-
Notifications
You must be signed in to change notification settings - Fork 17
/
configure.ac
50 lines (41 loc) · 1.51 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([ipdecap], [0.7.2], [[email protected]])
AC_CANONICAL_HOST
AC_CONFIG_SRCDIR([src/ipdecap.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CC
case $host in
*-*-freebsd*)
CPPFLAGS="${CFLAGS} -I/usr/local/include -L/usr/local/lib"
;;
*-apple-darwin*)
CPPFLAGS="${CFLAGS} -I/opt/local/include -L/opt/local/lib"
;;
esac
# Checks for libraries.
AC_CHECK_LIB(pcap, pcap_offline_filter, [],
AC_MSG_ERROR(pcap library not found ))
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [],
AC_MSG_ERROR(OpenSSL library not found))
# Checks for header files.
AC_CHECK_HEADERS([string.h pcap/pcap.h pcap/vlan.h arpa/inet.h sys/types.h sys/socket.h getopt.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_UINT16_T
AC_CHECK_TYPES([struct ip, struct ether_addr, struct ether_header])
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getopt_long memset strcspn strdup strtol])
# Used for unit tests
AC_CHECK_PROGS([MD5SUM], [md5sum md5 gmd5sum])
if test "x$MD5SUM" = x; then
AC_MSG_WARN(Cannot find a md5 checkum tool. Unit tests cannot be run)
fi
AC_SUBST([MD5SUM])
AC_CONFIG_FILES([Makefile src/Makefile unit_tests/ip6in4/Makefile unit_tests/gre/Makefile unit_tests/esp/Makefile unit_tests/ipip/Makefile unit_tests/802.1q/Makefile])
AC_OUTPUT