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 AC_CONFIG_MACRO_DIR([macros])
14 dnl -- JTS_PORT: the version of JTS this release is bound to
17 dnl -- Version info for the CAPI
18 CAPI_INTERFACE_CURRENT=6
19 CAPI_INTERFACE_REVISION=0
23 dnl -- Release versions / C++ library SONAME will use these
24 dnl -- encoding ABI break at every release
29 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
31 dnl CAPI_VERSION_MAJOR=$(($CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE))
32 dnl the following should be more portable
33 CAPI_VERSION_MAJOR=`expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE`
34 CAPI_VERSION_MINOR=$CAPI_INTERFACE_AGE
35 CAPI_VERSION_PATCH=$CAPI_INTERFACE_REVISION
36 CAPI_VERSION="$CAPI_VERSION_MAJOR.$CAPI_VERSION_MINOR.$CAPI_VERSION_PATCH"
38 AM_INIT_AUTOMAKE(geos, $VERSION, no-define)
39 AM_CONFIG_HEADER(source/headers/config.h)
40 AM_CONFIG_HEADER(source/headers/geos/platform.h)
43 dnl use libtool ----------------------------------------------------------
48 dnl check for programs ----------------------------------------------------
54 dnl function checks ------------------------------------------------------
62 AC_CHECK_HEADERS(memory.h)
63 AC_CHECK_HEADERS(unistd.h)
64 AC_CHECK_HEADERS(ieeefp.h)
65 AC_CHECK_HEADERS(sys/file.h)
66 AC_CHECK_HEADERS(sys/time.h)
67 AC_CHECK_FUNCS(strchr memcpy gettimeofday)
73 dnl --------------------------------------------------------------------
74 dnl - Check for inline and cassert settings
75 dnl --------------------------------------------------------------------
78 AC_ARG_ENABLE(inline, [ --disable-inline Disable inlining],
79 [case "${enableval}" in
80 yes) enable_inline=true ;;
81 no) enable_inline=false ;;
82 *) AC_MSG_ERROR(bad value ${enableval} for --enable-inline);;
87 AC_ARG_ENABLE(cassert, [ --disable-cassert Disable assertion checking],
88 [case "${enableval}" in
89 yes) enable_cassert=true ;;
90 no) enable_cassert=false ;;
91 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cassert);;
97 AC_SUBST(INLINE_FLAGS)
98 if test x"$enable_inline" = xtrue; then
99 INLINE_FLAGS="-DGEOS_INLINE"
100 CXXFLAGS="$CXXFLAGS $INLINE_FLAGS"
103 if test x"$enable_cassert" = xfalse; then
104 CXXFLAGS="$CXXFLAGS -DNDEBUG"
107 dnl --------------------------------------------------------------------
108 dnl - Append default C++ and C flags
109 dnl --------------------------------------------------------------------
111 # Set default CXXFLAGS and CFLAGS if not set by the user
112 # -pedantic: ISO does not support long long
113 # we add -Wno-long-long to avoid those messages
115 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -pedantic], [dummy], [-pedantic], [], [WARNFLAGS="$WARNFLAGS -pedantic"], [])
116 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -Wall], [dummy], [-Wall], [], [WARNFLAGS="$WARNFLAGS -Wall"], [])
117 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], [dummy], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], [])
118 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -Wno-long-long], [dummy], [-Wno-long-long], [], [WARNFLAGS="$WARNFLAGS -Wno-long-long"], [])
119 CXXFLAGS="${CXXFLAGS} ${WARNFLAGS}"
120 CFLAGS="${CFLAGS} ${WARNFLAGS}"
122 dnl --------------------------------------------------------------------
123 dnl - Look for a 64bit integer (do after CFLAGS is set)
124 dnl --------------------------------------------------------------------
126 dnl Find a working 64bit integer
127 PGAC_TYPE_64BIT_INT([int64_t])
128 if test x"$HAVE_INT64_T_64" = x"no" ; then
129 PGAC_TYPE_64BIT_INT([long int])
130 if test x"$HAVE_LONG_INT_64" = x"no" ; then
131 PGAC_TYPE_64BIT_INT([long long int])
138 dnl --------------------------------------------------------------------
139 dnl - check whether python is required for the build
140 dnl --------------------------------------------------------------------
142 AC_ARG_ENABLE(python, [ --enable-python Enable build of python module],
143 [case "${enableval}" in
144 yes) use_python=true ;;
145 no) use_python=false ;;
146 *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;;
152 dnl --------------------------------------------------------------------
153 dnl - check whether ruby is required for the build
154 dnl --------------------------------------------------------------------
156 AC_ARG_ENABLE(ruby, [ --enable-ruby Enable build of ruby module],
157 [case "${enableval}" in
158 yes) use_ruby=true ;;
159 no) use_ruby=false ;;
160 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ruby) ;;
166 dnl --------------------------------------------------------------------
167 dnl - check for swig if python or ruby are enabled
168 dnl --------------------------------------------------------------------
171 if test x"$use_python" = xtrue || test x"$use_ruby" = xtrue; then
173 if test x"$SWIG" != "x"; then
180 AM_CONDITIONAL(ENABLE_SWIG, [ test x"$use_swig" = xtrue ])
183 dnl --------------------------------------------------------------------
184 dnl - check for python if enabled
185 dnl --------------------------------------------------------------------
187 if test x"$use_python" = xtrue; then
192 if test x"$PYTHON" = "x"; then
197 AC_SUBST(SWIG_PYTHON_CPPFLAGS)
198 AC_SUBST(SWIG_PYTHON_OPT)
200 AM_CONDITIONAL(ENABLE_PYTHON, [test x"$use_python" = xtrue])
203 dnl --------------------------------------------------------------------
204 dnl - check for ruby if enabled
205 dnl --------------------------------------------------------------------
207 if test x"$use_ruby" = xtrue; then
211 if test x"$RUBY" = x; then
216 AM_CONDITIONAL(ENABLE_RUBY, [ test x"$use_ruby" = xtrue ])
219 dnl --------------------------------------------------------------------
220 dnl - check for boost
221 dnl --------------------------------------------------------------------
223 dnl -- AX_BOOST(1.32)
224 dnl -- if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
225 dnl -- use_boost_utf=yes
227 dnl -- use_boost_utf=no
229 dnl -- AM_CONDITIONAL(ENABLE_BOOST_UTF, [test "x$use_boost_utf" = "xyes"])
231 dnl things to substitute in output ----------------------------------------
233 AC_SUBST(VERSION_MAJOR)
234 AC_SUBST(VERSION_MINOR)
235 AC_SUBST(VERSION_PATCH)
236 AC_SUBST(INTERFACE_CURRENT)
237 AC_SUBST(INTERFACE_REVISION)
238 AC_SUBST(INTERFACE_AGE)
240 AC_SUBST(CAPI_VERSION)
241 AC_SUBST(CAPI_VERSION_MAJOR)
242 AC_SUBST(CAPI_VERSION_MINOR)
243 AC_SUBST(CAPI_VERSION_PATCH)
244 AC_SUBST(CAPI_INTERFACE_CURRENT)
245 AC_SUBST(CAPI_INTERFACE_REVISION)
246 AC_SUBST(CAPI_INTERFACE_AGE)
248 dnl output stuff ----------------------------------------------------------
253 build/msvc80/Makefile
254 build/msvc80/geos_c_dll/Makefile
255 build/msvc80/geos_lib/Makefile
256 build/msvc80/geos_python/Makefile
257 build/msvc80/geos_ruby/Makefile
258 build/msvc80/geos_unit/Makefile
259 build/msvc90/Makefile
260 build/msvc90/geos_c_dll/Makefile
261 build/msvc90/geos_lib/Makefile
262 build/msvc90/geos_python/Makefile
263 build/msvc90/geos_ruby/Makefile
264 build/msvc90/geos_unit/Makefile
271 source/algorithm/Makefile
272 source/algorithm/locate/Makefile
274 source/geom/prep/Makefile
275 source/geom/util/Makefile
276 source/geomgraph/Makefile
277 source/geomgraph/index/Makefile
278 source/headers/Makefile
279 source/headers/geos/Makefile
280 source/headers/geos/algorithm/Makefile
281 source/headers/geos/algorithm/locate/Makefile
282 source/headers/geos/geom/Makefile
283 source/headers/geos/geom/prep/Makefile
284 source/headers/geos/geom/util/Makefile
285 source/headers/geos/geomgraph/Makefile
286 source/headers/geos/geomgraph/index/Makefile
287 source/headers/geos/index/Makefile
288 source/headers/geos/index/bintree/Makefile
289 source/headers/geos/index/chain/Makefile
290 source/headers/geos/index/intervalrtree/Makefile
291 source/headers/geos/index/quadtree/Makefile
292 source/headers/geos/index/strtree/Makefile
293 source/headers/geos/index/sweepline/Makefile
294 source/headers/geos/io/Makefile
295 source/headers/geos/noding/Makefile
296 source/headers/geos/noding/snapround/Makefile
297 source/headers/geos/operation/Makefile
298 source/headers/geos/operation/buffer/Makefile
299 source/headers/geos/operation/distance/Makefile
300 source/headers/geos/operation/linemerge/Makefile
301 source/headers/geos/operation/overlay/Makefile
302 source/headers/geos/operation/polygonize/Makefile
303 source/headers/geos/operation/predicate/Makefile
304 source/headers/geos/operation/relate/Makefile
305 source/headers/geos/operation/union/Makefile
306 source/headers/geos/operation/valid/Makefile
307 source/headers/geos/planargraph/Makefile
308 source/headers/geos/planargraph/algorithm/Makefile
309 source/headers/geos/precision/Makefile
310 source/headers/geos/simplify/Makefile
311 source/headers/geos/util/Makefile
312 source/headers/geos/version.h
313 source/index/Makefile
314 source/index/bintree/Makefile
315 source/index/chain/Makefile
316 source/index/intervalrtree/Makefile
317 source/index/quadtree/Makefile
318 source/index/strtree/Makefile
319 source/index/sweepline/Makefile
321 source/noding/Makefile
322 source/noding/snapround/Makefile
323 source/operation/Makefile
324 source/operation/buffer/Makefile
325 source/operation/distance/Makefile
326 source/operation/linemerge/Makefile
327 source/operation/overlay/Makefile
328 source/operation/polygonize/Makefile
329 source/operation/predicate/Makefile
330 source/operation/relate/Makefile
331 source/operation/union/Makefile
332 source/operation/valid/Makefile
333 source/planargraph/Makefile
334 source/precision/Makefile
335 source/simplify/Makefile
340 swig/python/tests/Makefile
342 swig/ruby/test/Makefile
344 tests/bigtest/Makefile
347 tests/xmltester/Makefile
354 dnl -- echo "---------------------------------------"
355 dnl -- echo "Boost UTF: $use_boost_utf"
356 echo "Swig: $use_swig"
357 echo "Python: $use_python"
358 echo "Ruby: $use_ruby"
359 dnl -- echo "---------------------------------------"