summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-01-31 11:40:22 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-01-31 11:40:22 +0000
commit91d0fcf1f794acc90a671bf5557d2d2a505843f7 (patch)
tree2d7572c6c4f2dd15b07daa6abbf5b5897501cea2 /macros
parent50a193569c765191e14961718af2d004d184c7f1 (diff)
downloadneon-91d0fcf1f794acc90a671bf5557d2d2a505843f7.tar.gz
Add libneon-gnutls support library to allow use of external signing
callback with GnuTLS: * src/lib_gnutls.c, src/ne_gnutls.h, neon-gnutls.pc.in: New files. * src/ne_privssl.h (struct ne_ssl_context_s): Add sign_func, sign_data fields. * macros/neon.m4 (NEON_SSL): Define NE_SSL_LIBNAME; check for gnutls_sign_callback_set, add new exports NE_SSL_CFLAGS and NE_LIBSSL_LTFLAGS. Export NEON_LIBEXT in place of NEON_TARGET, NE_LIBNEON_LTFLAGS in place of NEON_LINK_FLAGS; * src/Makefile.in: Add and adjust targets to build libneon-gnutls iff configured with GnuTLS support. * Makefile.in (install-lib-ssl-no, install-lib-ssl-gnutls): New targets. * neon-config.in: Add --la-file=gnutls, --cflags=gnutls support. * src/ne_socket.c (ne_sock_connect_ssl): Set up the sign_func callback if non-NULL. * configure.in: Adjust for NEON_LINK_FLAGS rename. Define NE_LIBSSL_LTFLAGS. Generate neon-gnutls.pc. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1315 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'macros')
-rw-r--r--macros/neon.m423
1 files changed, 16 insertions, 7 deletions
diff --git a/macros/neon.m4 b/macros/neon.m4
index 8e17632..6d7c08e 100644
--- a/macros/neon.m4
+++ b/macros/neon.m4
@@ -777,18 +777,19 @@ else
NE_ENABLE_SUPPORT(DAV, [WebDAV support is enabled])
fi
-AC_SUBST(NEON_TARGET)
+AC_SUBST(NEON_LIBEXT)
AC_SUBST(NEON_OBJEXT)
AC_SUBST(NEONOBJS)
AC_SUBST(NEON_EXTRAOBJS)
-AC_SUBST(NEON_LINK_FLAGS)
+AC_SUBST(NE_LIBNEON_LTFLAGS)
+AC_SUBST(NE_LIBSSL_LTFLAGS)
])
# The libtoolized build case:
AC_DEFUN([NEON_LIBTOOL_BUILD], [
-NEON_TARGET=libneon.la
+NEON_LIBEXT=la
NEON_OBJEXT=lo
NEON_COMMON_BUILD($#, $*)
@@ -811,7 +812,7 @@ AC_PATH_TOOL(RANLIB, ranlib, :, $ne_PATH)
# The non-libtool build case:
AC_DEFUN([NEON_NORMAL_BUILD], [
-NEON_TARGET=libneon.a
+NEON_LIBEXT=a
NEON_OBJEXT=o
AC_REQUIRE([NE_FIND_AR])
@@ -881,6 +882,8 @@ AC_ARG_WITH(ssl,
AC_ARG_WITH(egd,
[[ --with-egd[=PATH] enable EGD support [using EGD socket at PATH]]])
+NE_SSL_LIBNAME=none
+
case $with_ssl in
/*)
AC_MSG_NOTICE([to use SSL libraries in non-standard locations, try --with-ssl --with-libs=$with_ssl])
@@ -949,7 +952,8 @@ gnutls)
;;
esac
- CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
+ NE_SSL_CFLAGS=`$GNUTLS_CONFIG --cflags`
+ CPPFLAGS="$CPPFLAGS $NE_SSL_CFLAGS"
AC_CHECK_HEADER([gnutls/gnutls.h],,
[AC_MSG_ERROR([could not find gnutls/gnutls.h in include path])])
@@ -960,12 +964,15 @@ gnutls)
AC_DEFINE([HAVE_GNUTLS], 1, [Define if GnuTLS support is enabled])
# Check for functions in later releases
- NE_CHECK_FUNCS(gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava)
+ NE_CHECK_FUNCS([gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava \
+ gnutls_sign_callback_set])
# Check for iconv support if using the new RDN access functions:
if test ${ac_cv_func_gnutls_x509_dn_get_rdn_ava}X${ac_cv_header_iconv_h} = yesXyes; then
AC_CHECK_FUNCS(iconv)
fi
+
+ NE_SSL_LIBNAME=gnutls
;;
*) # Default to off; only create crypto-enabled binaries if requested.
NE_DISABLE_SUPPORT(SSL, [SSL support is not enabled])
@@ -973,7 +980,9 @@ gnutls)
NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_stubssl"
;;
esac
-AC_SUBST(NEON_SUPPORTS_SSL)
+
+AC_SUBST(NE_SSL_LIBNAME)
+AC_SUBST(NE_SSL_CFLAGS)
AC_ARG_WITH(ca-bundle,
AS_HELP_STRING(--with-ca-bundle, specify filename of an SSL CA root bundle),,