[Date Prev][Date Next] [Chronological] [Thread] [Top]

[PATCH] Arrange ltmain.sh to build an EBCDIC compatible libtool



Hi,

I have another patch for EBCDIC machines. The ltmain.sh has to generate a EBCDIC
compatible libtool otherwise libtool cannot build libraries.

The patch is the following, thanks for checking and committing it:
+++
diff -u -r1.13 ltmain.sh
--- ltmain.sh   2000/10/04 00:53:19     1.13
+++ ltmain.sh   2001/11/21 14:29:01
@@ -70,8 +70,17 @@
 # metacharacters that are still active within double-quoted strings.
 Xsed='sed -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo A|od -x` in
+*[Cc]1*) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+*) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
 
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.
+++

Cheers

Jean-frederic