From ff3e7d4f75898b5854618203d4ee675dca2c38af Mon Sep 17 00:00:00 2001 From: "H.Habighorst" Date: Thu, 13 Aug 2009 17:27:59 -0400 Subject: Bug 591377 – Fails to detect krb5 in configure with -as-needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configure.ac | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3b0f3755d4..938fea054d 100644 --- a/configure.ac +++ b/configure.ac @@ -792,27 +792,27 @@ dnl Kerberos 5 dnl ************ msg_krb5="no" if test "x${with_krb5}" != "xno"; then - LDFLAGS_save="$LDFLAGS" + LIBS_save="$LIBS" mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5" heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi" sunlibs="-lkrb5 -lgss" AC_CACHE_CHECK([for Kerberos 5], [ac_cv_lib_kerberos5], [ - LDFLAGS="$LDFLAGS -L$with_krb5_libs $mitlibs" - AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context,])], + LIBS="$LIBS -L$with_krb5_libs $mitlibs" + AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])], [ac_cv_lib_kerberos5="$mitlibs"], [ - LDFLAGS="$LDFLAGS_save -L$with_krb5_libs $heimlibs" + LIBS="$LIBS_save -L$with_krb5_libs $heimlibs" AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])], [ac_cv_lib_kerberos5="$heimlibs"], [ - LDFLAGS="$LDFLAGS_save -L$with_krb5_libs $sunlibs" + LIBS="$LIBS_save -L$with_krb5_libs $sunlibs" AC_LINK_IFELSE([AC_LANG_CALL([], [krb5_init_context])], [ac_cv_lib_kerberos5="$sunlibs"], [ac_cv_lib_kerberos5="no"]) ]) ]) - LDFLAGS="$LDFLAGS_save" + LIBS="$LIBS_save" ]) if test "$ac_cv_lib_kerberos5" != "no"; then AC_DEFINE(HAVE_KRB5,1,[Define if you have Krb5]) @@ -868,36 +868,35 @@ dnl Kerberos 4 dnl *********** msg_krb4="no" if test "x${with_krb4}" != "xno"; then - LDFLAGS_save="$LDFLAGS" + LIBS_save="$LIBS" AC_CACHE_CHECK([for Kerberos 4], [ac_cv_lib_kerberos4], [ ac_cv_lib_kerberos4="no" - mitcompatlibs="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err" dnl Look for MIT krb5 compat krb4 - LDFLAGS="$LDFLAGS -L$with_krb4_libs $mitcompatlibs" + LIBS="$LIBS_save -L$with_krb4_libs $mitcompatlibs" AC_LINK_IFELSE([AC_LANG_CALL([], [krb_mk_req])], [ac_cv_lib_kerberos4="$mitcompatlibs"]) if test "$ac_cv_lib_kerberos4" = "no"; then dnl Look for KTH krb4 - LDFLAGS="$LDFLAGS_save -L$with_krb4_libs -lkrb -lcrypto -lcom_err -lroken" + LIBS="$LIBS_save -L$with_krb4_libs -lkrb -lcrypto -lcom_err -lroken" AC_LINK_IFELSE([AC_LANG_CALL([], [krb_mk_req])], [ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken"]) fi if test "$ac_cv_lib_kerberos4" = "no"; then dnl Look for old MIT krb4 - LDFLAGS="$LDFLAGS_save -L$with_krb4_libs -lkrb" + LIBS="$LIBS_save -L$with_krb4_libs -lkrb" AC_LINK_IFELSE([AC_LANG_CALL([], [krb_mk_req])], [ac_cv_lib_kerberos4="-lkrb"], [ - LDFLAGS="$LDFLAGS -ldes" + LIBS="$LIBS_save -ldes" AC_LINK_IFELSE([AC_LANG_CALL([], [krb_mk_req])], [ac_cv_lib_kerberos4="-lkrb -ldes"]) ]) fi ]) - LDFLAGS="$LDFLAGS_save" + LIBS="$LIBS_save" if test "$ac_cv_lib_kerberos4" != "no"; then AC_DEFINE(HAVE_KRB4,1,[Define if you have Krb4]) msg_krb4="yes" -- cgit