Only use a socket to connect to for security reasons. I may add
[pwmd.git] / configure.ac
blobe05d793048526c95c8eda421ab3d20f7c06fb582
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT(pwmd, 0.1-git1, [Ben Kibbey bjk@luxsci.net])
4 AC_CONFIG_AUX_DIR(build)
5 AC_CANONICAL_TARGET
6 AM_INIT_AUTOMAKE([foreign])
7 AC_PROG_MAKE_SET
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.
15 AC_PROG_AWK
16 AC_PROG_LN_S
17 AC_PROG_CC
18 AC_PROG_INSTALL
20 dnl Checks for library functions.
21 AC_CHECK_PROG([have_xmlconfig], [xml2-config], [yes], [no])
23 if test "x$have_xmlconfig" = "xno"; then
24     AC_MSG_ERROR([xml2-config not found])
27 XML_CFLAGS="`xml2-config --cflags`"
28 XML_LIBS="`xml2-config --libs`"
30 AC_SUBST(XML_CFLAGS)
31 AC_SUBST(XML_LIBS)
33 dnl Checks for header files.
34 AC_HEADER_STDC
35 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
37 dnl Checks for typedefs, structures, and compiler characteristics.
38 AC_C_CONST
39 AC_TYPE_SSIZE_T
40 AC_HEADER_TIME
42 dnl Checks for library functions.
43 AC_FUNC_FORK
44 AC_FUNC_REALLOC
45 AC_FUNC_SELECT_ARGTYPES
46 AC_TYPE_SIGNAL
47 AC_CHECK_FUNCS([gethostbyname memset select socket strcasecmp strdup strncasecmp])
49 AC_DEFUN([AC_DEBUG],
51     if test "$1"; then
52         ac_cv_sys_debug=$1
53     fi
55     AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
56         [ac_cv_sys_debug=no])
57     AM_CONDITIONAL([WITH_DEBUG], [test "$ac_cv_sys_debug" = "yes"])
60 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging.]),
61     AC_DEBUG([$enableval]), AC_DEBUG)
63 AM_WITH_DMALLOC
65 AC_CONFIG_FILES([Makefile src/Makefile])
66 AC_OUTPUT