From a61f6e4745d478a9badf77810b9e474133570dd1 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 20 Dec 2014 00:23:05 -0800 Subject: When checking for floorl(), include math.h. It's not being found with MSVC, but is apparently present; perhaps math.h does something magic, e.g. defining it as a macro, so try using check_symbol_exists with "math.h". Change-Id: Idaecac641fb0b87d399807d8bf1fcb74e7251a4e Reviewed-on: https://code.wireshark.org/review/5911 Reviewed-by: Guy Harris --- ConfigureChecks.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a6c9d85775..26ff93d06f 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -63,6 +63,7 @@ check_include_file("winsock2.h" HAVE_WINSOCK2_H) #Functions include(CheckFunctionExists) +include(CheckSymbolExists) check_function_exists("chown" HAVE_CHOWN) cmake_push_check_state() @@ -79,7 +80,11 @@ set(CMAKE_REQUIRED_LIBRARIES %{CMAKE_DL_LIBS}) check_function_exists("dladdr" HAVE_DLADDR) cmake_pop_check_state() -check_function_exists("floorl" HAVE_FLOORL) +# +# Use check_symbol_exists just in case math.h does something magic +# and there's not actually a function named floorl() +# +check_symbol_exists("floorl" "math.h" HAVE_FLOORL) check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) check_function_exists("getopt" HAVE_GETOPT) check_function_exists("getprotobynumber" HAVE_GETPROTOBYNUMBER) @@ -108,7 +113,6 @@ check_struct_has_member("struct stat" st_flags sys/stat.h HAVE_ST_FLAGS) check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE) #Symbols but NOT enums or types -include(CheckSymbolExists) check_symbol_exists(tzname "time.h" HAVE_TZNAME) # Check for stuff that isn't testable via the tests above -- cgit v1.2.1