Bug 506493 - Resync' configure.in between c-c and m-c; (Ov1a) Port bug 486782, Restore m-1.9.2 part after bug 543081.
authorSerge Gautherie <sgautherie.bz@free.fr>
Mon, 05 Apr 2010 20:37:37 +0200
changeset 5378 655ab6620778355d7833776ec103d8182c9decd6
parent 5377 2b335d50b7f58f7d1a2b14458b10d906924bc92f
child 5379 6eac7ef88f77ec74e80c81c39c26036827d9f18f
push idunknown
push userunknown
push dateunknown
bugs506493, 486782, 543081
Bug 506493 - Resync' configure.in between c-c and m-c; (Ov1a) Port bug 486782, Restore m-1.9.2 part after bug 543081. r=Callek. Bug 486782 - New variable: MOZ_FS_LAYOUT should be used instead of OS or Toolkit to determine file system layout Bug 543081 - Put -lobjc in LDFLAGS, not LIBXUL_LIBS
config/autoconf.mk.in
configure.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -68,16 +68,18 @@ idldir		= $(datadir)/idl/$(MOZ_APP_NAME)
 
 installdir	= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 sdkdir		= $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
 
 MOZDEPTH	= $(DEPTH)/mozilla
 DIST		= $(MOZDEPTH)/dist
 LIBXUL_SDK      = @LIBXUL_SDK@
 
+MOZ_FS_LAYOUT = @MOZ_FS_LAYOUT@
+
 L10NBASEDIR     = @L10NBASEDIR@
 
 LIBXUL_DIST	= @LIBXUL_DIST@
 SYSTEM_LIBXUL   = @SYSTEM_LIBXUL@
 
 XULRUNNER_STUB_NAME = @XULRUNNER_STUB_NAME@
 
 MOZ_CHROME_FILE_FORMAT	= @MOZ_CHROME_FILE_FORMAT@
--- a/configure.in
+++ b/configure.in
@@ -1115,16 +1115,18 @@ else
     DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core -lmozalloc'
     MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin:/usr/lib:/usr/local/lib:/lib -Wl,-rpath-link,$(prefix)/lib'
     XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom -lmozalloc'
     LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
     XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
     XPCOM_STANDALONE_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)'
 fi
 
+MOZ_FS_LAYOUT=unix
+
 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
 
 USE_DEPENDENT_LIBS=1
 
 _PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
 
 if test -n "$CROSS_COMPILE"; then
     OS_TARGET="${target_os}"
@@ -1756,18 +1758,16 @@ case "$host" in
         ;;
     esac
     ;;
 
 *-darwin*)
     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
     HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
-    LDFLAGS="$LDFLAGS -lobjc"
-    LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
     ;;
 
 *-linux*|*-kfreebsd*-gnu)
     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
     HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
     ;;
 
@@ -1899,17 +1899,16 @@ case "$target" in
     _PEDANTIC=
     CFLAGS="$CFLAGS -fpascal-strings -fno-common"
     CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common"
     DLL_SUFFIX=".dylib"
     DSO_LDOPTS=''
     STRIP="$STRIP -x -S"
     _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
     TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
-    LDFLAGS="$LDFLAGS -framework Cocoa"
     # The ExceptionHandling framework is needed for Objective-C exception
     # logging code in nsObjCExceptions.h. Currently we only use that in debug
     # builds.
     MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"
 
     dnl DTrace and -dead_strip don't interact well. See bug 403132.
     dnl ===================================================================
     if test "x$enable_dtrace" = "xyes"; then
@@ -4874,18 +4873,30 @@ cairo-cocoa)
     AC_DEFINE(XP_MACOSX)
     AC_DEFINE(TARGET_CARBON)
     AC_DEFINE(TARGET_API_MAC_CARBON)
     if test "$MOZILLA_1_9_2_BRANCH" = "1"; then
     TK_LIBS='-framework Carbon -framework AddressBook'
     else
     TK_LIBS='-framework QuartzCore -framework Carbon -framework AddressBook'
     fi
+    TK_CFLAGS="-DNO_X11"
+  if test "$MOZILLA_1_9_2_BRANCH" = "1"; then
+    LDFLAGS="$LDFLAGS -framework Cocoa"
+  else
+    LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
+  fi
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
+  if test "$MOZILLA_1_9_2_BRANCH" = "1"; then
+    LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL -lobjc'
+  else
+    LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
+  fi
+    MOZ_FS_LAYOUT=bundle
     ;;
 esac
 
 if test "$COMPILE_ENVIRONMENT"; then
   if test "$MOZ_ENABLE_GTK2"; then
     if test "$MOZ_X11"; then
       GDK_PACKAGES=gdk-x11-2.0
     elif test "$MOZ_DFB"; then
@@ -4893,16 +4904,18 @@ if test "$COMPILE_ENVIRONMENT"; then
       GDK_PACKAGES=directfb
     fi
 
     PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
   fi
 
 fi # COMPILE_ENVIRONMENT
 
+AC_SUBST(MOZ_FS_LAYOUT)
+
 dnl ========================================================
 dnl = startup-notification support module
 dnl ========================================================
 
 if test "$MOZ_ENABLE_GTK2"
 then
     MOZ_ENABLE_STARTUP_NOTIFICATION=