]> git.proxmox.com Git - mirror_frr.git/blobdiff - configure.ac
delete CVS keywords
[mirror_frr.git] / configure.ac
index 6da71c220e5f78d30a1988b886b9e665155ddb3e..899108d9f4ecb97651a7d285816b3cecb4e373ac 100755 (executable)
@@ -5,7 +5,6 @@
 ##  Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
 ##  Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
 ##
-## $Id$
 AC_PREREQ(2.53)
 
 AC_INIT(Quagga, 0.99.19, [https://bugzilla.quagga.net])
@@ -442,8 +441,35 @@ m4_define([QUAGGA_INCLUDES],
 #endif /* TIME_WITH_SYS_TIME */
 ])dnl
 
-AC_CHECK_HEADERS([sys/un.h net/if.h netinet/in_systm.h netinet/in_var.h \
-       net/if_dl.h net/if_var.h net/netopt.h net/route.h \
+dnl HAVE_NET_IF_H must be discovered by the time the longer AC_CHECK_HEADERS
+dnl round below execution begins, otherwise it doesn't properly detect
+dnl HAVE_NETINET6_IN6_VAR_H, HAVE_NET_IF_VAR_H and HAVE_STRUCT_IN6_ALIASREQ
+dnl on FreeBSD (BZ#408).
+
+AC_CHECK_HEADERS([net/if.h], [], [], QUAGGA_INCLUDES)
+
+m4_define([QUAGGA_INCLUDES],
+QUAGGA_INCLUDES
+[#if HAVE_NET_IF_H
+# include <net/if.h>
+#endif
+])dnl
+
+dnl Same applies for HAVE_NET_IF_VAR_H, which HAVE_NETINET6_ND6_H and
+dnl HAVE_NETINET_IN_VAR_H depend upon. But if_var.h depends on if.h, hence
+dnl an additional round for it.
+
+AC_CHECK_HEADERS([net/if_var.h], [], [], QUAGGA_INCLUDES)
+
+m4_define([QUAGGA_INCLUDES],
+QUAGGA_INCLUDES
+[#if HAVE_NET_IF_VAR_H
+# include <net/if_var.h>
+#endif
+])dnl
+
+AC_CHECK_HEADERS([sys/un.h netinet/in_systm.h netinet/in_var.h \
+       net/if_dl.h net/netopt.h net/route.h \
        inet/nd.h arpa/inet.h netinet/ip_icmp.h \
        fcntl.h stddef.h sys/ioctl.h syslog.h wchar.h wctype.h \
        sys/sysctl.h sys/sockio.h kvm.h sys/conf.h],
@@ -458,10 +484,7 @@ QUAGGA_INCLUDES
 
 m4_define([QUAGGA_INCLUDES],
 QUAGGA_INCLUDES
-[#if HAVE_NET_IF_H
-# include <net/if.h>
-#endif
-#if HAVE_SYS_UN_H
+[#if HAVE_SYS_UN_H
 # include <sys/un.h>
 #endif
 #if HAVE_NETINET_IN_SYSTM_H
@@ -473,9 +496,6 @@ QUAGGA_INCLUDES
 #if HAVE_NET_IF_DL_H
 # include <net/if_dl.h>
 #endif
-#if HAVE_NET_IF_VAR_H
-# include <net/if_var.h>
-#endif
 #if HAVE_NET_NETOPT_H
 # include <net/netopt.h>
 #endif
@@ -595,6 +615,13 @@ AC_SUBST(LIBREADLINE)
 
 dnl ----------
 dnl PAM module
+dnl
+dnl Quagga detects the PAM library it is built against by checking for a
+dnl functional pam_misc.h (Linux-PAM) or openpam.h (OpenPAM) header. pam_misc.h
+dnl is known to #include pam_appl.h, the standard header of a PAM library, and
+dnl openpam.h doesn't do that, although depends on the header too. Hence a
+dnl little assistance to AC_CHECK_HEADER is necessary for the proper detection
+dnl of OpenPAM.
 dnl ----------
 if test "$with_libpam" = "yes"; then
   AC_CHECK_HEADER([security/pam_misc.h],
@@ -608,7 +635,7 @@ if test "$with_libpam" = "yes"; then
      AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
      pam_conv_func="openpam_ttyconv"
     ],
-    [], QUAGGA_INCLUDES)
+    [], QUAGGA_INCLUDES[#include <security/pam_appl.h>])
   if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
     AC_MSG_WARN([*** pam support will not be built ***])
     with_libpam="no"