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.
This commit is contained in:
Vadim Zeitlin 2018-10-20 22:58:48 +02:00
parent 2242e98a4c
commit ef2b015e39
2 changed files with 6 additions and 0 deletions

2
configure vendored
View File

@ -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; }

View File

@ -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 ------------------------------------------------------------------------