+1999-10-03 Gary V. Vaughan <gary@oranda.demon.co.uk>
+
+ * ltconfig.in: Set $FILE to @FILE@ for substitution with
+ the value found in libtool.m4 at configure time.
+ * libtool.m4 (AC_PATH_TOOL_GREP_VERSION): New macro, combines
+ AC_PATH_PROG and AC_CHECK_TOOL with a test which greps the
+ output of $ac_dir/${ac_prefix}<tool> --version for a
+ given regex.
+ (AC_PATH_PROG_GREP_VERSION): New macro used by the above.
+ (AC_LIBTOOL_SETUP): Use the new macros to search the PATH
+ [starting at /usr/bin] for a file program which accepts
+ --version and has "file" in its --version output.
+
1999-10-03 Thomas Tanner <tanner@ffii.org>
* NEWS: new -no-install flag
AC_REQUIRE([AC_EXEEXT])dnl
dnl
-AC_CHECK_TOOL(FILE, file, :)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
+AC_PATH_TOOL_VERSION_GREP(FILE, file, file, :, "/usr/bin:$PATH")
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PATH_PROG_VERSION_GREP - look for a particular expression in the output
+# generated by $PROG --version
+dnl AC_PATH_PROG_VERSION_GREP(VARIABLE, PROG-TO-CHECK-FOR, GREP-EXPRESSION[, VALUE-IF-NOT-FOUND[, PATH]])
+AC_DEFUN(AC_PATH_PROG_VERSION_GREP,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$5], , $PATH, [$5])"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if $ac_dir/$2 --version 2>/dev/null | grep $3 >/dev/null 2>&1; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# AC_PATH_TOOL_VERSION_GREP - Try AC_PATH_PROG_VERSION_GREP with target
+# prefix when cross-compiling
+dnl AC_PATH_TOOL_VERSION_GREP(VARIABLE, PROG-TO-CHECK-FOR, GREP-EXPRESSION[, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AC_PATH_TOOL_VERSION_GREP,
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
+AC_PATH_PROG_VERSION_GREP($1, ${ac_tool_prefix}$2, $3,
+ ifelse([$4], , [$2], ), $5)
+ifelse([$4], , , [
+ if test -z "$ac_cv_prog_$1"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_PROG_VERSION_GREP($1, $2, $3, $2, $5)
+ else
+ $1="$4"
+ fi
+ fi
+])
+])
+
+
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AC_PROG_LD,
[AC_ARG_WITH(gnu-ld,