2 # Process this file with autoreconf to produce a configure script.
5 dnl Each time you want an updated version number for your build, you need to
6 dnl (re-)run autoreconf.
7 AC_INIT([awesome window manager],
8 [m4_esyscmd([./build-utils/package-version . version-stamp])],
9 [http://awesome.naquadah.org/bugs/],
11 AC_CONFIG_AUX_DIR([auto-aux])
12 AC_CONFIG_SRCDIR([awesome.c])
13 dnl The AC_CONFIG_HEADER and awesome's own config.h are different beasts
14 dnl AC_CONFIG_HEADER([config.h])
16 dnl check-news to check that NEWS has been adapted to current version
17 dnl std-options make sure shipped executables understand --help and --version
18 AM_INIT_AUTOMAKE([-Wall -Werror 1.10 dist-bzip2 foreign filename-length-max=99 foreign subdir-objects])
20 AC_DEFINE_UNQUOTED([RELEASE], ["Productivity Breaker"])
22 AC_MSG_CHECKING([package version according to autoconf])
23 AC_MSG_RESULT([${PACKAGE_VERSION}])
24 AC_MSG_CHECKING([package version according to version script])
25 version_script=`"${srcdir}/build-utils/package-version" "${srcdir}" version-stamp`
26 AC_MSG_RESULT([${version_script}])
28 # Checks for programs.
34 AC_ARG_VAR([ASCIIDOC], [asciidoc doc generation tool])
35 AC_ARG_VAR([XMLTO], [xmlto converter from xml to other formats])
36 AC_ARG_VAR([DOXYGEN], [doxygen source documentation system])
38 test "x$ASCIIDOC" = "x" && AC_PATH_PROG([ASCIIDOC], [asciidoc], [:])
39 test "x$XMLTO" = "x" && AC_PATH_PROG([XMLTO], [xmlto], [:])
40 test "x$DOXYGEN" = "x" && AC_PATH_PROG([DOXYGEN], [doxygen], [:])
42 test "x$ASCIIDOC" = "x:" && AC_MSG_WARN([awesome requires asciidoc])
43 test "x$XMLTO" = "x:" && AC_MSG_WARN([awesome requires xmlto])
44 test "x$DOXYGEN" = "x:" && AC_MSG_WARN([awesome requires doxygen])
46 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$ASCIIDOC" != "x:"])
47 AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x:"])
48 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x:"])
50 AM_CONDITIONAL([USING_GCC], [test "x$GCC" = "xyes"])
52 # Checks for libraries.
54 PKG_CHECK_MODULES([CAIRO], [cairo],,
55 [AC_MSG_ERROR([awesome requires cairo.])])
56 PKG_CHECK_MODULES([CONFUSE], [libconfuse >= 2.6],,
57 [AC_MSG_ERROR([awesome requires libconfuse >= 2.6.])])
58 PKG_CHECK_MODULES([XFT], [xft],,
59 [AC_MSG_ERROR([awesome requires xft.])])
60 PKG_CHECK_MODULES([XINERAMA], [xinerama],,
61 [AC_MSG_ERROR([awesome requires Xinerama.])])
62 PKG_CHECK_MODULES([XRANDR], [xrandr],,
63 [AC_MSG_ERROR([awesome requires Xrandr.])])
65 # Checks for header files.
69 AC_CHECK_HEADERS([fcntl.h limits.h locale.h stdlib.h string.h sys/socket.h unistd.h])
71 # Checks for typedefs, structures, and compiler characteristics.
77 # Checks for library functions.
80 AC_FUNC_SELECT_ARGTYPES
83 AC_CHECK_FUNCS([memchr regcomp select setenv socket strchr strrchr strstr])
85 AC_CONFIG_FILES([Makefile])
86 AC_CONFIG_FILES([awesome.doxygen])