Change return values for GEOSWKBWriter_getIncludeSRID_r to match function signature.
[geos.git] / configure.in
blob2413c598cc40338dd0ef873b9bcb6bed5191817c
1 dnl $Id$
2 dnl
3 dnl configure.in - autoconf input template to produce ./configure script
4 dnl
5 dnl version 2.52 is required for Cygwin libtool support
6 AC_PREREQ(2.52)
8 dnl local vars to hold user's preferences --------------------------------
9 AC_INIT(source/headers/geos.h)
10 AC_CANONICAL_SYSTEM
12 dnl -- JTS_PORT: the version of JTS this release is bound to
13 JTS_PORT=1.7.1
15 dnl -- Version info for the CAPI
16 CAPI_INTERFACE_CURRENT=6
17 CAPI_INTERFACE_REVISION=0
18 CAPI_INTERFACE_AGE=5
20 dnl
21 dnl -- Release versions / C++ library SONAME will use these
22 dnl -- encoding ABI break at every release
23 dnl
24 VERSION_MAJOR=3
25 VERSION_MINOR=1
26 VERSION_PATCH=0
27 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
29 dnl CAPI_VERSION_MAJOR=$(($CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE))
30 dnl the following should be more portable
31 CAPI_VERSION_MAJOR=`expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE`
32 CAPI_VERSION_MINOR=$CAPI_INTERFACE_AGE
33 CAPI_VERSION_PATCH=$CAPI_INTERFACE_REVISION
34 CAPI_VERSION="$CAPI_VERSION_MAJOR.$CAPI_VERSION_MINOR.$CAPI_VERSION_PATCH"
36 AM_INIT_AUTOMAKE(geos, $VERSION, no-define)
37 AM_CONFIG_HEADER(source/headers/config.h)
38 AM_CONFIG_HEADER(source/headers/geos/platform.h)
39 AC_PROG_CC
41 dnl use libtool ----------------------------------------------------------
42 AC_LIBTOOL_DLOPEN
43 AC_LIBTOOL_WIN32_DLL
44 AC_PROG_LIBTOOL
46 dnl check for programs ----------------------------------------------------
47 AC_PROG_CXX
48 AC_ISC_POSIX
50 dnl function checks ------------------------------------------------------
51 AC_FUNC_CLOSEDIR_VOID
52 AC_FUNC_MEMCMP
53 AC_FUNC_STRFTIME
54 AC_FUNC_VPRINTF
55 AC_FUNC_ALLOCA
56 AC_HEADER_DIRENT
57 AC_HEADER_STDC
58 AC_CHECK_HEADERS(memory.h)
59 AC_CHECK_HEADERS(unistd.h)
60 AC_CHECK_HEADERS(ieeefp.h)
61 AC_CHECK_HEADERS(sys/file.h)
62 AC_CHECK_HEADERS(sys/time.h)
63 AC_CHECK_FUNCS(strchr memcpy gettimeofday)
64 AC_HEADER_STAT
65 AC_STRUCT_TM
66 AC_TYPE_SIZE_T
67 AC_C_CONST
69 dnl --------------------------------------------------------------------
70 dnl - Check for inline and cassert settings
71 dnl --------------------------------------------------------------------
74 AC_ARG_ENABLE(inline, [  --disable-inline    Disable inlining],
75         [case "${enableval}" in
76                 yes) enable_inline=true ;;
77                 no)  enable_inline=false ;;
78                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-inline);;
79         esac],
80         [enable_inline=true]
83 AC_ARG_ENABLE(cassert, [  --disable-cassert   Disable assertion checking],
84         [case "${enableval}" in
85                 yes) enable_cassert=true ;;
86                 no)  enable_cassert=false ;;
87                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cassert);;
88         esac],
89         [enable_cassert=true]
92 INLINE_FLAGS=
93 AC_SUBST(INLINE_FLAGS)
94 if test x"$enable_inline" = xtrue; then
95         INLINE_FLAGS="-DGEOS_INLINE"
96         CXXFLAGS="$CXXFLAGS $INLINE_FLAGS"
99 if test x"$enable_cassert" = xfalse; then
100         CXXFLAGS="$CXXFLAGS -DNDEBUG"
103 dnl --------------------------------------------------------------------
104 dnl - Append default C++ and C flags 
105 dnl --------------------------------------------------------------------
107 # Set default CXXFLAGS and CFLAGS if not set by the user
108 # -pedantic: ISO does not support long long
109 # we add -Wno-long-long to avoid those messages
110 CXXFLAGS="${CXXFLAGS} -Wall -ansi -pedantic -Wno-long-long"
111 CFLAGS="${CFLAGS} -Wall -ansi -pedantic -Wno-long-long"
113 dnl --------------------------------------------------------------------
114 dnl - Look for a 64bit integer (do after CFLAGS is set)
115 dnl --------------------------------------------------------------------
117 dnl Find a working 64bit integer
118 PGAC_TYPE_64BIT_INT([int64_t])
119 if test x"$HAVE_INT64_T_64" = x"no" ; then
120   PGAC_TYPE_64BIT_INT([long int])
121   if test x"$HAVE_LONG_INT_64" = x"no" ; then
122     PGAC_TYPE_64BIT_INT([long long int])
123   fi
129 dnl --------------------------------------------------------------------
130 dnl - check whether python is required for the build
131 dnl --------------------------------------------------------------------
133 AC_ARG_ENABLE(python, [  --enable-python    Enable build of python module],
134         [case "${enableval}" in
135                 yes) use_python=true ;;
136                 no)  use_python=false ;;
137                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;;
138         esac],
139         [use_python=false]
143 dnl --------------------------------------------------------------------
144 dnl - check whether ruby is required for the build
145 dnl --------------------------------------------------------------------
147 AC_ARG_ENABLE(ruby, [  --enable-ruby    Enable build of ruby module],
148         [case "${enableval}" in
149                 yes) use_ruby=true ;;
150                 no)  use_ruby=false ;;
151                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ruby) ;;
152         esac],
153         [use_ruby=false]
157 dnl --------------------------------------------------------------------
158 dnl - check for swig if python or ruby are enabled
159 dnl --------------------------------------------------------------------
161 use_swig=false
162 if test x"$use_python" = xtrue || test x"$use_ruby" = xtrue; then
163         AC_PROG_SWIG(1.3.28)
164         if test x"$SWIG" != "x"; then
165             SWIG_ENABLE_CXX     
166             AC_SUBST(SWIG)           
168             use_swig=true 
169         fi
171 AM_CONDITIONAL(ENABLE_SWIG, [ test x"$use_swig" = xtrue ])
174 dnl --------------------------------------------------------------------
175 dnl - check for python if enabled
176 dnl --------------------------------------------------------------------
178 if test x"$use_python" = xtrue; then
179         dnl Check for Python 
180         AM_PATH_PYTHON  
181         SWIG_PYTHON
183         if test x"$PYTHON" = "x"; then
184                 use_python=false
185         fi
186         
187         AC_SUBST(PYTHON)
188         AC_SUBST(SWIG_PYTHON_CPPFLAGS)
189         AC_SUBST(SWIG_PYTHON_OPT)
191 AM_CONDITIONAL(ENABLE_PYTHON, [test x"$use_python" = xtrue])
194 dnl --------------------------------------------------------------------
195 dnl - check for ruby if enabled
196 dnl --------------------------------------------------------------------
198 if test x"$use_ruby" = xtrue; then
199         dnl Check for Ruby 
200         AC_RUBY_DEVEL
202         if test x"$RUBY" = x; then
203                 use_ruby=false
204         fi
207 AM_CONDITIONAL(ENABLE_RUBY, [ test x"$use_ruby" = xtrue ])
210 dnl --------------------------------------------------------------------
211 dnl - check for boost 
212 dnl --------------------------------------------------------------------
214 dnl -- AX_BOOST(1.32)
215 dnl -- if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
216 dnl --  use_boost_utf=yes
217 dnl -- else
218 dnl --  use_boost_utf=no
219 dnl -- fi
220 dnl -- AM_CONDITIONAL(ENABLE_BOOST_UTF, [test "x$use_boost_utf" = "xyes"])
222 dnl things to substitute in output ----------------------------------------
223 AC_SUBST(VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH INTERFACE_CURRENT INTERFACE_REVISION INTERFACE_AGE JTS_PORT CAPI_VERSION CAPI_VERSION_MAJOR CAPI_VERSION_MINOR CAPI_VERSION_PATCH CAPI_INTERFACE_CURRENT CAPI_INTERFACE_REVISION CAPI_INTERFACE_AGE)
225 dnl output stuff ----------------------------------------------------------
227 AC_OUTPUT([
228         Makefile 
229         capi/Makefile
230         capi/geos_c.h
231         doc/Doxyfile
232         doc/Makefile
233         macros/Makefile
234         source/Makefile 
235         source/algorithm/Makefile
236         source/algorithm/locate/Makefile
237         source/geom/Makefile
238         source/geom/prep/Makefile
239         source/geom/util/Makefile
240         source/geomgraph/Makefile
241         source/geomgraph/index/Makefile
242         source/headers/Makefile
243         source/headers/geos/Makefile
244         source/headers/geos/algorithm/Makefile
245         source/headers/geos/algorithm/locate/Makefile
246         source/headers/geos/geom/Makefile
247         source/headers/geos/geom/prep/Makefile
248         source/headers/geos/geom/util/Makefile
249         source/headers/geos/geomgraph/Makefile
250         source/headers/geos/geomgraph/index/Makefile
251         source/headers/geos/index/Makefile
252         source/headers/geos/index/bintree/Makefile
253         source/headers/geos/index/chain/Makefile
254         source/headers/geos/index/intervalrtree/Makefile
255         source/headers/geos/index/quadtree/Makefile
256         source/headers/geos/index/strtree/Makefile
257         source/headers/geos/index/sweepline/Makefile
258         source/headers/geos/io/Makefile
259         source/headers/geos/noding/Makefile
260         source/headers/geos/noding/snapround/Makefile
261         source/headers/geos/operation/Makefile
262         source/headers/geos/operation/buffer/Makefile
263         source/headers/geos/operation/distance/Makefile
264         source/headers/geos/operation/linemerge/Makefile
265         source/headers/geos/operation/overlay/Makefile
266         source/headers/geos/operation/polygonize/Makefile
267         source/headers/geos/operation/predicate/Makefile
268         source/headers/geos/operation/relate/Makefile
269         source/headers/geos/operation/valid/Makefile
270         source/headers/geos/planargraph/Makefile
271         source/headers/geos/planargraph/algorithm/Makefile
272         source/headers/geos/precision/Makefile
273         source/headers/geos/simplify/Makefile
274         source/headers/geos/util/Makefile
275         source/headers/geos/version.h
276         source/index/Makefile
277         source/index/bintree/Makefile
278         source/index/chain/Makefile
279         source/index/intervalrtree/Makefile
280         source/index/quadtree/Makefile
281         source/index/strtree/Makefile
282         source/index/sweepline/Makefile
283         source/io/Makefile
284         source/noding/Makefile
285         source/noding/snapround/Makefile
286         source/operation/Makefile
287         source/operation/buffer/Makefile
288         source/operation/distance/Makefile
289         source/operation/linemerge/Makefile
290         source/operation/overlay/Makefile
291         source/operation/polygonize/Makefile
292         source/operation/predicate/Makefile
293         source/operation/relate/Makefile
294         source/operation/valid/Makefile
295         source/planargraph/Makefile
296         source/precision/Makefile
297         source/simplify/Makefile
298         source/util/Makefile
299         swig/geos.i
300         swig/Makefile
301         swig/python/Makefile
302         swig/python/tests/Makefile
303         swig/ruby/Makefile
304         swig/ruby/test/Makefile
305         tests/Makefile
306         tests/bigtest/Makefile
307         tests/unit/Makefile
308         tests/tut/Makefile
309         tests/xmltester/Makefile
310         tools/Makefile
311         tools/geos-config
312         ])
316 dnl -- echo "---------------------------------------"
317 dnl -- echo "Boost UTF: $use_boost_utf"
318 echo "Swig: $use_swig"
319 echo "Python: $use_python"
320 echo "Ruby: $use_ruby"
321 dnl -- echo "---------------------------------------"