diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-04-19 18:21:22 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-04-19 18:21:22 +0000 |
commit | dbc24925d2873aa3418cb08296af0039f4284f4e (patch) | |
tree | 196c490c7c670038bf936cf597f28a229cf64765 | |
parent | b2b71fdf0e4ca56b8dc353e0df7f52d005acbae9 (diff) |
improve fltk detection
improve fltk detection
-rw-r--r-- | configure.ac | 11 |
1 files 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;]) |