mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 14:50:05 +00:00
configure: Use same pattern to find headers for clang
This commit is contained in:
parent
aacd7e0eb6
commit
bade6276d1
7
configure
vendored
7
configure
vendored
@ -5379,17 +5379,10 @@ fi
|
||||
if test -n "$CXX"; then
|
||||
# In theory the clang and gcc regexes can be merged, but the
|
||||
# result is incomprehensible.
|
||||
if test "$with_clang" != no; then
|
||||
find_cxx_header () {
|
||||
echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
|
||||
| sed -n "\,^[o.-]*[ :] /.*/$1 [\]$,{s,^[o.-]*[ :] /,/,;s/ [\]$//;p}"
|
||||
}
|
||||
else
|
||||
find_cxx_header () {
|
||||
echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
|
||||
| sed -n "\,$1:,{s/:\$//;p}"
|
||||
}
|
||||
fi
|
||||
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
|
||||
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
|
||||
CXX_BITS_STD_ABS_H="$(find_cxx_header bits/std_abs.h)"
|
||||
|
Loading…
Reference in New Issue
Block a user