summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2008-01-11 16:33:59 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2008-01-11 16:33:59 +0000
commit6418bedf29a5d573c4b39cc1ea4b0f5c91af22cd (patch)
tree8572ef61d7938698370f14cc474d8660002e531a
parent55edb0d446a272907715b0825ff008557174d34a (diff)
[link-detect] Improve BSD support.
2008-01-11 Ingo Flaschberger <if@xip.at> * configure.ac: Improve HAVE_BSD_LINK_DETECT test.
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure.ac15
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 539720e9..c8078e2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-11 Ingo Flaschberger <if@xip.at>
+
+ * configure.ac: Improve HAVE_BSD_LINK_DETECT test.
+
2008-01-10 Ingo Flaschberger <if@xip.at>
* configure.ac: Define HAVE_BSD_LINK_DETECT if <net/if_media.h> is
diff --git a/configure.ac b/configure.ac
index 7f061bb1..5e1fc96e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -893,9 +893,18 @@ AC_MSG_RESULT(no))
dnl ---------------------------------------------------------------
dnl figure out how to check link-state
dnl ---------------------------------------------------------------
-AC_CHECK_HEADER([net/if_media.h],
- [AC_DEFINE(HAVE_BSD_LINK_DETECT,,[BSD link-detect])],
- [], QUAGGA_INCLUDES)
+AC_CHECK_HEADER([net/if.h],
+ [AC_CHECK_HEADER( [net/if_media.h],
+ [m4_define([LINK_DETECT_INCLUDES],
+ QUAGGA_INCLUDES
+ [#include <net/if_media.h>
+ ])
+ AC_CHECK_MEMBERS( [struct ifmediareq.ifm_status],
+ AC_DEFINE(HAVE_BSD_LINK_DETECT,,[BSD link-detect]),
+ [], LINK_DETECT_INCLUDES)],
+ [],
+ QUAGGA_INCLUDES)],
+ [], QUAGGA_INCLUDES )
dnl -----------------------
dnl check proc file system.