Home | History | Annotate | Download | only in libnetfilter_conntrack
      1 dnl Process this file with autoconf to create configure.
      2 
      3 AC_INIT([libnetfilter_conntrack], [1.0.6])
      4 AC_CONFIG_AUX_DIR([build-aux])
      5 AC_CANONICAL_HOST
      6 AC_CONFIG_HEADER([config.h])
      7 AC_CONFIG_MACRO_DIR([m4])
      8 
      9 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
     10 	tar-pax no-dist-gzip dist-bzip2 1.6])
     11 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
     12 
     13 dnl kernel style compile messages
     14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
     15 
     16 AC_PROG_CC
     17 AC_DISABLE_STATIC
     18 AM_PROG_LIBTOOL
     19 AC_PROG_INSTALL
     20 AC_PROG_LN_S
     21 
     22 case "$host" in 
     23 *-*-linux* | *-*-uclinux*) ;;
     24 *) AC_MSG_ERROR([Linux only, dude!]);;
     25 esac
     26 
     27 dnl Dependencies
     28 PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.0])
     29 PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
     30 
     31 AC_CHECK_HEADERS(arpa/inet.h)
     32 dnl Check for inet_ntop
     33 AC_CHECK_FUNCS(inet_ntop)
     34 dnl Check for setns used in qa
     35 AC_CHECK_FUNCS(setns)
     36 dnl Again, some systems have it, but not IPv6
     37 if test "$ac_cv_func_inet_ntop" = "yes" ; then
     38 AC_MSG_CHECKING(if inet_ntop supports IPv6)
     39 AC_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>
     53 int 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)])
     65 fi
     66 
     67 dnl Output the makefile
     68 AC_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])
     72 AC_OUTPUT
     73