Make AddMouseRegion's index unsigned
[dockapps.git] / wmfsm / configure.ac
blobf569c19848b79d5c1ba3c07a06f063813dcca44a
1 dnl Hey emacs -*- mode: m4 -*- thanks
2 dnl Process this file with autoconf to create a configure script
3 AC_INIT([wmfsm], [0.36], [wmaker-dev@googlegroups.com])
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 -ldockapp"
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 dnl Set default XPM
61 define([xpmlist], esyscmd([find wmfsm/ -name 'wmfsm_master_*.xpm' -exec basename {} .xpm \;| sed 's/wmfsm_master_//']))
62 AC_ARG_WITH([xpm],
63         AS_HELP_STRING([--with-xpm],
64         [Configure wmfsm to use specified xpm file for appearance. Defaults to
65         'highcolor'. Choices are: ]
66         xpmlist),
67         [],
68         [with_xpm=highcolor])
70 xpm="wmfsm/wmfsm_master_${with_xpm}.xpm"
71 if test ! -e "${xpm}"; then
72    AC_MSG_ERROR([Cannot find xpm file '${xpm}'.])
75 echo "configuring for ${with_xpm} appearance..."
76 rm -f wmfsm/wmfsm_master.xpm
77 ln -sr ${xpm} wmfsm/wmfsm_master.xpm
79 AC_OUTPUT(Makefile wmfsm/Makefile)