* aclocal.m4 (AC_LIBRARY_NET): Look for res_nsearch.
authorKen Raeburn <raeburn@mit.edu>
Sun, 4 Jul 2004 08:52:45 +0000 (08:52 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sun, 4 Jul 2004 08:52:45 +0000 (08:52 +0000)
* configure.in: If thread support is enabled and res_nsearch isn't found, issue
a warning.

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

src/ChangeLog
src/aclocal.m4
src/configure.in

index 519292220a3c0bff29dacc85031ce2a80adb6640..f94309eb30d22faa9ab8646c4e708901c4a1d5b7 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4 (AC_LIBRARY_NET): Look for res_nsearch.
+       * configure.in: If thread support is enabled and res_nsearch
+       isn't found, issue a warning.
+
 2004-06-18  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (WITH_CC): Use -Wl,-search_paths_first for linking on
index 97ddb190b7f45ed5c118348fc2d0d81f5f9dcf46..80e36871d7aef7f37c6ed13ed93edd53e27b1423 100644 (file)
@@ -1308,10 +1308,14 @@ AC_DEFUN(AC_LIBRARY_NET, [
     AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl)))
   KRB5_AC_ENABLE_DNS
   if test "$enable_dns" = yes ; then
-    AC_CHECK_FUNC(res_search, , AC_CHECK_LIB(resolv, res_search,
-       LIBS="$LIBS -lresolv" ; RESOLV_LIB=-lresolv,
-       AC_MSG_ERROR(Cannot find resolver support routine res_search in -lresolv.)
-    ))
+    AC_CHECK_FUNC(res_nsearch, , [AC_CHECK_LIB(resolv, res_nsearch,
+       [LIBS="$LIBS -lresolv" ; RESOLV_LIB=-lresolv
+        AC_DEFINE(HAVE_RES_NSEARCH,1,[Define if BIND 8 routine res_nsearch is available])
+       ],
+       [AC_CHECK_FUNC(res_search, , AC_CHECK_LIB(resolv, res_search,
+           LIBS="$LIBS -lresolv" ; RESOLV_LIB=-lresolv,
+           AC_MSG_ERROR(Cannot find resolver support routine res_search in -lresolv.)
+       ))])])
   fi
   AC_SUBST(RESOLV_LIB)
   ])
index 099e102671a21ad1011cad23aebbcd624aa46d62..b915acfd61da9fedb47c48b5ff6796eb43ee0daf 100644 (file)
@@ -127,15 +127,18 @@ 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
+  tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r"
   tsmissing=""
   for ts in $tsfuncs; do
     if eval "test \"\${ac_cv_func_$ts}\" != yes"; then
       tsmissing="$tsmissing $ts"
     fi
   done
+  if test "$ac_cv_func_res_nsearch/$ac_cv_lib_resolv_res_nsearch" = "no/no"; then
+    tsmissing="$tsmissing res_nsearch"
+  fi
   if test "$tsmissing" != ""; then
     AC_MSG_WARN([Some functions that are needed for library thread])
     AC_MSG_WARN([safety appear to be missing.])