1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Improve compiler string shown in version()

With some compilers such as Clang and ICC emulating GCC, using a
version string of the form "GCC $version" can be quite misleading.
Also, a great while ago, the version output from gcc --version started
including the string "gcc", so it is redundant to repeat that.  In
order to support ancient GCC versions, we now prefix the result with
"GCC " only if the version output does not start with a letter.
This commit is contained in:
Peter Eisentraut
2011-05-06 22:14:53 +03:00
parent d2088ae949
commit 8dd2ede3f8
2 changed files with 4 additions and 2 deletions

3
configure vendored
View File

@ -29704,7 +29704,8 @@ $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
cc_string=`${CC} --version | sed q`
case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
elif test x"$SUN_STUDIO_CC" = x"yes" ; then
cc_string=`${CC} -V 2>&1 | sed q`
else