summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-09-13 04:48:59 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-09-13 04:48:59 +0200
commitac46856010e38bbb5767233541b96f433bdcd7a5 (patch)
treeb2b739e6c81b03471f65f6352bcc5793d7a8eb01
parenta005308e657eb1053f7dd08f7a9ce7caad1cbee0 (diff)
downloadtdeio-ftps-ac468560.tar.gz
tdeio-ftps-ac468560.zip
cmake: Adjusted test for time.h, added test of strtoll function
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--CMakeLists.txt2
-rw-r--r--ConfigureChecks.cmake8
-rw-r--r--config.h.cmake4
3 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3648f1..d670466 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,9 @@ set( VERSION R14.1.0 )
include( FindPkgConfig )
include( CheckIncludeFile )
+include( CheckIncludeFiles )
include( CheckLibraryExists )
+include( CheckFunctionExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 0c8966b..4b2708e 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -33,4 +33,10 @@ endif( WITH_GCC_VISIBILITY )
check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
-check_include_file( "time.h" TIME_WITH_SYS_TIME )
+
+check_include_files( "sys/time.h;time.h" TIME_WITH_SYS_TIME )
+
+
+#### check for functions
+
+check_function_exists( strtoll HAVE_STRTOLL )
diff --git a/config.h.cmake b/config.h.cmake
index ff9b61c..618f11a 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -13,8 +13,8 @@
// Defined to 1 if you have 'sys/select.h' header
#cmakedefine HAVE_SYS_SELECT_H 1
-// Defined to 1 if you have 'time.h' header
+// Defined to 1 if 'time.h' header can be included together with 'sys/time.h'
#cmakedefine TIME_WITH_SYS_TIME 1
// We should have 'strtol, strtoll' in stdlib.h header or in cstdlib with c++
-#define HAVE_STRTOLL 1
+#cmakedefine HAVE_STRTOLL 1