diff options
author | dimitri staessens <[email protected]> | 2016-08-16 18:46:20 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-08-16 18:46:20 +0200 |
commit | 0192488015770b4855165db8502214dad1941dd2 (patch) | |
tree | 6f9a20850e0eec5ca2709ed4ed24f1ccb983cf04 /src | |
parent | fbc0b71d3947cb6047e3e710d606ffc6a39778bc (diff) | |
parent | 6c50a54ee1725959b166d6ad5f6ca58204433a8e (diff) | |
download | ouroboros-0192488015770b4855165db8502214dad1941dd2.tar.gz ouroboros-0192488015770b4855165db8502214dad1941dd2.zip |
Merged in sandervrijders/ouroboros/be-swig (pull request #211)
Be swig
Diffstat (limited to 'src')
-rw-r--r-- | src/ipcpd/shim-udp/CMakeLists.txt | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/src/ipcpd/shim-udp/CMakeLists.txt b/src/ipcpd/shim-udp/CMakeLists.txt index 71f9e1d1..c63bd29c 100644 --- a/src/ipcpd/shim-udp/CMakeLists.txt +++ b/src/ipcpd/shim-udp/CMakeLists.txt @@ -31,32 +31,6 @@ IF(NOT CMAKE_HAVE_GETHOSTBYNAME) ENDIF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) ENDIF(NOT CMAKE_HAVE_GETHOSTBYNAME) -# Enable DNS by default -if (NOT DISABLE_DNS MATCHES True) - # Find the nsupdate executable - find_program(NSUPDATE_EXECUTABLE - NAMES nsupdate - DOC "The nsupdate tool that enables DDNS") - - if (${NSUPDATE_EXECUTABLE} STREQUAL "NSUPDATE_EXECUTABLE-NOTFOUND") - message(FATAL_ERROR "Could not find nsupdate, which is needed for DDNS") - else() - message("-- Found nsupdate: ${NSUPDATE_EXECUTABLE}") - endif() - - # Find the nslookup executable - find_program(NSLOOKUP_EXECUTABLE - NAMES nslookup - DOC "The nslookup tool that resolves DNS names") - - if (${NSLOOKUP_EXECUTABLE} STREQUAL "NSLOOKUP_EXECUTABLE-NOTFOUND") - message(FATAL_ERROR - "Could not find nslookup, which is needed for DNS resolution") - else() - message("-- Found nslookup: ${NSLOOKUP_EXECUTABLE}") - endif() -endif() - configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/shim_udp_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/shim_udp_config.h") @@ -72,8 +46,23 @@ add_executable (ipcpd-shim-udp ${SHIM_UDP_SOURCES} ${IPCP_SOURCES} target_link_libraries (ipcpd-shim-udp LINK_PUBLIC ouroboros ${PROTOBUF_C_LIBRARY}) -# Enable DNS by default -if (NOT DISABLE_DNS MATCHES True) +# Find the nsupdate executable +find_program(NSUPDATE_EXECUTABLE + NAMES nsupdate + DOC "The nsupdate tool that enables DDNS") + +# Find the nslookup executable +find_program(NSLOOKUP_EXECUTABLE + NAMES nslookup + DOC "The nslookup tool that resolves DNS names") + +if (${NSUPDATE_EXECUTABLE} STREQUAL "NSUPDATE_EXECUTABLE-NOTFOUND") + message("-- Could not find nsupdate. Disabling DDNS functionality.") +elseif (${NSLOOKUP_EXECUTABLE} STREQUAL "NSLOOKUP_EXECUTABLE-NOTFOUND") + message("-- Could not find nslookup. Disabling DNS lookups.") +else () + message("-- Found nsupdate: ${NSUPDATE_EXECUTABLE}") + message("-- Found nslookup: ${NSLOOKUP_EXECUTABLE}") MACRO_ADD_COMPILE_FLAGS(ipcpd-shim-udp -DCONFIG_OUROBOROS_ENABLE_DNS) endif() |