From 3aaf5e7ac6fa04f824b4395c5a3cfe1efa4a6173 Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Tue, 13 Jan 2009 10:19:25 -0500 Subject: [PATCH] Backed out changeset 8f347bf50a53 due to x86-64 build bustage, and the fact that the committed patch didn't match the reviewed patch in an important way (bug 469558) --- config/Makefile.in | 1 + config/autoconf.mk.in | 5 +++++ config/system-headers | 12 ++++++++++++ configure.in | 24 ++++++++++++++++++------ js/src/config/system-headers | 12 ++++++++++++ toolkit/toolkit-makefiles.sh | 15 ++++++++------- toolkit/toolkit-tiers.mk | 2 ++ 7 files changed, 58 insertions(+), 13 deletions(-) diff --git a/config/Makefile.in b/config/Makefile.in index b8dd659f3cd..71cf40f7fab 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -128,6 +128,7 @@ export:: -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \ -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \ -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \ + -DMOZ_NATIVE_LCMS=$(MOZ_NATIVE_LCMS) \ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers $(INSTALL) system_wrappers $(DIST)/include diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 3ea6b3611d1..0aa1304bc6e 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -441,9 +441,14 @@ PNG_LIBS = @MOZ_PNG_LIBS@ PNG_REQUIRES = png endif +MOZ_NATIVE_LCMS = @MOZ_NATIVE_LCMS@ LCMS_CFLAGS = @LCMS_CFLAGS@ LCMS_LIBS = @LCMS_LIBS@ +ifdef MOZ_NATIVE_LCMS +LCMS_REQUIRES = +else LCMS_REQUIRES = lcms +endif MOZ_NATIVE_SQLITE = @MOZ_NATIVE_SQLITE@ SQLITE_CFLAGS = @SQLITE_CFLAGS@ diff --git a/config/system-headers b/config/system-headers index 83c114e7463..a85937564b7 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1014,6 +1014,18 @@ png.h #if MOZ_NATIVE_ZLIB==1 zlib.h #endif +#if MOZ_ENABLE_LIBXUL!=1 +#if BUILD_STATIC_LIBS!=1 +#define WRAP_LCMS_HEADERS +#endif +#endif +#if MOZ_NATIVE_LCMS==1 +#define WRAP_LCMS_HEADERS +#endif +#ifdef WRAP_LCMS_HEADERS +icc34.h +lcms.h +#endif #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION libsn/sn.h libsn/sn-common.h diff --git a/configure.in b/configure.in index 4ca1e1ec170..70c1137113d 100644 --- a/configure.in +++ b/configure.in @@ -7537,16 +7537,28 @@ dnl ======================================================== dnl Check for lcms dnl ======================================================== -LCMS_CFLAGS= -if test "$_WIN32_MSVC"; then - if test -z "$BUILD_STATIC_LIBS" -a -z "$MOZ_ENABLE_LIBXUL"; then - LCMS_CFLAGS=-DLCMS_DLL +MOZ_NATIVE_LCMS= +MOZ_ARG_ENABLE_BOOL(system-lcms, +[ --enable-system-lcms Use system lcms (located with pkgconfig)], +MOZ_NATIVE_LCMS=1, +MOZ_NATIVE_LCMS= ) + +if test -z "$MOZ_NATIVE_LCMS" +then + LCMS_CFLAGS= + if test "$_WIN32_MSVC"; then + if test -z "$BUILD_STATIC_LIBS" -a -z "$MOZ_ENABLE_LIBXUL"; then + LCMS_CFLAGS=-DLCMS_DLL + fi + LCMS_LIBS='$(LIBXUL_DIST)/lib/mozlcms.lib' + else + LCMS_LIBS='-L$(LIBXUL_DIST)/bin -lmozlcms' fi - LCMS_LIBS='$(LIBXUL_DIST)/lib/mozlcms.lib' else - LCMS_LIBS='-L$(LIBXUL_DIST)/bin -lmozlcms' + PKG_CHECK_MODULES(LCMS, lcms >= $LCMS_VERSION) fi +AC_SUBST(MOZ_NATIVE_LCMS) AC_SUBST(LCMS_CFLAGS) AC_SUBST(LCMS_LIBS) diff --git a/js/src/config/system-headers b/js/src/config/system-headers index 83c114e7463..a85937564b7 100644 --- a/js/src/config/system-headers +++ b/js/src/config/system-headers @@ -1014,6 +1014,18 @@ png.h #if MOZ_NATIVE_ZLIB==1 zlib.h #endif +#if MOZ_ENABLE_LIBXUL!=1 +#if BUILD_STATIC_LIBS!=1 +#define WRAP_LCMS_HEADERS +#endif +#endif +#if MOZ_NATIVE_LCMS==1 +#define WRAP_LCMS_HEADERS +#endif +#ifdef WRAP_LCMS_HEADERS +icc34.h +lcms.h +#endif #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION libsn/sn.h libsn/sn-common.h diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 35c091939cf..50ed5c1e648 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -757,12 +757,6 @@ MAKEFILES_libmar=" modules/libmar/tool/Makefile " -MAKEFILES_lcms=" - modules/lcms/Makefile - modules/lcms/include/Makefile - modules/lcms/src/Makefile -" - add_makefiles " $MAKEFILES_db $MAKEFILES_dom @@ -805,7 +799,6 @@ add_makefiles " $MAKEFILES_accessible $MAKEFILES_zlib $MAKEFILES_libmar - $MAKEFILES_lcms " # @@ -842,6 +835,14 @@ if [ "$MOZ_TREE_CAIRO" ] ; then " fi +if [ ! "$MOZ_NATIVE_LCMS" ] ; then + add_makefiles " + modules/lcms/Makefile + modules/lcms/include/Makefile + modules/lcms/src/Makefile + " +fi + if [ "$MOZ_UNIVERSALCHARDET" ] ; then add_makefiles " extensions/universalchardet/Makefile diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk index b827acfe87d..68e80172124 100644 --- a/toolkit/toolkit-tiers.mk +++ b/toolkit/toolkit-tiers.mk @@ -70,7 +70,9 @@ endif tier_external_dirs += modules/libmar endif +ifndef MOZ_NATIVE_LCMS tier_external_dirs += modules/lcms +endif # # tier "gecko" - core components