changeset 2688:5d33e9d507a1

PR2822: Feed LIBS & CFLAGS into configure rather than make to avoid re-discovery by OpenJDK configure 2016-07-17 Andrew John Hughes <gnu.andrew@member.fsf.org> PR2822: Feed LIBS & CFLAGS into configure rather than make to avoid re-discovery by OpenJDK configure * Makefile.am: (ICEDTEA_CONFIGURE_ENV): Introduce environment variables for passing to configure. Always add FreeType CFLAGS and LIBS. Conditionally add CFLAGS and LIBS for LCMS, PNG, NSS and fontconfig. Others don't use pkg-config. (ICEDTEA_ENV): Remove LCMS_LIBS, LCMS_CFLAGS, PNG_LIBS, PNG_CFLAGS, NSS_LIBS, NSS_CFLAGS, FONTCONFIG_LIBS and FONTCONFIG_CFLAGS. Use ZLIB_CPPFLAGS and LIBZ instead of ZLIB_CFLAGS and ZLIB_LIBS. Use LIBJPEG_LDFLAGS and LIBJPEG_CFLAGS instead of JPEG_CFLAGS and JPEG_LIBS. Use GIF_LDFLAGS instead of GIF_LIBS. (icedtea-configure): Set environment variables using ICEDTEA_CONFIGURE_ENV. (icedtea-debug-configure): Likewise. (icedtea-boot-configure): Likewise. * NEWS: Updated.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Sun, 17 Jul 2016 22:00:50 +0100
parents ad9381c0b385
children 46f8680e14e0
files ChangeLog Makefile.am NEWS
diffstat 3 files changed, 56 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jul 17 18:48:03 2016 +0100
+++ b/ChangeLog	Sun Jul 17 22:00:50 2016 +0100
@@ -1,3 +1,31 @@
+2016-07-17  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	PR2822: Feed LIBS & CFLAGS into configure
+	rather than make to avoid re-discovery by
+	OpenJDK configure
+	* Makefile.am:
+	(ICEDTEA_CONFIGURE_ENV): Introduce
+	environment variables for passing
+	to configure. Always add FreeType
+	CFLAGS and LIBS. Conditionally
+	add CFLAGS and LIBS for LCMS, PNG,
+	NSS and fontconfig. Others don't
+	use pkg-config.
+	(ICEDTEA_ENV): Remove LCMS_LIBS,
+	LCMS_CFLAGS, PNG_LIBS, PNG_CFLAGS,
+	NSS_LIBS, NSS_CFLAGS, FONTCONFIG_LIBS
+	and FONTCONFIG_CFLAGS. Use
+	ZLIB_CPPFLAGS and LIBZ instead of
+	ZLIB_CFLAGS and ZLIB_LIBS. Use
+	LIBJPEG_LDFLAGS and LIBJPEG_CFLAGS
+	instead of JPEG_CFLAGS and JPEG_LIBS.
+	Use GIF_LDFLAGS instead of GIF_LIBS.
+	(icedtea-configure): Set environment
+	variables using ICEDTEA_CONFIGURE_ENV.
+	(icedtea-debug-configure): Likewise.
+	(icedtea-boot-configure): Likewise.
+	* NEWS: Updated.
+
 2016-07-15  Andrew John Hughes  <gnu.andrew@member.fsf.org>
 
 	PR3094: Zero lacks declaration of
--- a/Makefile.am	Sun Jul 17 18:48:03 2016 +0100
+++ b/Makefile.am	Sun Jul 17 22:00:50 2016 +0100
@@ -413,6 +413,10 @@
 	  --with-extra-ldflags="$(LDFLAGS)" \
 	  --with-java-debug-symbols=yes
 
+ICEDTEA_CONFIGURE_ENV = \
+	FREETYPE_CFLAGS="${FREETYPE2_CFLAGS}" \
+	FREETYPE_LIBS="${FREETYPE2_LIBS}"
+
 if ENABLE_CACAO
 ICEDTEA_CONFIGURE += \
 	--with-import-hotspot="$(CACAO_IMPORT_PATH)"
@@ -434,6 +438,9 @@
 if USE_SYSTEM_LCMS
 ICEDTEA_CONFIGURE += \
 	--with-lcms=system
+ICEDTEA_CONFIGURE_ENV += \
+	LCMS_LIBS="${LCMS2_LIBS}" \
+	LCMS_CFLAGS="${LCMS2_CFLAGS}"
 else
 ICEDTEA_CONFIGURE += \
 	--with-lcms=bundled
@@ -450,6 +457,9 @@
 if USE_SYSTEM_PNG
 ICEDTEA_CONFIGURE += \
 	--with-libpng=system
+ICEDTEA_CONFIGURE_ENV += \
+	PNG_LIBS="${PNG_LIBS}" \
+	PNG_CFLAGS="${PNG_CFLAGS}"
 else
 ICEDTEA_CONFIGURE += \
 	--with-libpng=bundled
@@ -464,6 +474,9 @@
 endif
 
 if ENABLE_SUNEC
+ICEDTEA_CONFIGURE_ENV += \
+	NSS_LIBS="${SUNEC_LIBS}" \
+	NSS_CFLAGS="${SUNEC_CFLAGS}"
 ICEDTEA_CONFIGURE += \
 	--enable-system-nss
 else
@@ -497,6 +510,9 @@
 if ENABLE_INFINALITY
 ICEDTEA_CONFIGURE += \
 	--enable-infinality
