wmfsm: Improve manpage.
[dockapps.git] / wmfsm / configure.ac
blob7ed0c7aa89647b00e59f164d8d061820aa1fbc92
1 dnl Hey emacs -*- mode: m4 -*- thanks
2 dnl Process this file with autoconf to create a configure script
3 AC_INIT([wmfsm], [0.34])
4 AC_CONFIG_SRCDIR([wmfsm/wmfsm.c])
5 AM_INIT_AUTOMAKE
6 AC_CANONICAL_HOST
7 AM_CONFIG_HEADER(config.h)
9 AM_SANITY_CHECK
10 AC_PROG_CC
11 AC_PROG_INSTALL
12 AC_PROG_MAKE_SET
13 AC_PROG_RANLIB
15 dnl Checks for libraries
16 AC_PATH_XTRA
17 X11LIBS="-L$x_libraries -I$x_includes -lX11 -lXpm -lXext"
18 AC_SUBST(X11LIBS)
19 AC_MSG_CHECKING([to see if we can use X])
20 AC_TRY_LINK([#include <X11/Xlib.h>],,AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]); exit 1)
22 dnl Checks how to call statfs
23 AC_MSG_CHECKING([how to call statfs]) 
24 AC_TRY_COMPILE([#include <sys/vfs.h>
25 #include <sys/param.h>
26 #include <sys/mount.h>
28 [struct statfs a; statfs("/", &a);], 
29 [AC_MSG_RESULT([2 arguments]) 
30 AC_DEFINE(
31         STATFS_2_ARGUMENTS, 1,
32         [Define if statfs takes two arguments (like linux)])
33 ac_statfs_args=2], 
35 AC_TRY_COMPILE([
36 #include <sys/types.h>
37 #include <sys/statfs.h>
39 [struct statfs a; statfs("/", &a, sizeof(struct statfs), 0);],
40 [AC_MSG_RESULT([4 arguments]) 
41 AC_DEFINE(
42         STATFS_4_ARGUMENTS, 1,
43         [Define if statfs takes four arguments (like SunOS)])
45 AC_MSG_RESULT([Can not determine])))
48 dnl Checks for header files
49 AC_HEADER_STDC
50 AC_CHECK_HEADERS(unistd.h sys/statfs.h sys/vfs.h sys/param.h sys/mount.h)
52 dnl Checks for typedefs, structures, and compiler characteristics.
53 AC_C_CONST
55 dnl Checks for library functions.
56 AC_CHECK_FUNCS(gethostname strcspn strdup strspn strstr statfs)
57 AC_CHECK_FUNCS(getopt_long, have_getopt=true)
58 AM_CONDITIONAL(GETOPT, test x$have_getopt = xtrue)
60 AC_OUTPUT(Makefile wmfsm/Makefile wmgeneral/Makefile)