From: Gordon Matzigkeit Date: Mon, 16 Feb 1998 20:13:54 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release-1-0~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54c920be9644e327e0a0dc7192214856199b819b;p=thirdparty%2Flibtool.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index edf31bcd1..4ee22bfb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Mon Feb 16 12:44:26 1998 Gordon Matzigkeit + + * libtool.m4, ltmain.in, ltconfig.in: Correctly identify absolute + directory names on MS-DOS. Suggested by Bob Friesenhahn. + + * ltconfig.in, ltmain.in, libtool.m4: Change a bunch of `sed N!d' + commands to `sed Nq', for efficiency. + + * ltmain.in: Only egrep the first few lines of files in order to + determine if they were libtool-generated. This prevents egrep(1) + from taking forever to look at a 10MB binary on Solaris. From + Stephan Kulow. + Wed Feb 11 22:20:33 1998 Gordon Matzigkeit * ltconfig.in (no_undefined_flag): Add a flag to declare under diff --git a/libtool.m4 b/libtool.m4 index 1dc570801..edba4c049 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -21,7 +21,7 @@ ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. -# serial 20 AM_PROG_LIBTOOL +# serial 21 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, [AC_REQUIRE([AM_ENABLE_SHARED])dnl AC_REQUIRE([AM_ENABLE_STATIC])dnl @@ -138,7 +138,7 @@ if test "$ac_cv_prog_gcc" = yes; then ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. - /*) + /* | [A-Za-z]:\\*) test -z "$LD" && LD="$ac_prog" ;; "") @@ -202,7 +202,7 @@ AC_DEFUN(AM_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [case "$NM" in -/*) +/* | [A-Za-z]:\\*) ac_cv_path_NM="$NM" # Let the user override the test with a path. ;; *) @@ -211,11 +211,11 @@ AC_CACHE_VAL(ac_cv_path_NM, test -z "$ac_dir" && dir=. if test -f $ac_dir/nm; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1!d' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" else ac_cv_path_NM="$ac_dir/nm" diff --git a/ltconfig.in b/ltconfig.in index 972082922..be2b6e7d2 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -617,7 +617,7 @@ if test -z "$LD"; then ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. - /*) + /* | [A-Za-z]:\\*) test -z "$LD" && LD="$ac_prog" ;; "") @@ -882,18 +882,18 @@ echo "$ac_t$ld_shlibs" 1>&6 if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in - /*) ;; # Let the user override the test with a path. + /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do test -z "$ac_dir" && dir=. if test -f $ac_dir/nm; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1!d' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -p" else NM="$ac_dir/nm" @@ -1464,7 +1464,7 @@ esac # Detect if we are using a relative or absolute path to ltmain.sh. case "$ltmain" in -/*) cat <> $ofile +/* | [A-Za-z]:\\*) cat <> $ofile # Execute the libtool backend. . $ltmain EOF diff --git a/ltmain.in b/ltmain.in index 839524d64..9883e1f80 100644 --- a/ltmain.in +++ b/ltmain.in @@ -486,7 +486,7 @@ if test -z "$show_help"; then -L*) dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` case "$dir" in - /*) + /* | [A-Za-z]:\\*) # Add the corresponding hardcode_libdir_flag, if it is not identical. ;; *) @@ -577,7 +577,7 @@ if test -z "$show_help"; then old_library= # Check to see that this really is a libtool archive. - if egrep '^# Generated by ltmain.sh' $arg >/dev/null 2>&1; then : + if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : else $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 exit 1 @@ -585,7 +585,7 @@ if test -z "$show_help"; then # If there is no directory component, then add one. case "$arg" in - */*) . $arg ;; + */* | *\\*) . $arg ;; *) . ./$arg ;; esac @@ -702,7 +702,7 @@ if test -z "$show_help"; then relink) # We need an absolute path. case "$dir" in - /*) ;; + /* | [A-Za-z]:\\*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then @@ -802,7 +802,7 @@ if test -z "$show_help"; then exit 1 ;; - */*) + */* | *\\*) $echo "$modename: output file \`$output' must have no directory components" 1>&2 exit 1 ;; @@ -1356,7 +1356,7 @@ EOF rpath= for dir in $temp_rpath; do case "$dir" in - /*) + /* | [A-Za-z]:\\*) # Absolute path. rpath="$rpath$dir:" ;; @@ -1460,7 +1460,7 @@ else # If there was a directory component, then change thisdir. if test "x\$destdir" != "x\$file"; then case "\$destdir" in - /*) thisdir="\$destdir" ;; + /* | [A-Za-z]:\\*) thisdir="\$destdir" ;; *) thisdir="\$thisdir/\$destdir" ;; esac fi @@ -1718,7 +1718,7 @@ EOF fi fi case "$destdir" in - /*) ;; + /* | [A-Za-z]:\\*) ;; *) for file in $files; do case "$file" in @@ -1751,7 +1751,7 @@ EOF *.la) # Check to see that this really is a libtool archive. - if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then : + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 @@ -1762,7 +1762,7 @@ EOF old_library= # If there is no directory component, then add one. case "$file" in - */*) . $file ;; + */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -1888,13 +1888,13 @@ EOF *) # Do a test to see if this is really a libtool program. - if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then + if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then link_against_libtool_libs= finalize_command= # If there is no directory component, then add one. case "$file" in - */*) . $file ;; + */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -1911,7 +1911,7 @@ EOF if test -f "$lib"; then # If there is no directory component, then add one. case "$lib" in - */*) . $lib ;; + */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi @@ -2074,7 +2074,7 @@ EOF case "$file" in *.la) # Check to see that this really is a libtool archive. - if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then : + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 @@ -2087,7 +2087,7 @@ EOF # If there is no directory component, then add one. case "$file" in - */*) . $file ;; + */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -2144,10 +2144,11 @@ EOF case "$file" in -*) ;; *) - if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then # If there is no directory component, then add one. case "$file" in - */*) . $file ;; + */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -2209,7 +2210,7 @@ EOF case "$name" in *.la) # Possibly a libtool archive, so verify it. - if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. diff --git a/tests/ChangeLog b/tests/ChangeLog index 9cda708ba..287026f4f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 16 13:10:17 1998 Gordon Matzigkeit + + * defs: Correctly identify absolute directory names on MS-DOS. + Suggested by Bob Friesenhahn. + Sat Feb 7 10:52:55 1998 Gordon Matzigkeit * suffix.test (extensions): Added GNAT (GNU Ada Translator) diff --git a/tests/defs b/tests/defs index 1e4c17f1f..ddf92ced6 100644 --- a/tests/defs +++ b/tests/defs @@ -4,7 +4,7 @@ # Check that srcdir is set to an absolute path. case "$srcdir" in -/*) ;; +/* | [A-Za-z]:\\*) ;; *) srcdir=`cd $srcdir && pwd` ;; esac