summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* libX: add new release / version info tagsAaron Conole2017-01-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit uses the $PACKAGE_VERSION automake variable to construct a release and version info combination which sets the library name to be: libfoo-$(OVS_MAJOR_VERSION).so.$(OVS_MINOR_VERSION).0.$(OVS_MICRO_VERSION) where formerly, it was always: libfoo.so.1.0.0 This allows releases of Open vSwitch libraries to reflect which specific versions they came with, and sets up a psuedo ABI-versioning scheme. In this fashion, future releases of Open vSwitch could be installed alongside older releases, allowing 3rd party utilities linked against previous versions to continue to function. ex: $ ldd /path/to/utility linux-vdso.so.1 (0x00007ffe92cf6000) libopenvswitch-2.so.6 => /lib64/libopenvswitch-2.so.6 (0x00007f733b7a3000) libssl.so.10 => /lib64/libssl.so.10 (0x00007f733b530000) ... Note the library name and version information. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* make: Check for Sphinx before checking docsStephen Finucane2017-01-041-1/+13
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Ben Pfaff <blp@ovn.org>
* build-windows: Update for msysAlin Serdean2016-04-121-1/+1
| | | | | | | | | Building under msys2(https://msys2.github.io/) revealed a small bug while defining the path separator. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* m4: Rename compat.at to compat.m4.Ben Pfaff2016-02-262-2/+2
| | | | | | | This is used by both Autoconf and Autotest, so it doesn't make sense for it to have a .at (Autotest) extension. Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Move Autotest compatibility macros into tests directory.Ben Pfaff2016-02-261-15/+0
| | | | | | | | | compat.at mixes compatibility for m4sh, which is used by Autoconf and Autotest, with compatibility for Autotest. It makes more sense to separate them. This moves the Autotest-only compatibility macros into an Autotest specific file. Signed-off-by: Ben Pfaff <blp@ovn.org>
* configure: Fix checking of six library for Python 3.Ilya Maximets2016-02-241-3/+3
| | | | | | | | Copied from python 2 checker but not corrected. Fixes: 8fb7d02686ed ("configure: Check for presence of Python 3.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* configure: Check for presence of Python 3.Russell Bryant2016-02-221-0/+42
| | | | | | | | | The configure script already checked for Python 2 (>=2.7). Add another check for Python 3 (>=3.4). This will be used later for automatically running tests with Python 3 as well if available. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Fix xmlrpclib imports.Russell Bryant2016-01-201-0/+6
| | | | | | | | | | | | | | Fix imports of xmlrpclib to be compatible with Python 3. Python 2 had xmlrpclib (client) and SimpleXMLRPCServer (server). In Python 3, these have been renamed to xmlrpc.client and xmlrpc.server. The solution implemented here is to use the six library. It may seem excessive for this particular issue, but the six library provides helpers for Python 2 and 3 compatibility for many different issues. This is just the first of many uses of the six library. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Run flake8 at build time.Russell Bryant2016-01-051-0/+12
| | | | | | | | | | | | If flake8 is installed, run it at build time. Similar to most Makefile targets, run it once and then only run again if the files change. flake8 is set to ignore all error and warning types that currently occur. Future patches will remove items from the ignore list as they are resolved. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* confifugre: Fix broken sed calls in shell code.Alin Serdean2015-12-141-2/+2
| | | | | | | | | | Commit 43000bc (openvswitch.m4: Portability improvement), which introduced a portability improvement, also introduces two bugs. This commit fixes both bug, by adding the command for $SED 's' and changes to x86 for 32 bit instead of x64. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* openvswitch.m4: Portability improvementYAMAMOTO Takashi2015-11-261-2/+2
| | | | | | | | ${parameter/pattern/string} substituion is not portable. Replace them with $SED equivalent. Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com> Acked-by: Ben Pfaff <blp@ovn.org>
* configure: add configuration options for libcap-ngAndy Zhou2015-09-301-0/+36
| | | | | | | | | | | | | | | | | | | Add configuration option for enabling or disabling linking with libcap-ng. Since capabilities are a security feature, the libcapng option is handled as follows: - no option: use libcapng if it's present --disable-libcapng: do not use libcapng --enable-libcapng: do use libcapng and fail configuration if it's missing On Linux, not linking with libcapng makes all OVS daemons fail when --user option is specified. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Add build system for compiling under MSVC x64Alin Serdean2015-09-291-2/+31
| | | | | | | | | | | | | | | This patch adds the modifications needed to compile under x64 under Windows: - created a new macro for testing if we are compiling under x64. this will define the linker flag: "/MACHINE:X64" as per documentation (https://msdn.microsoft.com/en-us/library/9yb4317s.aspx). - added x64 pthread libraries under the pthread defines - add documentation on how to build under x64 Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* tests: Reduce user burden for running "make check".Alin Serdean2015-06-251-2/+5
| | | | | | | | | With this commit, users do not have to manually add the pthread-win32 DLL directory to their PATH. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Increase prerequisite from Python 2.4 to Python 2.7.Ben Pfaff2015-06-231-34/+4
| | | | | | | This means that users of XenServer 6.5 and earlier will need to install Python 2.7. Signed-off-by: Ben Pfaff <blp@nicira.com>
* This commit adds the windows installer to the OVS tree.Alin Gabriel Serdean2015-06-071-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requirements are the following: Visual Studio Community 2013 WiX Toolset 3.9 Microsoft_VC120_CRT_x86.msm More detailed information on the requirements and build instructions can be found under: https://github.com/cloudbase/ovs-windows-installer/blob/master/README.rst To run and make the installer issue the following: ./boot.sh ./configure CC=./build-aux/cccl LD="`which link`" \ LIBS="-lws2_32 -liphlpapi" --prefix="C:/openvswitch/usr" \ --localstatedir="C:/openvswitch/var" --sysconfdir="C:/openvswitch/etc" \ --with-pthread="C:/pthread" --with-vstudiotarget="Release" make clean && make -j16 windows_installer To uninstall one could use the following Powershell commandlets: $app = Get-WmiObject -Class Win32_Product | Where-Object ` { $_.Name -match "Open Vswitch" } $app.Uninstall() Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com> Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* autoconf: check for linux/perf_event.hAndy Zhou2015-04-161-0/+4
| | | | | | | | | | | Older Linux prior to version 2.6.32 do not support user mode performance events, They also don't have 'linux/perf_event.h' header file. Add check for those older Linux to conditionally compile perf-counter.c Reported-by: Alex Wang <alexw@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
* configure: Omit -O2 from CFLAGS when configuring with --enable-coverage.Ben Pfaff2015-01-121-2/+14
| | | | | | | | | | | | | | CFLAGS follows OVS_CFLAGS in the compiler command line, and should, so that the user can override any automatically determined compiler options. That means that the -O0 that the code here added to OVS_CFLAGS didn't really have any effect since CFLAGS by default includes "-O2". However, we do really want to disable optimizations (because the coverage reports are hard to interpret with optimizations), so this commit changes the configure script to edit out -O2 from CFLAGS, leaving any other default or user-specified options. Reported-by: Mijo Safradin <mijo@linux.vnet.ibm.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: Also check for Python 2.x installed as python2.7.Dmitry Krivenok2014-10-091-1/+1
| | | | | | | | On ArchLinux "python" points to 3.x version and the right 2.x python binary is "python2.7". Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* build: Respect CFLAGS and LDFLAGS passed to makeThomas Graf2014-09-111-2/+2
| | | | | | | | | | | | | | | configure cannot expect that the user will not pass additional CFLAGS and LDFLAGS at make time [0]. Use OVS_CFLAGS and OVS_LDFLAGS instead to collect compiler and linker flags and substitute in Makefile.am. This allows for: ./configure --with-dpdk=[...] make CFLAGS=-Wno-error=foo [0] http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* cccl: Ability to enable compiler optimization.Gurucharan Shetty2014-09-041-0/+11
| | | | | | | | | | | | | | | | | | | | MSVC has a '-O2' compiler optimization flag which makes code run fast and is the recommended option for released code. For e.g., running "./tests/ovstest.exe test-cmap benchmark 1000000 3 1" shows a 3x improvement for some cmap micro-benchmarks. In the Visual Studio world, there is a concept of "release" build (fast code, harder to debug) and a "debug" build (easier to debug). The IDE provides this option and the IDE users expect something similar for command line build. So this commit, introduces a "--with-debug" configure option for Windows and does not use '-O2' as a compiler option when specified. This can be extended further if there are more compiler options that distinguish a "release" build vs "debug" build. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Saurabh Shah <ssaurabh@vmware.com>
* Add BUILD_MESSAGE() macroDaniele Di Proietto2014-08-291-0/+9
| | | | | | | | | | | This commit introduces the BUILD_MESSAGE() macro. It uses _Pragma("message"), with compilers that support that, to output a warning-like compile-time message without blocking the compilation. Used by next commit. Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* Add build of ovsext.sln using MSBuildAlin Serdean2014-08-281-0/+28
| | | | | | | | | | | | | | | | | | | This commit adds to the automake build system the full build required by the forwarding extension solution. It will help a lot in the future CI to check the full build of the project. To configure the forwarding extension to be built one could use the following: ./configure CC=./build-aux/cccl LD="`which link`" LIBS="-lws2_32" \ --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \ --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" \ --with-vstudioddk="Win8.1 Release" Documentation will be updated in another patch. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Saurabh Shah <ssaurabh@vmware.com>
* configure: Don't check for malloc hooks that we no longer use.Ben Pfaff2014-07-221-20/+0
| | | | | | | | | Commit 825da1c6d1c7 (leak-checker: Remove because it cannot be made thread-safe.) removed the only uses of these hooks but neglected to remove the test for them. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* build: Allow building with autoconf 2.63Thomas Graf2014-06-272-0/+34
| | | | | | | | | | | | | | | | | | | | Reduces the dependency on autoconf from 2.64 to 2.63 to ease building on older platforms. There is only a few macros missing and they can be provided easily. A handful of tests needed modification. The difference in quoting behaviour between 2.63 and later require the m4_define() to be manually unfolded. The Debian control file is left untouched on purpose. The decision whether to adjust the dependency is left to the respective maintainers. Tested with autoconf 2.63 and 2.69. Cc: Scott Mann <smann@noironetworks.com> Cc: Don Kehn <dkehn@noironetworks.com> Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* util: Use posix_memalign for xmalloc_cacheline if availableYAMAMOTO Takashi2014-05-071-0/+50
| | | | | | | | | | | A malloc library is expected to provide a better implementation using the knowledge of its internal details. ax_func_posix_memalign.m4 was obtained from: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_func_posix_memalign.m4 Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* configure: Include pthread-win32 libraries for Windows build.Gurucharan Shetty2014-03-131-0/+21
| | | | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Saurabh Shah <ssaurabh@vmware.com> Co-authored-by: Saurabh Shah <ssaurabh@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com>
* m4: remove useless include from netlink checkDaniele Di Proietto2014-02-031-1/+0
| | | | | | | | linux/types.h is already included from linux/netlink.h (in every linux version). This will ease FreeBSD porting Signed-off-by: Daniele Di Proietto <daniele.di.proietto@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: Identify OpenSSL libraries in Windows.Gurucharan Shetty2014-01-311-2/+7
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ovsdbmonitor: Remove.Ben Pfaff2014-01-101-40/+1
| | | | | | | ovsdbmonitor was poorly maintained and not widely used. Acked-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Add common definitions for Windows builds.Alin Serdean2013-12-271-0/+3
| | | | | Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* openvswitch: Use libtool and allow building shared libsHelmut Schaa2013-12-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | Currently openvswitch builds all libraries static only. However, libopenvswitch is linked into nearly all openvswitch executables making it hardly possible to run openvswitch on embedded devices (for example running OpenWrt). Convert openvswitch to use libtool for building its internal libs. This allows "--enable-shared" and "--enable-static" as configure arguments. Default is "--disable-shared" thus keeping the current behavior with the only change that static libs are installed by "make install". Since the openvswitch library interfaces are internal and thus not stable (yet) encode the openvswitch version into the library name: libopenvswitch-2.0.90.so Binary size is reduced to around 1/3 when using shared libs. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: Add macros to check for #include_next and add a workaround.Ben Pfaff2013-12-134-0/+340
| | | | | | | This will be used for the #include_next in string.h in the following commit. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Remove unused USE_LINKER_SECTIONS and OVS_LINK2_IFELSEHelmut Schaa2013-12-131-77/+0
| | | | | | | They are unused and can be removed. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* m4: Remove assignment of otherwise unused variable RESOLVER_LIBS.Ben Pfaff2013-12-051-1/+1
| | | | | | Found by inspection. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Add check for -latomicJames Page2013-12-051-0/+6
| | | | | | | | | | | | | | Later versions of gcc on some architectures push atomic functions out into a separate atomic library; add a check to see when this is required and add it to LIBS if need be. Specifically the problem was observed on GCC 4.8.2 on powerpc architecture for Ubuntu 14.04: https://launchpadlibrarian.net/155235096/buildlog_ubuntu-trusty-powerpc.openvswitch_2.0.0-0ubuntu1_FAILEDTOBUILD.txt.gz Signed-off-by: James Page <james.page@ubuntu.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: Windows can have spaces in directories.Gurucharan Shetty2013-11-181-1/+1
| | | | | | | | Running ./configure and testing for python through PATH gives out a bunch of errors because of the extra arguments. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* configure.ac: Identify when compiling on windows.Gurucharan Shetty2013-11-181-0/+10
| | | | | | | Presence of windows.h will set the WIN32 variable. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* configure: check for uuid python moduleAnsis Atteka2013-10-181-0/+12
| | | | | | | | | | | | | | | After introducing commit a5ae88ff8a276e86c842ac102145432662bf711a "ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is available" Open vSwitch did not build anymore on hosts that did not have uuid python module installed (for example, we still support XenServer that still uses old python 2.4 and hence does not have uuid). After this commit ./configure will check whether uuid module is present and, if it isn't, then it will add python/compat to the PYTHONPATH. Acked-By: Ben Pfaff <blp@nicira.com> Signed-Off-By: Ansis Atteka <aatteka@nicira.com> Issue: 20476
* timeval: Remove CACHE_TIME scheme.Alex Wang2013-09-041-16/+0
| | | | | | | | | | | | | | This commit removes the CACHE_TIME scheme from timeval module. This is for eliminating the lock contention over the read/write lock of the cached time. To get the time, the thread now will directly do the system call 'clock_gettime()'. As a side effect, timer can only be warpped after timer is stopped by 'appctl time/stop' command. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* configure: Add configure-time check for GCC 4.0+ atomic built-ins.Ben Pfaff2013-07-311-0/+72
| | | | | | | | | | We found out earlier that GCC sometimes produces an error only at link time for atomic built-ins that are not supported on a platform. This actually tries the link at configure time and should thus reliably detect whether the atomic built-ins are really supported. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* async-append: New library to allow asynchronous appending to a log file.Ben Pfaff2013-07-181-0/+5
| | | | | | This will be hooked into the vlog library in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-atomic: New library for atomic operations.Ben Pfaff2013-06-281-0/+21
| | | | | | | | This library should prove useful for the threading changes coming up. The following commit introduces one (very simple) user. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* ovs-thread: Add per-thread data support.Ben Pfaff2013-06-251-1/+36
| | | | | | | | | | | | | | | | | POSIX defines a portable pthread_key_t API for per-thread data. GCC and C11 have two different forms of per-thread data that are generally faster than the POSIX API, where they are available. This commit adds a macro-based wrapper, DEFINE_PER_THREAD_DATA, that takes advantage of these features where they are available and falls back to the POSIX API otherwise. The Clang compiler implements C11 thread_local in its <threads.h>. This commit also adds a convenience wrapper for the POSIX API, via the DEFINE_PER_THREAD_MALLOCED_DATA macro. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* don't forget to define HAVE_BACKTRACEYAMAMOTO Takashi2013-05-211-1/+3
| | | | | Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* deal with platforms where backtrace() is in a different library than libc.YAMAMOTO Takashi2013-04-231-3/+2
| | | | | | | | execinfo for NetBSD and ubacktrace for uClibc. i don't know if the latter is relevant to Open vSwitch, though. Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* use ax_check_openssl.m4 instead of a direct use of pkg-config.YAMAMOTO Takashi2013-04-222-21/+20
| | | | | | | | | on some platforms, including NetBSD-6, openssl is available but its pkg-config files (*.pc) are not. according to Ed Maste, this is the case for FreeBSD as well. Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* add ax_check_openssl.m4YAMAMOTO Takashi2013-04-221-0/+124
| | | | | | | | this file is obtained from: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_openssl.m4;hb=5a7260331c7d13263126e35c5743fdc35cbc2894 Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* openvswitch: Remove Linux bridge compatibility.Pravin B Shelar2012-12-271-20/+0
| | | | | | | | | Currently brcompat does not work on master due to recent datapath changes. We have decided to remove it as it is not used very widely. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* timeval: Optionally enable cached timing at configure time.Ethan Jackson2012-10-171-0/+16
| | | | | | | | Often when developing, it would be convenient to force OVS to either enable or disable cached timing so that a feature can be tested under both strategies. Signed-off-by: Ethan Jackson <ethan@nicira.com>