Subject: perl's configure vs IRIX / MIPSPro compiler
To: None <>
From: Jan Schaumann <>
List: tech-pkg
Date: 03/26/2004 17:11:07
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


During perl5's configure stage, the Configure script checks, by using
the preprocessor, if you can stringify and catify.  The problem under
IRIX is that the MIPSPro compiler behaves differently if it gets input
from stdin vs when it operates on a file.  The test is done on stdin,
but lateron, operations are done on a file.

So I came up with the silly hack below:

--- Configure.orig      Fri Mar 26 10:34:43 2004
+++ Configure   Fri Mar 26 10:43:17 2004
@@ -12495,7 +12495,14 @@
 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
-if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
+# yuck, what a hack.
+# MIPSPro compiler/preprocessor behaves differently if invoked on
+# stdin vs file.  Here we test for stdin, but lateron we use files.
+# So force it to work the way we know it does:
+if [ x"${OPSYS}" =3D x"IRIX" ]; then
+       echo "IRIX / MIPSPro hack - yay!"
+       cpp_stuff=3D42=20
+elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
        echo "Oh!  Smells like ANSI's been here." >&4
        echo "We can catify or stringify, separately or together!"

This should work fine, since either we're using MIPSPro, or we're using
gcc, which should be fine as well.  I'd rather test for the compiler in
cleaner way, but that really is a headache.

Does anybody have any other ideas for this?


I always said there was something fundamentally wrong with the universe.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)