summaryrefslogtreecommitdiff
path: root/configure
AgeCommit message (Collapse)AuthorFilesLines
2016-12-01build: configure: rewrap missing defs warningTobias Klauser1-3/+3
...and remove a superflous whitespace. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-12-01build: configure: clearify missing defs warningTobias Klauser1-3/+3
Missing definitions don't necessarily mean that certain tools won't be built. There might just be reduced functionality (e.g. geoip missing means still all tools will be compiled but they don't perform geoip lookups). Clearify the configure warning accordingly. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-10-04build: Unify default values for PREFIX and ETCDIR in configureTobias Klauser1-12/+4
The netsniff-ng make system is no longer usable without the `Config' file generated by the ^configure' script. Thus it's now possible to move default value definitions for PREFIX and ETCDIR to the configure script, so we they're not duplicated in `configure' and the Makefile. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-29build: configure: fix checking CC containing -i optionYousong Zhou1-5/+12
On CentOS 6, the configure process may hang there reading stdin if the we have CC='gcc -isystem'. This can be reproduced with bash -c 'which gcc -i' Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-15build: configure: Add option to specify install path for /etc filesVadim Kochan1-0/+10
Add new '--sysconfdir=PREFIX' option to control installation of config files, files will be installed into PREFIX/etc path. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-09-15build: configure: Add option to specify install path for binary filesVadim Kochan1-0/+20
Add new --prefix=PREFIX configure commandline option to specify installation directory for binaries. Add additional check in 'Cmds' file if --prefix was specified from 'configure' script, in that case required installation path components will be created automatically as it is done for 'make PREFIX=...' option. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-17build: configure: Add option to enable debug symbolsVadim Kochan1-0/+6
Add '--enable-debug' option to enable debugging symbols, the reason is to simplify it by ./configure it once and do not execute 'make DEBUG=1' each time for a long debug session. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-05build: configure: Allow to compile tools without libnlTobias Klauser1-3/+34
With libnl being made optional in commits 20a5e15443bf ("netsniff-ng: Allow to compile without libnl") and c831bcda3e26 ("trafgen: Allow to compile without libnl"), we can now compile netsniff-ng and trafgen without libnl being present. For now we don't consider libnl and libnl-route separately, meaning that if libnl-route is not present, we disable libnl support entirely. Also add a configure option to explicitely disable building netsniff-ng and trafgen with libnl support. Based on original patch by Vadim Kochan. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-04build: configure: Use command line options to disable optional librariesTobias Klauser1-2/+39
Make the configure script accept command line options similar to the autotools generated configure. Implement --disable-geoip and --disable-zlib and use the to replace the respective DISABLE_* variables introduced in 0349b93a6689a ("build: configure: Allow to disable support for libgeoip and zlib"). Also update INSTALL and the travis CI configuration accordingly. Based on previous work by Vadim Kochan. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-22build: configure: Allow to disable support for libgeoip and zlibTobias Klauser1-0/+10
Allow users to explicitely disable linking against libgeoip and zlib, as they are completely optional, e.g: DISABLE_GEOIP=1 ./configure && make DISABLE_ZLIB=1 ./configure && make This change should also help to increase build coverage once we use these options in the Travis CI setup. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-22build: configure: Write a comment to config.h for disabled featuresTobias Klauser1-0/+10
When looking at config.h it should be obvious which features were enabled and disabled, so put a comment there in cased they are disabled. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-11-06build: configure: Silence pkg-config check for libnetfilter_conntrackTobias Klauser1-1/+6
Redirect stderr output of pkg-config to config.log in order to not spam the configure output with pkg-config errors. Instead, use the same pkg-config commands as for the other library checks to get libnetfilter_conntrack cflags. Additionally, use pkg-config to the the linker flags as well. Fixes: 19991f90 ("build: Handle libnetfilter-conntrack with pkg-config") Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-11-06build: configure: Check for libnl-routeVadim Kochan1-0/+36
libnl-route is used in netsniff-ng to dump nlmsg flags. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-11-05build: Handle libnetfilter-conntrack with pkg-configMartin Hauke1-1/+1
Needed for openSUSE since they have versioned libnetfilter-header files. Signed-off-by: Martin Hauke <mardnh@gmx.de> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-08-19build: Don't strip generated binariesTobias Klauser1-11/+0
Except for some minor saving in disk space, stripping the binaries doesn't bring any benefits and it might prevent us from getting usable debugging information even from binaries build with DEBUG not set. Most distributions will strip the binaries as part of their packaging process anyhow. If someone really wants stripped binaries as a result of the netsniff-ng build, they could still add '-s' to CFLAGS or call strip manually. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-08-19build: configure: Prepend $SYSROOT to NACL_{INC,LIB}_DIRTobias Klauser1-2/+2
Otherwise nacl will not get picked up when cross-compiling. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-08-19build: configure: Properly encapsulate stringsTobias Klauser1-3/+3
This fixes the following errors when running configure e.g. inside the OpenEmbedded environment: ./configure: line 23: [: too many arguments ./configure: line 24: [: i586-oe-linux-ld: binary operator expected Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-04-23build: Restore support for cross-compiling the netsniff-ng toolkitTobias Klauser1-22/+65
Ever since we switched to the hand-crafted ./configure script, support for cross-compiling the netsniff-ng toolkit was basically broken. Restore the abaility to cross-compile our tools by making ./configure consider the CROSS_COMPILE and SYSROOT variables. Example for cross-compiling on arm: $ CROSS_COMPILE=arm-linux-gnueabihf- \ SYSROOT=/usr/arm-linux-gnueabihf \ ./configure $ make assuming the cross-compiled libraries (and their respective pkg-config information) are in /usr/arm-linux-gnueabihf. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-10-01build: Make ccache opt-in rather than opt-outTobias Klauser1-14/+0
Using ccache by default for compilation if it is available on the system might confuse people and in rare cases also lead to unexpected results. Thus, from now on the use of ccache for compilation has to explicitely specified by setting the CCACHE make variable to the name/path of the ccache binary, i.e. `make CCACHE=ccache' Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-09-08build: Change return type of main in configure compile test programsTobias Klauser1-12/+12
When running the configure script with `CC=clang ./configure' clang fails all the compile test programs due to the main() function not having return type int. Change it, so we can use clang as a compiler in the configure script. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-08-14netsniff-ng: Restore tpacket v2 capturingTobias Klauser1-1/+0
Some older systems (e.g. RHEL 6) don't have tpacket v3 available, but only tpacket v2. However, since commit d8cdc6a ("ring: netsniff-ng: migrate capture only to TPACKET_V3") we solely rely on tpacket v3 for capturing packets. This patch restores the possibility to capture using tpacket v2. For now this is just a fallback if the configure script doesn't detect tpacket v3 (and thus HAVE_TPACKET3 isn't set). Thus, on most modern systems this shouldn't change anything and they will continue using tpacket v3. For now this fix contains quite a bit of ugly #ifdefery which should be cleaned up in the future. Fixes #76 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-06-13lookup: Move UDP/TCP port and Ethernet type lookup into own moduleTobias Klauser1-1/+0
Up to now, the lookup of TCP/UDP port names and Ethernet types was tightly integrated with the dissector infrastructure, since it is its main user. However, flowtop also makes use of the name lookup functionality without needing the actual dissector infrastructure. Thus, the basic dissector infrastructure also needs to be linked into flowtop without actually being used. Fix this by extracting the port/ethertype lookup into an own module which can then be used either directly (for flowtop) or as part of the dissector infrastructure (for netsniff-ng). This also reverts the quick & dirty fix introduced in commit f3322c6 ("flowtop: Include netlink dissector to fix build temporarily"). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-06-13flowtop: Include netlink dissector to fix build temporarilyTobias Klauser1-0/+1
flowtop links in the dissector modules just for the TC/UDP port lookup feature. Since dissector.h now includes libnl headers, we also need to include the libnl CFLAGS for flowtop build and thus also make it depend on libnl. The real fix for this in the future would be to extract the port lookup from dissector_eth.c and the just link in this module into flowtop instead of the entire dissector stuff. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-05-27build: Allow to build astraceroute and flowtop without GeoIP supportTobias Klauser1-2/+0
Both tools are already prepared to handle NULL return values of the geoip_* lookup functions, so we might as well build them without geoip support if not needed/present. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-05-27build: Remove unused CONFIG_LIBGEOIPTobias Klauser1-2/+0
If libgeoip is present, CONFIG_GEOIP will be set later on depending on HAVE_LIBGEOIP, we thus don't need to write CONFIG_LIBGEOIP to Config. This symbol isn't used anywhere in the build process. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-04-11build: curvetun: add NACL_LIB variable to configure to be able to set an ↵Christian Wiese1-0/+5
alternative lib This way one can simply set an alternative lib like libsodium for linking the curvetun binary. The current default linking against libnacl is preserved! To link curvetun against libsodium you can set NACL_LIB=sodium Signed-off-by: Christian Wiese <chris@opensde.org> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-12-18debian: compile fix for programs using ncursesJesper Dangaard Brouer1-1/+2
For some reason the Debian ncurses version does not contain a ncurses.pc pkg-config file. Fix this by echoing "-lncurses" if the command fails: pkg-config --libs ncurses This fix will make ifpps compile on Debian Squeeze 6.0.8. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2013-08-21configure: minor: Rephrase and reformat some messagesTobias Klauser1-12/+11
Make sure all messages use a max. text width of 70 characters (in order for them to be easily pasteable into an email), remove a trailing whitespace and reword some bits. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-20configure: allow trafgen build when only TPACKET_V2 is availableDaniel Borkmann1-0/+8
On machines like RHEL6 that do not have support for TPACKET_V3, we should still allow at least trafgen to be built for network testing. Thus, do something useful with the TPACKET_V3 configure check and comment out in ring.h relevant structures. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-05mausezahn: libcli: add sys/time.h for older libcli versionsDaniel Borkmann1-0/+1
Older versions of libcli lack an include in libcli.h. [1] fixed the configure script to not fail in in the test [2], and an include into cli.h was added as well for the main mausezahn build. [1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-libcli-test.patch?revision=1.1&view=markup [2] http://b-4.xmw.de/var/log/portage/build/net-analyzer/netsniff-ng-0.5.8_rc2:20130805-055918.log Reported-by: Michael Weber <michael@xmw.de> Suggested-by: Michael Weber <michael@xmw.de> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-24build: add "+" version appendix automatically during buildDaniel Borkmann1-0/+16
For each build that has no tag name (thus for all commits except releases), we add a "+" version appendix to indicate that it is further than the rc tag itself, like in the kernel. Do this during configure automatically. This is useful in case someone wants to package a relase, so that the full version name indicates that. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-15configure: silent complaint if not built on git repositoryDaniel Borkmann1-1/+8
This silences a complaint if the toolkit is not built within a Git repository: ... [*] Checking libnet ... [YES] fatal: Not a git repository (or any of the parent directories): .git [*] Generating config.h ... [*] Looks good! All tools will be built! This is not problematic as the build can be done without any problems. It will just have an empty Git id in --version output. So simply silence this complaint and move on. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: fix wrong whitespacingDaniel Borkmann1-2/+2
Not sure how this came in with the last commit, but fix it to the correct format. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: redirect all compile output to our local config.logDaniel Borkmann1-24/+24
On errors in the configuration, redirect everything to config.log, and not some parts to config.log and some others to $TMPDIR/config.log. This will give a nice summary of what goes wrong to the user. Also, in case everything looks fine, the config.log file will be created, but with size 0 and no warning is thrown. So looks good. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: do not use bash's expr matchDaniel Borkmann1-6/+6
It looks like there are some incompatibilities in bash's expr match among different versions. Using set -x, gives us on bash 4.2.45: + TOOLS=' netsniff-ng trafgen ifpps bpfc' + for tool in '$_tools' + case "$tool" in ++ expr match '"curvetun' 'astraceroute"' '$1' expr: syntax error + m= + '[' '' == 0 ']' So rather avoid using "expr match" and switch to "case" for substring matching, which should be more portable. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-12configure: fix libnetfilter_conntrack dependency removalDaniel Borkmann1-1/+1
tools_remove "libnetfilter-conntrack" makes no sense, so replace it with the actual correct tools_remove "flowtop". Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11configure: Redirect pkg-config errors to log fileTobias Klauser1-6/+13
If pkg-config doesn't find a library it prints an error to stderr. Instead of directly printing them as part of the configure output, redirect them to config.log and let the user know about it in case there are any messages. Suggested-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-11configure, netsniff-ng: if no libgeopip, do not link against libzDaniel Borkmann1-1/+16
In netsniff-ng, we only use libz in combination with libgeoip, so if we lack either one of them, do not link against the other either. This would be a waste otherwise. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-11configure, netsniff-ng: make netsniff-ng's geoip dependency optionalDaniel Borkmann1-1/+10
Geoip dependency should not be mandatory as it's not a core part of netsniff-ng. This also facilitates compilation on platforms where geoip is not available. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-10configure: check for flex and bisonDaniel Borkmann1-0/+30
flex and bison are needed for bpfc and trafgen, so check for their existance. If they are not present, lets remove those two from the build in case users do not want it. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-09configure: fix multiple issues in build configurationDaniel Borkmann1-1/+66
This patch is a bundle of multiple fixes. 1) Fix compilation of astraceroute when HAVE_LIBPCAP=1: astraceroute doesn't need libpcap, so add an additional guard/define to bpf.h and bpf_comp.c and netsniff-ng.c. Also since we generate a config.h file, we do not need to have this additional compile flag anymore. 2) Fix tstamping.{h,c} to use the configure script instead of the Makefile. For doing this, also fix the object inclusion in netsniff-ng/Makefile. Last but not least, rename __WITH_... into HAVE_... as this is more clean. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-09configure: let configure script generate config.h fileDaniel Borkmann1-0/+20
While we're at it, also let configure script generate the config.h file. The generation of it is currently quite static, but that could change in future. While at it, we also generate a GITVERSION define, that we will use for ``--version'' output of the individual tools for being able to provide better support since we can see what concrete commit people are using when building from Git repo. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure: when we have all deps rather tell "all tools will be built"Daniel Borkmann1-2/+7
In case we have all dependencies, tell the user that all tools will be built instead of listing the tools. Only list them when we do not have all deps. This should facilitate usability a bit. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure: netsniff-ng: libpcap is not a hard dependencyDaniel Borkmann1-1/+2
netsniff-ng uses libpcap only for high-level filter compiling. Thus, let netsniff-ng not "hard-depend" on libpcap, but rather disable filter compiling in case the user does not want to install libpcap. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure: make: misc: update header commentDaniel Borkmann1-0/+4
Add a header comment to the configure script with Tobias as the primary author, and also mention Tobias as an author in the Makefile itself for his changes. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure: test also tpacket flags e.g. used in TX_RINGDaniel Borkmann1-6/+12
Also try compile-testing TPACKET_V2/3 flags that are used in some particular versions, especially in TX_RING. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure: two fixes on dependenciesDaniel Borkmann1-6/+35
1) netsniff-ng is also dependant on libnl (e.g. for raw 802.11 devices) 2) Only netsniff-ng depends on tpacket_v3, trafgen on tpacket_v2. Thus, add checks for both. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-08configure, Makefile: Conditionally build toolsTobias Klauser1-11/+101
Instead of halting out the entire build build if one dependency is not available, only exclude the tools that link against it from building. The configure script will now print a list of all tools that will be built -- and in case some libaries are not available -- that will not be built. Also add checks for libcli and libnet which mausezahn depends on. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-08configure: Add check for libpcapTobias Klauser1-0/+24
libpcap is used to compile tcpdump-like filters in netsniff-ng, so check for it in configure. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-08configure: Call a function from libgeoip in check_libgeoip()Tobias Klauser1-1/+3
In order to cause the linker to get called and thus the check for the presence of the library (not just the headers) to be performed, call GeoIP_new(). Also pass the proper linker flag to $CC. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>