1999-06-08 Gary V. Vaughan <gary@oranda.demon.co.uk>
+ * ltconfig.in (RANLIB): Accept, in order of decreasing preference:
+ the cached value; an environment setting; the first file called
+ ``ranlib'' in the user's path.
+
* ltmain.in (exeext): Use $exeext when working out the names of
programs (but not the wrapper script itself due to a stupidity in
win32 which hardwires the .exe extension to the binary loader!).
# Set a sane default for `OBJDUMP'.
test -z "$OBJDUMP" && OBJDUMP=objdump
-# If RANLIB is not set, then run the test.
-if test "${RANLIB+set}" != "set"; then
- result=no
-
- echo $ac_n "checking for ranlib... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
- RANLIB="ranlib"
- result="ranlib"
- break
- fi
- done
- IFS="$save_ifs"
-
- echo "$ac_t$result" 1>&6
+echo $ac_n "checking for ranlib... $ac_c" 1>&6
+echo "$progname:@LINENO@: checking for ranlib" 1>&5
+if test "${ac_cv_prog_RANLIB+set}" = "set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ result="$ac_cv_prog_RANLIB"
+else
+ if test -n "$RANLIB"; then
+ result="$RANLIB" # Let the user override the test.
+ ac_cv_prog_RANLIB="$result"
+ else
+ result=no
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
+ result="ranlib"
+ ac_cv_prog_RANLIB="$result"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ fi
fi
-
-if test -n "$RANLIB"; then
+if test -n "$ac_cv_prog_RANLIB"; then
+ RANLIB="$ac_cv_prog_RANLIB"
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
+echo "$ac_t$result" 1>&6
# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
test -z "$DLLTOOL" && DLLTOOL=dlltool