W3C home > Mailing lists > Public > www-amaya@w3.org > January to March 1999

Re: PATCH: Amaya 1.3b build FAILS on i586-pc-linux-gnu (Red Hat 5.1).

From: Sam <Mrsam@geocities.com>
Date: Mon, 7 Dec 1998 10:31:52 -0500 (EST)
To: Irene.Vatton@inrialpes.fr
cc: www-amaya@w3.org
Message-ID: <Pine.SUN.4.01.9812071009570.23353-100000@galileo.cris.com>
On Mon, 7 Dec 1998 Irene.Vatton@inrialpes.fr wrote:

> I've integrated them into the next Amaya release except the option *-x c*
> You suggested:
>  .c.o :
> -	$(CC) -DCPP="$(CPP)" $(CFLAGS) $(INCLUDES) -c $< -o $@
> +	$(CC) '-DCPP="'"$(CPP)"' -x c"' $(CFLAGS) $(INCLUDES) -c $< -o $@
> I've done
>  .c.o :
> -	$(CC) -DCPP="$(CPP)" $(CFLAGS) $(INCLUDES) -c $< -o $@
> +	$(CC) '-DCPP="'"$(CPP)"'"' $(CFLAGS) $(INCLUDES) -c $< -o $@
>   Irene.

Well, here's the problem.  The problem is that during the build, CPP is
called to preprocess several files whose filenames end with ".P" (and
other extensions).  The configure.in macro sets CPP to "gcc -E", which
does invoke the C preprocessor, but only if the filename ends with ".c".

There's a note to that effect in autoconf's documentation:


Set output variable CPP to a command that runs the C preprocessor. If `$CC
-E' doesn't work, it uses `/lib/cpp'. It is only portable to run CPP on
files with a `.c' extension.


One possible solution is to add the following code to configure.in right
after 'AC_PROG_CPP':

if test "$GCC" = "yes"
	CPP="$CPP -x c"

This should add '-x c' to CPP flags on gcc-based preprocessors only.
Received on Monday, 4 January 1999 04:01:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:30:27 UTC