summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2016-04-26 13:13:01 +0800
committerDaniel Stenberg <daniel@haxx.se>2021-10-28 14:13:38 +0200
commit6fe4e7d3bfc1520da032ea067b4712cc1357f016 (patch)
tree3daebb5ae1902dd465a4f945d8e0f6a8db282b4e
parent6204aab43a05e34e3797d9705e7bcc76b2cf0b0c (diff)
downloadcurl-6fe4e7d3bfc1520da032ea067b4712cc1357f016.tar.gz
configure.ac: replace krb5-config with pkg-config
The rationale is that custom *-config tools don't work well when cross-compiling or using sysroots (such as when using Yocto project) and require custom fixing for each of them; pkg-config on the other hand works similarly everywhere. Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Alexander Kanavin <alex@linutronix.de> Closes #7916
-rw-r--r--configure.ac14
1 files changed, 6 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 7c785b2fd..0c2384703 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1677,18 +1677,17 @@ AC_ARG_WITH(gssapi,
fi
])
-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
-
save_CPPFLAGS="$CPPFLAGS"
AC_MSG_CHECKING([if GSS-API support is requested])
if test x"$want_gss" = xyes; then
AC_MSG_RESULT(yes)
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
if test -z "$GSSAPI_INCS"; 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 "$KRB5CONFIG"; then
- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
+ elif test "$PKGCONFIG" != "no" ; then
+ GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
@@ -1773,15 +1772,14 @@ if test x"$want_gss" = xyes; then
LIBS="-lgssapi_krb5 -lresolv $LIBS"
;;
*)
+ CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
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 "$KRB5CONFIG"; then
- dnl krb5-config doesn't have --libs-only-L or similar, put everything
- dnl into LIBS
- gss_libs=`$KRB5CONFIG --libs gssapi`
+ elif test "$PKGCONFIG" != "no" ; then
+ gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
LIBS="$gss_libs $LIBS"
else
case $host in