Use spaces under tests/unit
[geos.git] / autogen.sh
blobb2950c12a5b91e1c14819c59c2b367c76560fdfd
1 #!/bin/sh
4 # GEOS Bootstrapping Script
6 giveup()
8 echo
9 echo " Something went wrong, giving up!"
10 echo
11 exit 1
14 OSTYPE=`uname -s`
16 AUTOCONF=`which autoconf 2>/dev/null`
17 if [ ! ${AUTOCONF} ]; then
18 echo "Missing autoconf!"
19 exit
21 AUTOCONF_VER=`${AUTOCONF} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
23 AUTOHEADER=`which autoheader 2>/dev/null`
24 if [ ! ${AUTOHEADER} ]; then
25 echo "Missing autoheader!"
26 exit
29 for aclocal in aclocal aclocal-1.10 aclocal-1.9; do
30 ACLOCAL=`which $aclocal 2>/dev/null`
31 if test -x "${ACLOCAL}"; then
32 break;
34 done
35 if [ ! ${ACLOCAL} ]; then
36 echo "Missing aclocal!"
37 exit
39 ACLOCAL_VER=`${ACLOCAL} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
41 for automake in automake automake-1.10 automake-1.9; do
42 AUTOMAKE=`which $automake 2>/dev/null`
43 if test -x "${AUTOMAKE}"; then
44 break;
46 done
47 if [ ! ${AUTOMAKE} ]; then
48 echo "Missing automake!"
49 exit
51 AUTOMAKE_VER=`${AUTOMAKE} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
53 for libtoolize in libtoolize glibtoolize; do
54 LIBTOOLIZE=`which $libtoolize 2>/dev/null`
55 if test -x "${LIBTOOLIZE}"; then
56 break;
58 done
59 if [ ! ${LIBTOOLIZE} ]; then
60 echo "Missing libtoolize!"
61 exit
63 LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | grep -E "^.*[0-9]\.[0-9]" | sed 's/^.* //'`
65 AMOPTS="--add-missing --copy -Woverride"
66 if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
67 AMOPTS=$AMOPTS" --include-deps";
70 LTOPTS="--force --copy"
71 echo "* Running ${LIBTOOLIZE} (${LIBTOOLIZE_VER})"
72 echo " OPTIONS = ${LTOPTS}"
73 ${LIBTOOLIZE} ${LTOPTS} || giveup
75 echo "* Running $ACLOCAL (${ACLOCAL_VER})"
76 ${ACLOCAL} -I macros || giveup
78 echo "* Running ${AUTOHEADER} (${AUTOCONF_VER})"
79 ${AUTOHEADER} || giveup
81 echo "* Running ${AUTOMAKE} (${AUTOMAKE_VER})"
82 echo " OPTIONS = ${AMOPTS}"
83 ${AUTOMAKE} ${AMOPTS} || giveup
85 echo "* Running ${AUTOCONF} (${AUTOCONF_VER})"
86 ${AUTOCONF} || giveup
88 if test -f "${PWD}/configure"; then
89 echo "======================================"
90 echo "Now you are ready to run './configure'"
91 echo "======================================"
92 else
93 echo " Failed to generate ./configure script!"
94 giveup