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