changeset 13748:f26ce5f24d79

bootstrap: use glibtoolize on MacOS * build-aux/bootstrap (check_versions): Convert libtool into libtoolize. (tool search): Move libtool check earlier, and look for glibtoolize for MacOS. (gnulib_tool_options): Auto-add --libtool when appropriate. Reported by Justin Clift. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Thu, 30 Sep 2010 11:14:11 -0600
parents a330b97239ef
children 259247e24a97
files ChangeLog build-aux/bootstrap
diffstat 2 files changed, 31 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-09-30  Eric Blake  <eblake@redhat.com>
 
+	bootstrap: use glibtoolize on MacOS
+	* build-aux/bootstrap (check_versions): Convert libtool into
+	libtoolize.
+	(tool search): Move libtool check earlier, and look for
+	glibtoolize for MacOS.
+	(gnulib_tool_options): Auto-add --libtool when appropriate.
+	Reported by Justin Clift.
+
 	poll: fix typo that broke test on MacOS
 	* m4/poll.m4 (gl_FUNC_POLL): Add missing test.
 	Reported by Justin Clift.
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2010-07-06.10; # UTC
+scriptversion=2010-09-30.17; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -346,6 +346,10 @@
   ret=0
 
   while read app req_ver; do
+    # We only need libtoolize from the libtool package.
+    if test "$app" = libtool; then
+      app=libtoolize
+    fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
     appvar=`echo $app | tr '[a-z]' '[A-Z]'`
     test "$appvar" = TAR && appvar=AMTAR
@@ -375,6 +379,18 @@
   # can't depend on column -t
 }
 
+use_libtool=0
+# We'd like to use grep -E, to see if any of LT_INIT,
+# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
+# but that's not portable enough (e.g., for Solaris).
+grep '^[	 ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
+  && use_libtool=1
+grep '^[	 ]*LT_INIT' configure.ac >/dev/null \
+  && use_libtool=1
+if test $use_libtool = 1; then
+  find_tool LIBTOOLIZE glibtoolize libtoolize
+fi
+
 if ! printf "$buildreq" | check_versions; then
   test -f README-prereq &&
   echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
@@ -736,6 +752,12 @@
  --local-dir $local_gl_dir\
  $gnulib_tool_option_extras\
 "
+if test $use_libtool = 1; then
+  case "$gnulib_tool_options " in
+    *' --libtool '*) ;;
+    *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
+  esac
+fi
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
 slurp $bt || exit
@@ -784,14 +806,6 @@
   "${AUTOMAKE-automake} --add-missing --copy --force-missing"
 do
   if test "$command" = libtool; then
-    use_libtool=0
-    # We'd like to use grep -E, to see if any of LT_INIT,
-    # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
-    # but that's not portable enough (e.g., for Solaris).
-    grep '^[	 ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
-      && use_libtool=1
-    grep '^[	 ]*LT_INIT' configure.ac >/dev/null \
-      && use_libtool=1
     test $use_libtool = 0 \
       && continue
     command="${LIBTOOLIZE-libtoolize} -c -f"