diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-28 04:41:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-28 04:41:57 +0000 |
commit | 242499c09161761a21ee3e2202f0a245ecfeb577 (patch) | |
tree | d0715a461f19b99a4229f78d11649efc57b476e1 /acinclude.m4 | |
parent | ac98f225a8db46c1c6e29abfbed24c91544fa6e4 (diff) | |
download | wireshark-242499c09161761a21ee3e2202f0a245ecfeb577.tar.gz wireshark-242499c09161761a21ee3e2202f0a245ecfeb577.tar.bz2 wireshark-242499c09161761a21ee3e2202f0a245ecfeb577.zip |
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
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 123de199f6..d6ef1a5e78 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1101,27 +1101,55 @@ AC_DEFUN([AC_ETHEREAL_KRB5_CHECK], # 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. |