diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-09 20:58:58 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2008-10-09 20:58:58 +0000 |
commit | 2da4f331e5379f7ed996690a9e998b7426873a12 (patch) | |
tree | d6e72b767a13c648a3d07da97bc7dcf68101ed64 /macros | |
parent | 7dbf6935b36ef6929f44ba277b1b569e780b96c7 (diff) | |
download | neon-2da4f331e5379f7ed996690a9e998b7426873a12.tar.gz |
Add support for use of a system-provided default set of proxy servers;
implemented using libproxy:
* macros/neon.m4 (NEON_LIBPROXY): New macro.
(LIBNEON_SOURCE_CHECKS): Use it.
(NE_PKG_CONFIG): Fix for non-alpha characters.
* src/ne_session.c (ne_session_system_proxy): New function.
* src/ne_session.h (ne_session_system_proxy): New prototype.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1560 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'macros')
-rw-r--r-- | macros/neon.m4 | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/macros/neon.m4 b/macros/neon.m4 index dd0156f..8f47d80 100644 --- a/macros/neon.m4 +++ b/macros/neon.m4 @@ -721,6 +721,7 @@ fi NEON_SSL() NEON_SOCKS() NEON_GSSAPI() +NEON_LIBPROXY() AC_SUBST(NEON_CFLAGS) AC_SUBST(NEON_LIBS) @@ -855,19 +856,21 @@ 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_cv_pkg_$2, + AC_CACHE_CHECK([for $2 pkg-config data], ne_cvar, [if $PKG_CONFIG $2; then - ne_cv_pkg_$2=yes + ne_cvar=yes else - ne_cv_pkg_$2=no + ne_cvar=no fi]) - if test "$ne_cv_pkg_$2" = "yes"; then + if test "$ne_cvar" = "yes"; then $1_CFLAGS=`$PKG_CONFIG --cflags $2` $1_LIBS=`$PKG_CONFIG --libs $2` : Using provided pkg-config data @@ -876,7 +879,10 @@ else : No pkg-config for $2 provided $4 fi -fi]) +fi + +m4_undefine([ne_cvar]) +]) dnl Check for an SSL library (GNU TLS or OpenSSL) AC_DEFUN([NEON_SSL], [ @@ -1072,6 +1078,18 @@ 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_proxy" != "no"; 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])]) +fi +]) + dnl Adds an --enable-warnings argument to configure to allow enabling dnl compiler warnings AC_DEFUN([NEON_WARNINGS],[ |