diff options
author | Mihai Moldovan <ionic@ionic.de> | 2018-01-09 01:08:17 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-01-09 01:08:17 +0100 |
commit | 1086c4aa5b4ad65bb51dac1dbab606f14ebaf98b (patch) | |
tree | 1365ea718d79998976bfab487b596ef48ce34b0c /nxcomp/configure.ac | |
parent | 70e1e6a011126aa027456ad4b3163f67d72c034f (diff) | |
parent | 2eb2f2e6ca13d84113e30041ade2dbfa9f4e1432 (diff) | |
download | nx-libs-1086c4aa5b4ad65bb51dac1dbab606f14ebaf98b.tar.gz nx-libs-1086c4aa5b4ad65bb51dac1dbab606f14ebaf98b.tar.bz2 nx-libs-1086c4aa5b4ad65bb51dac1dbab606f14ebaf98b.zip |
Merge branch 'Ionic-bugfix/ctime' into 3.6.x
Attributes GH PR #623: https://github.com/ArcticaProject/nx-libs/pull/623
Fixes: ArcticaProject/nx-libs#616
Diffstat (limited to 'nxcomp/configure.ac')
-rw-r--r-- | nxcomp/configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nxcomp/configure.ac b/nxcomp/configure.ac index 12c3b5004..b7350a45e 100644 --- a/nxcomp/configure.ac +++ b/nxcomp/configure.ac @@ -94,6 +94,23 @@ std::tm tm = *std::localtime(&t); [Use std::put_time to format times, must be made available by the compiler if turned on.])], [AC_MSG_RESULT([no])]) +# Check if ::ctime_s is available. +AC_MSG_CHECKING([if ::ctime_s is available]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[ +#define __STDC_WANT_LIB_EXT1__ 1 +#include <ctime> +]], +[[ +time_t res = time(NULL); +char str[26] = { }; +::ctime_s(str, sizeof(str), &res); +]])], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_CTIME_S, [1], + [Use ::ctime_s to format times, must be made available by the compiler if turned on.])], + [AC_MSG_RESULT([no])]) + AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable to get info session log output (disabled by default)])], |