configure and cpp detection

Started by Andreas Zeugswetterabout 27 years ago6 messages
#1Andreas Zeugswetter
andreas.zeugswetter@telecom.at

somehow current CVS configure does not detect that $CC -E is not working on AIX
and therefore configures xlc -E as preprocessor. It should be /lib/cpp

???
Andreas

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Zeugswetter (#1)
Re: [HACKERS] configure and cpp detection

Andreas Zeugswetter <andreas.zeugswetter@telecom.at> writes:

somehow current CVS configure does not detect that $CC -E is not
working on AIX and therefore configures xlc -E as preprocessor. It
should be /lib/cpp

Hmm. We just use the standard Autoconf AC_PROG_CPP macro, and there
are comments in the Autoconf code that show it's been tested on AIX.

Or are you only complaining about the case of invoking cpp to process
stdin? I changed the configure test for that on Sunday; maybe I
broke something. Or maybe AC_PROG_CPP is selecting $CC -E for CPP
because that works OK for reading from a file, but it can't be made
to work for reading stdin?

What does the config.log file show for the cpp tests (around line 1200
in configure)?

regards, tom lane

#3Andreas Zeugswetter
andreas.zeugswetter@telecom.at
In reply to: Tom Lane (#2)
Re: [HACKERS] configure and cpp detection

somehow current CVS configure does not detect that $CC -E is not
working on AIX and therefore configures xlc -E as preprocessor. It
should be /lib/cpp

Hmm. We just use the standard Autoconf AC_PROG_CPP macro, and there
are comments in the Autoconf code that show it's been tested on AIX.

Or are you only complaining about the case of invoking cpp to process
stdin? I changed the configure test for that on Sunday; maybe I
broke something. Or maybe AC_PROG_CPP is selecting $CC -E for CPP
because that works OK for reading from a file, but it can't be made
to work for reading stdin?

Yes, it is only not working for the stdin case, which is first needed for Gen_fmgrtab.sh
to create the F_OIDEQ stuff in fmgr.h

What does the config.log file show for the cpp tests (around line 1200
in configure)?

The line in config.log sais:
configure:1241: checking how to use cpp with stdin
xlc: 1501-221 cannot exec program less -eM - No such file or directory

if I unset PAGER the log sais nothing:
configure:1241: checking how to use cpp with stdin

Sorry for the confusion
Andreas

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Zeugswetter (#3)
Re: [HACKERS] configure and cpp detection

Andreas Zeugswetter <andreas.zeugswetter@telecom.at> writes:

Yes, it is only not working for the stdin case, which is first needed
for Gen_fmgrtab.sh to create the F_OIDEQ stuff in fmgr.h

The line in config.log sais:
configure:1241: checking how to use cpp with stdin
xlc: 1501-221 cannot exec program less -eM - No such file or directory

Wow. $(CC) tries to invoke the pager on your platform? How odd.

I don't think that what I changed could have broken this --- I just
changed the test that decides whether configure will use "$CPP -" or
plain "$CPP" for cpp-from-stdin. $CPP is still getting set by the same
old AC_PROG_CPP macro. Could this have been broken before Sunday?
How long ago did you last run a configure and build?

regards, tom lane

#5Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Tom Lane (#4)
Re: [HACKERS] configure and cpp detection

I don't think that what I changed could have broken this --- I just
changed the test that decides whether configure will use "$CPP -" or
plain "$CPP" for cpp-from-stdin. $CPP is still getting set by the
same old AC_PROG_CPP macro. Could this have been broken before
Sunday? How long ago did you last run a configure and build?

It isn't your fault, Tom. *I* helped with the breakage by changing the
Makefiles to actually use the results of an existing test in configure.
Before, several makefiles had references to cpp hardcoded in, and afaik
nowhere were the configure results used. That broke when I tried
installing egcs on my development system, which seemed to be missing an
explicit cpp.

That was maybe a month ago.

- Thomas

#6Andreas Zeugswetter
andreas.zeugswetter@telecom.at
In reply to: Thomas G. Lockhart (#5)
Re: [HACKERS] configure and cpp detection

Would you check that things build on AIX with the attached files
inserted?

I could not read your attachment, but I am currently compiling current CVS,
and see that the change is in there (including configure).
It should also fix the Siemens RM problem that needs gcc for configure.

And yes, it does work like shrink wrapped :-) Thanks

Andreas