aboutsummaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-05-04 23:00:29 -0700
committerGuy Harris <guy@alum.mit.edu>2018-05-05 06:01:05 +0000
commitf447aa7dd7f0e36916847b8bb7193fecc42ddc89 (patch)
tree701898213f910ab3530cd2f2e990713f2217e2be /ConfigureChecks.cmake
parent1ebbb09c5bc7a73765e1fa84f6a29ad06731e3b6 (diff)
On Solaris, check for getexecname in CMake.
We expect it to be checked for in wsutil/filesystem.c, so we should check for it. It's a Solarisism, so check for it only on Solaris. Change-Id: I09104c17d2ec91c74862b63e735c32a9d188f2a6 Reviewed-on: https://code.wireshark.org/review/27351 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 421fcf13e4..739fe7c32b 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -71,10 +71,16 @@ endif()
include(CheckFunctionExists)
include(CheckSymbolExists)
-cmake_push_check_state()
-set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
-check_function_exists("dladdr" HAVE_DLADDR)
-cmake_pop_check_state()
+#
+# Platform-specific functions used in platform-specific code.
+# We check for them only on the platform on which we use them.
+#
+if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
+ #
+ # Solaris
+ #
+ check_function_exists("getexecname" HAVE_GETEXECNAME)
+endif()
#
# Use check_symbol_exists just in case math.h does something magic