wmail: use AC_CONFIG_HEADERS to generate config.h.
[dockapps.git] / wmail / configure.in
blob84d2dedb9324e520eadef402a35b3bc27bcbc205
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/wmail.c)
3 AC_CONFIG_HEADERS(config.h)
5 dnl Checks for programs.
6 AC_PROG_CC
7 AC_PROG_MAKE_SET
9 dnl Checks for header files.
10 #AC_PATH_X
11 AC_HEADER_DIRENT
12 AC_HEADER_STDC
13 AC_CHECK_HEADERS(limits.h sys/time.h)
15 dnl Checks for X installation root directory.
16 AC_PATH_XTRA
17 X_LIBRARY_PATH="$x_libraries"
18 XLIBS="-lX11 $X_EXTRA_LIBS"
19 XCFLAGS="$X_CFLAGS"
20 XLFLAGS="$X_LIBS"
22 if test -n "$includedir"; then
23         XCFLAGS="$XCFLAGS -I$includedir"
26 if test -n "$libdir"; then
27         XLIBS="$XLIBS -L$libdir"
30 CPPFLAGS_old="$CPPFLAGS"
31 CPPFLAGS="$CPPFLAGS $XCFLAGS"
32 AC_CHECK_HEADER(dockapp.h,,)
33 CPPFLAGS="$CPPFLAGS_old"
35 AC_SUBST(XCFLAGS)
36 AC_SUBST(XLFLAGS)
37 AC_SUBST(XLIBS)
38 AC_SUBST(X_LIBRARY_PATH)
40 dnl Checks for typedefs, structures, and compiler characteristics.
41 AC_C_CONST
43 dnl Checks for library functions.
44 AC_FUNC_FNMATCH
45 AC_FUNC_UTIME_NULL
46 AC_FUNC_VPRINTF
47 AC_CHECK_FUNCS(strdup strstr memcpy)
49 dnl Checks for libraries.
50 AC_CHECK_LIB(X11, XCreateGC,,,$XLFLAGS $XLIBS)
51 AC_CHECK_LIB(dockapp, DAInitialize,,,$XLFLAGS $XLIBS)
53 dnl Enable Debugging?
54 AC_ARG_ENABLE(debug,
55                 [  --enable-debug         enable debugging ],, enable_debug=no)
56 if test "$enable_debug" = yes; then
57         CPPFLAGS="$CPPFLAGS -DDEBUG"
58         CFLAGS="$CFLAGS -Wall -g"
61 dnl Use delt's pixmaps instead of the default ones?
62 AC_ARG_ENABLE(delt_xpms,
63                 [  --enable-delt-xpms     enable delt's pixmaps ],, enable_delt_xpms=no)
64 if test "$enable_delt_xpms" = yes; then
65         CPPFLAGS="$CPPFLAGS -DUSE_DELT_XPMS"
68 AC_OUTPUT(Makefile src/Makefile)