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=prng
10TEST_TYPE=-f
11FILE=src/prng.h          # a file that should exist in the source dir
12
13DIE=0
14
15(autoconf --version) < /dev/null > /dev/null 2>&1 || {
16	echo
17	echo "You must have autoconf installed to compile $PROJECT."
18	echo "Download the appropriate package for your distribution,"
19	echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
20	DIE=1
21}
22
23#(libtool --version) < /dev/null > /dev/null 2>&1 || {
24#	echo
25#	echo "You must have libtool installed to compile $PROJECT."
26#	echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
27#	echo "(or a newer version if it is available)"
28#	DIE=1
29#}
30
31(automake --version) < /dev/null > /dev/null 2>&1 || {
32	echo
33	echo "You must have automake installed to compile $PROJECT."
34	echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.3.tar.gz"
35	echo "(or a newer version if it is available)"
36	DIE=1
37}
38
39if test "$DIE" -eq 1; then
40	exit 1
41fi
42
43test $TEST_TYPE $FILE || {
44	echo "You must run this script in the top-level $PROJECT directory"
45	exit 1
46}
47
48if test -z "$*"; then
49	echo "I am going to run ./configure with no arguments - if you wish "
50        echo "to pass any to it, please specify them on the $0 command line."
51fi
52
53case $CC in
54*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
55esac
56
57#if test -z "$ACLOCAL_FLAGS"; then
58#
59#	acdir=`aclocal --print-ac-dir`
60#        m4list="glib.m4 gettext.m4"
61#
62#	for file in $m4list
63#	do
64#		if [ ! -f "$acdir/$file" ]; then
65#			echo "WARNING: aclocal's directory is $acdir, but..."
66#			echo "         no file $acdir/$file"
67#			echo "         You may see fatal macro warnings below."
68#			echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
69#			echo "         environment variable to \"-I /some/dir\", or install"
70#			echo "         $acdir/$file."
71#			echo ""
72#		fi
73#	done
74#fi
75
76#echo "Running gettextize...  Ignore non-fatal messages."
77# Hmm, we specify --force here, since otherwise things dont'
78# get added reliably, but we don't want to overwrite intl
79# while making dist.
80#echo "no" | gettextize --copy --force
81
82aclocal $ACLOCAL_FLAGS
83
84# optionally feature autoheader
85(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
86
87automake --add-missing $am_opt
88autoconf
89cd $ORIGDIR
90
91$srcdir/configure "$@"
92
93echo
94echo "Now type 'make' to compile $PROJECT."
95
96
97
98
99
100