diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-09-21 10:45:32 +0200 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-06-30 09:43:16 -0700 |
commit | 6184f4153fce2e77898c9a9c0f316ac19490fd6b (patch) | |
tree | 11814122cd3d864cfd104aad7145bc478596f0fd /configure.ac | |
parent | 64a9f6a8acbbc0f7cd9c9532f5f16acefef15276 (diff) | |
download | glibc-6184f4153fce2e77898c9a9c0f316ac19490fd6b.zip glibc-6184f4153fce2e77898c9a9c0f316ac19490fd6b.tar.gz glibc-6184f4153fce2e77898c9a9c0f316ac19490fd6b.tar.bz2 |
Avoid running $(CXX) during build to obtain header file paths
This reduces the build time somewhat and is particularly noticeable
during rebuilds with few code changes.
(cherry picked from commit fc3e1337be1c6935ab58bd13520f97a535cf70cc)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8277d9f..1905e93 100644 --- a/configure.ac +++ b/configure.ac @@ -1039,6 +1039,18 @@ fi AC_SUBST(SYSINCLUDES) AC_SUBST(CXX_SYSINCLUDES) +# Obtain some C++ header file paths. This is used to make a local +# copy of those headers in Makerules. +if test -n "$CXX"; then + find_cxx_header () { + echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}" + } + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" + CXX_CMATH_HEADER="$(find_cxx_header cmath)" +fi +AC_SUBST(CXX_CSTDLIB_HEADER) +AC_SUBST(CXX_CMATH_HEADER) + # Test if LD_LIBRARY_PATH contains the notation for the current directory # since this would lead to problems installing/building glibc. # LD_LIBRARY_PATH contains the current directory if one of the following |