GCC CVS now outputs a multiline version string:

[teg@halden teg]$ gcc --version
gcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[teg@halden teg]$ 

It also complains about multiline literals being deprecated, like

#define CC_VERSION "FOO

BAR
"

Autoconf thinks these warnings (which it will get for pretty much all
tests, as this is in confdefs.h) means the test failed.

One way to work around this is:

--- postgresql-7.2rc1/configure.in.multiline	Wed Jan 23 12:36:53 2002
+++ postgresql-7.2rc1/configure.in	Wed Jan 23 12:37:26 2002
@@ -297,7 +297,7 @@
 
 # Create compiler version string
 if test x"$GCC" = x"yes" ; then
-  cc_string="GCC `${CC} --version`"
+  cc_string="GCC `${CC} --version|head -n 1`"
 else
   cc_string=$CC
 fi





-- 
Trond Eivind Glomsrï¿½d
Red Hat, Inc.

23 Jan 2002 12:48:42 -0500
teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)
autoconf + newer gcc barfs 
teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:
> GCC CVS now outputs a multiline version string:
> [teg@halden teg]$ gcc --version
> gcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I put in a "head -1" step per your suggestion.  However, this will still
leave us with really ugly version strings, along the line of

PostgreSQL 7.2rc1 on hppa-hp-hpux10.20, compiled by GCC gcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)

May I suggest that gcc is being a little too verbose here?  Perhaps
"gcc --version --verbose" could do that, and plain "gcc --version"
could try to have some respect for compatibility with prior behavior.

			regards, tom lane

Thu, 24 Jan 2002 14:53:37 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: autoconf + newer gcc barfs 