# Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([BadWM],[0.1.1],[badwm-devel@lists.sourceforge.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([src/include/config.h]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL # Checks for X AC_PATH_X AC_PATH_XTRA test x$no_x = "xyes" && AC_MSG_ERROR([BadWM requires the X Window System libraries and headers.]) test x$x_includes = "x" && x_includes="/usr/include" test x$x_libraries = "x" && x_libraries="/usr/lib" CFLAGS="$CFLAGS $X_CFLAGS" CXXFLAGS="$CXXFLAGS $X_CFLAGS" LIBS="$LIBS $X_LIBS" LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" # Checks for libraries. AC_CHECK_LIB(X11, XOpenDisplay, LIBS="$LIBS -lX11", AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.]) ) LIBS="$LIBS $X_EXTRA_LIBS" AC_CHECK_LIB(Xext, XShapeQueryExtension, LIBS="$LIBS -lXext", AC_MSG_ERROR([Could not find XShapeQueryExtension in -lXext.]) ) LIBS="$LIBS $X_EXTRA_LIBS" # Checks for header files. AC_PATH_X AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_CHECK_FUNCS([putenv]) AC_CHECK_FUNCS([strchr]) AC_CHECK_FUNCS([strdup]) AC_CHECK_FUNCS([strcasecmp]) AC_CHECK_FUNCS([strerror]) AC_FUNC_REALLOC AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], [ if test x$enableval = xyes; then AC_DEFINE(DEBUG,1,"") fi ]) AM_CONDITIONAL(DEBUG, test x$debug = xtrue) AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) AC_OUTPUT