diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-05-20 20:15:06 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-05-20 20:15:06 +0200 |
commit | 617e59b7bc9a2211e5c45f68ecd242f7b3820f8e (patch) | |
tree | a3f6107e98abfeee2d03c32db2e101245ace8cb8 /configure.in | |
parent | ad36ab252ee3bddf73ad9d12eed39f9fc367c8f7 (diff) | |
download | strongswan-617e59b7bc9a2211e5c45f68ecd242f7b3820f8e.tar.bz2 strongswan-617e59b7bc9a2211e5c45f68ecd242f7b3820f8e.tar.xz |
Portably check for IPSEC_* constants (defined in ipsec.h).
The problem is that FreeBSD defines them as #defines whereas Linux defines them as enums.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.in b/configure.in index eb76cd8dc..1a5f1d096 100644 --- a/configure.in +++ b/configure.in @@ -839,6 +839,36 @@ AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [], #endif ]) +AC_MSG_CHECKING([for IPSEC_MODE_BEET]) +AC_TRY_COMPILE( + [#ifdef HAVE_NETIPSEC_IPSEC_H + #include <netipsec/ipsec.h> + #elif defined(HAVE_NETINET6_IPSEC_H) + #include <netinet6/ipsec.h> + #else + #include <linux/ipsec.h> + #endif], + [int mode = IPSEC_MODE_BEET; + return mode;], + [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])], + [AC_MSG_RESULT([no])] +) + +AC_MSG_CHECKING([for IPSEC_DIR_FWD]) +AC_TRY_COMPILE( + [#ifdef HAVE_NETIPSEC_IPSEC_H + #include <netipsec/ipsec.h> + #elif defined(HAVE_NETINET6_IPSEC_H) + #include <netinet6/ipsec.h> + #else + #include <linux/ipsec.h> + #endif], + [int dir = IPSEC_DIR_FWD; + return dir;], + [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])], + [AC_MSG_RESULT([no])] +) + AC_MSG_CHECKING([for gcc atomic operations]) AC_TRY_RUN( [ |