From: Jarkko Hietaniemi Date: Mon, 13 Jul 1998 23:25:27 +0000 (+0300) Subject: minor Configure nits X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87563a30286604e7bcb7c822d9a91466c80e6504;p=p5sagit%2Fp5-mst-13.2.git minor Configure nits Message-Id: <199807132025.XAA10771@alpha.hut.fi> Subject: Configure patches for MVS (and one x2p/Makefile.SH) p4raw-id: //depot/perl@1476 --- diff --git a/Configure b/Configure index e3fef7e..bfc6103 100755 --- a/Configure +++ b/Configure @@ -3977,7 +3977,7 @@ rmlist="$rmlist pdp11" : coherency check echo " " echo "Checking your choice of C compiler and flags for coherency..." >&4 -set X $cc $optimize $ccflags $ldflags -o try try.c $libs +set X $cc $optimize $ccflags -o try $ldflags try.c $libs shift $cat >try.msg <&4 + echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin. Or UTF-8." >&4 val="$undef" fi rm -f tebcdic.c tebcdic @@ -6858,7 +6858,7 @@ EOM if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 && $ld $lddlflags -o dyna.$dlext tmp-dyna${_o} > /dev/null 2>&1 && - $cc $ccflags $ldflags $cccdlflags $ccdlflags -o fred fred.c $libs > /dev/null 2>&1; then + $cc $ccflags -o fred $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then xxx=`./fred` case $xxx in 1) echo "Test program failed using dlopen." >&4 @@ -7315,7 +7315,7 @@ $undef) #include #$i_niin I_NETINET_IN #$i_sysin I_SYS_IN -#$i_arpainet I_ARPA_INET +#$i_arpa_inet I_ARPA_INET #ifdef I_NETINET_IN #include #endif @@ -11963,23 +11963,54 @@ esac case "$ebcdic" in $define) - if test -d ebcdic; then - echo "This is an EBCDIC system, moving the right parser files in place." >&4 - # Try to save the ASCII versions, just in case. - test -f perly.c.ascii || mv perly.c perly.c.ascii - test -f perly.h.ascii || mv perly.h perly.h.ascii - - cp -pf ebcdic/perly.c perly.c - cp -pf ebcdic/perly.h perly.h - - test -f x2p/a2p.c.ascii || mv x2p/a2p.c x2p/a2p.c.ascii - - cp -pf ebcdic/a2p.c x2p/a2p.c + xxx='' + echo "This is an EBCDIC system, checking if any parser files may need regenerating." >&4 + rm -f y.tab.c y.tab.h + yacc -d perly.y >/dev/null 2>&1 + if cmp -s y.tab.c perly.c; then + rm -f y.tab.c + else + echo "perly.y -> perly.c" >&4 + mv -f y.tab.c perly.c + chmod u+w perly.c + sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \ + -e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c + xxx="$xxx perly.c" + fi + if cmp -s y.tab.h perly.h; then + rm -f y.tab.h else - echo "This is an EBCDIC system but there's no ebcdic directory." >&4 - echo "This will not do." >&4 - exit 1 + echo "perly.y -> perly.h" >&4 + mv -f y.tab.h perly.h + xxx="$xxx perly.h" fi + echo "x2p/a2p.y" >&4 + cd x2p + rm -f y.tab.c y.tab.h + yacc -d a2p.y >/dev/null 2>&1 + if cmp -s y.tab.c a2p.c + then + rm -f y.tab.c + else + echo "a2p.y -> a2p.c" >&4 + mv -f y.tab.c a2p.c + chmod u+w a2p.c + sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \ + -e 's/y\.tab/a2p/g' a2p.c >a2p.tmp && mv a2p.tmp a2p.c + xxx="$xxx a2p.c" + fi + if cmp -s y.tab.h a2p.h + then + rm -f y.tab.h + else + echo "a2p.h -> a2p.h" >&4 + mv -f y.tab.h a2p.h + xxx="$xxx a2p.h" + fi + cd .. + case "$xxx" in + '') echo "No parser files were regenerated. That's okay." >&4 ;; + esac ;; esac diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH index 090875b..3a8c012 100755 --- a/x2p/Makefile.SH +++ b/x2p/Makefile.SH @@ -105,7 +105,7 @@ compile: all $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' $(plextract) -prog -verbose dcf -log ../compilelog; a2p: $(obj) a2p$(OBJ_EXT) - $(CC) $(LDFLAGS) -o a2p $(obj) a2p$(OBJ_EXT) $(libs) + $(CC) -o a2p $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs) # I now supply a2p.c with the kits, so the following section is # used only if you force byacc to run by saying