+1999-07-20 Gary V. Vaughan <gary@oranda.demon.co.uk>
+
+ * configure.in (AC_PROG_RANLIB): No longer required as we now use
+ AC_CHECK_TOOL in AC_LIBTOOL_SETUP.
+ * libtool.m4 (AC_PROG_LIBTOOL): Pass the $build variable to
+ ltconfig.
+ (AC_PROG_RANLIB): replaced with AC_CHECK_TOOL.
+ * ltconfig.in (build): new variable to hold the build triplet
+ which is now checked for unless --no-verify is specified.
+ (--build): new argument to set the build triplet.
+ (ranlib): Prefer ${host_alias}-ranlib[.exe] if $build is different
+ to $host.
+ * doc/libtool.texi (Invoking ltconfig): Document --build option.
+ * NEWS: Note --build option.
+
1999-07-19 Erez Zadok <ezk@cs.columbia.edu>
* doc/PLATFORMS: Updated mostly *bsd platforms.
and accepts the following options:
@table @samp
+@item --build=@var{build}
+Set the build system to be different to the host system. This creates a
+libtool which prefers build tools which are prefixed by the host alias over
+the standard tools. For example, specifying @code{--build=i486-pc-linux-gnu}
+on a host described by i486-pc-cygwin would create a libtool which used
+@code{i486-pc-cygwin-ranlib} in preference to @code{ranlib} if present. This
+is useful for cross build environments.
+
@item --debug
Dump a trace of shell script execution to standard output. This
produces a lot of output, so you may wish to pipe it to @code{less} (or
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
ac_config_guess=
ac_config_sub=
host=
-nonopt=
+build=NONE
+nonopt=NONE
ofile="$default_ofile"
verify_host=yes
with_gcc=no
Generate a system-specific libtool script.
+ --build configure for building on BUILD [BUILD=HOST]
--debug enable verbose shell tracing
--disable-shared do not build shared libraries
--disable-static do not build static libraries
exit 0
;;
+ --build) prev=build ;;
+ --build=*) build="$optarg" ;;
+
--debug)
echo "$progname: enabling shell trace mode"
set -x
# Make sure the host verified.
test -z "$host" && exit 1
+ # Check for the build system type
+ echo $ac_n "checking build system type... $ac_c" 1>&6
+
+ build_alias=$build
+ case "$build_alias" in
+ NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ build=`SHELL $ac_config_sub $build_alias`
+ build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$build" 1>&6
+
elif test -z "$host"; then
echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
echo "$help" 1>&2
exit 1
else
host_alias=$host
+ build_alias=$host_alias
+ build=$host
+fi
+
+if test x"$host" != x"$build"; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
fi
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
echo "$ac_t""$result" 1>&6
# Search for a ranlib program
-echo $ac_n "checking for ranlib... $ac_c" 1>&6
-echo "$progname:@LINENO@: checking for ranlib" 1>&5
-if test "X${ac_cv_prog_RANLIB+set}" = Xset; 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"
+for ac_prog in "${ac_host_prefix}ranlib" ranlib :
+do
+ echo $ac_n "checking for $ac_prog... $ac_c" 1>&6
+ echo "$progname:@LINENO@: checking for $ac_prog" 1>&5
+ if test "X${ac_cv_prog_RANLIB+set}" = Xset; then
+ echo $ac_n "(cached) $ac_c" 1>&6
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"
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ else
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$ac_prog || test -f $dir/$ac_prog$ac_exeext; then
+ ac_cv_prog_RANLIB="$ac_prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ fi
fi
-fi
-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
+ 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"
+ echo "$ac_t$RANLIB" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+ test -n "$RANLIB" && break
+done
if test -z "$NM"; then
echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6