1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(pwmd, 0.1, [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])
12 CFLAGS="$CFLAGS -D_GNU_SOURCE"
14 dnl Checks for programs.
19 AM_PATH_GLIB_2_0(,, AC_MSG_ERROR([glib not found]))
21 dnl Checks for library functions.
22 AC_CHECK_PROG([have_xmlconfig], [xml2-config], [yes], [no])
24 if test "x$have_xmlconfig" = "xno"; then
25 AC_MSG_ERROR([xml2-config not found])
28 XML_CFLAGS="`xml2-config --cflags`"
29 XML_LIBS="`xml2-config --libs`"
34 dnl Checks for header files.
37 AC_CHECK_HEADERS([fcntl.h arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
39 dnl Checks for typedefs, structures, and compiler characteristics.
44 dnl Checks for library functions.
47 AC_FUNC_SELECT_ARGTYPES
49 AC_CHECK_FUNCS([mkdir strerror gethostbyname memset select socket strcasecmp strdup strncasecmp])
57 AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
59 AM_CONDITIONAL([WITH_DEBUG], [test "$ac_cv_sys_debug" = "yes"])
62 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging.]),
63 AC_DEBUG([$enableval]), AC_DEBUG)
67 AC_CONFIG_FILES([Makefile src/Makefile])