Autoconf insists on adding macros like PACKAGE_NAME and
PACKAGE_BUG_TARNAME to config.h but those are useless for libstdc++
because it's not a complete package, just a sub-directory of gcc, and we
never use any of those strings in our sources.
Since we include the generated config.h in our installed c++config.h
header, those useless macros are exposed to users. We do transform them
to use the reserved _GLIBCXX_ prefix, but they're still just useless
noise in the installed header.
I don't know any way to get autoconf to not add them to config.h but
this change comments them out so they're not defined when users include
our headers.
Although not really important now that the macro isn't being defined,
this change also avoids the double substitution for PACKAGE_VERSION
which was resulting in _GLIBCXX_PACKAGE__GLIBCXX_VERSION.
libstdc++-v3/ChangeLog:
PR libstdc++/79147
* include/Makefile.am (c++config.h): Adjust sed command to
comment out all PACKAGE_XXX macros and to avoid adjusting
PACKAGE_VERSION twice.
* include/Makefile.in: Regenerate.
-e "$$verbose_assert" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
- -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
- -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e '/PACKAGE/s,^,// ,' \
+ -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
-e 's/WORDS_/_GLIBCXX_WORDS_/g' \
-e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \
-e "$$verbose_assert" \
< ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
- -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
- -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e '/PACKAGE/s,^,// ,' \
+ -e '/PACKAGE/!s/VERSION/_GLIBCXX_VERSION/g' \
-e 's/WORDS_/_GLIBCXX_WORDS_/g' \
-e 's/LT_OBJDIR/_GLIBCXX_LT_OBJDIR/g' \
-e 's/STDC_HEADERS/_GLIBCXX_STDC_HEADERS/g' \