+Mon Feb 16 12:44:26 1998 Gordon Matzigkeit <gord@profitpress.com>
+
+ * 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 <gord@profitpress.com>
* ltconfig.in (no_undefined_flag): Add a flag to declare under
## 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
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"
;;
"")
[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.
;;
*)
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"
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"
;;
"")
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"
# Detect if we are using a relative or absolute path to ltmain.sh.
case "$ltmain" in
-/*) cat <<EOF >> $ofile
+/* | [A-Za-z]:\\*) cat <<EOF >> $ofile
# Execute the libtool backend.
. $ltmain
EOF
-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.
;;
*)
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
# If there is no directory component, then add one.
case "$arg" in
- */*) . $arg ;;
+ */* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
relink)
# We need an absolute path.
case "$dir" in
- /*) ;;
+ /* | [A-Za-z]:\\*) ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
exit 1
;;
- */*)
+ */* | *\\*)
$echo "$modename: output file \`$output' must have no directory components" 1>&2
exit 1
;;
rpath=
for dir in $temp_rpath; do
case "$dir" in
- /*)
+ /* | [A-Za-z]:\\*)
# Absolute path.
rpath="$rpath$dir:"
;;
# 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
fi
fi
case "$destdir" in
- /*) ;;
+ /* | [A-Za-z]:\\*) ;;
*)
for file in $files; do
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: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
old_library=
# If there is no directory component, then add one.
case "$file" in
- */*) . $file ;;
+ */* | *\\*) . $file ;;
*) . ./$file ;;
esac
*)
# 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
if test -f "$lib"; then
# If there is no directory component, then add one.
case "$lib" in
- */*) . $lib ;;
+ */* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
fi
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
# If there is no directory component, then add one.
case "$file" in
- */*) . $file ;;
+ */* | *\\*) . $file ;;
*) . ./$file ;;
esac
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
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.
+Mon Feb 16 13:10:17 1998 Gordon Matzigkeit <gord@profitpress.com>
+
+ * defs: Correctly identify absolute directory names on MS-DOS.
+ Suggested by Bob Friesenhahn.
+
Sat Feb 7 10:52:55 1998 Gordon Matzigkeit <gord@profitpress.com>
* suffix.test (extensions): Added GNAT (GNU Ada Translator)
# Check that srcdir is set to an absolute path.
case "$srcdir" in
-/*) ;;
+/* | [A-Za-z]:\\*) ;;
*) srcdir=`cd $srcdir && pwd` ;;
esac