]> git.proxmox.com Git - mirror_ovs.git/blob - configure.ac
Remove dependency on python3-six
[mirror_ovs.git] / configure.ac
1 # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Nicira, Inc.
2 #
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:
6 #
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.
14
15 AC_PREREQ(2.63)
16 AC_INIT(openvswitch, 2.12.90, 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])
22 AM_INIT_AUTOMAKE([tar-pax])
23
24 AC_PROG_CC_C99
25 AM_PROG_CC_C_O
26 AC_PROG_CXX
27 AC_PROG_CPP
28 AC_PROG_MKDIR_P
29 AC_PROG_FGREP
30 AC_PROG_EGREP
31 PKG_PROG_PKG_CONFIG
32
33 AM_MISSING_PROG([AUTOM4TE], [autom4te])
34
35 AC_USE_SYSTEM_EXTENSIONS
36 AC_C_BIGENDIAN
37 AC_SYS_LARGEFILE
38
39 LT_INIT([disable-shared])
40 m4_pattern_forbid([LT_INIT]) dnl Make autoconf fail if libtool is missing.
41
42 # The following explanation may help to understand the use of the
43 # version number fields: current, revision, and age.
44 #
45 # Consider that there are three possible kinds of reactions from
46 # users of your library to changes in a shared library:
47 #
48 # 1. Programs using the previous version may use the new version as drop-in
49 # replacement, and programs using the new version can also work with the
50 # previous one. In other words, no recompiling nor relinking is needed.
51 # In short, there are no changes to any symbols, no symbols removed,
52 # and no symbols added. In this case, bump revision only, don't touch
53 # current nor age.
54 #
55 # 2. Programs using the previous version may use the new version as drop-in
56 # replacement, but programs using the new version may use APIs not
57 # present in the previous one. In other words, new symbols have been
58 # added and a program linking against the new version may fail with
59 # "unresolved symbols." If linking against the old version at runtime:
60 # set revision to 0, bump current and age.
61 #
62 # 3. Programs may need to be changed, recompiled, relinked in order to use
63 # the new version. This is the case when symbols have been modified or
64 # deleted. Bump current, set revision and age to 0.
65
66 m4_define([libopenvswitch_lt_current], [0])
67 m4_define([libopenvswitch_lt_revision], [0])
68 m4_define([libopenvswitch_lt_age], [0])
69
70 LT_CURRENT=libopenvswitch_lt_current
71 AC_SUBST([LT_CURRENT])
72 LT_REVISION=libopenvswitch_lt_revision
73 AC_SUBST([LT_REVISION])
74 LT_AGE=libopenvswitch_lt_age
75 AC_SUBST([LT_AGE])
76
77 AC_SEARCH_LIBS([pow], [m])
78 AC_SEARCH_LIBS([clock_gettime], [rt])
79 AC_SEARCH_LIBS([timer_create], [rt])
80 AC_SEARCH_LIBS([pthread_rwlock_tryrdlock], [pthread])
81 AC_SEARCH_LIBS([pthread_rwlockattr_destroy], [pthread])
82 AC_SEARCH_LIBS([pthread_spin_lock], [pthread])
83 AC_CHECK_FUNCS([pthread_spin_lock])
84 AC_FUNC_STRERROR_R
85
86 OVS_CHECK_WIN64
87 OVS_CHECK_WIN32
88 OVS_CHECK_VISUAL_STUDIO_DDK
89 OVS_CHECK_COVERAGE
90 OVS_CHECK_NDEBUG
91 OVS_CHECK_NETLINK
92 OVS_CHECK_OPENSSL
93 OVS_CHECK_LIBCAPNG
94 OVS_CHECK_LOGDIR
95 OVS_CHECK_PYTHON3
96 OVS_CHECK_FLAKE8
97 OVS_CHECK_SPHINX
98 OVS_CHECK_DOT
99 OVS_CHECK_IF_DL
100 OVS_CHECK_STRTOK_R
101 OVS_CHECK_LINUX_AF_XDP
102 AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
103 AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec],
104 [], [], [[#include <sys/stat.h>]])
105 AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]])
106 AC_CHECK_MEMBERS([struct mmsghdr.msg_len], [], [], [[#include <sys/socket.h>]])
107 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], [], [],
108 [[#include <sys/socket.h>
109 #include <sys/types.h>
110 #include <netinet/in.h>]])
111 AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r sendmmsg clock_gettime])
112 AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h])
113 AC_CHECK_HEADERS([linux/net_namespace.h stdatomic.h bits/floatn-common.h])
114 AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h>
115 #include <net/if.h>]])
116
117 OVS_CHECK_PKIDIR
118 OVS_CHECK_RUNDIR
119 OVS_CHECK_DBDIR
120 OVS_CHECK_BACKTRACE
121 OVS_CHECK_PERF_EVENT
122 OVS_CHECK_VALGRIND
123 OVS_CHECK_SOCKET_LIBS
124 OVS_CHECK_XENSERVER_VERSION
125 OVS_CHECK_GROFF
126 OVS_CHECK_TLS
127 OVS_CHECK_ATOMIC_LIBS
128 OVS_CHECK_GCC4_ATOMICS
129 OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
130 OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
131 OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(4)
132 OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(8)
133 OVS_CHECK_POSIX_AIO
134 OVS_CHECK_PTHREAD_SET_NAME
135 OVS_CHECK_LINUX_HOST
136 OVS_LIBTOOL_VERSIONS
137 OVS_CHECK_CXX
138 AX_FUNC_POSIX_MEMALIGN
139 OVS_CHECK_UNBOUND
140 OVS_CHECK_UNWIND
141
142 OVS_CHECK_INCLUDE_NEXT([stdio.h string.h])
143 AC_CONFIG_FILES([
144 lib/stdio.h
145 lib/string.h
146 ovsdb/libovsdb.sym
147 ofproto/libofproto.sym
148 lib/libsflow.sym
149 lib/libopenvswitch.sym
150 vtep/libvtep.sym])
151
152 OVS_ENABLE_OPTION([-Wall])
153 OVS_ENABLE_OPTION([-Wextra])
154 OVS_ENABLE_OPTION([-Wno-sign-compare])
155 OVS_ENABLE_OPTION([-Wpointer-arith])
156 OVS_ENABLE_OPTION([-Wformat -Wformat-security])
157 OVS_ENABLE_OPTION([-Wswitch-enum])
158 OVS_ENABLE_OPTION([-Wunused-parameter])
159 OVS_ENABLE_OPTION([-Wbad-function-cast])
160 OVS_ENABLE_OPTION([-Wcast-align])
161 OVS_ENABLE_OPTION([-Wstrict-prototypes])
162 OVS_ENABLE_OPTION([-Wold-style-definition])
163 OVS_ENABLE_OPTION([-Wmissing-prototypes])
164 OVS_ENABLE_OPTION([-Wmissing-field-initializers])
165 OVS_ENABLE_OPTION([-Wthread-safety])
166 OVS_ENABLE_OPTION([-fno-strict-aliasing])
167 OVS_ENABLE_OPTION([-Wswitch-bool])
168 OVS_ENABLE_OPTION([-Wlogical-not-parentheses])
169 OVS_ENABLE_OPTION([-Wsizeof-array-argument])
170 OVS_ENABLE_OPTION([-Wbool-compare])
171 OVS_ENABLE_OPTION([-Wshift-negative-value])
172 OVS_ENABLE_OPTION([-Wduplicated-cond])
173 OVS_ENABLE_OPTION([-Qunused-arguments])
174 OVS_ENABLE_OPTION([-Wshadow])
175 OVS_ENABLE_OPTION([-Wmultistatement-macros])
176 OVS_ENABLE_OPTION([-Wcast-align=strict])
177 OVS_ENABLE_OPTION([-Wno-null-pointer-arithmetic])
178 OVS_ENABLE_OPTION([-Warray-bounds-pointer-arithmetic])
179 OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
180 OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
181 OVS_ENABLE_WERROR
182 OVS_ENABLE_SPARSE
183 OVS_CTAGS_IDENTIFIERS
184
185 AC_ARG_VAR(KARCH, [Kernel Architecture String])
186 AC_SUBST(KARCH)
187 OVS_CHECK_LINUX
188 OVS_CHECK_LINUX_NETLINK
189 OVS_CHECK_LINUX_TC
190 OVS_CHECK_LINUX_SCTP_CT
191 OVS_CHECK_DPDK
192 OVS_CHECK_PRAGMA_MESSAGE
193 AC_SUBST([OVS_CFLAGS])
194 AC_SUBST([OVS_LDFLAGS])
195
196 AC_CONFIG_FILES(Makefile)
197 AC_CONFIG_FILES(datapath/Makefile)
198 AC_CONFIG_FILES(datapath/linux/Kbuild)
199 AC_CONFIG_FILES(datapath/linux/Makefile)
200 AC_CONFIG_FILES(datapath/linux/Makefile.main)
201 AC_CONFIG_FILES(tests/atlocal)
202 AC_CONFIG_FILES(lib/libopenvswitch.pc)
203 AC_CONFIG_FILES(lib/libsflow.pc)
204 AC_CONFIG_FILES(ofproto/libofproto.pc)
205 AC_CONFIG_FILES(ovsdb/libovsdb.pc)
206 AC_CONFIG_FILES(include/openvswitch/version.h)
207
208 dnl This makes sure that include/openflow gets created in the build directory.
209 AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
210
211 AC_CONFIG_COMMANDS([utilities/bugtool/dummy], [:])
212 AC_CONFIG_COMMANDS([ipsec/dummy], [:])
213
214 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
215
216 AC_OUTPUT