summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
...
* Declare the NFLOG pseudo-header ourselves.Guy Harris2018-05-231-11/+0
| | | | | | | | | | It's not specified by a libpcap header that might have a different layout in different pcap releases, it's specified on the list of link-layer header types and must remain the same forever (except for getting additional bits defined), so we don't need to pick it up from libpcap. This means we get to use tcpdump's nd_ types; do so.
* Declare the Bluetooth pseudo-header ourselves.Guy Harris2018-05-231-1/+0
| | | | | | | | | | It's not specified by a libpcap header that might have a different layout in different pcap releases, it's specified on the list of link-layer header types and must remain the same forever (except for getting additional bits defined), so we don't need to pick it up from libpcap. This means we get to use tcpdump's nd_ types; do so.
* Don't set COMPILE_FLAGS if there aren't any flags to set.Guy Harris2018-03-271-2/+6
| | | | | Otherwise, you get a complaint about there being too few arguments to set_target_properties().
* Add -W options.Guy Harris2018-03-271-0/+89
|
* The COMPILE_FLAGS property is a string, not a list.Guy Harris2018-03-271-3/+3
| | | | Make C_ADDITIONAL_FLAGS a string as well, and use it appropriately.
* Add C_ADDITIONAL_FLAGS to the compiler flags for targets.Guy Harris2018-03-271-0/+2
|
* Initialize C_ADDITIONAL_FLAGS where we start setting it.Guy Harris2018-03-271-0/+1
|
* Don't use CMAKE_C_STANDARD, it doesn't work on all versions of CMake.Guy Harris2018-03-271-2/+56
| | | | | | It doesn't work at all prior to CMake 3.1 and, even in newer versions of CMake, it doesn't support all the vendor compilers out there for various UNIXes.
* Add a malloc/free process with garbage collectorFrancois-Xavier Le Bail2018-03-141-1/+2
| | | | Use it in the PPP printer.
* Add "make check".Guy Harris2018-03-051-0/+7
| | | | | | | | | This assumes you can run tests/TESTrun.sh as a script, which means it assumes your command interpreter will either recognize it as a shell script and run it in a Bourne-compatible shell or will just try and execute it and the #! header will cause it to be run by /bin/sh. This probably won't work on Windows.
* Add ws2_32, not socket and nsl, if ws2_32 has gethostbyaddr().Guy Harris2018-01-301-26/+38
| | | | | | | Also, fail if we don't have gethostbyaddr(), either on Windows or on UN*X. Suppress some UN*X-only tests on Windows while we're at it.
* Get rid of tests whose results we don't use.Guy Harris2018-01-301-16/+0
| | | | | (Crud left over from using libpcap's CMakeLists.txt as a basis for this one.)
* Add nd_{v}snprintf() routines/wrappers.Guy Harris2018-01-291-14/+31
| | | | | | | | Some versions of the MSVC runtime library have a non-C99-compliant vsnprintf(), which we want to avoid. On Windows, use snprintf() and vsnprintf() for VS 2015 and later, where they both exist in C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're guaranteed to do the null termination that we want).
* Not all Windows pcaps have pcap_wsockinit().Guy Harris2018-01-291-0/+11
| | | | WinPcap 4.1.3 has only wsockinit(); check for both, on Windows.
* Work around a WinPcap botch.Guy Harris2018-01-291-5/+18
|
* Extra libraries needed on Windows.Guy Harris2018-01-291-0/+7
|
* When checking pcap.h, make sure we look in ${PCAP_INCLUDE_DIRS}.Guy Harris2018-01-291-0/+1
| | | | | It's not necessarily in one of the default include directories, so look in the directory where we're supposed to look for pcap header files.
* Use check_symbol_exists for {v}snprintf().Guy Harris2018-01-291-2/+7
| | | | | | With MSVC 2015, stdio.h defines snprintf() and vsnprintf() as inline functions, so you need to include stdio.h when testing for them - check_function_exists() won't do it, you need check_symbol_exists().
* Pick up Windows snprintf and strdup replacements from libpcap.Guy Harris2018-01-281-1/+5
|
* If you need multiple headers, use check_include_files(), plural.Guy Harris2018-01-281-1/+1
|
* Do libdnet checks the same way autotools does.Guy Harris2018-01-281-1/+39
|
* Don't check for libxnet.Guy Harris2018-01-281-6/+4
| | | | | | | | | | We don't need it for tcpdump; libpcap will pick it up if necessary if it's dynamically-linked, we'll link with it ourselves if it's statically-linked, and libpcap will bind to the libxnet version of recvmsg() even if we link with libsocket (as it's compiled to refer to it with a decorated name). Also, we don't check for it with autotools.
* Check for ether_ntohost() after finding additional networking libraries.Guy Harris2018-01-281-84/+85
| | | | It might be in one of those libraries.
* Search TCPDUMP_LINK_LIBRARIES when looking for ether_ntohost().Guy Harris2018-01-281-0/+6
|
* Shuffle include(CheckLibraryExists) up with the other includes.Guy Harris2018-01-271-3/+1
| | | | We'll be using it later; might as well include it there.
* Check for pcap_debug and yydebug if we don't have pcap_set_parser_debug().Guy Harris2018-01-271-0/+5
|
* Look for pcap header files in the appropriate directory.Guy Harris2018-01-271-2/+8
| | | | | | | Include the directory in which the pcap find module found the main pcap header file in the list of directories in which to search for other pcap header files; otherwise, it won't find them unless they're system header files.
* Don't do "here's the directories in which to look for libraries".Guy Harris2018-01-261-1/+0
| | | | | | | | | CMake *hates* that. -L considered harmful, I guess (and I don't know how that's done with tools other than UN*X linkers - do all of them support an equivalent to -L?). This should fix the checks for pcap functions to look in the library we found.
* Add ${PCAP_LIBRARY_DIRS} to the list of directories with libraries.Guy Harris2018-01-261-21/+22
| | | | | | | Also, use ${PCAP_INCLUDE_DIRS} rather than ${PCAP_INCLUDE_DIR} for the list of directories with header files (it should be a one-element list, but do this for consistency), and search for pcap headers *after* we've found libpcap, so we look in the appropriate directory.
* Fix typo.Guy Harris2018-01-241-1/+1
|
* OK, even with -lxnet, we may need -lnsl.Guy Harris2018-01-241-1/+13
| | | | You are in a twisty little maze of Solaris libraries, all different.
* Clean up checks for -lsocket/-lnsl/-lxnet.Guy Harris2018-01-241-17/+53
| | | | | | | | | | | Do the checks for -lnsl/-lxnet in the same way that we do them for libpcap, before checking for functions that might require those libraries. Include the results of those checks when checking for routines that require them. For getservent(), check for -lsocket as well. Clean up ${XXX_LIBRARY} vs. ${XXX_LIBRARIES} usage while we're at it.
* Fix check for getrpcbynumber().Guy Harris2018-01-241-3/+5
| | | | | | Multiple checks for a function, in different libraries, need different variables, as, if only one variable is used, the first test checks, and subsequent tests are skipped because the variable is already set.
* Pop check state after pushing it in libcrypto tests.Guy Harris2018-01-231-0/+2
|
* -lcap_dns requires -lcasper.Guy Harris2018-01-231-5/+10
|
* Fix conditional addition of source files.Guy Harris2018-01-221-9/+10
| | | | | Conditionally add everything to LOCALSRC and include LOCALSRC in NETDISSECT_SOURCE_LIST_C.
* Fix name for variable containing libpcap library path.Guy Harris2018-01-221-1/+1
|
* Fix path for rpc.h.Guy Harris2018-01-221-1/+1
|
* Fix check for rpc/rpcent.h.Guy Harris2018-01-221-1/+3
| | | | | | | | | | | | Autotools' check in AC_CHECK_HEADERS() apparently either doesn't actually try to include it or somehow arranges to define stuff that it requires on FreeBSD. CMake's check in check_include_file() just tries to include it, which fails on FreeBSD because __BEGIN_DECLS isn't defined. The man page for getrpcbynumber() says we just need to include <rpc/rpc.h>; perhaps there are platforms on which we require both, and that's what we do, so test it with rpc/rpc.h if we have rpc/rpc.h.
* net/pfvar.h and net/if_pflog.h require other headers to be included first.Guy Harris2018-01-221-2/+2
|
* Fix endif() argument to match if() argument.Guy Harris2018-01-221-1/+1
|
* Do our best to try to get C99 support from the compiler.Guy Harris2018-01-221-0/+8
|
* Set up WITH_CHROOT and WITH_USER as user-settable string parameters.Guy Harris2018-01-221-0/+12
| | | | | | No, I have no idea why CMake has option() to create user-settable documented Boolean parameters but uses a special variant of set() to create user-settable documented non-Boolean parameters.
* Add cap-ng support.Guy Harris2018-01-221-2/+19
| | | | Fix check_library_exists() calls while we're at it.
* Add Capsium sandboxing support.Guy Harris2018-01-221-0/+30
|
* Clean up handling of libraries.Guy Harris2018-01-221-5/+14
| | | | | | | | | | | | If a library is found: add the include directories for it as a SYSTEM include directory; add the library for it to a list of libraries with which to link tcpdump; and link with that list of libraries.
* Add libcrypto checks.Guy Harris2018-01-221-11/+55
| | | | Put the optional libraries after libpcap, which is *not* optional.
* What has to be expanded is the template file, not the result file.Guy Harris2018-01-221-1/+1
|
* Expand the tcpdump man page from the template.Guy Harris2018-01-221-1/+10
|
* Install man pages from the source directory.Guy Harris2018-01-221-1/+1
|