diff options
Diffstat (limited to 'cmake/dependencies')
| -rw-r--r-- | cmake/dependencies/crypt/openssl.cmake | 7 | ||||
| -rw-r--r-- | cmake/dependencies/eth/netmap.cmake | 24 | ||||
| -rw-r--r-- | cmake/dependencies/udp/ddns.cmake | 31 |
3 files changed, 21 insertions, 41 deletions
diff --git a/cmake/dependencies/crypt/openssl.cmake b/cmake/dependencies/crypt/openssl.cmake index b0fa8d11..04451357 100644 --- a/cmake/dependencies/crypt/openssl.cmake +++ b/cmake/dependencies/crypt/openssl.cmake @@ -53,4 +53,11 @@ else() unset(HAVE_SLH CACHE) endif() +if(OPENSSL_VERSION VERSION_GREATER_EQUAL "4.1.0") + set(HAVE_OPENSSL_4_1 TRUE CACHE INTERNAL + "OpenSSL 4.1 or later") +else() + unset(HAVE_OPENSSL_4_1 CACHE) +endif() + # Secure memory options are in cmake/config/global.cmake diff --git a/cmake/dependencies/eth/netmap.cmake b/cmake/dependencies/eth/netmap.cmake index 94ecd634..b31c4d03 100644 --- a/cmake/dependencies/eth/netmap.cmake +++ b/cmake/dependencies/eth/netmap.cmake @@ -1,18 +1,22 @@ -# netmap support (optional acceleration) +# netmap support (kernel bypass). Explicit opt-in. find_path(NETMAP_C_INCLUDE_DIR net/netmap_user.h HINTS /usr/include /usr/local/include) mark_as_advanced(NETMAP_C_INCLUDE_DIR) -if(NOT HAVE_RAW_SOCKETS AND NOT HAVE_BPF AND NETMAP_C_INCLUDE_DIR) - set(DISABLE_NETMAP FALSE CACHE BOOL - "Disable netmap support for ETH IPCPs") - if(NOT DISABLE_NETMAP) - message(STATUS "Netmap support for Ethernet IPCPs enabled") - set(HAVE_NETMAP TRUE) - else() - message(STATUS "Netmap support for Ethernet IPCPs disabled by user") - unset(HAVE_NETMAP) +set(ENABLE_NETMAP FALSE CACHE BOOL + "Use netmap for Ethernet PoAs, overriding raw sockets or BPF") + +if(ENABLE_NETMAP) + if(NOT NETMAP_C_INCLUDE_DIR) + message(FATAL_ERROR "ENABLE_NETMAP is set, but netmap was not found.") endif() + + message(STATUS "Netmap support for Ethernet PoAs enabled") + + set(HAVE_NETMAP TRUE) + + unset(HAVE_RAW_SOCKETS) + unset(HAVE_BPF) endif() diff --git a/cmake/dependencies/udp/ddns.cmake b/cmake/dependencies/udp/ddns.cmake deleted file mode 100644 index e8208e47..00000000 --- a/cmake/dependencies/udp/ddns.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# DDNS (Dynamic DNS) support detection -# Requires nsupdate and nslookup tools - -find_program(NSUPDATE_EXECUTABLE - NAMES nsupdate - DOC "The nsupdate tool that enables DDNS") - -find_program(NSLOOKUP_EXECUTABLE - NAMES nslookup - DOC "The nslookup tool that resolves DNS names") - -mark_as_advanced(NSLOOKUP_EXECUTABLE NSUPDATE_EXECUTABLE) - -if(NSLOOKUP_EXECUTABLE AND NSUPDATE_EXECUTABLE) - set(DISABLE_DDNS FALSE CACHE BOOL "Disable DDNS support") - if(NOT DISABLE_DDNS) - message(STATUS "DDNS support enabled") - set(HAVE_DDNS TRUE CACHE INTERNAL "Dynamic DNS support available") - else() - message(STATUS "DDNS support disabled by user") - unset(HAVE_DDNS CACHE) - endif() -else() - if(NSLOOKUP_EXECUTABLE) - message(STATUS "Install nsupdate to enable DDNS support") - elseif(NSUPDATE_EXECUTABLE) - message(STATUS "Install nslookup to enable DDNS support") - else() - message(STATUS "Install nslookup and nsupdate to enable DDNS support") - endif() -endif() |
