1 AC_INIT(gwm, 0.0, gtw@gnu.org)
2 AC_CONFIG_SRCDIR(gwm.c)
4 AC_CONFIG_FILES(Makefile)
5 AC_CONFIG_HEADERS(config.h)
7 if test -f config.options; then
11 AC_DEFINE(_GNU_SOURCE,1,Enable GNU extensions on systems that have them.)
13 # Checks for programs:
17 # Checks for libraries:
18 # pkg-config packages which must be present:
20 # pkg-config xcb- packages which can optionally be used:
21 optional_xcb_packages="composite damage render shape xfixes"
23 AC_ARG_WITH(composite,[ --with-composite use the X Composite extension.])
24 AC_ARG_WITH(damage, [ --with-damage use the X DAMAGE extension.])
25 AC_ARG_WITH(render, [ --with-render use the X RENDER extension.])
26 AC_ARG_WITH(shape, [ --with-shape use the X SHAPE extension.])
27 AC_ARG_WITH(xfixes, [ --with-xfixes use the XFIXES extension.])
29 AH_TEMPLATE(USE_COMPOSITE,[Use the X Composite extension.])
30 AH_TEMPLATE(USE_DAMAGE,[Use the X DAMAGE extension.])
31 AH_TEMPLATE(USE_RENDER,[Use the X RENDER extension.])
32 AH_TEMPLATE(USE_SHAPE,[Use the X SHAPE extension.])
33 AH_TEMPLATE(USE_XFIXES,[Use the XFIXES extension.])
35 for i in $optional_xcb_packages; do
36 AC_MSG_CHECKING([for $i])
37 if eval test "x\$with_$i" = xno; then
38 AC_MSG_RESULT(disabled)
40 iname=`echo $i | tr 'a-z' 'A-Z'`
41 PKG_CHECK_EXISTS( xcb-$i,
43 packages="$packages xcb-$i"
44 AC_DEFINE_UNQUOTED(USE_$iname, 1)],
49 AC_SEARCH_LIBS(iconv, iconv)
51 # Checks for header files:
52 AC_CHECK_HEADERS(iconv.h mcheck.h poll.h)
54 # Checks for functions:
55 AC_CHECK_FUNCS(iconv mtrace ppoll)
57 PKG_CHECK_MODULES(XCB, $packages)