2 AC_INIT(openflow, v0.2.2a5, 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])
25 CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
26 CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
28 AC_CHECK_HEADER([linux/netlink.h],
31 [#include <sys/socket.h>
32 #include <linux/types.h>])
33 AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
34 if test "$HAVE_NETLINK" = yes; then
35 AC_DEFINE([HAVE_NETLINK], [1],
36 [Define to 1 if Netlink protocol is available.])
39 AC_CHECK_HEADER([net/if_packet.h],
42 AM_CONDITIONAL([HAVE_IF_PACKET], [test "$HAVE_IF_PACKET" = yes])
43 if test "$HAVE_IF_PACKET" = yes; then
44 AC_DEFINE([HAVE_IF_PACKET], [1],
45 [Define to 1 if net/if_packet.h is available.])
50 [AC_HELP_STRING([--enable-ssl],
51 [Enable ssl support (requires libssl)])],
52 [case "${enableval}" in # (
55 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;;
59 if test "$ssl" = true; then
60 PKG_CHECK_MODULES([SSL], [libssl],
63 AC_MSG_WARN([Cannot find libssl:
67 OpenFlow will not support SSL connections.])])
70 AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
71 if test "$HAVE_OPENSSL" = yes; then
72 AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
75 AC_CHECK_LIB([socket], [connect])
76 AC_CHECK_LIB([resolv], [gethostbyname])
77 AC_CHECK_LIB([dl], [dladdr])
79 CFLAGS="$CFLAGS -Wall -Wno-sign-compare"
81 AC_CONFIG_FILES([Makefile
92 datapath/tests/Makefile
94 datapath/linux-2.6/Kbuild
95 datapath/linux-2.6/Makefile
96 datapath/linux-2.6/Makefile.main
97 datapath/linux-2.4/Makefile])