2 AC_INIT(openflow, v0.2.1, info@openflowswitch.org)
8 AC_USE_SYSTEM_EXTENSIONS
14 [AC_HELP_STRING([--enable-ndebug],
15 [Disable debugging features for max performance])],
16 [case "${enableval}" in # (
17 yes) ndebug=true ;; # (
18 no) ndebug=false ;; # (
19 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ndebug]) ;;
22 AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])
24 CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
25 CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
27 AC_CHECK_HEADER([linux/netlink.h],
30 [#include <sys/socket.h>])
31 AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
32 if test "$HAVE_NETLINK" = yes; then
33 AC_DEFINE([HAVE_NETLINK], [1],
34 [Define to 1 if Netlink protocol is available.])
37 AC_CHECK_HEADER([net/if_packet.h],
40 AM_CONDITIONAL([HAVE_IF_PACKET], [test "$HAVE_IF_PACKET" = yes])
41 if test "$HAVE_IF_PACKET" = yes; then
42 AC_DEFINE([HAVE_IF_PACKET], [1],
43 [Define to 1 if net/if_packet.h is available.])
48 [AC_HELP_STRING([--enable-ssl],
49 [Enable ssl support (requires libssl)])],
50 [case "${enableval}" in # (
53 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;;
57 if test "$ssl" = true; then
58 PKG_CHECK_MODULES([SSL], [libssl],
61 AC_MSG_WARN([Cannot find libssl:
65 OpenFlow will not support SSL connections.])])
68 AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
69 if test "$HAVE_OPENSSL" = yes; then
70 AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
73 AC_CHECK_LIB([socket], [connect])
74 AC_CHECK_LIB([resolv], [gethostbyname])
75 AC_CHECK_LIB([dl], [dladdr])
77 CFLAGS="$CFLAGS -Wall -Wno-sign-compare"
79 AC_CONFIG_FILES([Makefile
89 datapath/tests/Makefile
91 datapath/linux-2.6/Makefile
92 datapath/linux-2.4/Makefile])