1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([blacklistd],[0.1],[christos@netbsd.com])
3 AM_INIT_AUTOMAKE([subdir-objects foreign])
4 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
6 AC_CONFIG_HEADERS([config.h])
7 AC_CONFIG_MACRO_DIR([m4])
11 dnl Checks for programs.
13 AC_USE_SYSTEM_EXTENSIONS
18 LT_INIT([disable-static pic-only])
20 dnl Checks for headers
24 AC_CHECK_HEADERS(stdint.h fcntl.h stdint.h inttypes.h unistd.h)
25 AC_CHECK_HEADERS(sys/un.h sys/socket.h limits.h)
26 AC_CHECK_HEADERS(arpa/inet.h getopt.h err.h)
27 AC_CHECK_HEADERS(sys/types.h util.h sys/time.h time.h)
28 AC_CHECK_HEADERS(netatalk/at.h net/if_dl.h db.h db_185.h)
29 AC_CHECK_LIB(rt, clock_gettime)
30 AC_CHECK_LIB(db, __db185_open)
31 AC_CHECK_LIB(util, pidfile)
32 AC_CHECK_LIB(util, sockaddr_snprintf)
40 dnl Checks for typedefs, structures, and compiler characteristics.
45 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include <sys/socket.h>])
57 AC_MSG_CHECKING(for gcc compiler warnings)
58 AC_ARG_ENABLE(warnings,
59 [ --disable-warnings disable compiler warnings],
60 [if test "${enableval}" = no -o "$GCC" = no; then
65 WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
66 -Wmissing-declarations -Wredundant-decls -Wnested-externs \
67 -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
68 -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
70 if test "$GCC" = yes; then
72 WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
73 -Wmissing-declarations -Wredundant-decls -Wnested-externs \
74 -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
75 -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
81 dnl Checks for functions
82 AC_CHECK_FUNCS(strerror)
84 dnl Provide implementation of some required functions if necessary
85 AC_REPLACE_FUNCS(strtoi sockaddr_snprintf popenve clock_gettime strlcpy strlcat getprogname fparseln fgetln pidfile)
87 dnl See if we are cross-compiling
88 AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes)
90 AC_CONFIG_FILES([Makefile])