summaryrefslogtreecommitdiff
path: root/aclocal.m4
Commit message (Collapse)AuthorAgeFilesLines
* Remove a trailing tabFrancois-Xavier Le Bail2020-08-011-1/+1
|
* autoconf: replace --with-system-libpcap with --disable-local-libpcap.Guy Harris2020-07-191-42/+51
| | | | | | | | --with-system-libpcap didn't work - it didn't prevent searching for a local libpcap - and had a misleading name. Replace it with --disable-local-libpcap. This should address GitHub issue #823.
* Compile with '-Wmissing-variable-declarations' if it's availableFrancois-Xavier Le Bail2020-05-301-0/+1
| | | | (In devel mode)
* Look for mkdep in the top-level source directory.Guy Harris2020-03-021-1/+1
| | | | | Not currently a problem for tcpdump, as we have no subdirectories, but this will leave us prepared for subdirectories if we ever add any.
* Remove the hacks to avoid floating-point issues in the tcpdump checks.Guy Harris2020-02-041-8/+0
| | | | | | | | | | | I can't seem to make those issues pop up on my (x86-64) machine, and, if they do show up on any platforms, the best hack to handle it is probably to have a special tcpdump flag to force it to do a floating-point calculation and see what result is generated, and report the result, so we know what it'll do with the numbers in the test files, and have tests/TESTrun run tcpdump with that flag. If those tests *do* fail, we'll know what calculations to do.
* Use -Wpointer-sign if it's availableFrancois-Xavier Le Bail2019-07-131-0/+1
|
* Note that we don't need to worry about pkg-config lacking --exists.Guy Harris2019-04-301-0/+4
| | | | [skip ci]
* Use pkg-config if we can. Clean up some CMake stuff.Guy Harris2019-04-261-47/+95
| | | | | | | | | | | | | | | | If we have pkg-config, *and* it has .pc files for libpcap, use it to get the C compiler flags and linker flags for libpcap. find_library() sets a cache variable; when we're looping over libraries, trying to find their full paths, we really want the variable to act as a local variable, as we're looking up different libraries, so unset it after we're finished processing a particular library. When we're searching for static libraries, save the current value of CMAKE_FIND_LIBRARY_SUFFIXES, set it to ".a", and then restore it when we're done. Don't use cmake_push_check_state() for that, as CMAKE_FIND_LIBRARY_SUFFIXES is *not* one of the variables that it's guaranteed to save and restore.
* Compile with '-Wsign-compare' in devel mode if supportedFrancois-Xavier Le Bail2018-10-291-0/+1
|
* Don't warn about declarations after statements.Guy Harris2018-09-151-1/+0
| | | | | We now allow them, and require a compiler that supports them, so there's no need to warn about them.
* Fix spacesFrancois-Xavier Le Bail2018-09-031-4/+4
|
* Fix some spelling in comments.Denis Ovsienko2018-08-011-3/+3
| | | | [skip ci]
* Compile with '-Wunreachable-code-return' in devel mode if supportedFrancois-Xavier Le Bail2018-07-171-0/+1
|
* Sort the tested compiler warning optionsFrancois-Xavier Le Bail2018-07-071-8/+8
|
* If we have a local libpcap, add it to the dependencies for tcpdump.Guy Harris2018-01-221-2/+6
| | | | We weren't doing so if we found a local pcap-config script.
* Use AC_RUN_LOG when testing the dependency-generating flag.Guy Harris2018-01-221-2/+1
|
* Don't test for __attribute__ in the configure script.Guy Harris2018-01-211-113/+0
| | | | | | | | | Instead, use compiler test macros to check whether *particular* attributes are supported, and set various #defines appropriately, in header files. Rename the UNALIGNED structure attribute to ND_UNALIGNED, and ask whether we still need it.
* Fix typo, and request additional libraries for *static* linking.Guy Harris2017-11-301-4/+5
|
* Fix the handling of libpcap.Guy Harris2017-11-291-64/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have four possibilities: 1) local library, with a pcap-config; 2) local library, without a pcap-config; 3) installed library, with a pcap-config; 4) installed library, without a pcap-config. If we have a local library, i.e. one in ../libpcap{whatever}, we: add -I flags to the C compiler flags to point it at whatever directories in ../libpcap{whatever}; add ../libpcap{whatever}/libpcap.a to $LIBS and: if it has a pcap-config, we use it, with --additional-libraries, to find the additional libraries with which we need to link; otherwise, we do the usual OS-dependent hacks to try to figure out with what additional flags we need to link; and add them to $LIBS after libpcap.a. If we have an installed library: if it has a pcap-config we use it, with --cflags, to find what flags to add to the C compiler flags, and use it, with --libs, to see what flags to add to $LIBS; if it doesn't have a pcap-config, we search for -lpcap and, if that succeeds, we assume the headers are under /usr/local/include or /usr/include, search for them there, and, if we don't find pcap.h there, we look for it in a pcap subdirectory under there, and add the appropriate -I flag to the C compiler flags, and then do the usual OS-dependent hacks to try to figure out with what additional flags we need to link. While we're at it, we do the libdlpi check only on Solaris, as part of "the usual OS-dependent hacks".
* Clean up indentation.Guy Harris2017-11-131-134/+134
|
* Some tweaks for AC_LBL_LIBPCAPAli Abdulkadir2017-11-141-38/+39
|
* Check for unaligned memory access support at compile time.Guy Harris2017-10-161-100/+0
| | | | | Don't test at configure time; that doesn't work when cross-compiling and may be a pain to do with CMake.
* On UN*X, always use sigaction(), and always have signal handlers return void.Guy Harris2017-10-151-35/+0
| | | | | | | | | Some time between the mid 1980's and 1990 called; they want their old-fashioned UNIX signal handling back. ANSI C has had signal handlers returning void sincer, well, 1989, and POSIX has had sigaction() since close to forever. No need to worry about really old UN*Xes here. On Windows, it's also void (as per ANSI C); use signal().
* Get rid of an unnecessary test.Guy Harris2017-10-151-25/+0
| | | | We don't care whether struct sockaddr has an sa_len field or not.
* Compile with '-Wassign-enum' in devel mode if supportedFrancois-Xavier Le Bail2017-09-201-0/+1
|
* Handle attributes for function pointers by checking the compiler version.Guy Harris2017-08-191-90/+0
| | | | | | | | | | | Handle attributes for function pointers the same way we handle attributes for functions, by explicitly checking for the compiler version with #if rather than with a configure script check. That's one fewer thing that, if you're not using autoconf, has to be done in some other fashion. While we're at it, put NORETURN in the right place to have it work with Microsoft Visual Studio as well as various UN*X compilers.
* Check for __attribute__ ((fallthrough)) (GCC 7).Denis Ovsienko2017-07-221-0/+41
| | | | | | | | | | | | | | | The documentation claims that recent GCC is now better by default at spotting cases of code flow falling through (which is true) and that it avoids false positives by matching nearby source code comments with regexps. However, the latter feature doesn't seem to work as reliably as the manual describes it, so let's have a macro for this purpose. Tested to work on: * x86_64, Fedora 26, GCC 7.1.1 (w/__attribute__, w/fallthrough) * x86_64, Ubuntu 16.04, GCC 5.4.0 (w/__attribute__, w/o fallthrough) * x86_64, FreeBSD 11.0, CLang 3.8.0 (w/__attribute__, w/o fallthrough) * SPARC, Solaris 10, SolStudio 12.4 (w/__attribute__, w/o fallthrough) * SPARC, Solaris 10, SunStudio 11 (w/o __attribute__)
* refine the feedback guidelinesDenis Ovsienko2017-02-021-1/+1
| | | | | | Provide better detailed guidelines in CONTRIBUTING and update a number of other files to refer to that file so that the directions are now more uniform.
* Compile with '-Wpedantic' in devel mode instead of '-pedantic'fxlb2016-11-011-1/+1
| | | | | | | | Avoid 'Undefined symbol _mcount' with some Solaris compilers. The '-pedantic' option is unknown to the comiler, but by coincidence starts with a '-p' (gather performance data). When a file is compiled with '-p' but is linked without '-p', 'Undefined symbol _mcount' occurs.
* Compile with '-Wused-but-marked-unused' in devel mode if supportedFrancois-Xavier Le Bail2016-08-191-0/+1
| | | | f.e. clang version 3.4 support this warning option.
* We need -Werror when testing whether -f or -m flags work.Guy Harris2015-09-291-1/+12
| | | | | | Thank you, clang, for treating unknown -f flags as warnings, only failing with them if run with -Werror, and spewing out warning messages whenever they're used.
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-171-125/+0
| | | | | | | | | | | | | Have our own routines to convert between IPv4/IPv6 addresses and strings; that helps if, for example, we want to build binary versions of tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It also means that we don't require IPv6 library support on UN*X to print addresses (if somebody wants to build tcpdump for older UN*Xes lacking IPv6 support in the system library or in add-on libraries). Get rid of files in the missing directory that we don't need, and various no-longer-necessary autoconf tests.
* '-pedantic' option is supported by Travis, '-Wpedantic' is notFrancois-Xavier Le Bail2015-09-091-1/+1
|
* Compile with '-Wold-style-definition' in devel modeFrancois-Xavier Le Bail2015-09-091-0/+1
|
* Fix incorrect detection of '-Wstrict-prototypes' optionFrancois-Xavier Le Bail2015-09-091-1/+32
| | | | | | | | | | | | | Revert "Simplify AC_LBL_CHECK_COMPILER_OPT a bit." (commit 43e88cd5b8e9d9d643bbad585743123492452041) The problem shows itself because 'configure' displays "checking whether the compiler supports the -Wstrict-prototypes option... no" even if '-Wstrict-prototypes' option is supported. Moreover: Update configure accordingly. Fix a trailing space.
* Compile with '-Wpedantic' in devel mode as an attempt to get gcc-ismFrancois-Xavier Le Bail2015-08-191-0/+1
|
* Compile with '-Wdeclaration-after-statement' in devel modeFrancois-Xavier Le Bail2015-08-181-0/+1
|
* Compile with -WshadowFrancois-Xavier Le Bail2015-07-291-0/+1
|
* Compile with -Wcast-qual.Guy Harris2015-04-261-0/+1
| | | | | | | | | | | | | That let me find what might have been the bulk of the 579(!) instances of "Deconst" reported in http://www.cl.cam.ac.uk/~dc552/papers/asplos15-memory-safe-c.pdf and, hopefully, will prevent more from creeping in. There are some remaining ones - and they represent attempts to overwrite the packet bytes handed to tcpdump by libpcap, which could well *fail* with, for example, memory-mapped capture mechanisms!
* Move pcap function checks to configure.in.Guy Harris2015-02-101-48/+0
| | | | | | | | | It was doing some of the function checks; move the remaining ones out of AC_LBL_LIBPCAP(), which is now solely responsible for finding libpcap, making sure it'll work, and setting compiler and linker flags appropriately. Checks for functions that were introduced in later versions of libpcap, which we use if available, are all done in configure.in.
* Use system libpcap when configured with --with-system-pcapBaruch Siach2014-10-291-21/+25
| | | | | | | | | | Don't force the local libpcap build when the system provides one. When --with-system-pcap is given to configure, don't try to locate a local libpcap build. This help build systems like Buildroot that store build trees in the same directory, but still prefer dynamically linking against system wide libpcap.so to save space. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
* these changes to aclocal let tcpdump, when build out of source tree,Michael Richardson2014-09-021-4/+16
| | | | to find a libpcap that is adjacent to it, also built out of source tree
* comma in AC_MSG_ERROR confuses configureMichael Richardson2014-09-021-1/+1
|
* Check for pcap_free_datalinks().Guy Harris2014-05-191-5/+7
| | | | | | | Fixes GitHub issue #390. Also, if all we do when checking for a function is set a HAVE_XXX AC_CHECK_FUNC, as AC_CHECK_FUNCS will set the #define for you.
* delete trailing spaces/tabsFrancois-Xavier Le Bail2014-05-121-1/+1
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-4/+1
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-2/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* Add -g3 on some platforms even if .devel isn't present.Guy Harris2013-10-211-24/+24
| | | | | | | | | | | | | | | Now that we're requiring autoconf 2.61 or later, AC_PROG_CC sets -g along with -O2 for GCC-like compilers regardless of whether .devel is present. Add "include debugging symbols" options for MIPS C/DEC C regardless of whether .devel is present; that's -g3, which is the version that doesn't turn optimization off (we also turn on -O). Also, don't change the ABI on IRIX depending on .devel. I'm not sure why we were doing that; if somebody has a good reason to continue doing it, please let us know what it is. Expand some comments while we're at it.
* Explain why we set -xansi -signed for MIPS C.Guy Harris2013-10-171-0/+15
|
* Update a comment for the previous commit.Guy Harris2013-10-171-1/+0
|