summaryrefslogtreecommitdiff
path: root/libtoolize.in
diff options
context:
space:
mode:
authorGordon Matzigkeit <gord@gnu.ai.mit.edu>1997-04-01 19:53:01 +0000
committerGordon Matzigkeit <gord@gnu.org>1997-04-01 19:53:01 +0000
commit9276ad0be39800323030804cc2f4341ffaf6d67d (patch)
tree894cf889e7b6075788f6fffaa29f38cf9cbdb6b3 /libtoolize.in
parentef1ef543d114e1171b7486d749da686f45039cdc (diff)
downloadlibtool-9276ad0be39800323030804cc2f4341ffaf6d67d.tar.gz
*** empty log message ***
Diffstat (limited to 'libtoolize.in')
-rw-r--r--libtoolize.in64
1 files changed, 56 insertions, 8 deletions
diff --git a/libtoolize.in b/libtoolize.in
index 20f05444..0c1ed514 100644
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -122,24 +122,59 @@ fi
files=`cd $pkgdatadir && ls`
if test -z "$files"; then
- echo "$progname: cannot \`cd' to \`$pkgdatadir'" 1>&2
+ echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2
exit 1
fi
+auxdir=.
+auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null`
+if test -n "$auxdirline"; then
+ # Handle explicit AC_CONFIG_AUX_DIR settings.
+ auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'`
+
+ if test "$auxdir" = "$auxdirline"; then
+ echo "$progname: invalid AC_CONFIG_AUX_DIR syntax: $auxdirline" 1>&2
+ exit 1
+ else
+ # Strip any quote brackets.
+ auxdir=`echo "$auxdir" | sed 's/^\[\(.*\)\]$/\1/g'`
+ case "$auxdir" in
+ *\$*)
+ echo "$progname: cannot handle variables in AC_CONFIG_AUX_DIR" 1>&2
+ exit 1
+ ;;
+ *)
+ ;;
+ esac
+ fi
+else
+ # Try to discover auxdir the same way it is discovered by configure.
+ # Note that we default to the current directory.
+ for dir in . .. ../..; do
+ if test -f $dir/install-sh; then
+ auxdir=$dir
+ break
+ elif test -f $dir/install.sh; then
+ auxdir=$dir
+ break
+ fi
+ done
+fi
+
if test -z "$automake"; then
- if egrep AM_PROG_LIBTOOL configure.in >/dev/null 2>&1; then :
+ if egrep '^AM_PROG_LIBTOOL' configure.in >/dev/null 2>&1; then :
else
echo "Remember to add \`AM_PROG_LIBTOOL' to \`configure.in'."
fi
- if egrep AC_PROG_RANLIB configure.in >/dev/null 2>&1; then
+ if egrep '^AC_PROG_RANLIB' configure.in >/dev/null 2>&1; then
echo "Using \`AC_PROG_RANLIB' is rendered obsolete by \`AM_PROG_LIBTOOL'"
fi
if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then
- updatemsg="You should update your \`aclocal.m4' by running aclocal."
+ updatemsg="update your \`aclocal.m4' by running aclocal"
else
- updatemsg="You should add the contents of \`$libtool_m4' to \`aclocal.m4'."
+ updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'"
fi
if egrep '^AC_DEFUN\(AM_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then
@@ -155,16 +190,29 @@ if test -z "$automake"; then
test -z "$localserial" && localserial=0
if test "$localserial" -lt "$instserial"; then
- echo "$updatemsg"
+ echo "You should $updatemsg."
elif test "$localserial" -gt "$instserial"; then
- echo "$progname: \`$libtool_m4' has serial number $instserial, less than $localserial found in \`aclocal.m4'" 1>&2
+ echo "$progname: \`$libtool_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2
+ if test -z "$force"; then
+ echo "Use \`--force' to replace newer libtool files with this version." 1>&2
+ exit 1
+ fi
+ echo "To remain compatible, you should $updatemsg."
fi
fi
else
- echo "$updatemsg"
+ echo "You should $updatemsg."
fi
fi
+
+# Change to the auxillary directory.
+if test "$auxdir" != .; then
+ test -z "$automake" && echo "Putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
+ cd $auxdir || exit 1
+fi
+
+
for file in $files; do
if test -f "$file" && test -z "$force"; then
test -z "$automake" && echo "$progname: \`$file' exists: use \`--force' to overwrite" 1>&2