mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 01:44:20 +00:00
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.
This commit is contained in:
parent
90fd310a78
commit
0c22f56ed7
@ -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
|
||||
|
||||
@ -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([
|
||||
|
||||
@ -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
|
||||
])
|
||||
Loading…
x
Reference in New Issue
Block a user