Fix CascadedPolygonUnion to discard non-polygonal components created during unioning
[geos.git] / autogen.sh
blob96b8bb02d11c5bd4d4ff3d92de103cd522be9f42
1 #!/bin/sh
3 # $Id$
5 # GEOS Bootstrapping Script
7 giveup()
9 echo
10 echo " Something went wrong, giving up!"
11 echo
12 exit 1
15 OSTYPE=`uname -s`
17 AUTOCONF=`which autoconf 2>/dev/null`
18 if [ ! ${AUTOCONF} ]; then
19 echo "Missing autoconf!"
20 exit
22 AUTOCONF_VER=`${AUTOCONF} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
24 AUTOHEADER=`which autoheader 2>/dev/null`
25 if [ ! ${AUTOHEADER} ]; then
26 echo "Missing autoheader!"
27 exit
30 for aclocal in aclocal aclocal-1.10 aclocal-1.9; do
31 ACLOCAL=`which $aclocal 2>/dev/null`
32 if test -x "${ACLOCAL}"; then
33 break;
35 done
36 if [ ! ${ACLOCAL} ]; then
37 echo "Missing aclocal!"
38 exit
40 ACLOCAL_VER=`${ACLOCAL} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
42 for automake in automake automake-1.10 automake-1.9; do
43 AUTOMAKE=`which $automake 2>/dev/null`
44 if test -x "${AUTOMAKE}"; then
45 break;
47 done
48 if [ ! ${AUTOMAKE} ]; then
49 echo "Missing automake!"
50 exit
52 AUTOMAKE_VER=`${AUTOMAKE} --version | grep -E "^.*[0-9]$" | sed 's/^.* //'`
55 for libtoolize in libtoolize glibtoolize; do
56 LIBTOOLIZE=`which $libtoolize 2>/dev/null`
57 if test -x "${LIBTOOLIZE}"; then
58 break;
60 done
61 if [ ! ${LIBTOOLIZE} ]; then
62 echo "Missing libtoolize!"
63 exit
65 LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | grep -E "^.*[0-9]\.[0-9]" | sed 's/^.* //'`
67 AMOPTS="--add-missing --copy -Woverride"
68 if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
69 AMOPTS=$AMOPTS" --include-deps";
72 LTOPTS="--force --copy"
73 echo "* Running ${LIBTOOLIZE} (${LIBTOOLIZE_VER})"
74 echo " OPTIONS = ${LTOPTS}"
75 ${LIBTOOLIZE} ${LTOPTS} || giveup
77 echo "* Running $ACLOCAL (${ACLOCAL_VER})"
78 ${ACLOCAL} -I macros || giveup
80 echo "* Running ${AUTOHEADER} (${AUTOCONF_VER})"
81 ${AUTOHEADER} || giveup
83 echo "* Running ${AUTOMAKE} (${AUTOMAKE_VER})"
84 echo " OPTIONS = ${AMOPTS}"
85 ${AUTOMAKE} ${AMOPTS} || giveup
87 echo "* Running ${AUTOCONF} (${AUTOCONF_VER})"
88 ${AUTOCONF} || giveup
90 if test -f "${PWD}/configure"; then
91 echo "======================================"
92 echo "Now you are ready to run './configure'"
93 echo "======================================"
94 else
95 echo " Failed to generate ./configure script!"
96 giveup