summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2017-10-25 21:42:03 +0200
committerGlenn Strauss <gstrauss@gluelogic.com>2017-10-28 22:48:12 -0400
commit2c69ef6704b4858b224f9b25e159c9cd3f4667f4 (patch)
tree2624c6e4e3f95b6a3959beeb1524394539bf9225
parent955b029f2f421d7cc394bbabca3afefe3770aee2 (diff)
downloadlighttpd-git-2c69ef6704b4858b224f9b25e159c9cd3f4667f4.tar.gz
[autobuild] kerberos improvements
-rw-r--r--configure.ac48
1 files changed, 29 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 146ac111..71a20380 100644
--- a/configure.ac
+++ b/configure.ac
@@ -479,49 +479,59 @@ AC_ARG_WITH([krb5],
AC_MSG_RESULT([$WITH_KRB5])
if test "$WITH_KRB5" != no; then
- use_krb5=yes
if test "$WITH_KRB5" != yes; then
- CPPFLAGS="$CPPFLAGS -I$WITH_KRB5/include"
- LDFLAGS="$LDFLAGS -L$WITH_KRB5/lib"
+ krb5_append_CPPFLAGS=" -I$WITH_KRB5/include"
+ krb5_append_LDFLAGS=" -L$WITH_KRB5/lib"
fi
-else
- use_krb5=no
fi
-AM_CONDITIONAL([BUILD_WITH_KRB5], [test "$WITH_KRB5" != no])
+AC_MSG_CHECKING([custom include directory for kerberos5])
AC_ARG_WITH([krb5-includes],
[AC_HELP_STRING([--with-krb5-includes=DIR], [Kerberos includes])],
[
- use_krb5=yes
- CPPFLAGS="$CPPFLAGS -I$withval"
- ]
+ if test "$WITH_KRB5" = no; then
+ AC_MSG_ERROR([build --with-krb5 to use --with-krb5-includes])
+ fi
+ krb5_append_CPPFLAGS=" -I$withval"
+ AC_MSG_RESULT([$withval])
+ ],
+ [AC_MSG_RESULT([no])]
)
+AC_MSG_CHECKING([custom lib directory for kerberos5])
AC_ARG_WITH([krb5-libs],
[AC_HELP_STRING([--with-krb5-libs=DIR], [Kerberos libraries])],
[
- use_krb5=yes
- LDFLAGS="$LDFLAGS -L$withval"
- ]
+ if test "$WITH_KRB5" = no; then
+ AC_MSG_ERROR([build --with-krb5 to use --with-krb5-libs])
+ fi
+ krb5_append_LDFLAGS=" -L$withval"
+ AC_MSG_RESULT([$withval])
+ ],
+ [AC_MSG_RESULT([no])]
)
-if test "$use_krb5" = yes; then
+if test "$WITH_KRB5" != no; then
+ CPPFLAGS="${CPPFLAGS}${krb5_append_CPPFLAGS}"
+ LDFLAGS="${LDFLAGS}${krb5_append_LDFLAGS}"
+
AC_CHECK_LIB([gssapi_krb5], [gss_acquire_cred],
[AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],
[
KRB5_LIB="-lkrb5 -lgssapi_krb5"
AC_DEFINE([HAVE_KRB5], [1], [libgssapi_krb5])
- ]
- )]
+ ],
+ [AC_MSG_ERROR([gssapi_krb5 headers were not found, install them or build without --with-krb5])]
+ )],
+ [AC_MSG_ERROR([gssapi_krb5 libs were not found, install them or build without --with-krb5])]
)
- if test -z "$KRB5_LIB"; then
- AC_MSG_ERROR([gssapi_krb5 headers and/or libs where not found, install them or build with --without-krb5])
- fi
case "$host_os" in
*darwin*|*cygwin* ) KRB5_LIB="$KRB5_LIB -lcom_err" ;;
* ) ;;
esac
fi
+
+AM_CONDITIONAL([BUILD_WITH_KRB5], [test "$WITH_KRB5" != no])
AC_SUBST([KRB5_LIB])
dnl Check for openssl
@@ -564,7 +574,7 @@ AC_ARG_WITH([openssl-libs],
)
if test "$use_openssl" = yes; then
- if test "$use_krb5" = yes; then
+ if test "$WITH_KRB5" != no; then
AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos])
fi