Add missing 3.3.9 section
[geos.git] / autogen.sh
blobcf50777070a0e6e4bb69588363c0d4e650f095bd
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/^.* //'`
54 for libtoolize in libtoolize glibtoolize; do
55 LIBTOOLIZE=`which $libtoolize 2>/dev/null`
56 if test -x "${LIBTOOLIZE}"; then
57 break;
59 done
60 if [ ! ${LIBTOOLIZE} ]; then
61 echo "Missing libtoolize!"
62 exit
64 LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | grep -E "^.*[0-9]\.[0-9]" | sed 's/^.* //'`
66 AMOPTS="--add-missing --copy -Woverride"
67 if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
68 AMOPTS=$AMOPTS" --include-deps";
71 LTOPTS="--force --copy"
72 echo "* Running ${LIBTOOLIZE} (${LIBTOOLIZE_VER})"
73 echo " OPTIONS = ${LTOPTS}"
74 ${LIBTOOLIZE} ${LTOPTS} || giveup
76 echo "* Running $ACLOCAL (${ACLOCAL_VER})"
77 ${ACLOCAL} -I macros || giveup
79 echo "* Running ${AUTOHEADER} (${AUTOCONF_VER})"
80 ${AUTOHEADER} || giveup
82 echo "* Running ${AUTOMAKE} (${AUTOMAKE_VER})"
83 echo " OPTIONS = ${AMOPTS}"
84 ${AUTOMAKE} ${AMOPTS} || giveup
86 echo "* Running ${AUTOCONF} (${AUTOCONF_VER})"
87 ${AUTOCONF} || giveup
89 if test -f "${PWD}/configure"; then
90 echo "======================================"
91 echo "Now you are ready to run './configure'"
92 echo "======================================"
93 else
94 echo " Failed to generate ./configure script!"
95 giveup