1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(pwmd, 0.4, [Ben Kibbey bjk@luxsci.net])
4 AC_CONFIG_AUX_DIR(build)
6 AM_INIT_AUTOMAKE([foreign])
8 AC_CONFIG_SRCDIR([src/pwmd.c])
9 AM_CONFIG_HEADER([config.h])
10 AC_CONFIG_SUBDIRS([libpwmd])
17 dnl Is this a bug? The [[ and ]] are needed. Shouldn't it just be
22 AC_DEFINE([MMAP_ANONYMOUS_SHARED],, \
23 [Define if your mmap() supports MAP_ANONYMOUS with MAP_SHARED.])
31 CFLAGS="$CFLAGS -D_GNU_SOURCE"
33 dnl Checks for programs.
38 AM_PATH_GLIB_2_0(,, AC_MSG_ERROR([glib2 not found]))
39 AM_PATH_LIBGCRYPT(,, AC_MSG_ERROR([libgcrypt not found]))
41 dnl Checks for library functions.
42 AC_CHECK_PROG([have_xmlconfig], [xml2-config], [yes], [no])
44 if test "x$have_xmlconfig" = "xno"; then
45 AC_MSG_ERROR([xml2-config not found])
48 XML_CFLAGS="`xml2-config --cflags`"
49 XML_LIBS="`xml2-config --libs`"
54 dnl Checks for header files.
57 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h sys/time.h unistd.h \
60 dnl Checks for typedefs, structures, and compiler characteristics.
68 dnl Checks for library functions.
76 AC_FUNC_SELECT_ARGTYPES
77 AC_CHECK_FUNCS([mkdir strerror memset select socket strcasecmp strdup \
78 strncasecmp strchr setrlimit mlock mlockall ftruncate \
79 getcwd memmove munmap strrchr strtol strstr])
87 AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
89 AM_CONDITIONAL([WITH_DEBUG], [test "$ac_cv_sys_debug" = "yes"])
92 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging.]),
93 AC_DEBUG([$enableval]), AC_DEBUG)
97 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])