1# Bootstrap configuration.
2
3# Copyright (C) 2006-2021 Free Software Foundation, Inc.
4
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
19# gnulib modules used by this package.
20gnulib_modules="
21    getpagesize
22    errno
23    error
24    fdl
25    getopt-gnu
26    getrusage
27    gettext
28    gettimeofday
29    gitlog-to-changelog
30    git-version-gen
31    inttypes
32    limits-h
33    maintainer-makefile
34    non-recursive-gnulib-prefix-hack
35    progname
36    sig2str
37    signal
38    signal-h
39    stdbool
40    stdnoreturn
41    stdlib
42    string
43    sys_time
44    sys_resource
45    sys_types
46    sys_wait
47    unistd
48    update-copyright
49    version-etc
50    version-etc-fsf
51    warnings
52"
53
54# Additional xgettext options to use.  Use "\\\newline" to break lines.
55XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
56 --from-code=UTF-8\\\
57 --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
58 --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
59 --flag=wrapf:1:c-format\\\
60'
61
62# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
63# appears in configure.ac, exclude some unnecessary files.
64# Without grep's -E option (not portable enough, pre-configure),
65# the following test is ugly.  Also, this depends on the existence
66# of configure.ac, not the obsolescent-named configure.in.  But if
67# you're using this infrastructure, you should care about such things.
68
69gettext_external=0
70grep '^[	 ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
71  gettext_external=1
72grep '^[	 ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
73  gettext_external=1
74
75if test $gettext_external = 1; then
76  # Gettext supplies these files, but we don't need them since
77  # we don't have an intl subdirectory.
78  excluded_files='
79      m4/glibc2.m4
80      m4/intdiv0.m4
81      m4/lcmessage.m4
82      m4/lock.m4
83      m4/printf-posix.m4
84      m4/size_max.m4
85      m4/uintmax_t.m4
86      m4/ulonglong.m4
87      m4/visibility.m4
88      m4/xsize.m4
89  '
90fi
91
92
93gnulib_tool_option_extras="--makefile-name=gnulib.mk"
94
95# Build prerequisites
96buildreq="\
97autoconf   2.69
98automake   1.14
99git        1.5.5
100gzip       -
101makeinfo   -
102tar        -
103"
104
105bootstrap_post_import_hook ()
106{
107  # Automake requires that ChangeLog exist.
108  touch ChangeLog || return 1
109  # Massage lib/gnulib.mk before using it later in the bootstrapping process.
110  build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
111}
112
113# File that should exist in the top directory of a checked out hierarchy,
114# but not in a distribution tarball.
115checkout_only_file=HACKING.md
116