dnl Process this file with autoconf to produce a configure script. AC_INIT(src/fluxspace.cc) AM_INIT_AUTOMAKE(fluxspace, 0.0.3) AC_PREFIX_DEFAULT(/usr/local) AC_CHECK_PROGS(regex_cmd, sed) if test x$regex_cmd = "x"; then AC_MSG_ERROR([error. sed is required to build the default bbtoolsrc file.]) fi dnl get the debug values right AC_DEFUN(AC_SET_DEBUG, [ test "$CFLAGS" = "" && CFLAGS="-g -Wall -DDEBUG" test "$CXXFLAGS" = "" && CXXFLAGS="-g -Wall -DDEBUG" test "$LDFLAGS" = "" && LDFLAGS="" ]) AC_DEFUN(AC_SET_NODEBUG, [ test "$CFLAGS" = "" && CFLAGS="-O2 -Wall" test "$CXXFLAGS" = "" && CXXFLAGS="-O2 -Wall" test "$LDFLAGS" = "" && LDFLAGS="-s" ]) AC_ARG_ENABLE(debug,[ --enable-debug create debugging code [default=no]], [ if test $enableval = "no"; then AC_SET_NODEBUG else AC_SET_DEBUG fi ], AC_SET_NODEBUG) dnl Checks for programs. dnl needed by configure itsself AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_SWIG AM_PROG_LIBTOOL AC_HEADER_STDC AC_CHECK_HEADERS(ctype.h fcntl.h libgen.h locale.h process.h signal.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/stat.h sys/time.h sys/types.h sys/wait.h) AC_HEADER_TIME AC_CHECK_FUNCS(setlocale sigaction strftime) AC_PATH_X AC_PATH_XTRA CFLAGS="$CFLAGS $X_CFLAGS" CXXFLAGS="$CXXFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_PRE_LIBS" dnl Checks for X libraries. AC_CHECK_LIB(X11, XOpenDisplay, LDFLAGS="$LDFLAGS -lX11", AC_MSG_ERROR(XOpenDisplay not found in -lX11)) LDFLAGS="$LDFLAGS $X_EXTRA_LIBS" AC_MSG_CHECKING(for pixmap support) AC_ARG_WITH(imlib, [ --with-imlib[=DIR] compile with Imlib support (Imlib residing in DIR/lib) (default)], [ if test "$withval" != "no"; then AC_MSG_RESULT(yes) if test "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" fi USE_IMLIB=1 else AC_MSG_RESULT(no) GRLIBS="" USE_IMLIB=0 AC_WARN(*** Pixmap support has been disabled at your request. This ***) AC_WARN(*** is generally a bad idea since it really doesn't save ***) AC_WARN(*** much memory. And the developers almost never test that ***) AC_WARN(*** configuration. So I'd reconsider if I were you.... ***) fi], [AC_MSG_RESULT(yes) USE_IMLIB=1 ]) if test $USE_IMLIB -eq 1 ; then AC_CHECK_LIB(dl, dlopen, GRLIBS="-ldl", , $GRLIBS) AC_CHECK_LIB(ttf, TT_Init_FreeType, GRLIBS="-lttf $GRLIBS", , $GRLIBS) AC_CHECK_LIB(Imlib2, imlib_create_image, [ GRLIBS="-lImlib2 $GRLIBS" AC_DEFINE(HAVE_LIBIMLIB2) AC_DEFINE(PIXMAP_SUPPORT) AC_DEFINE(BACKING_STORE) ], [ AC_WARN(*** Pixmap support has been disabled because Imlib2 was not found ***) AC_WARN(*** or could not be linked. Eterm should still work, but it will ***) AC_WARN(*** not be very happy. Check config.log for more detailed ***) AC_WARN(*** information on why my attempt to link with Imlib2 failed. ***) ], $GRLIBS) LDFLAGS="$LDFLAGS $GRLIBS" fi dnl AM_PATH_PYTHON(2.2) AM_PATH_PYTHON AC_MSG_CHECKING(for python >= 2.2) prog=" import sys, string minver = (2,2,0,'final',0) if sys.version_info < minver: sys.exit(1) sys.exit(0)" if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC then AC_MSG_RESULT(okay) else AC_MSG_ERROR(too old) fi AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR(could not find Python libraries)]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(malloc.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_CHECK_FUNCS(select strstr) AC_OUTPUT(Makefile version.h src/Makefile bin/Makefile fluxlet/Makefile modules/Makefile doc/Makefile examples/Makefile )