with_libiptc="no (Linux only)"
fi
])
-if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
+SAVE_CPPFLAGS="$CPPFLAGS"
+SAVE_LDFLAGS="$LDFLAGS"
+CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
+LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
+if test "x$with_libiptc" = "xyes"
then
- AC_CHECK_LIB(iptc, iptc_init,
+ AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
[
- AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
+ with_libiptc="no (Linux iptables headers not found)"
+ with_own_libiptc="no"
],
[
- with_libiptc="yes"
- with_own_libiptc="yes"
+#include "$srcdir/src/owniptc/ipt_kernel_headers.h"
])
+
fi
if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
then
with_own_libiptc="yes"
])
fi
-if test "x$with_libiptc" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
-
- AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
- [
- with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
- with_own_libiptc="no"
- ],
- [
-#include "$srcdir/src/owniptc/ipt_kernel_headers.h"
- ])
-
- CPPFLAGS="$SAVE_CPPFLAGS"
-fi
-if test "x$with_libiptc" = "xyes"
+if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
-
AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
[
#if OWN_LIBIPTC
# include <libiptc/libip6tc.h>
#endif
])
-
- CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
+then
+ AC_CHECK_LIB(iptc, iptc_init,
+ [
+ AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
+ ],
+ [
+ with_libiptc="yes"
+ with_own_libiptc="yes"
+ ])
fi
AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
then
AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
fi
+CPPFLAGS="$SAVE_CPPFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
# }}}
# --with-java {{{
#if OWN_LIBIPTC
# include "owniptc/libiptc.h"
# include "owniptc/libip6tc.h"
-#else
+
+# define HAVE_IPTC_HANDLE_T 1
+# define HAVE_IP6TC_HANDLE_T 1
+
+#else /* if !OWN_LIBIPTC */
# include <libiptc/libiptc.h>
# include <libiptc/libip6tc.h>
-#endif
/*
* iptc_handle_t was available before libiptc was officially available as a
* this is somewhat hacky, I didn't find better way to solve that :-/
* -tokkee
*/
-#ifndef HAVE_IPTC_HANDLE_T
+# ifndef HAVE_IPTC_HANDLE_T
typedef struct iptc_handle iptc_handle_t;
-#endif
-#ifndef HAVE_IP6TC_HANDLE_T
+# endif
+# ifndef HAVE_IP6TC_HANDLE_T
typedef struct ip6tc_handle ip6tc_handle_t;
-#endif
+# endif
+#endif /* !OWN_LIBIPTC */
/*
* (Module-)Global variables