1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([wmlongrun], [0.3.1], [wmaker-dev@googlegroups.com])
3 AC_CONFIG_SRCDIR([src/main.c])
5 AM_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
11 dnl Checks for header files.
15 dnl Specify paths to look for libraries and headers
16 dnl ===============================================
17 AC_ARG_WITH(libs-from,
18 [ --with-libs-from pass compiler flags to look for libraries],
19 [lib_search_path="$withval $lib_search_path"])
21 AC_ARG_WITH(incs-from,
22 [ --with-incs-from pass compiler flags to look for header files],
23 [inc_search_path="$withval $inc_search_path"])
26 dnl ===========================================
28 dnl ===========================================
32 X_LIBRARY_PATH=$x_libraries
38 XLIBS="-lX11 $X_EXTRA_LIBS"
41 lib_search_path="$lib_search_path $XLFLAGS -L/usr/local/lib"
42 inc_search_path="$inc_search_path $XCFLAGS -I/usr/local/include"
44 AC_SUBST(X_LIBRARY_PATH)
46 AC_CHECK_LIB(Xext, XShapeCombineMask,,
47 [echo "The shape extension stuff could not be found in the X client
50 $X_LIBS $X_EXTRA_LIBS -lX11)
52 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,,
53 [echo "The libXpm library was not found, but is necessary to build this
56 $X_LIBS $X_EXTRA_LIBS -lX11)
62 AC_SUBST(X_EXTRA_LIBS)
64 dnl ===============================================
65 dnl End of stuff that uses X
66 dnl ===============================================
72 [ --enable-debug enable debugging ],,enable_debug=no)
73 if test "$enable_debug" = yes; then
74 DFLAGS="-Wall -g -ansi -pedantic"
86 linux* | *-gnu | gnu*)
87 SETUID_FLAGS="-m 4755 -o root -g root"
89 AC_DEFINE([LINUX], [1], [use Linux specific code])
93 dnl AC_DEFINE(FREEBSD)
97 echo "${host_os} is NOT supported"
104 AC_SUBST(SETUID_FLAGS)
108 dnl =============================
109 dnl Checks for library functions.
110 dnl =============================
112 LIBRARY_SEARCH_PATH="$lib_search_path"
113 HEADER_SEARCH_PATH="$inc_search_path"
115 AC_SUBST(LIBRARY_SEARCH_PATH)
116 AC_SUBST(HEADER_SEARCH_PATH)
119 dnl Checks for header files.
120 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
121 AC_CHECK_HEADERS(string.h,, [
122 AC_CHECK_HEADERS(strings.h,,)])
124 dnl Checks for typedefs, structures, and compiler characteristics.
125 AC_CHECK_FUNCS(select)
127 dnl Checks for library functions.
129 AC_OUTPUT(Makefile src/Makefile doc/Makefile)