• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl Process this file with autoconf to create configure.
2
3AC_INIT([libnetfilter_conntrack], [1.0.6])
4AC_CONFIG_AUX_DIR([build-aux])
5AC_CANONICAL_HOST
6AC_CONFIG_HEADER([config.h])
7AC_CONFIG_MACRO_DIR([m4])
8
9AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
10	tar-pax no-dist-gzip dist-bzip2 1.6])
11m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
12
13dnl kernel style compile messages
14m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15
16AC_PROG_CC
17AC_DISABLE_STATIC
18AM_PROG_LIBTOOL
19AC_PROG_INSTALL
20AC_PROG_LN_S
21
22case "$host" in
23*-*-linux* | *-*-uclinux*) ;;
24*) AC_MSG_ERROR([Linux only, dude!]);;
25esac
26
27dnl Dependencies
28PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.0])
29PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
30
31AC_CHECK_HEADERS(arpa/inet.h)
32dnl Check for inet_ntop
33AC_CHECK_FUNCS(inet_ntop)
34dnl Check for setns used in qa
35AC_CHECK_FUNCS(setns)
36dnl Again, some systems have it, but not IPv6
37if test "$ac_cv_func_inet_ntop" = "yes" ; then
38AC_MSG_CHECKING(if inet_ntop supports IPv6)
39AC_RUN_IFELSE([AC_LANG_SOURCE([[
40#ifdef HAVE_SYS_TYPES_H
41#include <sys/types.h>
42#endif
43#ifdef HAVE_SYS_SOCKET_H
44#include <sys/socket.h>
45#endif
46#ifdef HAVE_NETINET_IN_H
47#include <netinet/in.h>
48#endif
49#ifdef HAVE_ARPA_INET_H
50#include <arpa/inet.h>
51#endif
52#include <errno.h>
53int main()
54  {
55     struct in6_addr addr6;
56     char buf[128];
57     if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
58        exit(1);
59     else
60        exit(0);
61  }
62  ]])],[ AC_MSG_RESULT(yes)
63       AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])
64     ],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
65fi
66
67dnl Output the makefile
68AC_CONFIG_FILES([Makefile src/Makefile include/Makefile utils/Makefile
69	examples/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile
70	include/internal/Makefile src/conntrack/Makefile src/expect/Makefile
71	libnetfilter_conntrack.pc doxygen.cfg])
72AC_OUTPUT
73