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([{ git describe 2>/dev/null || echo devel; } | tr -d '\n'])],
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 # Checks for programs.
28 AC_ARG_VAR([ASCIIDOC], [asciidoc doc generation tool])
29 AC_ARG_VAR([XMLTO], [xmlto converter from xml to other formats])
30 AC_ARG_VAR([DOXYGEN], [doxygen source documentation system])
32 test "x$ASCIIDOC" = "x" && AC_PATH_PROG([ASCIIDOC], [asciidoc], [:])
33 test "x$XMLTO" = "x" && AC_PATH_PROG([XMLTO], [xmlto], [:])
34 test "x$DOXYGEN" = "x" && AC_PATH_PROG([DOXYGEN], [doxygen], [:])
36 test "x$ASCIIDOC" = "x:" && AC_MSG_WARN([awesome requires asciidoc])
37 test "x$XMLTO" = "x:" && AC_MSG_WARN([awesome requires xmlto])
38 test "x$DOXYGEN" = "x:" && AC_MSG_WARN([awesome requires doxygen])
40 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$ASCIIDOC" != "x:"])
41 AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x:"])
42 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x:"])
44 AM_CONDITIONAL([USING_GCC], [test "x$GCC" = "xyes"])
46 # Checks for libraries.
48 PKG_CHECK_MODULES([CAIRO], [cairo],,
49 [AC_MSG_ERROR([awesome requires cairo.])])
50 PKG_CHECK_MODULES([CONFUSE], [libconfuse >= 2.6],,
51 [AC_MSG_ERROR([awesome requires libconfuse >= 2.6.])])
52 PKG_CHECK_MODULES([XFT], [xft],,
53 [AC_MSG_ERROR([awesome requires xft.])])
54 PKG_CHECK_MODULES([XINERAMA], [xinerama],,
55 [AC_MSG_ERROR([awesome requires Xinerama.])])
56 PKG_CHECK_MODULES([XRANDR], [xrandr],,
57 [AC_MSG_ERROR([awesome requires Xrandr.])])
59 # Checks for header files.
63 AC_CHECK_HEADERS([fcntl.h limits.h locale.h stdlib.h string.h sys/socket.h unistd.h])
65 # Checks for typedefs, structures, and compiler characteristics.
71 # Checks for library functions.
74 AC_FUNC_SELECT_ARGTYPES
77 AC_CHECK_FUNCS([memchr regcomp select setenv socket strchr strrchr strstr])
79 AC_CONFIG_FILES([Makefile])
80 AC_CONFIG_FILES([awesome.doxygen])