pull up r18331 from trunk
authorTom Yu <tlyu@mit.edu>
Tue, 1 Aug 2006 23:50:00 +0000 (23:50 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 1 Aug 2006 23:50:00 +0000 (23:50 +0000)
 r18331@cathode-dark-space:  raeburn | 2006-07-17 13:55:54 -0400
 ticket: 3971
 target_version: 1.5.1
 tags: pullup

 (KRB5_AC_FIND_DLOPEN): Use AC_SEARCH_LIBS.

ticket: 3971
version_fixed: 1.5.5

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-5@18398 dc483132-0cff-0310-8789-dd5450dbe970

src/aclocal.m4

index 5a080f8c3e5862d893f8c6d538aa9c5b93e7bdaf..8fd2f8d3449673a09cdcabf4e29aeabceb34b053 100644 (file)
@@ -157,9 +157,14 @@ fi
 
 dnl find dlopen
 AC_DEFUN([KRB5_AC_FIND_DLOPEN],[
-AC_CHECK_LIB(dl, dlopen,[DL_LIB=-ldl
+old_LIBS="$LIBS"
+DL_LIB=
+AC_SEARCH_LIBS(dlopen, dl, [
+if test "$ac_cv_search_dlopen" != "none required"; then
+  DL_LIB=$ac_cv_search_dlopen
+fi
+LIBS="$old_LIBS"
 AC_DEFINE(USE_DLOPEN,1,[Define if dlopen should be used])])
-dnl AC_CHECK_LIB(ld, main, DL_LIB=-lld)
 AC_SUBST(DL_LIB)
 ])