From: Amos Jeffries Date: Thu, 19 Nov 2015 14:07:53 +0000 (-0800) Subject: Error on missing MIT libraries only if MIT was required X-Git-Tag: SQUID_4_0_3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff78f3c3d2a46f0b5fe0c954ccda0c50e962539a;p=thirdparty%2Fsquid.git Error on missing MIT libraries only if MIT was required --- diff --git a/configure.ac b/configure.ac index edc0d554fb..d1daa126c6 100644 --- a/configure.ac +++ b/configure.ac @@ -1437,23 +1437,31 @@ if test "x$with_mit_krb5" != "xno" || test "x$with_apple_krb5" = "xyes" ; then ## Detect libraries the hard way. SQUID_STATE_SAVE([squid_mit_save]) + missing_required= AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) AC_CHECK_LIB(com_err, [main], [LIB_KRB5_LIBS="-lcom_err $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'com_err' is required for MIT Kerberos]) + AC_MSG_WARN([library 'com_err' is required for MIT Kerberos]) + missing_required=yes ]) LIBS=$LIB_KRB5_LIBS AC_CHECK_LIB(k5crypto, [main], [LIB_KRB5_LIBS="-lk5crypto $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'k5crypto' is required for MIT Kerberos]) + AC_MSG_WARN([library 'k5crypto' is required for MIT Kerberos]) + missing_required=yes ]) LIBS=$LIB_KRB5_LIBS AC_CHECK_LIB(krb5, [main], [LIB_KRB5_LIBS="-lkrb5 $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'krb5' is required for MIT Kerberos]) + AC_MSG_WARN([library 'krb5' is required for MIT Kerberos]) + missing_required=yes ]) LIBS=$LIB_KRB5_LIBS AC_CHECK_LIB(gssapi_krb5, [main], [LIB_KRB5_LIBS="-lgssapi_krb5 $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'gssapi_krb5' is required for MIT Kerberos]) + AC_MSG_WARN([library 'gssapi_krb5' is required for MIT Kerberos]) + missing_required=yes ]) SQUID_STATE_ROLLBACK([squid_mit_save]) + if test "x$missing_required" = "xyes"; then + LIB_KRB5_LIBS="" + fi fi ]) @@ -1524,15 +1532,21 @@ if test "x$with_solaris_krb5" = "xyes" -a "x$KRB5LIBS" = "x"; then CXXFLAGS="-I/usr/include/kerberosv5 $CXXFLAGS" SQUID_STATE_SAVE([squid_solaris_save]) + missing_required= AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) AC_CHECK_LIB(krb5, [main], [LIB_KRB5_LIBS="-lkrb5 $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'krb5' is required for Solaris Kerberos]) + AC_MSG_WARN([library 'krb5' is required for Solaris Kerberos]) + missing_required=yes ]) LIBS=$LIB_KRB5_LIBS AC_CHECK_LIB(gss, [main], [LIB_KRB5_LIBS="-lgss $LIB_KRB5_LIBS"],[ - AC_MSG_ERROR([library 'gss' is required for Solaris Kerberos]) + AC_MSG_WARN([library 'gss' is required for Solaris Kerberos]) + missing_required=yes ]) SQUID_STATE_ROLLBACK([squid_solaris_save]) + if test "x$missing_required" = "xyes"; then + LIB_KRB5_LIBS="" + fi fi if test "x$LIB_KRB5_LIBS" != "x"; then