forked from farsightsec/wdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
64 lines (56 loc) · 1.67 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
AC_PREREQ(2.60)
AC_INIT([wdns], [0.6])
AC_CONFIG_SRCDIR([wdns/wdns.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules subdir-objects])
AC_PROG_CC_STDC
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4])
AM_SILENT_RULES([yes])
LT_INIT
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([Makefile wdns/libwdns.pc])
PKG_PROG_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
# Horrible hack for systems where the pkg-config install directory is simply wrong!
if $PKG_CONFIG --variable=pc_path pkg-config 2>/dev/null | grep -q /libdata/; then
PKG_INSTALLDIR(['${prefix}/libdata/pkgconfig'])
else
PKG_INSTALLDIR
fi
else
AC_MSG_ERROR([pkg-config is required!])
fi
my_CFLAGS="-Wall \
-Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wpointer-arith -Wsign-compare -Wchar-subscripts \
-Wstrict-prototypes -Wshadow \
-Wformat-security"
AC_SUBST([my_CFLAGS])
AC_CHECK_HEADERS([alloca.h])
AC_CHECK_HEADER([pcap.h])
AC_CHECK_LIB([pcap], [pcap_loop],
[
AC_DEFINE([HAVE_LIBPCAP], [1], [Define to 1 if libpcap works.])
have_libpcap=true
],
[
have_libpcap=false
]
)
AM_CONDITIONAL([LIBPCAP], [test "$have_libpcap" = "true"])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
CC: ${CC}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
prefix: ${prefix}
sysconfdir: ${sysconfdir}
libdir: ${libdir}
includedir: ${includedir}
pkgconfigdir: ${pkgconfigdir}
])