Skip to content

Commit

Permalink
configure: respect host tool prefix for krb5-config
Browse files Browse the repository at this point in the history
Use ${host_alias}-krb5-config if available. This improves cross-
compilation support and fixes multilib on Gentoo (at least).
  • Loading branch information
mgorny authored and bagder committed Jul 14, 2014
1 parent 9886600 commit 08b27e0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,9 @@ if test x"$want_gss" = xyes; then
AC_MSG_RESULT(yes)

if test -z "$GSSAPI_INCS"; then
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
Expand Down Expand Up @@ -1301,7 +1303,12 @@ if test x"$want_gss" = xyes; then
LIBS="-lgss $LIBS"
;;
*)
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
LIBS="$gss_libs $LIBS"
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS
gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
Expand Down

0 comments on commit 08b27e0

Please sign in to comment.