summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.