From ef2b015e399e192050fad5eca5b5f125dfa54946 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Oct 2018 22:58:48 +0200 Subject: [PATCH] Export CC and similar variables for sub-configure scripts This is especially important under macOS where we modify CC, CPP and CXX to use the specified SDK, and it's important to compile the code of 3rd party libtiff and expat libraries using the same SDK, but also matters for the other platforms when using non-default CC and CXX values. By exporting these values we ensure that tiff and expat use the same compilers and flags as the main libraries linking with them. --- configure | 2 ++ configure.in | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/configure b/configure index a13a739ad2..2378cc74fd 100755 --- a/configure +++ b/configure @@ -20494,6 +20494,8 @@ if test "$USE_UNIX" = 1 ; then fi +export CC CFLAGS CPP CPPFLAGS CXX CXXFLAGS LDD LDFLAGS OBJCFLAGS OBJCXXFLAGS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } diff --git a/configure.in b/configure.in index e168e56e6f..1159b013c6 100644 --- a/configure.in +++ b/configure.in @@ -1477,6 +1477,10 @@ if test "$USE_UNIX" = 1 ; then AC_DEFINE(__UNIX__) fi +dnl Values of these variables shouldn't change any longer from now on, we +dnl export them to ensure they're picked up by sub-configure scripts. +export CC CFLAGS CPP CPPFLAGS CXX CXXFLAGS LDD LDFLAGS OBJCFLAGS OBJCXXFLAGS + dnl ------------------------------------------------------------------------ dnl Check for headers dnl ------------------------------------------------------------------------