Update comments.
[libsigsegv/ericb.git] / autogen.sh
blob2d7e595bfdbb84d022f6fefe189d6bb2f8e8853c
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.
7 # This script requires autoconf-2.63..2.67 and automake-1.11 in the PATH.
8 # It also requires either
9 # - the GNULIB_TOOL environment variable pointing to the gnulib-tool script
10 # in a gnulib checkout, or
11 # - an internet connection.
13 # Copyright (C) 2009-2010 Free Software Foundation, Inc.
15 # This program is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 3 of the License, or
18 # (at your option) any later version.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program. If not, see <http://www.gnu.org/licenses/>.
28 # Usage: ./autogen.sh
30 # Fetch config.guess, config.sub.
31 if test -n "$GNULIB_TOOL"; then
32 for file in config.guess config.sub; do
33 $GNULIB_TOOL --copy-file build-aux/$file; chmod a+x build-aux/$file
34 done
35 else
36 for file in config.guess config.sub; do
37 wget -q --timeout=5 -O build-aux/$file.tmp "http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/${file};hb=HEAD" \
38 && mv build-aux/$file.tmp build-aux/$file \
39 && chmod a+x build-aux/$file
40 done
43 # Generate aclocal.m4.
44 aclocal -I m4
45 # Generate configure.
46 autoconf
47 # Generate config.h.in.
48 autoheader && touch config.h.in
49 # Generate Makefile.in, src/Makefile.in, tests/Makefile.in, and some
50 # build-aux/* files.
51 automake --add-missing --copy
53 # Generate config.h.msvc, src/sigsegv.h.msvc.
54 ./configure \
55 && make config.h.msvc \
56 && (cd src && make sigsegv.h.msvc) \
57 && make distclean