From 9d1a8da0e35084d837dfe2fc0bd2964ee8ade5f1 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Sat, 9 Mar 2013 20:04:50 +0100 Subject: Add bootstrap_charset/BOOTSTRAP_CHARSET for non-ASCII architectures --- Configure | 65 +++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 29 deletions(-) (limited to 'Configure') diff --git a/Configure b/Configure index 6823cb737d..6c71218c8d 100755 --- a/Configure +++ b/Configure @@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Fri Feb 15 14:51:06 CET 2013 [metaconfig 3.5 PL0] +# Generated on Sat Mar 9 17:50:01 CET 2013 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 +$cat >try.c <<'EOM' +int main() +{ + if ('M'==0xd4) return 0; + return 1; +} +EOM + +case "$BOOTSTRAP_CHARSET" in + Y|y|define) bootstrap_charset=$define ;; + *) bootstrap_charset=$undef ;; +esac + +val=$undef +set try +if eval $compile_ok; then + if $run ./try; then + echo "You seem to speak EBCDIC." >&4 + val="$define" + else + echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 + fi +else + echo "I'm unable to compile the test program." >&4 + echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 +fi +$rm_try +set ebcdic +eval $setvar + : length of character in bytes. Is always 1, otherwise it isnt C : This used to be a test using sizeof charsize=1 @@ -19527,34 +19561,6 @@ EOCP esac done -: Determine if this is an EBCDIC system -echo " " -echo "Determining whether or not we are on an EBCDIC system..." >&4 -$cat >try.c <<'EOM' -int main() -{ - if ('M'==0xd4) return 0; - return 1; -} -EOM - -val=$undef -set try -if eval $compile_ok; then - if $run ./try; then - echo "You seem to speak EBCDIC." >&4 - val="$define" - else - echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 - fi -else - echo "I'm unable to compile the test program." >&4 - echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 -fi -$rm_try -set ebcdic -eval $setvar - : Check how to flush echo " " $cat >&4 <