From 4a51cc6b152082b4907d3701983e5535510ef9c1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 4 Jul 2004 08:52:45 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16542 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 6 ++++++ src/aclocal.m4 | 12 ++++++++---- src/configure.in | 5 ++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 519292220..f94309eb3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-07-04 Ken Raeburn + + * 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 * aclocal.m4 (WITH_CC): Use -Wl,-search_paths_first for linking on diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 97ddb190b..80e36871d 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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) ]) diff --git a/src/configure.in b/src/configure.in index 099e10267..b915acfd6 100644 --- a/src/configure.in +++ b/src/configure.in @@ -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.]) -- 2.26.2