1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7ORIGDIR=`pwd`
8cd $srcdir
9PROJECT=xmlroff-testing
10TEST_TYPE=-f
11FILE=ChangeLog
12AC_CONFIG_AUX_DIR=config
13
14DIE=0
15
16(autoconf --version) < /dev/null > /dev/null 2>&1 || {
17	echo
18	echo "You must have autoconf installed to compile $PROJECT."
19	echo "Download the appropriate package for your distribution,"
20	echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
21	DIE=1
22}
23
24(automake --version) < /dev/null > /dev/null 2>&1 || {
25	echo
26	echo "You must have automake installed to compile $PROJECT."
27	echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
28	echo "(or a newer version if it is available)"
29	DIE=1
30}
31
32if test "$DIE" -eq 1; then
33	exit 1
34fi
35
36test $TEST_TYPE $FILE || {
37	echo "You must run this script in the top-level $PROJECT directory"
38	exit 1
39}
40
41test -d config || {
42	echo "Creating AC_CONFIG_AUX_DIR, \`$AC_CONFIG_AUX_DIR'."
43	mkdir config
44}
45
46if test -z "$*"; then
47	echo "I am going to run ./configure with no arguments - if you wish "
48        echo "to pass any to it, please specify them on the $0 command line."
49fi
50
51aclocal $ACLOCAL_FLAGS
52
53# optionally run autoheader
54(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
55
56automake -a $am_opt
57autoconf
58cd $ORIGDIR
59
60$srcdir/configure --enable-maintainer-mode "$@"
61
62echo
63echo "Now type 'make' to compile $PROJECT."
64