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
This commit is contained in:
Guy Harris 2004-09-28 04:41:57 +00:00
parent ac98f225a8
commit 242499c091
1 changed files with 38 additions and 10 deletions

View File

@ -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.