2 AC_INIT(openflow, v0.1.9, 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 PKG_CHECK_MODULES([SSL], [libssl],
40 AC_MSG_WARN([Cannot find libssl:
44 OpenFlow will not support SSL connections.])])
45 AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
46 if test "$HAVE_OPENSSL" = yes; then
47 AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
50 AC_CHECK_LIB([socket], [connect])
51 AC_CHECK_LIB([resolv], [gethostbyname])
52 AC_CHECK_LIB([dl], [dladdr])
54 CFLAGS="$CFLAGS -Wall -Wno-sign-compare"
56 AC_CONFIG_FILES([Makefile
65 datapath/tests/Makefile
67 datapath/linux-2.6/Makefile
68 datapath/linux-2.4/Makefile])