Commit d8a12f51 authored by David Woodhouse's avatar David Woodhouse

Fix libproxy build.

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 1bf6c585
......@@ -43,14 +43,20 @@ AC_PROG_LIBTOOL
PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
PKG_CHECK_MODULES(ZLIB, zlib)
libproxy_hdr=no
AC_CHECK_HEADER([libproxy.h],
[libproxy_hdr='"libproxy.h"'],
[AC_CHECK_HEADER([proxy.h],
[libproxy_hdr='"libproxy.h"'])])
if (test "$libproxy_hdr" != "no"); then
AC_DEFINE([LIBPROXY_HDR], $libproxy_hdr)
PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0, AC_SUBST(LIBPROXY_PC, libproxy-1.0), dummy=yes)
PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0,
[AC_SUBST(LIBPROXY_PC, libproxy-1.0)
AC_DEFINE([LIBPROXY_HDR], ["proxy.h"])
libproxy_pkg=yes],
libproxy_pkg=no)
dnl Libproxy *can* exist without a .pc file, and its header may be called
dnl libproxy.h in that case.
if (test "$libproxy_pkg" = "no"); then
AC_CHECK_HEADER([proxy.h],
[AC_DEFINE([LIBPROXY_HDR], ["proxy.h"])
AC_SUBST([LIBPROXY_LIBS], [-lproxy])],
[AC_CHECK_HEADER([libproxy.h],
[AC_DEFINE([LIBPROXY_HDR], ["libproxy.h"])
AC_SUBST([LIBPROXY_LIBS], [-lproxy])])])
fi
AC_CHECK_HEADER([if_tun.h],
......
......@@ -40,7 +40,7 @@
#include <sys/utsname.h>
#include <sys/types.h>
#include <openssl/ui.h>
#ifdef OPENCONNECT_LIBPROXY
#ifdef LIBPROXY_HDR
#include LIBPROXY_HDR
#endif
......@@ -167,7 +167,7 @@ static void usage(void)
printf(" -P, --proxy=URL Set proxy server\n");
printf(" --no-proxy Disable proxy\n");
printf(" --libproxy Use libproxy to automatically configure proxy\n");
#ifndef OPENCONNECT_LIBPROXY
#ifndef LIBPROXY_HDR
printf(" (NOTE: libproxy disabled in this build)\n");
#endif
printf(" -q, --quiet Less output\n");
......@@ -476,7 +476,7 @@ int main(int argc, char **argv)
vpninfo->progress = write_progress;
if (autoproxy) {
#ifdef OPENCONNECT_LIBPROXY
#ifdef LIBPROXY_HDR
vpninfo->proxy_factory = px_proxy_factory_new();
#else
fprintf(stderr, "This version of openconnect was built without libproxy support\n");
......
......@@ -36,7 +36,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef OPENCONNECT_LIBPROXY
#ifdef LIBPROXY_HDR
#include LIBPROXY_HDR
#endif
......@@ -97,7 +97,7 @@ struct openconnect_info {
char *csd_scriptname;
#ifdef OPENCONNECT_LIBPROXY
#ifdef LIBPROXY_HDR
pxProxyFactory *proxy_factory;
#endif
char *proxy_type;
......
......@@ -184,6 +184,7 @@ For full changelog entries including the latest development, see
<LI><B>OpenConnect HEAD</B><BR>
<UL>
<LI>Fix build on Debian systems where <TT>dtls1_stop_timer()</TT> is not available.</LI>
<LI>Fix libproxy detection.</LI>
<LI>Enable a useful set of compiler warnings by default.</LI>
<LI>Fix various minor compiler warnings.</LI>
</UL><BR>
......@@ -507,6 +508,6 @@ An <TT>openconnect</TT> <A HREF="http://www.freebsd.org/cgi/cvsweb.cgi/ports/sec
<hr>
<address>David Woodhouse &lt;<A HREF="mailto:dwmw2@infradead.org">dwmw2@infradead.org</A>&gt;</address>
<!-- hhmts start -->
Last modified: Thu Sep 15 23:17:44 BST 2011
Last modified: Thu Sep 22 14:39:12 BST 2011
<!-- hhmts end -->
</body> </html>
......@@ -888,7 +888,7 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
this way than if we pass NULL to getaddrinfo() and
then try to fill in the numeric value into
different types of returned sockaddr_in{6,}. */
#ifdef OPENCONNECT_LIBPROXY
#ifdef LIBPROXY_HDR
if (vpninfo->proxy_factory) {
char *url;
char **proxies;
......
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