+ICEDTEA_CONFIGURE_ENV += \
+	FONTCONFIG_LIBS="${FONTCONFIG_LIBS}" \
+	FONTCONFIG_CFLAGS="${FONTCONFIG_CFLAGS}"
 else
 ICEDTEA_CONFIGURE += \
 	--disable-infinality
@@ -551,14 +567,8 @@
 
 if USE_SYSTEM_ZLIB
 ICEDTEA_ENV += \
-	ZLIB_LIBS="${ZLIB_LIBS}" \
-	ZLIB_CFLAGS="${ZLIB_CFLAGS}"
-endif
-
-if USE_SYSTEM_LCMS
-ICEDTEA_ENV += \
-	LCMS_LIBS="${LCMS2_LIBS}" \
-	LCMS_CFLAGS="${LCMS2_CFLAGS}"
+	LIBZ="${ZLIB_LIBS}" \
+	ZLIB_CPPFLAGS="${ZLIB_CFLAGS}"
 endif
 
 if ENABLE_JAR_COMPRESSION
@@ -568,34 +578,16 @@
 
 if USE_SYSTEM_JPEG
 ICEDTEA_ENV += \
-	JPEG_LIBS="${JPEG_LIBS}" \
-	JPEG_CFLAGS="${JPEG_CFLAGS}"
-endif
-
-if USE_SYSTEM_PNG
-ICEDTEA_ENV += \
-	PNG_LIBS="${PNG_LIBS}" \
-	PNG_CFLAGS="${PNG_CFLAGS}"
+	LIBJPEG_LDFLAGS="${JPEG_LIBS}" \
+	LIBJPEG_CFLAGS="${JPEG_CFLAGS}"
 endif
 
 if USE_SYSTEM_GIF
 ICEDTEA_ENV += \
-	GIF_LIBS="${GIF_LIBS}" \
+	GIF_LDFLAGS="${GIF_LIBS}" \
 	GIF_CFLAGS="${GIF_CFLAGS}"
 endif
 
-if ENABLE_SUNEC
-ICEDTEA_ENV += \
-	NSS_LIBS="${SUNEC_LIBS}" \
-	NSS_CFLAGS="${SUNEC_CFLAGS}"
-endif
-
-if ENABLE_INFINALITY
-ICEDTEA_ENV += \
-	FONTCONFIG_LIBS="${FONTCONFIG_LIBS}" \
-	FONTCONFIG_CFLAGS="${FONTCONFIG_CFLAGS}"
-endif
-
 # OpenJDK boot build environment.
 ICEDTEA_CONFIGURE_BOOT = $(ICEDTEA_CONFIGURE)
 ICEDTEA_ENV_BOOT = $(ICEDTEA_ENV) \
@@ -1807,7 +1799,8 @@
  stamps/cacao.stamp stamps/jamvm.stamp
 	mkdir -p $(BUILD_OUTPUT_DIR)
 	cd $(BUILD_OUTPUT_DIR) && \
-	$(SHELL) $(abs_top_builddir)/openjdk/configure $(ICEDTEA_CONFIGURE)
+          $(ICEDTEA_CONFIGURE_ENV) $(SHELL) $(abs_top_builddir)/openjdk/configure \
+          $(ICEDTEA_CONFIGURE)
 	mkdir -p stamps
 	touch $@
 
@@ -1868,8 +1861,8 @@
  stamps/cacao.stamp stamps/jamvm.stamp
 	mkdir -p $(DEBUG_BUILD_OUTPUT_DIR)
 	cd $(DEBUG_BUILD_OUTPUT_DIR) && \
-	$(SHELL) $(abs_top_builddir)/openjdk/configure $(ICEDTEA_CONFIGURE) \
-	  --with-debug-level=slowdebug
+          $(ICEDTEA_CONFIGURE_ENV) $(SHELL) $(abs_top_builddir)/openjdk/configure \
+          $(ICEDTEA_CONFIGURE) --with-debug-level=slowdebug
 	mkdir -p stamps
 	touch $@
 
@@ -2016,7 +2009,8 @@
  stamps/download.stamp $(OPENJDK_BOOT_TREE) stamps/cacao.stamp stamps/jamvm.stamp
 	mkdir -p $(BOOT_BUILD_OUTPUT_DIR)
 	cd $(BOOT_BUILD_OUTPUT_DIR) && \
-	$(SHELL) $(abs_top_builddir)/openjdk-boot/configure $(ICEDTEA_CONFIGURE_BOOT)
+          $(ICEDTEA_CONFIGURE_ENV) $(SHELL) $(abs_top_builddir)/openjdk-boot/configure \
+          $(ICEDTEA_CONFIGURE_BOOT)
 	mkdir -p stamps
 	touch $@
 
--- a/NEWS	Sun Jul 17 18:48:03 2016 +0100
+++ b/NEWS	Sun Jul 17 22:00:50 2016 +0100
@@ -180,6 +180,7 @@
   - S8159690, PR3077: [TESTBUG] Mark headful tests with @key headful.
 * Bug fixes
   - PR1958: GTKLookAndFeel does not honor gtk-alternative-button-order
+  - PR2822: Feed LIBS & CFLAGS into configure rather than make to avoid re-discovery by OpenJDK configure
   - PR2931, G478960: Provide Infinality Support via fontconfig
   - PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
   - PR3083, RH1346460: Regression in SSL debug output without an ECC provider