Lines Matching +full:zero +full:- +full:crossing +full:- +full:detect
13 # on a "long-term support" version # of some OS and that
95 # If you set an architecture flag such as -m32 or -m64 in CFLAGS
102 # 64-bit, and Oracle Studio's C++ compiler, which will default to
103 # building 32-bit, the size for C++ will win, and, again, hilarity
113 # shipping a pre-built shared library cache, at least), and we do the
121 # For getting raw lists of --libs and --libs --static information from a
122 # pkg-config module.
127 # a UN*X, -l can be prefixed - i.e., names, without extensions,
130 # containing the libraries, to which, on a UN*X, -L can be
134 # than -l and -L flags
146 # pkg-config, so the output of --libs, etc. may include a -L for the
148 # pcap-config files.
150 # So we just run pkg-config ourselves, so that we get its output
156 # Get the --libs information.
160 # pkg_check_modules() before running pkg-config and *not* undefine
166 COMMAND ${PKG_CONFIG_EXECUTABLE} "--libs" ${_package}
173 # pkg-config failed; assume that means that there is no such
174 # package for it to find. XXX - what do we do here?
179 # pkg-config succeeded; replace CR and LF with spaces.
184 # Now get the --libs --static information.
188 COMMAND ${PKG_CONFIG_EXECUTABLE} "--libs" "--static" ${_package}
195 # pkg-config failed; assume that means that there is no such
196 # package for it to find. XXX - what do we do here?
201 # pkg-config succeeded; replace CR and LF with spaces.
220 if(NOT ${_library_prefix}_LIBRARY STREQUAL "${_library_prefix}_LIBRARY-NOTFOUND")
227 # when we're trying to construct a -L argument, for insertion into
228 # pcap-config and libpcap.pc, for a library upon which we depend.
234 if(_lib_index EQUAL -1)
236 # No, so add a -L flag to get the linker to search in that
239 set(${_library_prefix}_LIBS "-L${_lib_directory}")
240 set(${_library_prefix}_LIBS_STATIC "-L${_lib_directory}")
241 set(${_libraryprefix}_LIBS_PRIVATE "-L${_lib_directory}")
243 set(${_library_prefix}_LIBS "${${_library_prefix}_LIBS} -l${_library_name}")
244 set(${_library_prefix}_LIBS_STATIC "${${_library_prefix}_LIBS} -l${_library_name}")
245 set(${_library_prefix}_LIBS_PRIVATE "${${_library_prefix}_LIBS} -l${_library_name}")
252 # defaults to generating 32-bit code even when running on a 64-bit
253 # platform, and where that platform may provide only 64-bit versions of
257 message(STATUS "Building 32-bit")
259 message(STATUS "Building 64-bit")
263 # Solaris pkg-config is annoying. For at least one package (D-Bus, I'm
264 # looking at *you*!), there are separate include files for 32-bit and
265 # 64-bit builds (I guess using "unsigned long long" as a 64-bit integer
266 # type on a 64-bit build is like crossing the beams or something), and
267 # there are two separate .pc files, so if we're doing a 32-bit build we
269 # we're doing a 64-bit build we should make sure we look in
272 if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
280 # 64-bit build. If /usr/lib/pkgconfig appears in the path,
307 # 32-bit build. If /usr/amd64/lib/pkgconfig appears in the path,
330 string(REPLACE "=" "-" _temp_option_variable ${_option})
331 string(REGEX REPLACE "^-" "" _option_variable ${_temp_option_variable})
352 # Treat source files as being in UTF-8 with MSVC if it's not using
354 # We assume that UTF-8 source is OK with other compilers and with
358 set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} /utf-8")
367 string(REPLACE "=" "-" _temp_option_variable ${_option})
368 string(REGEX REPLACE "^-" "" _option_variable ${_temp_option_variable})
379 # At minimum, we want C++/C99-style // comments.
386 # ourselves on pre-3.1 CMake, so we just do it ourselves on all versions
400 # XXX - this just tests whether the option works, fails if it doesn't,
407 require_and_add_compiler_option("-std=gnu99")
411 # so we use -qlanglvl=extc99.
413 require_and_add_compiler_option("-qlanglvl=extc99")
415 require_and_add_compiler_option("-AC99")
417 require_and_add_compiler_option("-xc99")
419 require_and_add_compiler_option("-c99")
435 add_definitions(-D_WIN32_WINNT=0x0601)
439 # Build all runtimes in the top-level binary directory; that way,
454 # kernel-mode code to support capturing.
512 # We don't support D-Bus sniffing on macOS; see
517 option(DISABLE_DBUS "Disable D-Bus sniffing support" ON)
519 option(DISABLE_DBUS "Disable D-Bus sniffing support" OFF)
552 string(REGEX MATCH "^([0-9]+)" PACKAGE_VERSION_MAJOR "${PACKAGE_VERSION}")
555 string(REGEX MATCH "^([0-9]+.)?([0-9]+.)?([0-9]+)" PACKAGE_VERSION_NOSUFFIX "${PACKAGE_VERSION}")
614 add_definitions(-D__STDC__)
615 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
627 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc")
634 # Detect available platform features
644 # Windows, we skip tests for UN*X-only headers and functions.
654 add_definitions(-DYY_NO_UNISTD_H)
709 # POSIX-compliant strerror_r() or a GNU strerror_r()?
715 /* Define it GNU-style; that will cause an error if it's not GNU-style */
738 # functions - in Visual Studio, for example, they're inline functions
760 # Look for various networking-related libraries that we may need.
764 # thread-safe way of getting information for a host name or port;
837 set(LIBS "-lsocket -lnsl ${LIBS}")
838 set(LIBS_STATIC "-lsocket -lnsl ${LIBS_STATIC}")
839 set(LIBS_PRIVATE "-lsocket -lnsl ${LIBS_PRIVATE}")
854 set(LIBS "-lnetwork ${LIBS}")
855 set(LIBS_STATIC "-lnetwork ${LIBS_STATIC}")
856 set(LIBS_PRIVATE "-lnetwork ${LIBS_PRIVATE}")
893 set(LIBSC "-lxnet ${LIBS_LIBS}")
894 set(LIBS_STATIC "-lxnet ${LIBS_STATIC}")
895 set(LIBS_PRIVATE "-lxnet ${LIBS_PRIVATE}")
900 # DLPI needs putmsg under HP-UX, so test for -lstr while we're at it.
907 set(LIBS "-lstr ${LIBS}")
908 set(LIBS_STATIC "-lstr ${LIBS_STATIC}")
909 set(LIBS_PRIVATE "-lstr ${LIBS_PRIVATE}")
927 # thread-specific data on many platforms, but doesn't use it on
992 # thread-specific data on many platforms, but doesn't use it on
1055 # XXX - there's no check_type() macro that's like check_type_size()
1121 # Yes - we have it declared.
1130 # No - how about <netinet/ether.h>, as on Linux?
1138 # Yes - we have it declared.
1148 # No - how about <sys/ethernet.h>, as on Solaris 10 and later?
1156 # Yes - we have it declared.
1174 # Yes - we have it declared.
1196 # Yes - we have it declared.
1209 # XXX - there's no check_type() macro that's like check_type_size()
1272 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
1308 # from somehow deciding it doesn't need -lpthread when building rpcapd
1317 # JetBrains' CLion "helpfully" appears to pass -DENABLE_SANITIZERS=OFF
1327 # Set -Werror to catch "argument unused during compilation" warnings
1328 set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize=${_sanitizer}")
1329 check_c_compiler_flag("-fsanitize=${_sanitizer}" ${sanitizer_variable})
1331 set(${_sanitizer_flag} "-fsanitize=${_sanitizer}")
1335 # If the sanitizer is "address", try -fsanitize-address.
1336 # If it's "undefined", try -fcatch-undefined-behavior.
1341 set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize-address")
1342 check_c_compiler_flag("-fsanitize-address" ${sanitizer_variable})
1344 set(${_sanitizer_flag} "-fsanitize-address")
1347 set(CMAKE_REQUIRED_FLAGS "-Werror -fcatch-undefined-behavior")
1348 check_c_compiler_flag("-fcatch-undefined-behavior" ${sanitizer_variable})
1350 set(${_sanitizer_flag} "-fcatch-undefined-behavior")
1362 # "1, ON, YES, TRUE, Y, or a non-zero number".
1389 # constants", meaning "1, ON, YES, TRUE, Y, or a non-zero number".
1393 # the empty string, or ends in the suffix -NOTFOUND."
1437 …set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O1 -g ${SANITIZER_FLAGS} -fno-omit-frame-pointer -fno-optimiz…
1455 # pkg-config or not. We need to know that as, if it was found with
1456 # pkg-config, we should set the Requires.private value in libpcap.pc
1460 # On UN*X, FindOpenSSL happens to use pkg-config to find OpenSSL, but
1462 # assume that, if we got here, we have pkg-config.
1464 # So we use pkg_get_link_info() to run pkg-config ourselves, both
1474 # pkg-config failed; assume that means that there is no openssl
1477 # best we can do. XXX - need list of -l and -L flags to add....
1496 if(_lib_index EQUAL -1)
1498 # No, so add a -L flag to get the linker to search in that
1501 set(LIBS "${LIBS} -L${_lib_directory}")
1502 set(LIBS_STATIC "${LIBS_STATIC} -L${_lib_directory}")
1503 set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${_lib_directory}")
1513 # add a -l flag based on that.
1516 set(LIBS "${LIBS} -l${_library_name}")
1517 set(LIBS_STATIC "${LIBS_STATIC} -l${_library_name}")
1518 set(LIBS_PRIVATE "${LIBS_PRIVATE} -l${_library_name}")
1534 string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MAJOR "${CMAKE_SYSTEM_VERSION}")
1538 # Pre-Tiger.
1540 # Build libraries and executables only for 32-bit PowerPC, as
1552 string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MINOR_AND_PATCH_VERSION}")
1557 # Build libraries and executables for 32-bit PowerPC and
1558 # 64-bit PowerPC, with 32-bit PowerPC first, as those
1566 # With Intel support but prior to x86-64 support.
1568 # Build for 32-bit PowerPC, 64-bit PowerPC, and 32-bit x86,
1569 # with 32-bit PowerPC first, as those are all supported.
1576 # With Intel support including x86-64 support.
1578 # Build for 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
1579 # and x86-64, with 32-bit PowerPC first, as those are
1589 # Build libraries and executables for 32-bit PowerPC, 64-bit
1590 # PowerPC, 32-bit x86, and x86-64, with 32-bit PowerPC
1600 # Build libraries for x86-64, 32-bit x86, and 32-bit PowerPC,
1601 # with x86-64 first, because 32-bit PowerPC executables are
1610 # Build executables only for 32-bit x86 and 64-bit x86, as PPC
1616 # Post-Snow Leopard, pre-Catalina.
1618 # Build libraries for 64-bit x86 and 32-bit x86, with 64-bit x86
1619 # first, as PPC machines are no longer supported, but 32-bit
1629 …age(WARNING "We're assuming the OpenSSL libraries are 64-bit only, so we're not compiling for 32-b…
1635 set(CMAKE_REQUIRED_FLAGS "-arch i386")
1655 # Pre-Mojave; the command-line tools should be sufficient to
1656 # enable 32-bit x86 builds.
1658 … message(WARNING "Compiling for 32-bit x86 gives an error; try installing the command-line tools")
1660 …message(WARNING "Compiling for 32-bit x86 gives an error; try installing the command-line tools an…
1666 # Build executables only for 64-bit x86, as 32-bit x86 machines
1674 # Build libraries and executables only for x86-64, as 32-bit
1682 # Post-Catalina. Build libraries and
1683 # executables for x86-64 and ARM64.
1686 # some of the pointer-checking extensions.)
1698 set(CMAKE_REQUIRED_FLAGS "-arch x86_64 -arch arm64")
1740 set(LINKER_FLAGS " -pg")
1757 pcap-common.c
1758 pcap-util.c
1761 sf-pcapng.c
1762 sf-pcap.c
1767 # We add the character set conversion routines; they're Windows-only
1791 # Determine the main pcap-XXX.c file to use, and the libraries with
1815 # -DPCAP_TYPE=null if they want a libpcap that can't
1817 # nobody gets surprised by getting a no-capture
1823 WinPcap and the WinPcap SDK, and run cmake with -DPacket_ROOT={path of SDK},
1824 where {path of SDK} is the path name of the top-level directory of the SDK.
1827 pcap and pcapng files, run cmake with -DPCAP_TYPE=null.")
1849 # I.e., is it a header for an LBL/BSD-style capture
1859 # requires that various BSD-style integer types
1923 # Pre-SunOS 4.x non-STREAMS NIT.
1933 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
1945 # -DPCAP_TYPE=null if they want a libpcap that can't
1947 # nobody gets surprised by getting a no-capture
1954 pcap and pcapng files, run cmake with -DPCAP_TYPE=null.")
1963 # Do capture-mechanism-dependent tests.
1978 # Needed for common functions used by pcap-[dlpi,libdlpi].c
1993 # Due to a gcc bug, the default search path for 32-bit libraries does
1997 # libdlpi will have to add "-L/lib" option to "configure".
2000 set(CMAKE_REQUIRED_FLAGS "-L/lib")
2006 # XXX - add -L/lib
2009 set(LIBS "${LIBS} -ldlpi")
2010 set(LIBS_STATIC "${LIBS_STATIC} -ldlpi")
2011 set(LIBS_PRIVATE "${LIBS_PRIVATE} -ldlpi")
2019 # XXX - there's no check_type() macro that's like check_type_size()
2037 # short-lived, and version 1 is source and binary
2044 pkg_check_modules(LIBNL libnl-genl-3.0)
2049 # Get raw link flags from pkg-config.
2051 pkg_get_link_info(LIBNL libnl-genl-3.0)
2057 set(CMAKE_REQUIRED_LIBRARIES nl-3)
2064 set(PCAP_LINK_LIBRARIES nl-genl-3 nl-3 ${PCAP_LINK_LIBRARIES})
2066 set(LIBS "-lnl-genl-3 -lnl-3 ${LIBS}")
2067 set(LIBS_STATIC "-lnl-genl-3 -lnl-3 ${LIBS_STATIC}")
2068 set(LIBS_PRIVATE "-lnl-genl-3 -lnl-3 ${LIBS_PRIVATE}")
2078 # Check whether we have the *BSD-style ioctls.
2085 # XXX - there's no check_type() macro that's like check_type_size()
2101 # if so, whether it defines IPNET_ANY_LINK - if so,
2117 message(STATUS "Checking whether the Solaris \"any\" device is supported - supported")
2119 … message(STATUS "Checking whether the Solaris \"any\" device is supported - not supported")
2126 set(PCAP_SRC pcap-${PCAP_TYPE}.c)
2134 set(PCAP_SRC pcap-${PCAP_TYPE}.c)
2146 # UN*X - figure out what type of interface list mechanism we
2174 set(LIBS "-lsocket ${LIBS}")
2175 set(LIBS_STATIC "-lsocket ${LIBS_STATIC}")
2176 set(LIBS_PRIVATE "-lsocket ${LIBS_PRIVATE}")
2197 # We don't have the header - give up.
2198 # XXX - we could also fall back on some other
2214 # getifaddrs(), but in -lsocket, not in -lxnet, so we
2215 # won't find it if we link with -lxnet, which we want
2223 # avoids a not-all-that-useful middleman.)
2232 message(STATUS "Find-interfaces mechanism type: ${FINDALLDEVS_TYPE}")
2233 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} fad-${FINDALLDEVS_TYPE}.c)
2247 # Various Linux-specific mechanisms.
2253 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-usb-linux.c)
2261 # Yes - include it when testing for <linux/usbdevice_fs.h>.
2311 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-netfilter-linux.c)
2335 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-netmap.c)
2353 set(DPDK_C_FLAGS "-march=native")
2361 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-dpdk.c)
2378 "We couldn't find DPDK with pkg-config. If you want DPDK support,
2379 make sure that pkg-config is installed, that DPDK 18.02.2 or later is
2390 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-bt-linux.c)
2417 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-bt-monitor-linux.c)
2426 # Check for D-Bus sniffing support
2429 # We don't support D-Bus sniffing on macOS; see
2434 …message(FATAL_ERROR "Due to freedesktop.org bug 74029, D-Bus capture support is not available on m…
2436 pkg_check_modules(DBUS dbus-1)
2439 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-dbus.c)
2444 # library names - not paths - and DBUS_LIBRARY_DIRS as
2467 pkg_get_link_info(DBUS dbus-1)
2479 # pkg-config found it; remember its pkg-config name.
2489 # pkg-config didn't find it; try to look for it ourselves
2495 # XXX - at least on Ubuntu 20.04, there are many more
2497 # libibverbs is available but where pkg-config
2499 # If not, we should only use pkg-config for it.
2501 set(LIBIBVERBS_LIBS -libverbs)
2502 set(LIBIBVERBS_LIBS_STATIC -libverbs)
2503 set(LIBIBVERBS_LIBS_PRIVATE -libverbs)
2517 # routines in -libverbs, so, in order to keep the compile and
2519 # usable, we need to link with -libverbs.
2527 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-rdmasniff.c)
2540 # Check for sniffing capabilities using third-party APIs.
2571 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-dag.c)
2607 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-septel.c)
2628 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-snf.c)
2652 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-airpcap.c)
2673 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-tc.c)
2688 # which has those members, rather than the backwards-compatible
2691 # won't check the current directory, so we add the top-level
2701 pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c)
2722 check_and_add_compiler_option(-Wall)
2735 check_and_add_compiler_option(-wd4100)
2742 check_and_add_compiler_option(-wd4255)
2746 check_and_add_compiler_option(-wd4548)
2753 check_and_add_compiler_option(-wd4574)
2755 # The Windows headers also test not-defined values in #if, so
2758 check_and_add_compiler_option(-wd4668)
2763 check_and_add_compiler_option(-wd4710)
2764 check_and_add_compiler_option(-wd4711)
2769 check_and_add_compiler_option(-wd4820)
2774 # Bison-generated code that we don't control.
2776 # XXX - add /Qspectre if that is really worth doing.
2778 check_and_add_compiler_option(-wd5045)
2783 check_and_add_compiler_option(-WX)
2788 # they might support GCC-style -W options.
2790 check_and_add_compiler_option(-W)
2791 check_and_add_compiler_option(-Wall)
2792 check_and_add_compiler_option(-Wcomma)
2794 # check_and_add_compiler_option(-Wcovered-switch-default)
2795 check_and_add_compiler_option(-Wdocumentation)
2796 check_and_add_compiler_option(-Wformat-nonliteral)
2797 check_and_add_compiler_option(-Wmissing-noreturn)
2798 check_and_add_compiler_option(-Wmissing-prototypes)
2799 check_and_add_compiler_option(-Wmissing-variable-declarations)
2800 check_and_add_compiler_option(-Wnull-pointer-subtraction)
2801 check_and_add_compiler_option(-Wpointer-arith)
2802 check_and_add_compiler_option(-Wpointer-sign)
2803 check_and_add_compiler_option(-Wshadow)
2804 check_and_add_compiler_option(-Wshorten-64-to-32)
2805 check_and_add_compiler_option(-Wsign-compare)
2806 check_and_add_compiler_option(-Wstrict-prototypes)
2807 check_and_add_compiler_option(-Wundef)
2808 check_and_add_compiler_option(-Wunreachable-code)
2809 check_and_add_compiler_option(-Wunused-but-set-parameter)
2810 check_and_add_compiler_option(-Wunused-but-set-variable)
2811 check_and_add_compiler_option(-Wunused-parameter)
2812 check_and_add_compiler_option(-Wused-but-marked-unused)
2822 # have a non-void return type. That's because, on some
2827 check_and_add_compiler_option(-wd4646)
2842 # XXX - we don't use ADD_COMPILER_EXPORT_FLAGS, because, as of CMake
2853 check_and_add_compiler_option(-xldscope=hidden)
2860 check_and_add_compiler_option(-fvisibility=hidden)
2865 # Extra compiler options for the build matrix scripts to request -Werror or
2868 # usage: cmake -DEXTRA_CFLAGS='-Wall -Wextra -Werror' ...
2891 if(LEX_EXECUTABLE STREQUAL "LEX_EXECUTABLE-NOTFOUND")
2897 # Make sure {f}lex supports the -P, --header-file, and --nounput flags
2905 execute_process(COMMAND ${LEX_EXECUTABLE} -P pcap_ --header-file=${NULL_DEVICE} --nounput -t ${pcap…
2910 If a suitable version of Lex/Flex is available as a non-standard command
2921 …COMMAND ${LEX_EXECUTABLE} -P pcap_ --header-file=scanner.h --nounput -o${CMAKE_CURRENT_BINARY_DIR}…
2945 if(YACC_EXECUTABLE STREQUAL "YACC_EXECUTABLE-NOTFOUND")
2953 # Run it with "-V"; that succeeds and reports the
2962 execute_process(COMMAND ${YACC_EXECUTABLE} -V OUTPUT_QUIET
2971 # "%pure-parser".
2973 set(REENTRANT_PARSER "%pure-parser")
2977 # "%pure-parser".
2979 execute_process(COMMAND ${YACC_EXECUTABLE} -V OUTPUT_VARIABLE bison_full_version)
2980 string(REGEX MATCH "[1-9][0-9]*[.][0-9]+" bison_major_minor ${bison_full_version})
2982 set(REENTRANT_PARSER "%pure-parser")
2996 …COMMAND ${YACC_EXECUTABLE} -p pcap_ -o ${CMAKE_CURRENT_BINARY_DIR}/grammar.c -d ${pcap_BINARY_DIR}…
3034 set(LIBS "${LIBS} -lodm -lcfg")
3035 set(LIBS_STATIC "${LIBS_STATIC} -lodm -lcfg")
3036 set(LIBS_PRIVATE "${LIBS_PRIVATE} -lodm -lcfg")
3038 elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
3039 if(CMAKE_SYSTEM_VERSION MATCHES "[A-Z.]*9\.[0-9]*")
3041 # HP-UX 9.x.
3044 elseif(CMAKE_SYSTEM_VERSION MATCHES "[A-Z.]*10\.0")
3046 # HP-UX 10.0.
3048 elseif(CMAKE_SYSTEM_VERSION MATCHES "[A-Z.]*10\.1")
3050 # HP-UX 10.1.
3054 # HP-UX 10.20 and later.
3083 elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
3089 # Make sure errno is thread-safe, in case we're called in
3094 # is thread-safe (it wasn't thread-safe in some older versions).
3096 add_definitions(-D_TS_ERRNO)
3112 add_definitions(-D_BSD_SOURCE)
3120 # Add pcap-dll.rc to the list of sources.
3122 set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} ${pcap_SOURCE_DIR}/pcap-dll.rc)
3143 # https://public.kitware.com/pipermail/cmake/2013-August/055510.html
3169 # No matter what the library is called - it might be called "wpcap"
3170 # in a Windows build - the symbol to define to indicate that we're
3311 set(LINK_COMMAND "\"${LINK_EXECUTABLE}\" \"-s\" \"${SOURCE}\" \"${TARGET}\"")
3313 … set(LINK_COMMAND "\"${CMAKE_COMMAND}\" \"-E\" \"create_symlink\" \"${SOURCE}\" \"${TARGET}\"")
3321 COMMAND \"${CMAKE_COMMAND}\" \"-E\" \"remove\" \"${TARGET}\"
3335 set(MAN1_NOEXPAND pcap-config.1)
3399 pcap-savefile.manfile.in
3402 pcap-filter.manmisc.in
3403 pcap-linktype.manmisc.in
3404 pcap-tstamp.manmisc.in
3415 # XXX - according to the CMake documentation, WIN32 is set if
3421 # Install 64-bit code built with MSVC in the x64 subdirectories,
3438 # Install 32-bit code, and 64-bit code not built with MSVC
3439 # in the top-level directories, as those are where they
3461 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
3462 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
3465 # pcap-config and process man pages and arrange that they be installed.
3474 # pcap-config script supply an rpath option to specify the directory
3480 # isn't necessarily /usr/lib in this case - for example, Linux
3481 # distributions for 64-bit platforms that also provide support for
3482 # binaries for a 32-bit version of the platform may put the 64-bit
3483 # libraries, the 32-bit libraries, or both in directories other than
3488 # In Darwin-based OSes, the full paths of the shared libraries with
3492 # With the HP-UX linker, directories specified with -L are, by
3493 # default, added to the run-time search path, so we don't need to
3496 # For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C
3498 # no GCC-compatible option is documented as working with the DEC
3503 # there's a GCC-compatible compiler and a vendor compiler, we need
3514 # compatible command-line arguments, and the "native" linker
3515 # is the GNU linker or accepts compatible command-line
3518 set(RPATH "-Wl,-rpath,\${libdir}")
3519 elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
3523 # Sun/Oracle's linker, the GNU linker, and GNU-compatible
3524 # linkers all support -R.
3526 set(RPATH "-Wl,-R,\${libdir}")
3534 …configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config …
3536 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
3545 # If this is MinGW, maybe we have a UN*X-style ln command and
3612 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)