summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/CMakeLists.txt
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-16 18:46:20 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-16 18:46:20 +0200
commit0192488015770b4855165db8502214dad1941dd2 (patch)
tree6f9a20850e0eec5ca2709ed4ed24f1ccb983cf04 /src/ipcpd/shim-udp/CMakeLists.txt
parentfbc0b71d3947cb6047e3e710d606ffc6a39778bc (diff)
parent6c50a54ee1725959b166d6ad5f6ca58204433a8e (diff)
downloadouroboros-0192488015770b4855165db8502214dad1941dd2.tar.gz
ouroboros-0192488015770b4855165db8502214dad1941dd2.zip
Merged in sandervrijders/ouroboros/be-swig (pull request #211)
Be swig
Diffstat (limited to 'src/ipcpd/shim-udp/CMakeLists.txt')
-rw-r--r--src/ipcpd/shim-udp/CMakeLists.txt45
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()