blob: deff5134e09cd2ab82635b67b416197ebef77054 [file] [log] [blame]
Upstreamcc2ee171970-01-12 13:46:40 +00001#!/bin/sh
2
3# run to generate needed files not in CVS
4
5# NB: if you run this file with AUTOMAKE, AUTOCONF, etc. environment
6# variables set, you *must* run "configure" with the same variables
7# set. this is because "configure" will embed the values of these variables
8# into the generated Makefiles, as @AUTOMAKE@, @AUTOCONF@ etc. and it will
9# trigger regeneration of configuration state using those programs when any
10# of Makefile.am etc. change.
11
12run() {
13 echo "Running $1 ..."
14 $1
15}
16
17set -e
18
19ACLOCAL=${ACLOCAL:-aclocal}
20AUTOHEADER=${AUTOHEADER:-autoheader}
21AUTOMAKE=${AUTOMAKE:-automake}
22AUTOCONF=${AUTOCONF:-autoconf}
23
24if $AUTOMAKE --version | grep -q 1.4
25 then
26 echo ""
27 echo "Automake 1.4 not supported. please set \$AUTOMAKE"
28 echo "to point to a newer automake, or upgrade."
29 echo ""
30 exit 1
31fi
32
33if test -n "$1"; then
34 echo "autogen.sh doesn't take any options" >&2
35 exit 1
36fi
37
38run "$ACLOCAL -I m4"
39run $AUTOHEADER
40run "$AUTOMAKE --foreign --add-missing --copy"
41run $AUTOCONF