* configure.in: Check for various _r functions needed for thread safety. If
authorKen Raeburn <raeburn@mit.edu>
Fri, 4 Jun 2004 01:05:24 +0000 (01:05 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 4 Jun 2004 01:05:24 +0000 (01:05 +0000)
enable-thread-support is specified, complain about any that aren't found.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16405 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/configure.in

index 632676843ddf45ba6496dc00de419951bb25d6c3..c095304f62ece20a16b22db1826e17f97d81dfcc 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-03  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Check for various _r functions needed for thread
+       safety.  If enable-thread-support is specified, complain about
+       any that aren't found.
+
 2004-05-30  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (KRB5_AC_GCC_ATTRS): On AIX 4, mark the destructor
index 307ddbdcb1d2a2502165d040d70df818192a28a4..099e102671a21ad1011cad23aebbcd624aa46d62 100644 (file)
@@ -125,6 +125,28 @@ dnl for krb524
 AC_TYPE_SIGNAL
 dnl
 dnl
+dnl Check for thread safety issues.
+dnl (Is there a better place for this?)
+tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r"
+AC_CHECK_FUNCS($tsfuncs)
+if test "$enable_thread_support" = yes; then
+  tsmissing=""
+  for ts in $tsfuncs; do
+    if eval "test \"\${ac_cv_func_$ts}\" != yes"; then
+      tsmissing="$tsmissing $ts"
+    fi
+  done
+  if test "$tsmissing" != ""; then
+    AC_MSG_WARN([Some functions that are needed for library thread])
+    AC_MSG_WARN([safety appear to be missing.])
+    for ts in $tsmissing; do
+      AC_MSG_WARN([  missing thread-safe function: $ts])
+    done
+    AC_MSG_WARN([Without these functions, the installed libraries])
+    AC_MSG_WARN([may not be thread-safe.])
+  fi # tsmissing not empty
+fi # enable_thread_support
+dnl
 HOST_TYPE=$krb5_cv_host
 AC_SUBST(HOST_TYPE)
 dnl