[PATCH v2 2/4] Rewrite find_cxx_header config configure.ac

Florian Weimer fweimer@redhat.com
Mon Nov 7 13:22:30 GMT 2022


* Adhemerval Zanella via Libc-alpha:

> diff --git a/configure b/configure
> index fc3d7842de..e23ea95a49 100755
> --- a/configure
> +++ b/configure
> @@ -5669,8 +5669,8 @@ fi
>  # copy of those headers in Makerules.
>  if test -n "$CXX"; then
>    find_cxx_header () {
> -    echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \
> -	 | sed -n "\,$1:,{s/:\$//;p}"
> +    echo "#include <$1>" | $CXX -H -fsyntax-only -x c++ - 2>&1 \
> +	 | awk '$1 == "."{print $2}'
>    }
>    CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
>    CXX_CMATH_HEADER="$(find_cxx_header cmath)"

Shouldn't this use $ac_cv_prog_AWK?

Thanks,
Florian



More information about the Libc-alpha mailing list