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],
#include <sys/utsname.h>
#include <sys/types.h>
#include <openssl/ui.h>
-#ifdef OPENCONNECT_LIBPROXY
+#ifdef LIBPROXY_HDR
#include LIBPROXY_HDR
#endif
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");
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");
<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>
<hr>
<address>David Woodhouse <<A HREF="mailto:dwmw2@infradead.org">dwmw2@infradead.org</A>></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>
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;