]>
Commit | Line | Data |
---|---|---|
726af752 | 1 | # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. |
064af421 | 2 | # |
a14bc59f BP |
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: | |
064af421 | 6 | # |
a14bc59f BP |
7 | # http://www.apache.org/licenses/LICENSE-2.0 |
8 | # | |
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. | |
064af421 | 14 | |
0877a018 | 15 | AC_PREREQ(2.63) |
e2218eee | 16 | AC_INIT(openvswitch, 2.7.90, bugs@openvswitch.org) |
064af421 BP |
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]) | |
1b233b95 | 21 | AC_CONFIG_TESTDIR([tests]) |
833d8dfe | 22 | AM_INIT_AUTOMAKE([tar-pax]) |
064af421 | 23 | |
0471423a | 24 | AC_PROG_CC_C99 |
064af421 BP |
25 | AM_PROG_CC_C_O |
26 | AC_PROG_CPP | |
064af421 | 27 | AC_PROG_MKDIR_P |
c92647a4 | 28 | AC_PROG_FGREP |
4958e3ee | 29 | AC_PROG_EGREP |
064af421 BP |
30 | |
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.]) | |
35 | fi | |
36 | ||
4210c33b | 37 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) |
7fd3e43d | 38 | |
064af421 BP |
39 | AC_USE_SYSTEM_EXTENSIONS |
40 | AC_C_BIGENDIAN | |
41 | AC_SYS_LARGEFILE | |
42 | ||
38b7a52b | 43 | LT_INIT([disable-shared]) |
32015a3f BP |
44 | m4_pattern_forbid([LT_INIT]) dnl Make autoconf fail if libtool is missing. |
45 | ||
7f2f24e3 SM |
46 | # The following explanation may help to understand the use of the |
47 | # version number fields: current, revision, and age. | |
48 | # | |
49 | # Consider that there are three possible kinds of reactions from | |
50 | # users of your library to changes in a shared library: | |
51 | # | |
52 | # 1. Programs using the previous version may use the new version as drop-in | |
53 | # replacement, and programs using the new version can also work with the | |
54 | # previous one. In other words, no recompiling nor relinking is needed. | |
55 | # In short, there are no changes to any symbols, no symbols removed, | |
56 | # and no symbols added. In this case, bump revision only, don't touch | |
57 | # current nor age. | |
58 | # | |
59 | # 2. Programs using the previous version may use the new version as drop-in | |
60 | # replacement, but programs using the new version may use APIs not | |
61 | # present in the previous one. In other words, new symbols have been | |
62 | # added and a program linking against the new version may fail with | |
c84e499a | 63 | # "unresolved symbols." If linking against the old version at runtime: |
7f2f24e3 SM |
64 | # set revision to 0, bump current and age. |
65 | # | |
66 | # 3. Programs may need to be changed, recompiled, relinked in order to use | |
67 | # the new version. This is the case when symbols have been modified or | |
68 | # deleted. Bump current, set revision and age to 0. | |
69 | ||
70 | m4_define([libopenvswitch_lt_current], [1]) | |
71 | m4_define([libopenvswitch_lt_revision], [0]) | |
72 | m4_define([libopenvswitch_lt_age], [0]) | |
73 | ||
74 | LT_CURRENT=libopenvswitch_lt_current | |
75 | AC_SUBST([LT_CURRENT]) | |
76 | LT_REVISION=libopenvswitch_lt_revision | |
77 | AC_SUBST([LT_REVISION]) | |
78 | LT_AGE=libopenvswitch_lt_age | |
79 | AC_SUBST([LT_AGE]) | |
80 | ||
f38b84ea | 81 | AC_SEARCH_LIBS([pow], [m]) |
c73814a3 | 82 | AC_SEARCH_LIBS([clock_gettime], [rt]) |
6ca00f6f | 83 | AC_SEARCH_LIBS([timer_create], [rt]) |
513a32ee | 84 | AC_SEARCH_LIBS([pthread_create], [pthread]) |
5fcbed74 | 85 | AC_FUNC_STRERROR_R |
f38b84ea | 86 | |
361906b1 | 87 | OVS_CHECK_ESX |
1cb3649c | 88 | OVS_CHECK_WIN64 |
db6964bb | 89 | OVS_CHECK_WIN32 |
bd9d7025 | 90 | OVS_CHECK_VISUAL_STUDIO_DDK |
c2b07021 | 91 | OVS_CHECK_COVERAGE |
064af421 BP |
92 | OVS_CHECK_NDEBUG |
93 | OVS_CHECK_NETLINK | |
94 | OVS_CHECK_OPENSSL | |
1bbebfb7 | 95 | OVS_CHECK_LIBCAPNG |
064af421 | 96 | OVS_CHECK_LOGDIR |
3b135da3 | 97 | OVS_CHECK_PYTHON |
8fb7d026 | 98 | OVS_CHECK_PYTHON3 |
115d8719 | 99 | OVS_CHECK_FLAKE8 |
d84bdc82 | 100 | OVS_CHECK_SPHINX |
7c9b0073 | 101 | OVS_CHECK_DOT |
064af421 | 102 | OVS_CHECK_IF_PACKET |
9360d9b7 | 103 | OVS_CHECK_IF_DL |
e50097d2 | 104 | OVS_CHECK_STRTOK_R |
22c4e104 | 105 | AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]]) |
9cb07887 BP |
106 | AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec], |
107 | [], [], [[#include <sys/stat.h>]]) | |
666afb55 | 108 | AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]]) |
8a8cd0ac | 109 | AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r]) |
31a3fc6e | 110 | AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h stdatomic.h]) |
db273f62 EM |
111 | AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h> |
112 | #include <net/if.h>]]) | |
064af421 | 113 | |
31a7c9e7 BP |
114 | OVS_CHECK_PKIDIR |
115 | OVS_CHECK_RUNDIR | |
f973f2af | 116 | OVS_CHECK_DBDIR |
0e6644c3 | 117 | OVS_CHECK_BACKTRACE |
9a6156bb | 118 | OVS_CHECK_PERF_EVENT |
31a7c9e7 | 119 | OVS_CHECK_VALGRIND |
31a7c9e7 | 120 | OVS_CHECK_SOCKET_LIBS |
ed2d4f6a | 121 | OVS_CHECK_XENSERVER_VERSION |
0027492d | 122 | OVS_CHECK_GROFF |
b4e1bf8b | 123 | OVS_CHECK_GNU_MAKE |
c22095a5 | 124 | OVS_CHECK_TLS |
fd2e50cd | 125 | OVS_CHECK_ATOMIC_LIBS |
15248032 | 126 | OVS_CHECK_GCC4_ATOMICS |
31a3fc6e BP |
127 | OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1) |
128 | OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2) | |
129 | OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(4) | |
130 | OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(8) | |
97eba8fc | 131 | OVS_CHECK_POSIX_AIO |
8a8cd0ac | 132 | OVS_CHECK_PTHREAD_SET_NAME |
5020f5f0 | 133 | OVS_CHECK_LINUX_HOST |
cb991590 | 134 | OVS_LIBTOOL_VERSIONS |
3dc62a6c | 135 | AX_FUNC_POSIX_MEMALIGN |
064af421 | 136 | |
cde1c287 | 137 | OVS_CHECK_INCLUDE_NEXT([stdio.h string.h]) |
7f2f24e3 SM |
138 | AC_CONFIG_FILES([ |
139 | lib/stdio.h | |
140 | lib/string.h | |
141 | ovsdb/libovsdb.sym | |
142 | ofproto/libofproto.sym | |
143 | lib/libsflow.sym | |
973edd6e | 144 | lib/libopenvswitch.sym |
7d45b576 | 145 | ovn/lib/libovn.sym |
973edd6e | 146 | vtep/libvtep.sym]) |
4e857508 | 147 | |
31a7c9e7 | 148 | OVS_ENABLE_OPTION([-Wall]) |
9b437f0f | 149 | OVS_ENABLE_OPTION([-Wextra]) |
31a7c9e7 BP |
150 | OVS_ENABLE_OPTION([-Wno-sign-compare]) |
151 | OVS_ENABLE_OPTION([-Wpointer-arith]) | |
726af752 | 152 | OVS_ENABLE_OPTION([-Wformat -Wformat-security]) |
31a7c9e7 BP |
153 | OVS_ENABLE_OPTION([-Wswitch-enum]) |
154 | OVS_ENABLE_OPTION([-Wunused-parameter]) | |
31a7c9e7 BP |
155 | OVS_ENABLE_OPTION([-Wbad-function-cast]) |
156 | OVS_ENABLE_OPTION([-Wcast-align]) | |
157 | OVS_ENABLE_OPTION([-Wstrict-prototypes]) | |
158 | OVS_ENABLE_OPTION([-Wold-style-definition]) | |
159 | OVS_ENABLE_OPTION([-Wmissing-prototypes]) | |
160 | OVS_ENABLE_OPTION([-Wmissing-field-initializers]) | |
97be1538 | 161 | OVS_ENABLE_OPTION([-Wthread-safety]) |
538919d3 | 162 | OVS_ENABLE_OPTION([-fno-strict-aliasing]) |
398b6657 BP |
163 | OVS_ENABLE_OPTION([-Wswitch-bool]) |
164 | OVS_ENABLE_OPTION([-Wlogical-not-parentheses]) | |
165 | OVS_ENABLE_OPTION([-Wsizeof-array-argument]) | |
166 | OVS_ENABLE_OPTION([-Wbool-compare]) | |
905d453a BP |
167 | OVS_ENABLE_OPTION([-Wshift-negative-value]) |
168 | OVS_ENABLE_OPTION([-Wduplicated-cond]) | |
c2deac54 | 169 | OVS_ENABLE_OPTION([-Qunused-arguments]) |
c72e245a | 170 | OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED]) |
52af5b99 | 171 | OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER]) |
a64e37a1 | 172 | OVS_ENABLE_WERROR |
29d935d6 | 173 | OVS_ENABLE_SPARSE |
064af421 BP |
174 | |
175 | AC_ARG_VAR(KARCH, [Kernel Architecture String]) | |
176 | AC_SUBST(KARCH) | |
e3438006 | 177 | OVS_CHECK_LINUX |
8a9562d2 | 178 | OVS_CHECK_DPDK |
aa8ea223 | 179 | OVS_CHECK_PRAGMA_MESSAGE |
95626395 TG |
180 | AC_SUBST([OVS_CFLAGS]) |
181 | AC_SUBST([OVS_LDFLAGS]) | |
064af421 | 182 | |
954d706e GS |
183 | AC_CONFIG_FILES(Makefile) |
184 | AC_CONFIG_FILES(datapath/Makefile) | |
185 | AC_CONFIG_FILES(datapath/linux/Kbuild) | |
186 | AC_CONFIG_FILES(datapath/linux/Makefile) | |
187 | AC_CONFIG_FILES(datapath/linux/Makefile.main) | |
188 | AC_CONFIG_FILES(tests/atlocal) | |
81696de0 | 189 | AC_CONFIG_FILES(lib/libopenvswitch.pc) |
e72e07a9 | 190 | AC_CONFIG_FILES(lib/libsflow.pc) |
b82b1573 | 191 | AC_CONFIG_FILES(ofproto/libofproto.pc) |
32fe2cfb | 192 | AC_CONFIG_FILES(ovsdb/libovsdb.pc) |
3f47a0c5 | 193 | AC_CONFIG_FILES(include/openvswitch/version.h) |
064af421 | 194 | |
05b3c97b BP |
195 | dnl This makes sure that include/openflow gets created in the build directory. |
196 | AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp]) | |
197 | ||
b2df0225 | 198 | AC_CONFIG_COMMANDS([utilities/bugtool/dummy], [:]) |
fe36184b | 199 | AC_CONFIG_COMMANDS([ovn/dummy], [:]) |
43d3e694 | 200 | AC_CONFIG_COMMANDS([ovn/utilities/dummy], [:]) |
436f27dd | 201 | |
743f8109 EJ |
202 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) |
203 | ||
064af421 | 204 | AC_OUTPUT |