From 242499c09161761a21ee3e2202f0a245ecfeb577 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 28 Sep 2004 04:41:57 +0000 Subject: If the user specified --with-krb5 but we don't have a usable Kerberos library, don't disable dissection and drive on, report an error and stop; --with-krb5 means "build this with Kerberos", not "build this with Kerberos if you can" (no -krb5 option at all means "build this with Kerberos if you can"). If they *didn't* specify --with-krb5 and we don't have a usable Kerberos library, set want_krb5 to "no", so that at the end of the configure script we don't say we're building with the Kerberos library (otherwise, want_krb5 is "ifpresent", but the stuff to print the configuration options treats anything other than "no" as meaning "yes"). svn path=/trunk/; revision=12118 --- acinclude.m4 | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 123de199f6..d6ef1a5e78 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1100,28 +1100,56 @@ AC_DEFUN([AC_ETHEREAL_KRB5_CHECK], # We didn't find "krb5_kt_resolve()" in the # Kerberos library, even when we tried linking # with -lresolv; we can't link with kerberos. + # + if test "x$want_krb5" = "xyes" + then + # + # The user tried to force us to use the library, + # but we can't do so; report an error. + # + AC_MSG_ERROR(Usable Heimdal not found) + else + # + # Restore the versions of CFLAGS and CPPFLAGS + # from before we added the flags for Kerberos. + # + AC_MSG_RESULT(Usable Heimdal not found - disabling dissection for some kerberos data in packet decoding) + CFLAGS="$ethereal_save_CFLAGS" + CPPFLAGS="$ethereal_save_CPPFLAGS" + LIBS="$ethereal_save_LIBS" + KRB5_LIBS="" + want_krb5=no + fi + fi + else + # + # It's not Heimdal. + # + if test "x$want_krb5" = "xyes" + then + # + # The user tried to force us to use the library, + # but we can't do so; report an error. + # + AC_MSG_ERROR(Heimdal not found) + else # # Restore the versions of CFLAGS and CPPFLAGS # from before we added the flags for Kerberos. # - AC_MSG_RESULT(usable Heimdal not found - disabling dissection for some kerberos data in packet decoding) + AC_MSG_RESULT(no) + AC_MSG_RESULT(Heimdal not found - disabling dissection for some kerberos data in packet decoding) CFLAGS="$ethereal_save_CFLAGS" CPPFLAGS="$ethereal_save_CPPFLAGS" - LIBS="$ethereal_save_LIBS" KRB5_LIBS="" want_krb5=no fi - else - AC_MSG_RESULT(no) - AC_MSG_RESULT(Heimdal not found - disabling dissection for some kerberos data in packet decoding) fi else # - # The user didn't ask for Kerberos, or they did but we don't - # have Heimdal. - # XXX - if they did ask for it, should we fail and tell - # them that the Kerberos library they have isn't one we can - # use? + # The user asked us not to use Kerberos, or they didn't + # say whether they wanted us to use it but we found + # that we couldn't. # # Restore the versions of CFLAGS and CPPFLAGS # from before we added the flags for Kerberos. -- cgit v1.2.3