From 6ac0b9a1443541ea26330bf42c63058b9bc56eac Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 19 Nov 1998 20:28:01 +0000 Subject: [PATCH] * 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. --- ChangeLog | 3 +++ ltconfig.in | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2db942039..36273e808 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1998-11-19 Alexandre Oliva + * 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. diff --git a/ltconfig.in b/ltconfig.in index a5bdb4408..6395960c6 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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+"$@"} -- 2.47.2