Bug 517655 - Support for libProxy - Part 1. Build Changes. r=khuey
authorWolfgang Rosenauer <mozilla@rosenauer.org>
Tue, 03 Aug 2010 10:44:49 -0700
changeset 48830 9a616c369203fc2e09f3e8e57217dce5eb44278c
parent 48829 cb95b8d67bdd4a07d5c093cb85a1106f9e6574d8
child 48831 2d0a5af9e11f6002081176d6f32a55e49379a543
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs517655
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 517655 - Support for libProxy - Part 1. Build Changes. r=khuey
config/autoconf.mk.in
config/system-headers
configure.in
toolkit/library/Makefile.in
toolkit/system/unixproxy/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -543,16 +543,20 @@ FT2_CFLAGS             = @FT2_CFLAGS@
 FT2_LIBS               = @FT2_LIBS@
 
 MOZ_PANGO_CFLAGS        = @MOZ_PANGO_CFLAGS@
 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@
 
 MOZ_ALSA_LIBS           = @MOZ_ALSA_LIBS@
 
 GLIB_CFLAGS	= @GLIB_CFLAGS@
 GLIB_LIBS	= @GLIB_LIBS@
--- a/config/system-headers
+++ b/config/system-headers
@@ -1028,8 +1028,12 @@ gio/gio.h
 #ifdef MOZ_ENABLE_LIBCONIC
 conic/conicconnection.h
 conic/conicconnectionevent.h
 conic/conicstatisticsevent.h
 #endif
 #if MOZ_NATIVE_LIBEVENT==1
 event.h
 #endif
+#ifdef MOZ_ENABLE_LIBPROXY
+proxy.h
+#endif
+
--- a/configure.in
+++ b/configure.in
@@ -5537,16 +5537,39 @@ then
     fi
 
     AC_SUBST(MOZ_ENABLE_GCONF)
     AC_SUBST(MOZ_GCONF_CFLAGS)
     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 ========================================================
 
 if test "$MOZ_ENABLE_GTK2"
 then
     MOZ_ENABLE_LIBNOTIFY=1
 
     MOZ_ARG_DISABLE_BOOL(libnotify,
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -223,16 +223,20 @@ endif
 ifdef MOZ_TREE_FREETYPE
 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
 endif
 
 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
 
 ifeq ($(OS_ARCH),SunOS)
 EXTRA_DSO_LDOPTS += -lelf -ldemangle
 endif
 
--- a/toolkit/system/unixproxy/Makefile.in
+++ b/toolkit/system/unixproxy/Makefile.in
@@ -15,16 +15,17 @@
 #
 # The Initial Developer of the Original Code is
 # IBM Corporation.
 # Portions created by the Initial Developer are Copyright (C) 2004
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
 #  Brian Ryner <bryner@brianryner.com>
+#  Wolfgang Rosenauer <wr@rosenauer.org>
 #
 # 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
 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -46,16 +47,30 @@ MODULE          = unixproxy
 LIBRARY_NAME    = unixproxy
 
 EXPORT_LIBRARY  = 1
 IS_COMPONENT    = 1
 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