]> git.proxmox.com Git - mirror_ovs.git/blame_incremental - configure.ac
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / configure.ac
... / ...
CommitLineData
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
15AC_PREREQ(2.63)
16AC_INIT(openvswitch, 2.15.90, bugs@openvswitch.org)
17AC_CONFIG_SRCDIR([datapath/datapath.c])
18AC_CONFIG_MACRO_DIR([m4])
19AC_CONFIG_AUX_DIR([build-aux])
20AC_CONFIG_HEADERS([config.h])
21AC_CONFIG_TESTDIR([tests])
22AM_INIT_AUTOMAKE([tar-pax])
23
24AC_PROG_CC_C99
25AM_PROG_CC_C_O
26AC_PROG_CXX
27AC_PROG_CPP
28AC_PROG_MKDIR_P
29AC_PROG_FGREP
30AC_PROG_EGREP
31PKG_PROG_PKG_CONFIG
32
33AM_MISSING_PROG([AUTOM4TE], [autom4te])
34
35AC_USE_SYSTEM_EXTENSIONS
36AC_C_BIGENDIAN
37AC_SYS_LARGEFILE
38
39LT_INIT([disable-shared])
40m4_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
66m4_define([libopenvswitch_lt_current], [0])
67m4_define([libopenvswitch_lt_revision], [0])
68m4_define([libopenvswitch_lt_age], [0])
69
70LT_CURRENT=libopenvswitch_lt_current
71AC_SUBST([LT_CURRENT])
72LT_REVISION=libopenvswitch_lt_revision
73AC_SUBST([LT_REVISION])
74LT_AGE=libopenvswitch_lt_age
75AC_SUBST([LT_AGE])
76
77AC_SEARCH_LIBS([pow], [m])
78AC_SEARCH_LIBS([clock_gettime], [rt])
79AC_SEARCH_LIBS([timer_create], [rt])
80AC_SEARCH_LIBS([pthread_rwlock_tryrdlock], [pthread])
81AC_SEARCH_LIBS([pthread_rwlockattr_destroy], [pthread])
82AC_SEARCH_LIBS([pthread_spin_lock], [pthread])
83AC_CHECK_FUNCS([pthread_spin_lock])
84AC_FUNC_STRERROR_R
85
86OVS_CHECK_WIN64
87OVS_CHECK_WIN32
88OVS_CHECK_VISUAL_STUDIO_DDK
89OVS_CHECK_COVERAGE
90OVS_CHECK_NDEBUG
91OVS_CHECK_NETLINK
92OVS_CHECK_OPENSSL
93OVS_CHECK_LIBCAPNG
94OVS_CHECK_LOGDIR
95OVS_CHECK_PYTHON3
96OVS_CHECK_FLAKE8
97OVS_CHECK_SPHINX
98OVS_CHECK_DOT
99OVS_CHECK_IF_DL
100OVS_CHECK_STRTOK_R
101OVS_CHECK_LINUX_AF_XDP
102AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
103AC_CHECK_DECLS([malloc_trim], [], [], [[#include <malloc.h>]])
104AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec],
105 [], [], [[#include <sys/stat.h>]])
106AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]])
107AC_CHECK_MEMBERS([struct mmsghdr.msg_len], [], [], [[#include <sys/socket.h>]])
108AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], [], [],
109 [[#include <sys/socket.h>
110#include <sys/types.h>
111#include <netinet/in.h>]])
112AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r sendmmsg clock_gettime])
113AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h])
114AC_CHECK_HEADERS([linux/net_namespace.h stdatomic.h bits/floatn-common.h])
115AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h>
116#include <net/if.h>]])
117
118OVS_CHECK_PKIDIR
119OVS_CHECK_RUNDIR
120OVS_CHECK_DBDIR
121OVS_CHECK_BACKTRACE
122OVS_CHECK_PERF_EVENT
123OVS_CHECK_VALGRIND
124OVS_CHECK_SOCKET_LIBS
125OVS_CHECK_XENSERVER_VERSION
126OVS_CHECK_GROFF
127OVS_CHECK_TLS
128OVS_CHECK_ATOMIC_LIBS
129OVS_CHECK_GCC4_ATOMICS
130OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
131OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
132OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(4)
133OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(8)
134OVS_CHECK_POSIX_AIO
135OVS_CHECK_PTHREAD_SET_NAME
136OVS_CHECK_LINUX_HOST
137OVS_LIBTOOL_VERSIONS
138OVS_CHECK_CXX
139AX_FUNC_POSIX_MEMALIGN
140OVS_CHECK_UNBOUND
141OVS_CHECK_UNWIND
142
143OVS_CHECK_INCLUDE_NEXT([stdio.h string.h])
144AC_CONFIG_FILES([
145 lib/stdio.h
146 lib/string.h
147 ovsdb/libovsdb.sym
148 ofproto/libofproto.sym
149 lib/libsflow.sym
150 lib/libopenvswitch.sym
151 vtep/libvtep.sym])
152
153OVS_ENABLE_OPTION([-Wall])
154OVS_ENABLE_OPTION([-Wextra])
155OVS_ENABLE_OPTION([-Wno-sign-compare])
156OVS_ENABLE_OPTION([-Wpointer-arith])
157OVS_ENABLE_OPTION([-Wformat -Wformat-security])
158OVS_ENABLE_OPTION([-Wswitch-enum])
159OVS_ENABLE_OPTION([-Wunused-parameter])
160OVS_ENABLE_OPTION([-Wbad-function-cast])
161OVS_ENABLE_OPTION([-Wcast-align])
162OVS_ENABLE_OPTION([-Wstrict-prototypes])
163OVS_ENABLE_OPTION([-Wold-style-definition])
164OVS_ENABLE_OPTION([-Wmissing-prototypes])
165OVS_ENABLE_OPTION([-Wmissing-field-initializers])
166OVS_ENABLE_OPTION([-Wthread-safety])
167OVS_ENABLE_OPTION([-fno-strict-aliasing])
168OVS_ENABLE_OPTION([-Wswitch-bool])
169OVS_ENABLE_OPTION([-Wlogical-not-parentheses])
170OVS_ENABLE_OPTION([-Wsizeof-array-argument])
171OVS_ENABLE_OPTION([-Wbool-compare])
172OVS_ENABLE_OPTION([-Wshift-negative-value])
173OVS_ENABLE_OPTION([-Wduplicated-cond])
174OVS_ENABLE_OPTION([-Qunused-arguments])
175OVS_ENABLE_OPTION([-Wshadow])
176OVS_ENABLE_OPTION([-Wmultistatement-macros])
177OVS_ENABLE_OPTION([-Wcast-align=strict])
178OVS_ENABLE_OPTION([-Wno-null-pointer-arithmetic])
179OVS_ENABLE_OPTION([-Warray-bounds-pointer-arithmetic])
180OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
181OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
182OVS_CONDITIONAL_CC_OPTION([-mavx512f], [HAVE_AVX512F])
183OVS_CHECK_CC_OPTION([-mavx512f], [CFLAGS="$CFLAGS -DHAVE_AVX512F"])
184OVS_ENABLE_WERROR
185OVS_ENABLE_SPARSE
186OVS_CTAGS_IDENTIFIERS
187OVS_CHECK_DPCLS_AUTOVALIDATOR
188OVS_CHECK_BINUTILS_AVX512
189
190AC_ARG_VAR(KARCH, [Kernel Architecture String])
191AC_SUBST(KARCH)
192OVS_CHECK_LINUX
193OVS_CHECK_LINUX_NETLINK
194OVS_CHECK_LINUX_TC
195OVS_CHECK_LINUX_SCTP_CT
196OVS_CHECK_LINUX_VIRTIO_TYPES
197OVS_CHECK_DPDK
198OVS_CHECK_PRAGMA_MESSAGE
199AC_SUBST([OVS_CFLAGS])
200AC_SUBST([OVS_LDFLAGS])
201
202AC_CONFIG_FILES(Makefile)
203AC_CONFIG_FILES(datapath/Makefile)
204AC_CONFIG_FILES(datapath/linux/Kbuild)
205AC_CONFIG_FILES(datapath/linux/Makefile)
206AC_CONFIG_FILES(datapath/linux/Makefile.main)
207AC_CONFIG_FILES(tests/atlocal)
208AC_CONFIG_FILES(lib/libopenvswitch.pc)
209AC_CONFIG_FILES(lib/libsflow.pc)
210AC_CONFIG_FILES(ofproto/libofproto.pc)
211AC_CONFIG_FILES(ovsdb/libovsdb.pc)
212AC_CONFIG_FILES(include/openvswitch/version.h)
213
214dnl This makes sure that include/openflow gets created in the build directory.
215AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
216
217AC_CONFIG_COMMANDS([utilities/bugtool/dummy], [:])
218AC_CONFIG_COMMANDS([ipsec/dummy], [:])
219
220m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
221
222AC_OUTPUT