2 AC_INIT(openflow, v0.8.1, info@openflowswitch.org)
9 AC_USE_SYSTEM_EXTENSIONS
15 [AC_HELP_STRING([--enable-ndebug],
16 [Disable debugging features for max performance])],
17 [case "${enableval}" in # (
18 yes) ndebug=true ;; # (
19 no) ndebug=false ;; # (
20 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ndebug]) ;;
23 AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])
27 [AC_HELP_STRING([--enable-hw-tables=MODULE...],
28 [Configure and build the specified externally supplied
29 hardware table support modules])])
30 case "${enable_hw_tables}" in # (
32 AC_MSG_ERROR([--enable-hw-tables has a required argument])
38 hw_tables=`echo "$enable_hw_tables" | sed 's/,/ /g'`
41 for d in $hw_tables; do
42 mk=datapath/hwtable-$d/Modules.mk
43 if test ! -e $srcdir/$mk; then
44 AC_MSG_ERROR([--enable-hw-tables=$d specified but $mk is missing])
46 HW_TABLES="$HW_TABLES \$(top_srcdir)/$mk"
50 AC_ARG_VAR(KARCH, [Kernel Architecture String])
53 CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
54 CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
56 AC_CHECK_HEADER([linux/netlink.h],
59 [#include <sys/socket.h>
60 #include <linux/types.h>])
61 AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
62 if test "$HAVE_NETLINK" = yes; then
63 AC_DEFINE([HAVE_NETLINK], [1],
64 [Define to 1 if Netlink protocol is available.])
67 AC_CHECK_HEADER([net/if_packet.h],
70 AM_CONDITIONAL([HAVE_IF_PACKET], [test "$HAVE_IF_PACKET" = yes])
71 if test "$HAVE_IF_PACKET" = yes; then
72 AC_DEFINE([HAVE_IF_PACKET], [1],
73 [Define to 1 if net/if_packet.h is available.])
78 [AC_HELP_STRING([--enable-ssl],
79 [Enable ssl support (requires libssl)])],
80 [case "${enableval}" in # (
83 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;;
87 if test "$ssl" = true; then
88 PKG_CHECK_MODULES([SSL], [libssl],
91 AC_MSG_WARN([Cannot find libssl:
95 OpenFlow will not support SSL connections.])])
98 AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
99 if test "$HAVE_OPENSSL" = yes; then
100 AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
103 AC_CHECK_LIB([socket], [connect])
104 AC_CHECK_LIB([resolv], [gethostbyname])
105 AC_CHECK_LIB([dl], [dladdr])
107 CFLAGS="$CFLAGS -Wall -Wno-sign-compare"
109 AC_CONFIG_FILES([Makefile
120 datapath/tests/Makefile
122 datapath/linux-2.6/Kbuild
123 datapath/linux-2.6/Makefile
124 datapath/linux-2.6/Makefile.main
125 datapath/linux-2.4/Kbuild
126 datapath/linux-2.4/Makefile
127 datapath/linux-2.4/Makefile.main])