1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(libbridge/config.h)
4 AM_INIT_AUTOMAKE(bridge-utils,1.0.6)
6 AC_ARG_WITH( linux-headers, [ --with-linux-headers Location of the linux headers to use],
7 KERNEL_HEADERS=$withval, KERNEL_HEADERS="/usr/src/linux/include")
9 dnl Checks for programs.
14 dnl Checks for header files.
16 AC_CHECK_HEADERS(sys/ioctl.h sys/time.h)
18 dnl Checks for typedefs, structures, and compiler characteristics.
22 dnl Checks for library functions.
23 AC_PROG_GCC_TRADITIONAL
25 AC_CHECK_FUNCS(gethostname socket strdup uname)
26 AC_CHECK_FUNCS(if_nametoindex if_indextoname)
28 dnl Check for libsysfs
29 AC_CHECK_HEADER(sysfs/libsysfs.h,
30 [AC_CHECK_LIB(sysfs, sysfs_open_directory,
31 [AC_DEFINE(HAVE_LIBSYSFS)
32 LIBS="$LIBS -lsysfs"],
33 [AC_MSG_WARN([Missing sysfs library!])])],
34 [AC_MSG_WARN([Missing /usr/include/sysfs/libsysfs.h])])
37 AC_SUBST(KERNEL_HEADERS)
39 AC_OUTPUT(doc/Makefile libbridge/Makefile brctl/Makefile Makefile bridge-utils.spec)