]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.in (AC_PROG_RANLIB): No longer required as we now use
authorGary V. Vaughan <gary@gnu.org>
Tue, 20 Jul 1999 09:29:31 +0000 (09:29 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 20 Jul 1999 09:29:31 +0000 (09:29 +0000)
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.

ChangeLog
NEWS
configure.in
doc/libtool.texi
libtool.m4
ltconfig.in

index ae10d1f2ab9fccea23beb362a391cef35fc96316..f3fe8c986db5649bc340b95fa470a6cff160579a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+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.
diff --git a/NEWS b/NEWS
index 5e9893af31e4508745b334c95851286909a1e5e4..7680ea61f680b42c6433ea06557c2a6d89176564 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
 * New --with-pic flag to control the generation of PIC/non-PIC code.
+* New --build flag to ltconfig to help with build cross compilation
+  environments is inherited from --build flag passed to configure.
 * Various bugfixes
 \f
 New in 1.3b: 1999-07-02; CVS version 1.3a, Libtool team:
index 4e6dbd81ad84951326b1a361a3f7fd6c04ca2839..a70cc419fac0473296865fc286c36213997a821c 100644 (file)
@@ -29,9 +29,8 @@ AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does
 aclocaldir='${datadir}/aclocal'
 AC_SUBST(aclocaldir)
 
-dnl Use the specified CC, RANLIB, and LD while running ltconfig.
+dnl Use the specified CC and LD while running ltconfig.
 AC_PROG_CC
-AC_PROG_RANLIB
 AM_PROG_LD
 AM_PROG_NM
 AC_PROG_LN_S
index 0c9e18837132a85898a736d58e806010f9ecec4c..dcf4d3e87d629ceff0a0bf06ec4d1873bccb5f8a 100644 (file)
@@ -1558,6 +1558,14 @@ ltconfig [@var{option}]@dots{} @var{ltmain} [@var{host}]
 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
index fc24e1176bedb3124cfdc5b77eb965058adb548c..0fb19502c2e926c71392002625c5a0d33146c44d 100644 (file)
@@ -34,7 +34,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 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
@@ -59,13 +59,14 @@ AC_REQUIRE([AC_ENABLE_STATIC])dnl
 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"
index a0817d0db2061520c1be9434a043eb7bdee3458f..d5cc5705f753a5dce8e91ba9e4822a7d4f354a98 100755 (executable)
@@ -194,7 +194,8 @@ srcdir=
 ac_config_guess=
 ac_config_sub=
 host=
-nonopt=
+build=NONE
+nonopt=NONE
 ofile="$default_ofile"
 verify_host=yes
 with_gcc=no
@@ -243,6 +244,7 @@ Usage: $progname [OPTION]... [HOST [LTMAIN]]
 
 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
@@ -271,6 +273,9 @@ EOM
   exit 0
   ;;
 
+  --build) prev=build ;;
+  --build=*) build="$optarg" ;;
+
   --debug)
     echo "$progname: enabling shell trace mode"
     set -x
@@ -445,12 +450,38 @@ if test "$verify_host" = yes; then
   # 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.
@@ -519,35 +550,38 @@ LN_S="$ac_cv_prog_LN_S"
 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