diff options
Diffstat (limited to 'macros/neon.m4')
-rw-r--r-- | macros/neon.m4 | 95 |
1 files changed, 41 insertions, 54 deletions
diff --git a/macros/neon.m4 b/macros/neon.m4 index 439d8d7..d8fe451 100644 --- a/macros/neon.m4 +++ b/macros/neon.m4 @@ -136,18 +136,12 @@ AC_DEFUN([NE_VERSIONS_BUNDLED], [ # Define the current versions. NE_VERSION_MAJOR=0 -NE_VERSION_MINOR=29 -NE_VERSION_PATCH=0 -NE_VERSION_TAG=-dev - -# libtool library interface versioning. Release policy dictates that -# for neon 0.x.y, each x brings an incompatible interface change, and -# each y brings no interface change, and since this policy has been -# followed since 0.1, x == CURRENT, y == RELEASE, 0 == AGE. For -# 1.x.y, this will become N + x == CURRENT, y == RELEASE, x == AGE, -# where N is constant (and equal to CURRENT + 1 from the final 0.x -# release) -NE_LIBTOOL_VERSINFO="${NE_VERSION_MINOR}:${NE_VERSION_PATCH}:0" +NE_VERSION_MINOR=28 +NE_VERSION_PATCH=6 +NE_VERSION_TAG= + +# 0.28.x is backwards-compatible with 0.27.x, so AGE=1 +NE_LIBTOOL_VERSINFO="28:${NE_VERSION_PATCH}:1" NE_DEFINE_VERSIONS @@ -156,11 +150,7 @@ NE_DEFINE_VERSIONS dnl Adds an ABI variation tag which will be added to the SONAME of dnl a shared library. e.g. NE_ADD_ABITAG(FOO) AC_DEFUN([NE_ADD_ABITAG], [ -if test "x${NE_LIBTOOL_RELEASE}y" = "xy"; then - NE_LIBTOOL_RELEASE="$1" -else - NE_LIBTOOL_RELEASE="${NE_LIBTOOL_RELEASE}-$1" -fi +: Disabled for 0.28 to retain 0.27 ABI ]) dnl Define the minimum required versions, usage: @@ -269,6 +259,7 @@ NEON_CHECK_VERSION([ NEON_CHECK_SUPPORT([zlib], [ZLIB], [zlib]) NEON_CHECK_SUPPORT([ipv6], [IPV6], [IPv6]) NEON_CHECK_SUPPORT([lfs], [LFS], [LFS]) + NEON_CHECK_SUPPORT([socks], [SOCKS], [SOCKSv5]) NEON_CHECK_SUPPORT([ts_ssl], [TS_SSL], [thread-safe SSL]) neon_got_library=yes if test $NE_FLAG_LFS = yes; then @@ -718,12 +709,12 @@ if test "x$neon_no_acl" = "xyes"; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_oldacl ne_acl3744" + NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_acl" fi NEON_SSL() +NEON_SOCKS() NEON_GSSAPI() -NEON_LIBPROXY() AC_SUBST(NEON_CFLAGS) AC_SUBST(NEON_LIBS) @@ -858,21 +849,19 @@ good dnl Less noisy replacement for PKG_CHECK_MODULES AC_DEFUN([NE_PKG_CONFIG], [ -m4_define([ne_cvar], m4_translit(ne_cv_pkg_[$2], [.-], [__]))dnl - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "$PKG_CONFIG" = "no"; then : Not using pkg-config $4 else - AC_CACHE_CHECK([for $2 pkg-config data], ne_cvar, + AC_CACHE_CHECK([for $2 pkg-config data], ne_cv_pkg_$2, [if $PKG_CONFIG $2; then - ne_cvar=yes + ne_cv_pkg_$2=yes else - ne_cvar=no + ne_cv_pkg_$2=no fi]) - if test "$ne_cvar" = "yes"; then + if test "$ne_cv_pkg_$2" = "yes"; then $1_CFLAGS=`$PKG_CONFIG --cflags $2` $1_LIBS=`$PKG_CONFIG --libs $2` : Using provided pkg-config data @@ -881,10 +870,7 @@ else : No pkg-config for $2 provided $4 fi -fi - -m4_undefine([ne_cvar]) -]) +fi]) dnl Check for an SSL library (GNU TLS or OpenSSL) AC_DEFUN([NEON_SSL], [ @@ -975,6 +961,12 @@ gnutls) ne_gnutls_ver=`$GNUTLS_CONFIG --version` ]) + case $ne_gnutls_ver in + 1.0.?|1.0.1?|1.0.20|1.0.21) + AC_MSG_ERROR([GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required]) + ;; + esac + AC_CHECK_HEADER([gnutls/gnutls.h],, [AC_MSG_ERROR([could not find gnutls/gnutls.h in include path])]) @@ -983,16 +975,9 @@ 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 \ - gnutls_sign_callback_set \ - gnutls_certificate_get_x509_cas \ - gnutls_certificate_verify_peers2]) - - # fail if gnutls_certificate_verify_peers2 is not found - if test x${ac_cv_func_gnutls_certificate_verify_peers2} != xyes; then - AC_MSG_ERROR([GnuTLS version predates gnutls_certificate_verify_peers2, newer version required]) - fi - + 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) @@ -1090,20 +1075,6 @@ if test "x$KRB5_CONFIG" != "xnone"; then NEON_LIBS=$ne_save_LIBS fi]) -AC_DEFUN([NEON_LIBPROXY], [ -AC_ARG_WITH(libproxy, AS_HELP_STRING(--without-libproxy, disable libproxy support)) -if test "x$with_libproxy" != "xno"; then - NE_PKG_CONFIG(NE_PXY, libproxy-1.0, - [AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is supported]) - CPPFLAGS="$CPPFLAGS $NE_PXY_CFLAGS" - NEON_LIBS="$NEON_LIBS ${NE_PXY_LIBS}" - NE_ENABLE_SUPPORT(LIBPXY, [libproxy support enabled])], - [NE_DISABLE_SUPPORT(LIBPXY, [libproxy support not enabled])]) -else - NE_DISABLE_SUPPORT(LIBPXY, [libproxy support not enabled]) -fi -]) - dnl Adds an --enable-warnings argument to configure to allow enabling dnl compiler warnings AC_DEFUN([NEON_WARNINGS],[ @@ -1152,7 +1123,23 @@ esac]) dnl Macro to optionally enable socks support AC_DEFUN([NEON_SOCKS], [ -]) + +AC_ARG_WITH([socks], AS_HELP_STRING([--with-socks],[use SOCKSv5 library])) + +if test "$with_socks" = "yes"; then + ne_save_LIBS=$LIBS + + AC_CHECK_HEADERS(socks.h, + [AC_CHECK_LIB(socks5, connect, [:], + [AC_MSG_ERROR([could not find libsocks5 for SOCKS support])])], + [AC_MSG_ERROR([could not find socks.h for SOCKS support])]) + + NE_ENABLE_SUPPORT(SOCKS, [SOCKSv5 support is enabled]) + NEON_LIBS="$NEON_LIBS -lsocks5" + LIBS=$ne_save_LIBS +else + NE_DISABLE_SUPPORT(SOCKS, [SOCKSv5 support is not enabled]) +fi]) AC_DEFUN([NEON_WITH_LIBS], [ AC_ARG_WITH([libs], |