------------------------------------------------------------ revno: 13541 revision-id: squid3@treenet.co.nz-20140822124840-1pawu3ph8wcinj1c parent: squidadm@squid-cache.org-20140822001629-4yrebps75xvt1hx5 committer: Amos Jeffries branch nick: trunk timestamp: Fri 2014-08-22 05:48:40 -0700 message: 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140822124840-1pawu3ph8wcinj1c # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: f864325601fd26b3b3e15b45b55e212445dad5f0 # timestamp: 2014-08-22 12:54:37 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squidadm@squid-cache.org-20140822001629-\ # 4yrebps75xvt1hx5 # # Begin patch === modified file 'configure.ac' --- configure.ac 2014-08-21 18:11:23 +0000 +++ configure.ac 2014-08-22 12:48:40 +0000 @@ -1450,8 +1450,8 @@ 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 @@ # 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 @@ 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 @@ # 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