xref: /minix3/external/bsd/blacklist/port/configure.ac (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambucdnl Process this file with autoconf to produce a configure script.
2*0a6a1f1dSLionel SambucAC_INIT([blacklistd],[0.1],[christos@netbsd.com])
3*0a6a1f1dSLionel SambucAM_INIT_AUTOMAKE([subdir-objects foreign])
4*0a6a1f1dSLionel Sambucm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
5*0a6a1f1dSLionel Sambuc
6*0a6a1f1dSLionel SambucAC_CONFIG_HEADERS([config.h])
7*0a6a1f1dSLionel SambucAC_CONFIG_MACRO_DIR([m4])
8*0a6a1f1dSLionel Sambuc
9*0a6a1f1dSLionel SambucAC_SUBST(WARNINGS)
10*0a6a1f1dSLionel Sambuc
11*0a6a1f1dSLionel Sambucdnl Checks for programs.
12*0a6a1f1dSLionel SambucAC_PROG_CC_STDC
13*0a6a1f1dSLionel SambucAC_USE_SYSTEM_EXTENSIONS
14*0a6a1f1dSLionel SambucAM_PROG_CC_C_O
15*0a6a1f1dSLionel SambucAC_C_BIGENDIAN
16*0a6a1f1dSLionel SambucAC_PROG_INSTALL
17*0a6a1f1dSLionel SambucAC_PROG_LN_S
18*0a6a1f1dSLionel SambucLT_INIT([disable-static pic-only])
19*0a6a1f1dSLionel Sambucgl_VISIBILITY
20*0a6a1f1dSLionel Sambucdnl Checks for headers
21*0a6a1f1dSLionel SambucAC_HEADER_STDC
22*0a6a1f1dSLionel SambucAC_HEADER_MAJOR
23*0a6a1f1dSLionel SambucAC_HEADER_SYS_WAIT
24*0a6a1f1dSLionel SambucAC_CHECK_HEADERS(stdint.h fcntl.h stdint.h inttypes.h unistd.h)
25*0a6a1f1dSLionel SambucAC_CHECK_HEADERS(sys/un.h sys/socket.h limits.h)
26*0a6a1f1dSLionel SambucAC_CHECK_HEADERS(arpa/inet.h getopt.h err.h)
27*0a6a1f1dSLionel SambucAC_CHECK_HEADERS(sys/types.h util.h sys/time.h time.h)
28*0a6a1f1dSLionel SambucAC_CHECK_HEADERS(netatalk/at.h net/if_dl.h db.h db_185.h)
29*0a6a1f1dSLionel SambucAC_CHECK_LIB(rt, clock_gettime)
30*0a6a1f1dSLionel SambucAC_CHECK_LIB(db, __db185_open)
31*0a6a1f1dSLionel SambucAC_CHECK_LIB(util, pidfile)
32*0a6a1f1dSLionel SambucAC_CHECK_LIB(util, sockaddr_snprintf)
33*0a6a1f1dSLionel Sambuc
34*0a6a1f1dSLionel SambucAH_BOTTOM([
35*0a6a1f1dSLionel Sambuc#ifndef __NetBSD__
36*0a6a1f1dSLionel Sambuc#include "port.h"
37*0a6a1f1dSLionel Sambuc#endif
38*0a6a1f1dSLionel Sambuc])
39*0a6a1f1dSLionel Sambuc
40*0a6a1f1dSLionel Sambucdnl Checks for typedefs, structures, and compiler characteristics.
41*0a6a1f1dSLionel SambucAC_C_CONST
42*0a6a1f1dSLionel SambucAC_TYPE_OFF_T
43*0a6a1f1dSLionel SambucAC_TYPE_SIZE_T
44*0a6a1f1dSLionel SambucAC_SYS_LARGEFILE
45*0a6a1f1dSLionel SambucAC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include <sys/socket.h>])
46*0a6a1f1dSLionel Sambuc
47*0a6a1f1dSLionel SambucAC_TYPE_PID_T
48*0a6a1f1dSLionel SambucAC_TYPE_UINT8_T
49*0a6a1f1dSLionel SambucAC_TYPE_UINT16_T
50*0a6a1f1dSLionel SambucAC_TYPE_UINT32_T
51*0a6a1f1dSLionel SambucAC_TYPE_INT32_T
52*0a6a1f1dSLionel SambucAC_TYPE_UINT64_T
53*0a6a1f1dSLionel SambucAC_TYPE_INT64_T
54*0a6a1f1dSLionel SambucAC_TYPE_INTPTR_T
55*0a6a1f1dSLionel SambucAC_TYPE_UINTPTR_T
56*0a6a1f1dSLionel Sambuc
57*0a6a1f1dSLionel SambucAC_MSG_CHECKING(for gcc compiler warnings)
58*0a6a1f1dSLionel SambucAC_ARG_ENABLE(warnings,
59*0a6a1f1dSLionel Sambuc[  --disable-warnings	disable compiler warnings],
60*0a6a1f1dSLionel Sambuc[if test "${enableval}" = no -o "$GCC" = no; then
61*0a6a1f1dSLionel Sambuc   AC_MSG_RESULT(no)
62*0a6a1f1dSLionel Sambuc   WARNINGS=
63*0a6a1f1dSLionel Sambucelse
64*0a6a1f1dSLionel Sambuc   AC_MSG_RESULT(yes)
65*0a6a1f1dSLionel Sambuc   WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
66*0a6a1f1dSLionel Sambuc       -Wmissing-declarations -Wredundant-decls -Wnested-externs \
67*0a6a1f1dSLionel Sambuc       -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
68*0a6a1f1dSLionel Sambuc       -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
69*0a6a1f1dSLionel Sambucfi], [
70*0a6a1f1dSLionel Sambucif test "$GCC" = yes; then
71*0a6a1f1dSLionel Sambuc   AC_MSG_RESULT(yes)
72*0a6a1f1dSLionel Sambuc   WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
73*0a6a1f1dSLionel Sambuc       -Wmissing-declarations -Wredundant-decls -Wnested-externs \
74*0a6a1f1dSLionel Sambuc       -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
75*0a6a1f1dSLionel Sambuc       -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
76*0a6a1f1dSLionel Sambucelse
77*0a6a1f1dSLionel Sambuc   WARNINGS=
78*0a6a1f1dSLionel Sambuc   AC_MSG_RESULT(no)
79*0a6a1f1dSLionel Sambucfi])
80*0a6a1f1dSLionel Sambuc
81*0a6a1f1dSLionel Sambucdnl Checks for functions
82*0a6a1f1dSLionel SambucAC_CHECK_FUNCS(strerror)
83*0a6a1f1dSLionel Sambuc
84*0a6a1f1dSLionel Sambucdnl Provide implementation of some required functions if necessary
85*0a6a1f1dSLionel SambucAC_REPLACE_FUNCS(strtoi sockaddr_snprintf popenve clock_gettime strlcpy strlcat getprogname fparseln fgetln pidfile)
86*0a6a1f1dSLionel Sambuc
87*0a6a1f1dSLionel Sambucdnl See if we are cross-compiling
88*0a6a1f1dSLionel SambucAM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes)
89*0a6a1f1dSLionel Sambuc
90*0a6a1f1dSLionel SambucAC_CONFIG_FILES([Makefile])
91*0a6a1f1dSLionel SambucAC_OUTPUT
92