]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltconfig.in (echo_test_string): the whole ltconfig script was
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Thu, 19 Nov 1998 20:28:01 +0000 (20:28 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 19 Nov 1998 20:28:01 +0000 (20:28 +0000)
too much for DU4.0's ksh, but the first 50 lines will be enough.

ChangeLog
ltconfig.in

index 2db9420391161bc1c582ada555a7c37af0696522..36273e80802ec7f91fe9f8231ad82bc6c9c8446b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1998-11-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * ltconfig.in (echo_test_string): the whole ltconfig script was
+       too much for DU4.0's ksh, but the first 50 lines will be enough.
+
        * ltmain.in (installed): new variable defined within a .la file,
        so that libtool can now link already-installed libraries into a
        program.
index a5bdb44087d9ddcdc61e5f7ce05c347d29a4f072..6395960c6414e8cdea784c485c87fcffd38ebb67 100755 (executable)
@@ -50,12 +50,15 @@ fi
 # if CDPATH is set.
 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
 
-echo_test_string=${echo_test_string-`cat "$0"`} || {
+if echo_test_string=${echo_test_string-`sed 50q "$0"`}; then :
+else
   # some shells may not be able to cope with such a large variable
   # I just hope they do not crash
-  echo ok, just ignore the message above >&2
-  echo_test_string=""
-}
+  echo_test_string=${echo_test_string-`sed 15q "$0"`} ||
+  echo_test_string=${echo_test_string-`sed 2q "$0"`} ||
+  echo_test_string=${echo_test_string-"test"}
+  echo ok, just ignore the messages above >&2
+fi
 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
    test "X`($echo "$echo_test_string")`" != X"$echo_test_string"; then
   # The Solaris, AIX, and Digital Unix default echo programs unquote
@@ -105,17 +108,13 @@ if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
       elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
           test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
         echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif test "X$echo_test_string" != "Xsmaller" &&
+      elif test "X$echo_test_string" != "Xtest" &&
           test "X$echo_test_string" != "X"; then
         # maybe if we try with a smaller string...
        if test "X$echo_test_string" != "X`sed 15q "$0"`"; then
-         if test "X$echo_test_string" != "X`sed 50q "$0"`"; then
-           echo_test_string="`sed 50q "$0"`" # about 2Kb
-         else
-           echo_test_string="`sed 15q "$0"`" # less than 1Kb
-         fi
+         echo_test_string="`sed 15q "$0"`" # less than 1Kb
        else
-         echo_test_string="smaller" # really small
+         echo_test_string="test" # really small
        fi
        export echo_test_string
        exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}