Commit b7346f8e authored by Luca Boccassi's avatar Luca Boccassi

Problem: gssapi search in autoconf does not use pkgconfig

Solution: use it before falling back to headers checks
parent 7be3efc9
......@@ -307,6 +307,11 @@ src_libzmq_la_CPPFLAGS += ${pgm_CFLAGS}
src_libzmq_la_LIBADD += ${pgm_LIBS}
endif
if BUILD_GSSAPI
src_libzmq_la_CPPFLAGS += ${gssapi_krb5_CFLAGS}
src_libzmq_la_LIBADD += ${gssapi_krb5_LIBS}
endif
if ENABLE_PERF
noinst_PROGRAMS = \
perf/local_lat \
......
......@@ -442,10 +442,12 @@ AC_ARG_WITH([libgssapi_krb5], [AS_HELP_STRING([--with-libgssapi_krb5],
# conditionally require libgssapi_krb5
if test "x$require_libgssapi_krb5_ext" != "xno"; then
AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi],
AC_DEFINE(HAVE_LIBGSSAPI_KRB5, [1], [Enabled GSSAPI security]),
AC_MSG_ERROR(libgssapi_krb5 is needed for GSSAPI security))
PKG_CHECK_MODULES([gssapi_krb5], [krb5-gssapi], [], [
AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi],
AC_DEFINE(HAVE_LIBGSSAPI_KRB5, [1], [Enabled GSSAPI security]),
AC_MSG_ERROR(libgssapi_krb5 is needed for GSSAPI security))
])
fi
AM_CONDITIONAL(BUILD_GSSAPI, test "x$require_libgssapi_krb5_ext" != "xno")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment