bpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287)

diff --git a/configure b/configure
index 0edbb3e..7944f8f 100755
--- a/configure
+++ b/configure
@@ -9512,6 +9512,37 @@
 fi
 	# Dynamic linking for HP-UX
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
+$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <uuid/uuid.h>
+int
+main ()
+{
+
+#ifndef uuid_generate_time_safe
+uuid_t out;
+uuid_generate_time_safe(out);
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+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_ext
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
 $as_echo_n "checking for library containing sem_init... " >&6; }
 if ${ac_cv_search_sem_init+:} false; then :