• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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
38libtoolize --automake -c
39run "$ACLOCAL -I m4"
40run $AUTOHEADER
41run "$AUTOMAKE --foreign --add-missing --copy"
42run $AUTOCONF
43