Hello!

Testing for a library is not sufficient if you also need the headers. Many distributions install libraries without headers by default. This is the case for Fedora Core 3 and libsysfs. The library is in sysfsutils, but the headers are in sysfsutils-devel.

The patch for configure.in tests for both the headers and the library and makes the configure script print a warning if libsysfs cannot be used.

The patch is against bridge-utils-1.0.4.

--
Regards,
Pavel Roskin
--- configure.in
+++ configure.in
@@ -24,7 +24,14 @@
 AC_FUNC_MEMCMP
 AC_CHECK_FUNCS(gethostname socket strdup uname)
 AC_CHECK_FUNCS(if_nametoindex if_indextoname)
-AC_CHECK_LIB(sysfs, sysfs_open_directory)
+
+dnl Check for libsysfs
+libsysfs_found=0
+AC_CHECK_HEADER(sysfs/libsysfs.h,
+               [AC_CHECK_LIB(sysfs, sysfs_open_directory, libsysfs_found=1)])
+if test $libsysfs_found != 1; then
+       AC_MSG_WARN([Compiling without libsysfs support!])
+fi
 
 AC_SUBST(KERNEL_HEADERS)
 
_______________________________________________
Bridge mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/bridge

Reply via email to