Finishing touches on v0.8.0 release candidate.
[sliver-openvswitch.git] / configure.ac
1 AC_PREREQ(2.59)
2 AC_INIT(openflow, v0.8.0rc1, info@openflowswitch.org)
3 AM_INIT_AUTOMAKE
4
5 AC_PROG_CC
6 AC_PROG_CPP
7 AC_PROG_LD
8
9 AC_USE_SYSTEM_EXTENSIONS
10
11 AC_PROG_LIBTOOL
12
13 AC_ARG_ENABLE(
14   [ndebug],
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]) ;;
21    esac],
22   [ndebug=false])
23 AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])
24
25 CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
26 CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
27
28 AC_CHECK_HEADER([linux/netlink.h],
29                 [HAVE_NETLINK=yes],
30                 [HAVE_NETLINK=no],
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.])
37 fi
38
39 AC_CHECK_HEADER([net/if_packet.h],
40                 [HAVE_IF_PACKET=yes],
41                 [HAVE_IF_PACKET=no])
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.])
46 fi
47
48 AC_ARG_ENABLE(
49   [ssl],
50   [AC_HELP_STRING([--enable-ssl], 
51                   [Enable ssl support (requires libssl)])],
52   [case "${enableval}" in # (
53      yes) ssl=true ;;  # (
54      no)  ssl=false ;; # (
55      *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;;
56    esac],
57   [ssl=false])
58
59 if test "$ssl" = true; then
60 PKG_CHECK_MODULES([SSL], [libssl], 
61   [HAVE_OPENSSL=yes],
62   [HAVE_OPENSSL=no
63    AC_MSG_WARN([Cannot find libssl:
64
65 $SSL_PKG_ERRORS
66
67 OpenFlow will not support SSL connections.])])
68
69 fi
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.])
73 fi
74
75 AC_CHECK_LIB([socket], [connect])
76 AC_CHECK_LIB([resolv], [gethostbyname])
77 AC_CHECK_LIB([dl], [dladdr])
78
79 CFLAGS="$CFLAGS -Wall -Wno-sign-compare"
80
81 AC_CONFIG_FILES([Makefile 
82 man/Makefile
83 man/man8/Makefile
84 datapath/Makefile 
85 lib/Makefile
86 include/Makefile
87 controller/Makefile
88 utilities/Makefile
89 secchan/Makefile
90 switch/Makefile
91 tests/Makefile
92 datapath/tests/Makefile
93 third-party/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])
98
99 AC_OUTPUT