summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-03-23 00:21:45 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-03-23 00:26:36 -0700
commit0c22f56ed7990cf02cbd2ade738944dd5ea8afd5 (patch)
treefb00331d55306162213dc7030d75554ff0b9d542
parent90fd310a7865bf4ae695aaab0f21a9ab71f849f8 (diff)
downloaddiffutils-0c22f56ed7990cf02cbd2ade738944dd5ea8afd5.tar.gz
maint: update build procedure to recent gettext etc.
* bootstrap.conf (gnulib_modules): Add vararrays. (needed_gnulib_files, unnecessary_gettext_files): New vars. (bootstrap_post_import_hook): New function, to implement these vars. (excluded_files): Remove; 'bootstrap' no longer supports this. Its function is now performed by unnecessary_gettext_files. (buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2, to lessen the probability that we'll have outlandishly old files during a build. * m4/vararrays.m4: Remove from repository, as we now use the gnulib version.
-rw-r--r--bootstrap.conf48
-rw-r--r--configure.ac2
-rw-r--r--m4/vararrays.m435
3 files changed, 39 insertions, 46 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 00e75e3..240754b 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -73,6 +73,7 @@ system-quote
unistd
unlocked-io
update-copyright
+vararrays
verify
version-etc
version-etc-fsf
@@ -106,18 +107,36 @@ grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
gettext_external=1
+needed_gnulib_files=
+unnecessary_gettext_files=
+
if test $gettext_external = 1; then
# Gettext supplies these files, but we don't need them since
# we don't have an intl subdirectory.
- excluded_files='
- m4/glibc2.m4
- m4/intdiv0.m4
- m4/lcmessage.m4
- m4/printf-posix.m4
- m4/uintmax_t.m4
- m4/ulonglong.m4
- m4/visibility.m4
-'
+ unnecessary_gettext_files='
+ m4/glibc2.m4
+ m4/intdiv0.m4
+ m4/intl.m4
+ m4/intldir.m4
+ m4/intmax.m4
+ m4/lcmessage.m4
+ m4/lock.m4
+ m4/printf-posix.m4
+ m4/threadlib.m4
+ m4/uintmax_t.m4
+ m4/visibility.m4
+ '
+
+ # Gettext supplies these files, but the gnulib version of these files
+ # typically is more up-to-date. We don't use gnulib's gettext module,
+ # as it's too heavyweight, so grab the files one at a time instead.
+ needed_gnulib_files='
+ m4/gettext.m4
+ m4/intlmacosx.m4
+ m4/nls.m4
+ m4/po.m4
+ m4/progtest.m4
+ '
fi
gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests
@@ -130,7 +149,7 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests
# Build prerequisites
buildreq="\
autoconf 2.61
-automake 1.11
+automake 1.12.2
autopoint -
gettext -
git 1.4.4
@@ -145,6 +164,15 @@ tar -
# Automake requires that ChangeLog exist.
touch ChangeLog || exit 1
+bootstrap_post_import_hook()
+{
+ for file in $needed_gnulib_files; do
+ echo "$0: $gnulib_tool --copy-file $file $file ..."
+ $gnulib_tool --copy-file $file $file || exit
+ done
+ rm -f $unnecessary_gettext_files || exit
+}
+
bootstrap_epilogue()
{
perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
diff --git a/configure.ac b/configure.ac
index 7d29646..aea40fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,7 +161,7 @@ test -f $srcdir/.tarball-version \
|| SRC_VERSION_C=../src/version.c
AM_GNU_GETTEXT([external], [need-ngettext])
-AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT_VERSION([0.18.2])
XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
AC_CONFIG_FILES([
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
deleted file mode 100644
index bf957ef..0000000
--- a/m4/vararrays.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-# Check for variable-length arrays.
-
-#serial 2
-
-# From Paul Eggert
-
-# Copyright (C) 2001, 2009-2013 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-AC_DEFUN([AC_C_VARARRAYS],
-[
- AC_CACHE_CHECK([for variable-length arrays],
- ac_cv_c_vararrays,
- [AC_TRY_COMPILE(
- [],
- [static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];],
- ac_cv_c_vararrays=yes,
- ac_cv_c_vararrays=no)])
- if test $ac_cv_c_vararrays = yes; then
- AC_DEFINE([HAVE_C_VARARRAYS], [1],
- [Define to 1 if C supports variable-length arrays.])
- fi
-])