From 9430775cd3d27f8300d461c53dce1687db120e7a Mon Sep 17 00:00:00 2001 From: ltoetsch <> Date: Thu, 31 May 2001 10:26:41 +0000 Subject: [lcd4linux @ 2001-05-31 10:26:41 by ltoetsch] added tests for X and ncurses --- configure.in | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'configure.in') 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 -- cgit v1.2.3