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