diff options
author | ltoetsch <> | 2001-05-31 10:26:41 +0000 |
---|---|---|
committer | ltoetsch <> | 2001-05-31 10:26:41 +0000 |
commit | 9430775cd3d27f8300d461c53dce1687db120e7a (patch) | |
tree | d63d64de9e01af8e6c6422f4b3707f508ea13e21 /configure.in | |
parent | 7c2adf6a7c1e9e46f6815305c49b90b836ccf9e8 (diff) | |
download | lcd4linux-9430775cd3d27f8300d461c53dce1687db120e7a.tar.gz |
[lcd4linux @ 2001-05-31 10:26:41 by ltoetsch]
added tests for X and ncurses
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 376be74..d89ff8e 100644 --- a/configure.in +++ b/configure.in @@ -12,6 +12,10 @@ AC_PROG_LN_S dnl Checks for libraries. AC_CHECK_LIB(m, log) +dnl curses +sinclude(curses.m4) +AC_CHECK_CURSES + dnl Checks for X11 AC_PATH_XTRA @@ -151,18 +155,29 @@ if test "$SKELETON" = "yes"; then fi if test "$TEXT" = "yes"; then - DRIVERS="$DRIVERS Text.o" - DRVLIBS="$DRVLIBS -lncurses" - AC_DEFINE(WITH_TEXT) + if test "$has_curses" = true; then + DRIVERS="$DRIVERS Text.o" + DRVLIBS="$DRVLIBS $CURSES_LIBS" + CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES" + AC_DEFINE(WITH_TEXT) + else + AC_MSG_WARN(curses not found: Text driver disabled) + fi fi if test "$X11" = "yes"; then - if test "$no_x" = "yes"; then - AC_MSG_ERROR([cannot build X11 driver: headers or libraries not available]) - fi - DRIVERS="$DRIVERS XWindow.o" - DRVLIBS="$DRVLIBS -lX11" - AC_DEFINE(WITH_X11) + if test "$have_x" != yes; then + AC_MSG_WARN(X not found: X11 driver disabled) + else + if test "$no_x" = "yes"; then + AC_MSG_ERROR([cannot build X11 driver: headers or libraries not available]) + fi + DRIVERS="$DRIVERS XWindow.o" + # DRVLIBS="$DRVLIBS -lX11" + DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11" + # CPPFLAGS="$CPPFLAGS -I$ac_x_includes" + AC_DEFINE(WITH_X11) + fi fi dnl Raster.o depends on PPM or PNG |