1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(brctl/brctl.c)
3AC_CONFIG_HEADER(libbridge/config.h)
4AM_INIT_AUTOMAKE(bridge-utils,1.0.6)
5
6AC_ARG_WITH( linux-headers, [  --with-linux-headers     Location of the linux headers to use], 
7    KERNEL_HEADERS=$withval, KERNEL_HEADERS="/usr/src/linux/include")
8
9dnl Checks for programs.
10AC_PROG_CC
11AC_PROG_INSTALL
12AC_PROG_RANLIB
13
14dnl Checks for header files.
15AC_HEADER_STDC
16AC_CHECK_HEADERS(sys/ioctl.h sys/time.h)
17
18dnl Checks for typedefs, structures, and compiler characteristics.
19AC_C_CONST
20AC_HEADER_TIME
21
22dnl Checks for library functions.
23AC_PROG_GCC_TRADITIONAL
24AC_FUNC_MEMCMP
25AC_CHECK_FUNCS(gethostname socket strdup uname)
26AC_CHECK_FUNCS(if_nametoindex if_indextoname)
27
28dnl Check for libsysfs
29AC_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])])
35
36
37AC_SUBST(KERNEL_HEADERS)
38
39AC_OUTPUT(doc/Makefile libbridge/Makefile brctl/Makefile Makefile bridge-utils.spec)
40