1 # Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 AC_INIT(openvswitch, 1.8.90, ovs-bugs@openvswitch.org)
17 AC_CONFIG_SRCDIR([datapath/datapath.c])
18 AC_CONFIG_MACRO_DIR([m4])
19 AC_CONFIG_AUX_DIR([build-aux])
20 AC_CONFIG_HEADERS([config.h])
21 AC_CONFIG_TESTDIR([tests])
31 AC_ARG_VAR([PERL], [path to Perl interpreter])
32 AC_PATH_PROG([PERL], perl, no)
33 if test "$PERL" = no; then
34 AC_MSG_ERROR([Perl interpreter not found in $PATH or $PERL.])
37 AC_USE_SYSTEM_EXTENSIONS
41 AC_SEARCH_LIBS([pow], [m])
42 AC_SEARCH_LIBS([clock_gettime], [rt])
43 AC_SEARCH_LIBS([timer_create], [rt])
44 AC_SEARCH_LIBS([pcap_open_live], [pcap])
53 OVS_CHECK_OVSDBMONITOR
58 AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec],
59 [], [], [[#include <sys/stat.h>]])
60 AC_CHECK_FUNCS([mlockall strnlen strsignal getloadavg statvfs setmntent])
61 AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h])
67 OVS_CHECK_MALLOC_HOOKS
70 OVS_CHECK_LINKER_SECTIONS
71 OVS_CHECK_XENSERVER_VERSION
76 OVS_ENABLE_OPTION([-Wall])
77 OVS_ENABLE_OPTION([-Wno-sign-compare])
78 OVS_ENABLE_OPTION([-Wpointer-arith])
79 OVS_ENABLE_OPTION([-Wdeclaration-after-statement])
80 OVS_ENABLE_OPTION([-Wformat-security])
81 OVS_ENABLE_OPTION([-Wswitch-enum])
82 OVS_ENABLE_OPTION([-Wunused-parameter])
83 OVS_ENABLE_OPTION([-Wstrict-aliasing])
84 OVS_ENABLE_OPTION([-Wbad-function-cast])
85 OVS_ENABLE_OPTION([-Wcast-align])
86 OVS_ENABLE_OPTION([-Wstrict-prototypes])
87 OVS_ENABLE_OPTION([-Wold-style-definition])
88 OVS_ENABLE_OPTION([-Wmissing-prototypes])
89 OVS_ENABLE_OPTION([-Wmissing-field-initializers])
90 OVS_ENABLE_OPTION([-Wno-override-init])
91 OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
92 OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
96 AC_ARG_VAR(KARCH, [Kernel Architecture String])
100 AC_CONFIG_FILES([Makefile
102 datapath/linux/Kbuild
103 datapath/linux/Makefile
104 datapath/linux/Makefile.main
107 dnl This makes sure that include/openflow gets created in the build directory.
108 AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
110 AC_CONFIG_COMMANDS([ovsdb/ovsdbmonitor/dummy], [:])
111 AC_CONFIG_COMMANDS([utilities/bugtool/dummy], [:])