3 dnl configure.in - autoconf input template to produce ./configure script
5 dnl version 2.52 is required for Cygwin libtool support
8 dnl local vars to hold user's preferences --------------------------------
9 AC_INIT(source/headers/geos.h)
12 dnl -- JTS_PORT: the version of JTS this release is bound to
15 dnl -- Version info for the CAPI
16 CAPI_INTERFACE_CURRENT=6
17 CAPI_INTERFACE_REVISION=0
21 dnl -- Release versions / C++ library SONAME will use these
22 dnl -- encoding ABI break at every release
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)
41 dnl use libtool ----------------------------------------------------------
46 dnl check for programs ----------------------------------------------------
50 dnl function checks ------------------------------------------------------
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)
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);;
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);;
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])
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) ;;
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) ;;
157 dnl --------------------------------------------------------------------
158 dnl - check for swig if python or ruby are enabled
159 dnl --------------------------------------------------------------------
162 if test x"$use_python" = xtrue || test x"$use_ruby" = xtrue; then
164 if test x"$SWIG" != "x"; then
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
183 if test x"$PYTHON" = "x"; then
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
202 if test x"$RUBY" = x; then
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
218 dnl -- use_boost_utf=no
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 ----------------------------------------------------------
235 source/algorithm/Makefile
236 source/algorithm/locate/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
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
302 swig/python/tests/Makefile
304 swig/ruby/test/Makefile
306 tests/bigtest/Makefile
309 tests/xmltester/Makefile
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 "---------------------------------------"