Ignore:
Timestamp:
Feb 17, 2004, 2:53:14 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + No longer check for ncurses etc., we use caca-config.
  • src/*: + Updated to new libcaca API, mainly caca_get_event() and caca_set_color()

calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/configure.ac

    r191 r365  
    1313AM_PROG_CC_C_O
    1414AC_PROG_CPP
    15 AC_PROG_RANLIB
    1615
    1716dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
     
    1918AC_EGREP_CPP(foo,foo)
    2019
    21 AC_ARG_ENABLE(slang,
    22   [  --enable-slang          slang graphics support (default enabled)])
    23 AC_ARG_ENABLE(ncurses,
    24   [  --enable-ncurses        ncurses graphics support (default disabled)])
    25 AC_ARG_ENABLE(conio,
    26   [  --enable-conio          DOS conio.h graphics support (default disabled)])
    27 
    28 USE_SLANG=false
    29 USE_NCURSES=false
    30 USE_CONIO=false
    31 if test "${enable_conio}" = "yes"; then
    32   AC_CHECK_HEADER(conio.h,:,AC_MSG_ERROR([cannot find conio.h header]))
    33   AC_MSG_CHECKING(for ScreenUpdate in pc.h)
    34   AC_EGREP_HEADER(ScreenUpdate,pc.h,[
    35     AC_MSG_RESULT(yes)
    36     AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
    37               Define if <pc.h> defines ScreenUpdate.)],[
    38     AC_MSG_RESULT(no)])
    39   AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h)
    40   USE_CONIO=:
    41 elif test "${enable_ncurses}" = "yes"; then
    42   AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers]))
    43   AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library]))
    44   AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses)
    45   USE_NCURSES=:
    46 elif test "${enable_slang}" != "no"; then
    47   AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers]))
    48   AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library]))
    49   AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang)
    50   USE_SLANG=:
     20AC_MSG_CHECKING(for libcaca support)
     21video_caca=no
     22AC_TRY_COMPILE([
     23  #include <caca.h>
     24],[ ],[video_caca=yes])
     25AC_MSG_RESULT($video_caca)
     26if test "$video_caca" = "yes"; then
     27  CACA_CFLAGS="${CFLAGS} `caca-config --cflags`"
     28  CACA_LIBS="${LIBS} `caca-config --libs`"
     29  AC_SUBST(CACA_CFLAGS)
     30  AC_SUBST(CACA_LIBS)
     31else
     32  AC_MSG_ERROR([cannot find libcaca])
    5133fi
    52 
    53 AM_CONDITIONAL(USE_SLANG, ${USE_SLANG})
    54 AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES})
    5534
    5635# Optimizations
Note: See TracChangeset for help on using the changeset viewer.