summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorKleis Auke Wolthuizen <github@kleisauke.nl>2021-10-23 14:13:26 +0200
committerKleis Auke Wolthuizen <github@kleisauke.nl>2021-10-23 14:13:26 +0200
commitdab70b6f655ec409e284dad1027ff296b3262f96 (patch)
tree0a6b3d8315a10a6e8e1cc39a11c2271ccbdfb4e1 /configure
parentc6d1c9c07cfd03642d154973d036fccc59a2075c (diff)
downloadlcms2-dab70b6f655ec409e284dad1027ff296b3262f96.tar.gz
Regenerate configure script
Incorporates the changes from PR #270.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 40 insertions, 6 deletions
diff --git a/configure b/configure
index 194364c..3a6c32d 100755
--- a/configure
+++ b/configure
@@ -17062,16 +17062,50 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
esac
-# Check for functions that some compilers lack (or name differently)
-for ac_func in gmtime_r _gmtime64_s
+# Check for threadsafe variants of gmtime
+# Note: check for gmtime_s is a bit more complex as it is implemented as a macro
+for ac_func in gmtime_r
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
+if test "x$ac_cv_func_gmtime_r" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_GMTIME_R 1
_ACEOF
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmtime_s" >&5
+$as_echo_n "checking for gmtime_s... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <time.h>
+int
+main ()
+{
+
+ time_t t;
+ struct tm m;
+ gmtime_s(&m, &t);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_GMTIME_S 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
done