From 9352078bb7ca30d83ca4de0e473f01bd05eba36c Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 3 Aug 2010 10:44:49 -0700 Subject: [PATCH] Bug 517655 - Support for libProxy - Part 1. Build Changes. r=khuey --HG-- extra : rebase_source : 47b4c922a01099fa569ee122ef0b2f545627f175 --- config/autoconf.mk.in | 4 ++++ config/system-headers | 4 ++++ configure.in | 23 +++++++++++++++++++++++ toolkit/library/Makefile.in | 4 ++++ toolkit/system/unixproxy/Makefile.in | 17 ++++++++++++++++- 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index c43386591da6..a6758b47a0ff 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -548,6 +548,10 @@ MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@ MOZ_XIE_LIBS = @MOZ_XIE_LIBS@ XT_LIBS = @XT_LIBS@ +MOZ_LIBPROXY_CFLAGS = @MOZ_LIBPROXY_CFLAGS@ +MOZ_LIBPROXY_LIBS = @MOZ_LIBPROXY_LIBS@ +MOZ_ENABLE_LIBPROXY = @MOZ_ENABLE_LIBPROXY@ + MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CFLAGS@ MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@ MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ diff --git a/config/system-headers b/config/system-headers index 858aff45567e..b9b29b8811ac 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1033,3 +1033,7 @@ conic/conicstatisticsevent.h #if MOZ_NATIVE_LIBEVENT==1 event.h #endif +#ifdef MOZ_ENABLE_LIBPROXY +proxy.h +#endif + diff --git a/configure.in b/configure.in index ee563f42ef2a..d5e49fbc234e 100644 --- a/configure.in +++ b/configure.in @@ -5541,6 +5541,29 @@ then AC_SUBST(MOZ_GCONF_LIBS) fi +dnl ======================================================== +dnl = libproxy support +dnl ======================================================== + +if test "$MOZ_ENABLE_GTK2" +then + MOZ_ENABLE_LIBPROXY= + + MOZ_ARG_ENABLE_BOOL(libproxy, + [ --enable-libproxy Enable libproxy support ], + MOZ_ENABLE_LIBPROXY=1, + MOZ_ENABLE_LIBPROXY=) + + if test "$MOZ_ENABLE_LIBPROXY" + then + PKG_CHECK_MODULES(MOZ_LIBPROXY, libproxy-1.0) + AC_DEFINE(MOZ_ENABLE_LIBPROXY) + fi +fi +AC_SUBST(MOZ_ENABLE_LIBPROXY) +AC_SUBST(MOZ_LIBPROXY_CFLAGS) +AC_SUBST(MOZ_LIBPROXY_LIBS) + dnl ======================================================== dnl = libnotify support dnl ======================================================== diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 7837790d55e8..a6a749ce8abc 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -228,6 +228,10 @@ ifdef MOZ_ENABLE_STARTUP_NOTIFICATION EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS) endif +ifdef MOZ_ENABLE_LIBPROXY +EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS) +endif + ifeq ($(OS_ARCH),BeOS) EXTRA_DSO_LDOPTS += -lbe -ltracker endif diff --git a/toolkit/system/unixproxy/Makefile.in b/toolkit/system/unixproxy/Makefile.in index 0498750c601a..a474b94a0dab 100644 --- a/toolkit/system/unixproxy/Makefile.in +++ b/toolkit/system/unixproxy/Makefile.in @@ -20,6 +20,7 @@ # # Contributor(s): # Brian Ryner +# Wolfgang Rosenauer # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or @@ -51,11 +52,25 @@ MODULE_NAME = nsUnixProxyModule GRE_MODULE = 1 LIBXUL_LIBRARY = 1 +EXTRA_DSO_LDOPTS += \ + $(MOZ_LIBPROXY_LIBS) \ + $(MOZ_COMPONENT_LIBS) \ + $(NULL) -EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) +ifdef MOZ_ENABLE_LIBPROXY + +CPPSRCS = \ + nsLibProxySettings.cpp \ + $(NULL) + +CXXFLAGS += $(MOZ_LIBPROXY_CFLAGS) + +else # MOZ_ENABLE_LIBPROXY CPPSRCS = \ nsUnixSystemProxySettings.cpp \ $(NULL) +endif # MOZ_ENABLE_LIBPROXY + include $(topsrcdir)/config/rules.mk