From dbc24925d2873aa3418cb08296af0039f4284f4e Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 19 Apr 2005 18:21:22 +0000 Subject: improve fltk detection improve fltk detection --- configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index aecf0dc..80f29f9 100644 --- a/configure.ac +++ b/configure.ac @@ -34,9 +34,14 @@ AC_TYPE_SIGNAL AC_CHECK_FUNCS([dup2 setenv strchr strdup strrchr strstr]) # Check for fltk -AC_ARG_WITH([fltk-dir], AS_HELP_STRING([--with-fltk-dir=DIR], [fltk is installed in DIR]), [CPPFLAGS="-I$withval/include ${_cppflags}" LDFLAGS="-L$withval/lib $LDFLAGS"], [CPPFLAGS="-I/usr/X11R6/include ${_cppflags}" LDFLAGS="-L/usr/X11R6/lib $LDFLAGS"]) -AC_CHECK_HEADERS([FL/Fl.H], [], [echo "Error: FL/Fl.H not found. Try './configure --with-fltk-dir=DIR'"; exit 1;]) -AC_CHECK_LIB([fltk], [open], [], [echo "Error: libfltk.so not found. Try './configure --with-fltk-dir=DIR'"; exit 1;]) +AC_PATH_PROG(FLTKCONFIG,fltk-config) +if test "x$FLTKCONFIG" = x; then + echo "fltk-config not found" + exit 1 +fi +CFLAGS="`$FLTKCONFIG --cflags` $CFLAGS" +CXXFLAGS="`$FLTKCONFIG --cflags` $CXXFLAGS" +LIBS="`$FLTKCONFIG --ldflags` $LIBS" # Check for X11 AC_CHECK_LIB([X11], [open], [], [echo "Error: libX11.so not found."; exit 1;]) -- cgit v1.2.3