summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* m4: Remove trailing whitespace.Ethan Jackson2012-10-171-12/+12
| | | | Signed-off-by: Ethan Jackson <ethan@nicira.com>
* config: Add explicit support for building on ESX.Ethan Jackson2012-10-091-0/+10
| | | | | | | | | | | | | The ESX userspace looks quite a bit like linux, but has some key differences which need to be specially handled in the build. To distinguish between ESX and systems which use the linux datapath module, this patch adds two new macros "ESX" and "LINUX_DATAPATH". It uses these macros to disable building code on ESX which only applies to a true Linux environment. In addition, it adds a new route-table-stub implementation which is required for the build to complete successfully on ESX. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* Make the location of the database separately configurable.Ben Pfaff2012-08-011-0/+10
| | | | | | | | | The default is unchanged, /etc/openvswitch/conf.db. This makes it possible to transition each Open vSwitch packaging from /etc/openvswitch/conf.db to /var/lib/openvswitch/conf.db independently. Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Remove bit-rotted support for "lcov".Ben Pfaff2012-07-201-1/+1
| | | | | | | | | At one point I got the "lcov" utilities to work well with OVS. Then I didn't try to use them again for a year or so, and when I did I found that it didn't work at all. I wasn't able to fix the problem easily, so it seems better to remove the feature than to leave around broken code. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: Remove --with-build-number.Ben Pfaff2012-03-191-53/+0
| | | | | | | | | | From early days, Nicira used the --with-build-number option to configure to stamp our internal builds. We've since switched to another scheme, so this option is obsolete. Good riddance. Signed-off-by: Ben Pfaff <blp@nicira.com>
* configure: add configure option to disable building brcompatChris Wright2012-03-131-0/+20
| | | | | | | | | | | | | | | | | | This adds ability to do: ./configure --disable-brcompat to disable building userspace and kernel module associated with providing linux bridge compatibility. Sources should still be distributed w/ make dist. While there, update comment referring to long removed veth driver which is now relevant for brcompat module. Cc: Jesse Gross <jesse@nicira.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* debian: Move PKI directory to FHS-compliant location.Ben Pfaff2012-03-011-3/+3
| | | | | | | | | | The PKI directory is mutable state, so it should be in /var, not in /usr. This commit changes its location and, on systems upgraded from earlier versions, moves the existing PKI and leaves behind a symlink. CC: 661090@bugs.debian.org Reported-by: Andreas Beckmann <debian@abeckmann.de> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath: Always use generic stats for devices (vports)Pravin Shelar2011-09-151-19/+0
| | | | | | | | | | | | | | | Currently ovs is using device stats for Linux devices and count them itself in other situations. This leads to overlap with hardware stats, inconsistencies, etc. It's much better to just always count the packets flowing through the switch and let userspace do any merging that it wants. Following patch removes vport->get_stats() interface. vport-stat is changed to use new `struct ovs_vport_stat` rather than rtnl_link_stats64. Definitions of rtnl_link_stats64 is removed from OVS. dipf_port->stat is also removed as aggregate stats are only available at netdev layer. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* docs: Add Makefile rule to check syntax of manpages.Ben Pfaff2011-08-241-0/+12
| | | | | This should catch future nroff syntax errors immediately, instead of much later.
* configure: Improve error message when pkg-config is missing.Ben Pfaff2011-07-131-2/+1
| | | | | | | | | | Until now, when pkg-config is missing, Autoconf emitted this error: error: possibly undefined macro: PKG_CHECK_MODULES This commit changes the message to: error: Please install pkg-config. This should be easier for users to interpret. Suggested-by: Ethan Jackson <ethan@nicira.com>
* backtrace: Make backtrace_capture() work on more systems.Ben Pfaff2011-05-131-0/+5
| | | | | | | | | | The backtrace_capture() implementation only worked properly with GNU C on systems that have a simple stack frame with a frame pointer. Notably, the x86-64 ABI by default has no frame pointer, so this failed on x86-64. However, glibc has a function named backtrace() that does what we want. This commit tests for this function and uses it when it is present, fixing x86-64 backtraces.
* datapath: Tolerate backporting of rtnl_link_stats64 (as in RHEL 6).Ben Pfaff2011-02-041-1/+20
| | | | | | | | | | | | | | | | | | | | Red Hat Enterprise Linux 6 has a 2.6.32 kernel but it backports the rtnl_link_stats64 structure that was introduced in 2.6.35, so we need to check whether it was defined instead of just guessing based on the kernel version number. Build-tested only, on 2.6.32-71.14.1.el6 (RHEL 6), linux-2.6.18-128.1.6.el5.xs5.5.0.496.101 (XenServer 5.5.0), 2.6.18-128.1.6.el5.xs5.5.0.505.1024xen (XenServer 5.5.0 update 1), and upstream 2.6.18, 2.6.26, 2.6.29, 2.6.33, 2.6.34, 2.6.36, all for i386, plus 2.6.36 for x86-64. My machine's userspace headers have <linux/if_link.h> but not rtnl_link_stats64. Jesse Gross tested the case where <linux/if_link.h> has rtnl_link_stats64, on Ubuntu 10.10. Reported-by: Geoff White <gwhite@nicira.com> Tested-by: Jesse Gross <jesse@nicira.com>
* docs: Only regenerate vswitch.pic when the schema really changes.Ben Pfaff2010-12-061-14/+1
| | | | | | | | | Until now, vswitch.pic has been rebuilt whenever the schema changed. This is OK when the E-R diagram would really change, but many changes to the schema don't change the E-R diagram, and it surprises people when vswitch.pic changes in such a situation. This commit fixes the problem. Requested-by: Justin Pettit <jpettit@nicira.com>
* vlog: Generate vlog-modules.def automatically.Ben Pfaff2010-11-301-1/+3
|
* configure: Check for pkg-config "openssl" library instead of "libssl".Ben Pfaff2010-11-291-3/+3
| | | | | | | | Checking for libssl only does not necessarily link against libcrypto, so the build can gratuitously fail. Reported-by: Dave Walker <DaveWalker@ubuntu.com> Ubuntu bug #680439.
* configure: Fix Graphviz test and input generation.Ben Pfaff2010-11-051-1/+1
| | | | | | | | | | This check for Graphviz never actually worked properly because Autoconf swallows up the [] around [gG], so Graphviz was always detected as missing. This commit fixes the problem by doubling up to [[gG]]. Because Graphviz was never used, I never noticed that ovsdb-dot had not been revised to use the latest Python interface to OVSDB, so this commit fixes up those problems too.