summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-10-10 17:59:27 +0200
committerJim Meyering <meyering@redhat.com>2010-10-10 19:07:23 +0200
commit08699c353db951a2f4352e609591f992649685c0 (patch)
tree7e42a48119d59cc3fe3db4764da2ca9d26c0d446 /bootstrap
parent56213caaef52621fab6e2566394b7bcbe6cc8725 (diff)
downloadparted-08699c353db951a2f4352e609591f992649685c0.tar.gz
build: update gnulib submodule to latest, and update bootstrap
* bootstrap: update from gnulib
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap70
1 files changed, 50 insertions, 20 deletions
diff --git a/bootstrap b/bootstrap
index 5ab4cf7..43684f1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2010-07-06.10; # UTC
+scriptversion=2010-10-10.16; # UTC
# Bootstrap this package from checked-out sources.
@@ -80,6 +80,10 @@ gnulib_modules=
# Any gnulib files needed that are not in modules.
gnulib_files=
+# A function to be called to edit gnulib.mk right after it's created.
+# Override it via your own definition in bootstrap.conf.
+gnulib_mk_hook() { :; }
+
# A function to be called after everything else in this script.
# Override it via your own definition in bootstrap.conf.
bootstrap_epilogue() { :; }
@@ -346,8 +350,12 @@ check_versions() {
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]'`
+ appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
test "$appvar" = TAR && appvar=AMTAR
eval "app=\${$appvar-$app}"
inst_ver=$(get_version $app)
@@ -370,16 +378,30 @@ check_versions() {
print_versions() {
echo "Program Min_version"
echo "----------------------"
- printf "$buildreq"
+ printf %s "$buildreq"
echo "----------------------"
# 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
- echo
- print_versions
+ echo >&2
+ if test -f README-prereq; then
+ echo "See README-prereq for how to get the prerequisite programs" >&2
+ else
+ echo "Please install the prerequisite programs" >&2
+ fi
exit 1
fi
@@ -660,7 +682,8 @@ slurp() {
for file in `ls -a $1/$dir`; do
case $file in
.|..) continue;;
- .*) continue;; # FIXME: should all file names starting with "." be ignored?
+ # FIXME: should all file names starting with "." be ignored?
+ .*) continue;;
esac
test -d $1/$dir/$file && continue
for excluded_file in $excluded_files; do
@@ -669,10 +692,12 @@ slurp() {
if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
copied=$copied${sep}$gnulib_mk; sep=$nl
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
- sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
+ sed "$remove_intl" $1/$dir/$file |
+ cmp - $dir/$gnulib_mk > /dev/null || {
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
rm -f $dir/$gnulib_mk &&
- sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
+ sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
+ gnulib_mk_hook $dir/$gnulib_mk
}
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
version_controlled_file $dir $file; then
@@ -705,7 +730,14 @@ slurp() {
# the name with just ".h". Many gnulib headers are generated,
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
- f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
+ f=`echo "$copied" |
+ sed '
+ s/\.in\.h$/.h/
+ s/\.sin$/.sed/
+ s/\.y$/.c/
+ s/\.gperf$/.h/
+ '
+ `
insert_sorted_if_absent $ig "$f"
# For files like sys_stat.in.h and sys_time.in.h, record as
@@ -736,6 +768,12 @@ gnulib_tool_options="\
--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
@@ -778,20 +816,12 @@ grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
for command in \
libtool \
- "${ACLOCAL-aclocal} --force -I m4" \
+ "${ACLOCAL-aclocal} --force -I m4 $ACLOCAL_FLAGS" \
"${AUTOCONF-autoconf} --force" \
"${AUTOHEADER-autoheader} --force" \
"${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"