1 dnl Process this file with autoconf to produce a configure script.
4 dnl AC_INIT(src/main.c)
5 AC_INIT(wmmemload, 0.1.8, wmaker-dev@googlegroups.com)
10 AC_CONFIG_SRCDIR(src/main.c)
11 AM_CONFIG_HEADER(config.h)
13 dnl Checks for programs.
20 dnl Specify paths to look for libraries and headers
21 dnl ===============================================
22 AC_ARG_WITH(libs-from,
23 [ --with-libs-from pass compiler flags to look for libraries],
24 [lib_search_path="$withval $lib_search_path"])
26 AC_ARG_WITH(incs-from,
27 [ --with-incs-from pass compiler flags to look for header files],
28 [inc_search_path="$withval $inc_search_path"])
31 dnl ===========================================
33 dnl ===========================================
37 X_LIBRARY_PATH=$x_libraries
43 XLIBS="-lX11 $X_EXTRA_LIBS"
45 lib_search_path="$lib_search_path $XLFLAGS -L/usr/local/lib"
46 inc_search_path="$inc_search_path $XCFLAGS -I/usr/local/include"
48 AC_SUBST(X_LIBRARY_PATH)
52 AC_CHECK_LIB(Xext, XShapeCombineMask, [XLIBS="$XLIBS -lXext"],
53 [echo "The shape extension stuff could not be found in the X client libraries"
55 $X_LIBS $X_EXTRA_LIBS -lX11)
59 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [XLIBS="$XLIBS -lXpm"],
60 [echo "The libXpm library was not found, but is necessary to build this library"
62 $X_LIBS $X_EXTRA_LIBS -lX11)
68 AC_SUBST(X_EXTRA_LIBS)
70 dnl ===============================================
71 dnl End of stuff that uses X
72 dnl ===============================================
78 [ --enable-debug turn on debugging [default=on]],,enable_debug=no)
79 if test "$enable_debug" = yes; then
80 DFLAGS="-Wall -g -ansi -pedantic"
81 AC_DEFINE(DEBUG, 1, [use debug code])
118 echo "Sorry, ${host_os} is not supported yet"
125 AC_SUBST(SETGID_FLAGS)
128 if test "$ignore_buffers" = yes; then
129 AC_DEFINE(IGNORE_BUFFERS, 1, [use '--ignore-buffers' option])
131 if test "$ignore_cached" = yes; then
132 AC_DEFINE(IGNORE_CACHED, 1, [use '--ignore-cached' option])
134 if test "$ignore_wired" = yes; then
135 AC_DEFINE(IGNORE_WIRED, 1, [use '--ignore-wired' option])
139 dnl =============================
140 dnl Checks for library functions.
141 dnl =============================
143 LIBRARY_SEARCH_PATH="$lib_search_path"
144 HEADER_SEARCH_PATH="$inc_search_path"
146 AC_SUBST(LIBRARY_SEARCH_PATH)
147 AC_SUBST(HEADER_SEARCH_PATH)
149 dnl Checks for header files.
151 AC_CHECK_HEADERS([fcntl.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])
153 dnl Checks for typedefs, structures, and compiler characteristics.
158 dnl Checks for library functions.
160 AC_CHECK_FUNCS(select strtoul uname)
162 AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
165 dnl contrib/Makefile \
166 dnl contrib/wmmemmon.spec)