forked from onotelli/justniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac.in
97 lines (79 loc) · 2.26 KB
/
configure.ac.in
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
dnl
dnl Copyright (c) 2007-{{date.year}} Plecno s.r.l. All Rights Reserved
dnl via Giovio 8, 20144 Milano, Italy
dnl
dnl Released under the terms of the GPLv3 or later
dnl
dnl Author: Oreste Notelli <[email protected]>
dnl
AC_PREREQ(2.60)
AC_COPYRIGHT(2007-{{date.year}} (c) Plecno s.r.l)
AC_INIT(justniffer, [{{version}}], [email protected])
AC_DEFINE(JUSTNIFFER_VERSION, ["{{version}}"], [justniffer version])
AC_DEFINE(JUSTNIFFER_YEAR, ["{{date.year}}"], [justniffer year])
AC_CONFIG_MACRO_DIR([included])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE([disable])
AC_DEFINE([HAVE_LIB_PCAP], [], [has not libcap])
AM_CONFIG_HEADER(include/config.h)
AC_INIT([-Wall -Werror])
dnl if test "$CXXFLAGS" = ""; then
dnl CXXFLAGS="-Os -Wall"
dnl fi
LIBNIDS="libnids-1.21_patched"
NIDS2_INCLUDE="-I ../lib/$LIBNIDS/src"
NIDS2_LIB="-L../lib/$LIBNIDS/src -lnids2"
PCAP_LIB="-lpcap"
AC_SUBST(NIDS2_INCLUDE)
AC_SUBST(NIDS2_LIB)
AC_SUBST(PCAP_LIB)
AC_CHECK_PROG(BASH_F, bash, "yes")
echo "BASH_F= $BASH_F"
if test "$BASH_F" != "yes";
then
AC_MSG_ERROR(["cannot find bash shell, download and build it: see www.gnu.org/software/bash/"])
fi
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CXX (gcc)
AC_PROG_CPP
AC_PROG_INSTALL
AC_CHECK_HEADERS([sys/time.h])
AC_C_CONST
AC_C_INLINE
AC_FUNC_STRFTIME
AC_HEADER_STDBOOL
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_HEADER(netinet/ip.h, ,
AC_MSG_ERROR(["cannot find netinet/ip.h"]))
AC_PROG_LIBTOOL
AC_CHECK_LIB(pcap, pcap_open_live, AC_DEFINE(HAVE_LIB_PCAP))
AX_BOOST_BASE([1.46])
AX_BOOST_REGEX
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_IOSTREAMS
AC_CHECK_FILE(lib/$LIBNIDS/README.original, ,
[ AC_CHECK_PROG(PATCH, patch, yes, no)
if test "$PATCH" != yes;
then
AC_MSG_ERROR(["cannot find patch, download and build it: see http://www.gnu.org/software/patch/"])
fi
TAR_FOUND=""
AC_CHECK_PROG(TAR, tar, yes)
if test "$TAR" != yes;
then
AC_MSG_ERROR(["cannot find tar"])
fi
AC_CHECK_FILE(lib/$LIBNIDS/src/nids2.h, , AC_MSG_ERROR(["cannot find patched libnids"]))
]
)
AC_CONFIG_SUBDIRS([lib/libnids-1.21_patched])
AX_PYTHON
PYTHONCODEDIR=${datarootdir}/justniffer/scripts
AC_SUBST(PYTHONCODEDIR)
if test "$AX_PYTHON_ENABLED" == "enabled"; then
PYTHONSUBDIR="python"
fi
AC_SUBST(PYTHONSUBDIR)
AC_OUTPUT(Makefile src/Makefile python/Makefile )