-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
75 lines (66 loc) · 2.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
65
66
67
68
69
70
71
72
73
74
75
dnl
dnl File: configure.ac
dnl Revision: $Id: configure.ac,v 1.14 2010/06/14 12:50:57 j-nijhof Exp $
dnl Created: 2007/08/17
dnl Author: Jeroen Nijhof <jeroen@jeroennijhof.nl>
dnl R.K. Owen <rkowen@nersc.gov>
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ([2.59])
AC_COPYRIGHT([
See the included file: COPYING for copyright information.
])
AC_INIT([nfqueue-mnl], [0.1], [Maciej Puzio])
AC_CONFIG_AUX_DIR(config)
dnl MP foreign - forget about NEWS, AUTHORS and README files
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([nfqueue-test.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([config])
AC_USE_SYSTEM_EXTENSIONS
dnl --------------------------------------------------------------------
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl --------------------------------------------------------------------
# Checks for libraries.
AC_CHECK_LIB(mnl, mnl_socket_open, [],
[AC_MSG_ERROR([*** Sorry, you must install libmnl ***])])
AC_CHECK_LIB(mnl, mnl_socket_open2,
[AC_DEFINE(HAVE_MNL_SOCKET_OPEN2, 1, [Define to 1 if your system has mnl_socket_open2])], [])
dnl --------------------------------------------------------------------
AH_TOP([
/*****
**** nfqueue-mnl header ************************************************
**
** Description: config.h.in (generated by autoheader from configure.ac)
**
***********************************************************************
****/
])
dnl --------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([string.h syslog.h unistd.h])
AC_CHECK_HEADERS([libmnl/libmnl.h], [],
[AC_MSG_ERROR([*** Sorry, you must install the libmnl development module ***])])
AC_CHECK_HEADERS([linux/netfilter.h linux/netfilter/nfnetlink_queue.h linux/netfilter/nfnetlink_conntrack.h linux/netfilter/nf_conntrack_common.h], [],
[AC_MSG_ERROR([*** Sorry, you must install the netfilter development module ***])])
dnl --------------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
dnl --------------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_MALLOC
dnl --------------------------------------------------------------------
dnl MP Set compile and link options
CFLAGS="-O3 -Wall -Wno-unused-function -std=gnu11 -fstack-protector-all -fPIE -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-z,relro,-z,now -pie"
dnl --------------------------------------------------------------------
dnl Generate made files
AC_CONFIG_FILES([Makefile])
AC_OUTPUT