From: Amos Jeffries Date: Fri, 22 Aug 2014 12:48:40 +0000 (-0700) Subject: Portability: disable krb5-config use when cross-compiling X-Git-Tag: SQUID_3_5_0_1~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77f4953df8d0bc137d0a03c86464778da19eeaff;p=thirdparty%2Fsquid.git Portability: disable krb5-config use when cross-compiling krb5-config detection does not support cross-compiling or multiple krb5 library installations properly. pkg-config is supported by recent releases of the popular krb5 libraries and supports cross-compile properly and complicated build environments much better. Trust its results when cross-compiling. --- diff --git a/configure.ac b/configure.ac index f70fcc96e7..25b76445c2 100644 --- a/configure.ac +++ b/configure.ac @@ -1450,8 +1450,8 @@ elif test $ac_with_krb5_count -eq 0 ; then fi if test $ac_with_krb5_count -gt 1 ; then AC_MSG_ERROR([pkg-config found multiple Kerberos library. Please select one with --with-]) - elif test $ac_with_krb5_count -eq 0 ; then - # Look for krb5-config + elif test $ac_with_krb5_count -eq 0 -a "$cross_compiling" = "no"; then + # Look for krb5-config (unless cross-compiling) AC_PATH_PROG(krb5_config,krb5-config,no) if test "x$ac_cv_path_krb5_config" != "xno" ; then krb5confpath="`dirname $ac_cv_path_krb5_config`" @@ -1481,14 +1481,16 @@ if test "x$with_mit_krb5" = "xyes"; then # auto-detect using pkg-config PKG_CHECK_MODULES([LIB_KRB5],[gssapi-krb5 krb5],,[ - # look for krb5-config - if test "x$krb5confpath" = "x" ; then - AC_PATH_PROG(krb5_config,krb5-config,no) - if test "x$ac_cv_path_krb5_config" != "xno" ; then - ac_krb5_config="$ac_cv_path_krb5_config" + # look for krb5-config (unless cross-compiling) + if test "$cross_compiling" = "no"; then + if test "x$krb5confpath" = "x" ; then + AC_PATH_PROG(krb5_config,krb5-config,no) + if test "x$ac_cv_path_krb5_config" != "xno" ; then + ac_krb5_config="$ac_cv_path_krb5_config" + fi + else + ac_krb5_config="$krb5confpath/krb5-config" fi - else - ac_krb5_config="$krb5confpath/krb5-config" fi if test "x$ac_krb5_config" != "x" && test -x "$ac_krb5_config"; then # Get libs, etc @@ -1560,14 +1562,16 @@ if test "x$with_solaris_krb5" = "xyes"; then LIBS="$LIBS $LIB_KRB5_PATH" # no pkg-config for solaris native Kerberos - # look for krb5-config - if test "x$krb5confpath" = "x" ; then - AC_PATH_PROG(krb5_config,krb5-config,no) - if test "x$ac_cv_path_krb5_config" != "xno" ; then - ac_krb5_config="$ac_cv_path_krb5_config" + # look for krb5-config (unless cross-compiling) + if test "$cross_compiling" = "no"; then + if test "x$krb5confpath" = "x" ; then + AC_PATH_PROG(krb5_config,krb5-config,no) + if test "x$ac_cv_path_krb5_config" != "xno" ; then + ac_krb5_config="$ac_cv_path_krb5_config" + fi + else + ac_krb5_config="$krb5confpath/krb5-config" fi - else - ac_krb5_config="$krb5confpath/krb5-config" fi if test "x$ac_krb5_config" != "x" && test -x "$ac_krb5_config"; then # Get libs, etc @@ -1631,14 +1635,16 @@ if test "x$with_heimdal_krb5" = "xyes"; then # auto-detect using pkg-config PKG_CHECK_MODULES([LIB_KRB5],[heimdal-gssapi],,[ - # look for krb5-config - if test "x$krb5confpath" = "x" ; then - AC_PATH_PROG(krb5_config,krb5-config,no) - if test "x$ac_cv_path_krb5_config" != "xno" ; then - ac_krb5_config="$ac_cv_path_krb5_config" + # look for krb5-config (unless cross-compiling) + if test "$cross_compiling" = "no"; then + if test "x$krb5confpath" = "x" ; then + AC_PATH_PROG(krb5_config,krb5-config,no) + if test "x$ac_cv_path_krb5_config" != "xno" ; then + ac_krb5_config="$ac_cv_path_krb5_config" + fi + else + ac_krb5_config="$krb5confpath/krb5-config" fi - else - ac_krb5_config="$krb5confpath/krb5-config" fi if test "x$ac_krb5_config" != "x" && test -x "$ac_krb5_config"; then # Get libs, etc