]> www.ginac.de Git - cln.git/blob - autogen.sh
build/CMake: defined `long_long_(big|little)_endian` to intparam.h
[cln.git] / autogen.sh
1 #!/bin/sh
2 # Convenience script for regenerating all autogeneratable files that are
3 # omitted from the version control repository. In particular, this script
4 # also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
5 # with new versions of autoconf or automake.
6 #
7 # This script requires autoconf-2.63..2.69 and automake-1.11..1.16 in the PATH.
8
9 # Copyright (C) 2003-2019 Free Software Foundation, Inc.
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
23
24 # Usage: ./autogen.sh
25
26 GETTEXT_VERSION=0.20.1
27 TEXINFO_VERSION=6.5
28
29 mkdir -p build-aux m4
30
31 # libtool
32 # Don't use libtoolize, as it may not be installed or may be outdated.
33 for f in build-aux/ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4; do
34   { wget -nv --timeout=5 -O $f.tmp "https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob_plain;f=${f};hb=refs/tags/v${GETTEXT_VERSION}" \
35       && mv $f.tmp $f; \
36   } || rm -f $f.tmp
37 done
38
39 # config.{guess,sub}, gnulib module 'havelib', test-driver.diff
40 for f in build-aux/config.guess build-aux/config.sub \
41          m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/host-cpu-c-abi.m4 build-aux/config.rpath \
42          build-aux/test-driver.diff; do
43   { wget -nv --timeout=5 -O $f.tmp "https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=${f}" \
44       && mv $f.tmp $f; \
45   } || rm -f $f.tmp
46 done
47
48 # autoconf archive
49 for f in m4/ax_cxx_compile_stdcxx.m4; do
50   { wget -nv --timeout=5 -O $f.tmp "https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=${f}" \
51       && mv $f.tmp $f; \
52   } || rm -f $f.tmp
53 done
54
55 # texinfo.tex
56 # The most recent snapshot of it is available in the gnulib repository.
57 # But this is a snapshot, with all possible dangers.
58 # A stable release of it is available through "automake --add-missing --copy",
59 # but that may be too old. So take the version which matches the latest stable
60 # texinfo release.
61 for f in texinfo.tex; do
62   g="build-aux/$f"
63   { wget -nv --timeout=5 -O $g.tmp "https://git.savannah.gnu.org/gitweb/?p=texinfo.git;a=blob_plain;f=doc/${f};hb=refs/tags/texinfo-${TEXINFO_VERSION}" \
64       && mv $g.tmp $g; \
65   } || rm -f $g.tmp
66 done
67
68 aclocal -I m4
69 autoconf
70 autoheader && touch autoconf/cl_config.h.in
71 # Make sure we get new versions of files brought in by automake.
72 (cd build-aux && rm -f ar-lib compile depcomp install-sh mdate-sh missing test-driver)
73 automake --add-missing --copy
74 patch build-aux/test-driver < build-aux/test-driver.diff
75 # Get rid of autom4te.cache directory.
76 rm -rf autom4te.cache