configure: add a check for ETHERTYPE_IPV6
authorVincent Bernat <bernat@luffy.cx>
Wed, 6 Oct 2010 20:42:03 +0000 (20:42 +0000)
committerAlexandre Cassen <acassen@lnxos-dev.(none)>
Wed, 8 Dec 2010 10:57:12 +0000 (11:57 +0100)
ETHERTYPE_IPV6 defined in net/ethernet.h is pretty recent. If absent,
we hard-code the value into CFLAGS. This patch requires regeneration
of configure.

configure.in

index f4da333..96af8ef 100644 (file)
@@ -44,6 +44,8 @@ dnl [do we really need this ?] AC_CHECK_HEADERS(linux/netlink.h linux/rtnetlink.
 AC_CHECK_HEADERS(openssl/ssl.h openssl/md5.h openssl/err.h,,AC_MSG_ERROR([
   !!! OpenSSL is not properly installed on your system. !!!
   !!! Can not include OpenSSL headers files.            !!!]))
+AC_CHECK_DECL([ETHERTYPE_IPV6],[],[CFLAGS="$CFLAGS -DETHERTYPE_IPV6=0x86dd"],
+  [[@%:@include <net/ethernet.h>]])
 
 dnl ----[ Checks for libraries ]----
 AC_CHECK_LIB(crypto, MD5_Init,,AC_MSG_ERROR([OpenSSL libraries are required]))