Ignore:
Timestamp:
Mar 15, 2006, 10:57:04 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Do not fail if SLsmg_utf8_enable was not found, just disable UTF-8 support in the SLang driver.
  • Cosmetic fixes in configure.ac.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r585 r610  
    5858AC_TRY_COMPILE([#include <windows.h>],[Sleep(42);],
    5959 [AC_MSG_RESULT(yes)
    60   AC_DEFINE(HAVE_SLEEP, 1, [Define if you have Windows' Sleep])],
     60  AC_DEFINE(HAVE_SLEEP, 1, [Define to 1 if you have the `Sleep' function.])],
    6161 [AC_MSG_RESULT(no)])
    6262AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
     
    7272      AC_MSG_RESULT(yes)
    7373      AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
    74                 Define if <pc.h> defines ScreenUpdate.)
    75       AC_DEFINE(USE_CONIO, 1, Define to activate the conio.h backend driver)
     74                Define to 1 if <pc.h> defines ScreenUpdate.)
     75      AC_DEFINE(USE_CONIO, 1, Define to 1 to activate the conio.h backend driver)
    7676      CACA_DRIVERS="${CACA_DRIVERS} conio"],
    7777     [AC_MSG_RESULT(no)])])
     
    8989      AC_MSG_RESULT(yes)
    9090      AC_DEFINE(ALLOCCONSOLE_IN_WINDOWS_H, 1,
    91                 Define if <windows.h> defines AllocConsole.)
    92       AC_DEFINE(USE_WIN32, 1, Define to activate the win32 backend driver)
     91                Define to 1 if <windows.h> defines AllocConsole.)
     92      AC_DEFINE(USE_WIN32, 1, Define to 1 to activate the win32 backend driver)
    9393      CACA_DRIVERS="${CACA_DRIVERS} win32"],
    9494     [AC_MSG_RESULT(no)])])
     
    101101  ac_cv_my_have_slang="no"
    102102  AC_CHECK_HEADERS(slang.h slang/slang.h,
    103    [AC_CHECK_LIB(slang, SLsmg_utf8_enable,
    104      [ac_cv_my_have_slang="yes"
    105       AC_DEFINE(USE_SLANG, 1, Define to activate the slang backend driver (needs slang-utf8))
    106       CPPFLAGS="${CPPFLAGS} -DOPTIMISE_SLANG_PALETTE=1"
    107       CACA_LIBS="${CACA_LIBS} -lslang"
    108       CACA_DRIVERS="${CACA_DRIVERS} slang"])])
     103   [ac_cv_my_have_slang="yes"
     104    AC_DEFINE(USE_SLANG, 1, Define to 1 to activate the slang backend driver)
     105    AC_CHECK_LIB(slang, SLsmg_utf8_enable,
     106     [AC_DEFINE(HAVE_SLSMG_UTF8_ENABLE, 1, Define to 1 if you have the `SLsmg_utf8_enable' function.)])
     107    CPPFLAGS="${CPPFLAGS} -DOPTIMISE_SLANG_PALETTE=1"
     108    CACA_LIBS="${CACA_LIBS} -lslang"
     109    CACA_DRIVERS="${CACA_DRIVERS} slang"
     110    break])
    109111  if test "${ac_cv_my_have_slang}" = "no" -a "${enable_slang}" = "yes"; then
    110112    AC_MSG_ERROR([cannot find slang development files])
     
    118120    if test -n "${x_includes}"; then X_CFLAGS="-I${x_includes}"; fi
    119121    if test -n "${x_libraries}"; then X_LIBS="-lX11 -L${x_libraries}"; fi
    120     AC_DEFINE(USE_X11, 1, Define to activate the X11 backend driver)
     122    AC_DEFINE(USE_X11, 1, Define to 1 to activate the X11 backend driver)
    121123    CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
    122124    CACA_LIBS="${CACA_LIBS} ${X_LIBS}"
     
    132134if test "${enable_gl}" != "no"; then
    133135  ac_cv_my_have_gl="no"
    134   AC_CHECK_HEADERS(GL/gl.h GL/glut.h,
    135    [AC_CHECK_LIB(glut, glutMainLoopEvent,
    136      [ac_cv_my_have_gl="yes"
    137       AC_DEFINE(USE_GL, 1, Define to activate the OpenGL backend driver)
    138       CACA_LIBS="${CACA_LIBS} -lGL -lglut"
    139       CACA_DRIVERS="${CACA_DRIVERS} gl"])])
     136  AC_CHECK_HEADERS(GL/gl.h,
     137   [AC_CHECK_HEADERS(GL/glut.h,
     138     [AC_CHECK_LIB(glut, glutMainLoopEvent,
     139       [ac_cv_my_have_gl="yes"
     140        AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
     141        CACA_LIBS="${CACA_LIBS} -lGL -lglut"
     142        CACA_DRIVERS="${CACA_DRIVERS} gl"])])])
    140143  if test "${ac_cv_my_have_gl}" = "no" -a "${enable_gl}" = "yes"; then
    141144    AC_MSG_ERROR([cannot find OpenGL+FreeGLUT development files])
     
    147150  AC_CHECK_HEADERS(sys/socket.h,
    148151     [ac_cv_my_have_network="yes"
    149       AC_DEFINE(USE_NETWORK, 1, Define to activate the network backend driver)
     152      AC_DEFINE(USE_NETWORK, 1, Define to 1 to activate the network backend driver)
    150153      CACA_DRIVERS="${CACA_DRIVERS} network"])
    151154  if test "${ac_cv_my_have_network}" = "no" -a "${enable_network}" = "yes"; then
     
    159162   [AC_CHECK_LIB(ncurses, initscr,
    160163     [ac_cv_my_have_ncurses="yes"
    161       AC_DEFINE(USE_NCURSES, 1, Define to activate the ncurses backend driver)
     164      AC_DEFINE(USE_NCURSES, 1, Define to 1 to activate the ncurses backend driver)
    162165      CACA_LIBS="${CACA_LIBS} -lncurses"
    163166      CACA_DRIVERS="${CACA_DRIVERS} ncurses"
     
    166169      LIBS="${LIBS} -lncurses"
    167170      AC_CHECK_FUNCS(resizeterm resize_term)
    168       LIBS="${SAVED_LIBS}"])])
     171      LIBS="${SAVED_LIBS}"])
     172    break])
    169173  if test "${ac_cv_my_have_ncurses}" = "no" -a "${enable_ncurses}" = "yes"; then
    170174    AC_MSG_ERROR([cannot find ncurses development files])
     
    178182  CCASFLAGS="${CCASFLAGS} -I."
    179183  LDFLAGS="${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"
    180   AC_DEFINE(USE_VGA, 1, Define to activate the VGA backend driver)
     184  AC_DEFINE(USE_VGA, 1, Define to 1 to activate the VGA backend driver)
    181185  CACA_DRIVERS="${CACA_DRIVERS} vga"
    182186fi
Note: See TracChangeset for help on using the changeset viewer.