1 | AC_INIT([ZOO Kernel], [1.5.0], [bugs@zoo-project.org]) |
---|
2 | |
---|
3 | # Checks for programs. |
---|
4 | AC_PROG_YACC |
---|
5 | AC_PROG_CC |
---|
6 | AC_PROG_LEX |
---|
7 | AC_PROG_CXX |
---|
8 | AC_PROG_SED |
---|
9 | |
---|
10 | # Checks for libraries. |
---|
11 | AC_CHECK_LIB([curl], [curl_easy_init,curl_easy_setopt,curl_easy_cleanup,curl_easy_perform]) |
---|
12 | AC_CHECK_LIB([dl], [dlopen,dlsym,dlerror,dlclose]) |
---|
13 | AC_CHECK_LIB([crypto], [EVP_DigestInit,EVP_md5,EVP_DigestUpdate,BIO_f_base64,BIO_new]) |
---|
14 | AC_CHECK_LIB([uuid], [uuid_generate_time]) |
---|
15 | |
---|
16 | DEFAULT_LIBS="$LIBS" |
---|
17 | AC_SUBST([DEFAULT_LIBS]) |
---|
18 | |
---|
19 | |
---|
20 | # Checks for header files. |
---|
21 | AC_FUNC_ALLOCA |
---|
22 | AC_CHECK_HEADERS([fcntl.h inttypes.h libintl.h malloc.h stddef.h stdlib.h string.h unistd.h]) |
---|
23 | |
---|
24 | # Checks for typedefs, structures, and compiler characteristics. |
---|
25 | AC_HEADER_STDBOOL |
---|
26 | AC_TYPE_INT16_T |
---|
27 | AC_TYPE_INT32_T |
---|
28 | AC_TYPE_INT8_T |
---|
29 | AC_TYPE_PID_T |
---|
30 | AC_TYPE_SIZE_T |
---|
31 | AC_TYPE_UINT16_T |
---|
32 | AC_TYPE_UINT32_T |
---|
33 | AC_TYPE_UINT8_T |
---|
34 | |
---|
35 | # Checks for library functions. |
---|
36 | AC_FUNC_FORK |
---|
37 | AC_FUNC_MALLOC |
---|
38 | AC_FUNC_REALLOC |
---|
39 | AC_CHECK_FUNCS([dup2 getcwd memset setenv strdup strstr]) |
---|
40 | |
---|
41 | #============================================================================ |
---|
42 | # Detect if run on debian / ubuntu |
---|
43 | #============================================================================ |
---|
44 | if test -f "/usr/bin/dpkg" |
---|
45 | then |
---|
46 | DEB_DEF=-DDEB |
---|
47 | fi |
---|
48 | AC_SUBST([DEB_DEF]) |
---|
49 | |
---|
50 | AC_ARG_WITH([cgi-dir], |
---|
51 | [AS_HELP_STRING([--with-cgi-dir=PATH], [Specifies an alternative cgi directory path ( default: /usr/lib/cgi-bin) ])], |
---|
52 | [CGI_DIR="$withval"], [CGI_DIR="/usr/lib/cgi-bin"]) |
---|
53 | AC_SUBST([CGI_DIR]) |
---|
54 | |
---|
55 | AC_ARG_WITH([db-backend], |
---|
56 | [AS_HELP_STRING([--with-db-backend], [Relies on a database for storing status messages and response files ])], |
---|
57 | [RELY_ON_DB="-DRELY_ON_DB"], [RELY_ON_DB=""]) |
---|
58 | AC_SUBST([RELY_ON_DB]) |
---|
59 | |
---|
60 | |
---|
61 | AC_ARG_WITH([rabbitmq], |
---|
62 | [AS_HELP_STRING([--with-rabbittmq], [asynchronous requests management with rabbitmq ])], |
---|
63 | [AMQP="-DAMQP"], [AMQP=""]) |
---|
64 | |
---|
65 | if test -z "$AMQP" |
---|
66 | then |
---|
67 | RABBITMQ_LDFLAGS="" |
---|
68 | RABBITMQ_CPPFLAGS="" |
---|
69 | RABBITMQ_FILE="" |
---|
70 | else |
---|
71 | AC_CHECK_LIB([rabbitmq], [main]) |
---|
72 | RABBITMQ_LDFLAGS=`pkg-config --libs librabbitmq` |
---|
73 | RABBITMQ_CPPFLAGS="-DAMQP" `pkg-config --cflags librabbitmq` |
---|
74 | RABBITMQ_FILE="zoo_amqp.o" |
---|
75 | RELY_ON_DB="-DRELY_ON_DB" |
---|
76 | AC_SUBST([RELY_ON_DB]) |
---|
77 | fi |
---|
78 | AC_SUBST([RABBITMQ_LDFLAGS]) |
---|
79 | AC_SUBST([RABBITMQ_CPPFLAGS]) |
---|
80 | AC_SUBST([RABBITMQ_FILE]) |
---|
81 | |
---|
82 | # =========================================================================== |
---|
83 | # Detect if libyaml is available |
---|
84 | # =========================================================================== |
---|
85 | |
---|
86 | AC_ARG_WITH([yaml], |
---|
87 | [AS_HELP_STRING([--with-yaml=PATH], [Specifies an alternative location for the yaml library])], |
---|
88 | [YAMLPATH="$withval"], [YAMLPATH=""]) |
---|
89 | |
---|
90 | if test -z "$YAMLPATH" |
---|
91 | then |
---|
92 | YAML_LDFLAGS="" |
---|
93 | YAML_CPPFLAGS="" |
---|
94 | YAML_FILE="" |
---|
95 | YAML_FILE1="" |
---|
96 | else |
---|
97 | |
---|
98 | # Extract the linker and include flags |
---|
99 | YAML_LDFLAGS="-L$YAMLPATH/lib -lyaml" |
---|
100 | YAML_CPPFLAGS="-I$YAMLPATH/include -DYAML" |
---|
101 | YAML_FILE="service_yaml.o" |
---|
102 | YAML_FILE1="zcfg2yaml" |
---|
103 | |
---|
104 | # Check headers file |
---|
105 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
106 | CPPFLAGS="$YAML_CPPFLAGS" |
---|
107 | LIBS_SAVE="$LIBS" |
---|
108 | LIBS="$YAML_LDFLAGS" |
---|
109 | AC_CHECK_LIB([yaml], [yaml_parser_initialize,yaml_parser_set_input_file,yaml_parser_scan]) |
---|
110 | AC_CHECK_HEADERS([yaml.h], |
---|
111 | [], [AC_MSG_ERROR([could not find headers include related to YAML])]) |
---|
112 | LIBS="$LIBS_SAVE" |
---|
113 | fi |
---|
114 | AC_SUBST([YAML_CPPFLAGS]) |
---|
115 | AC_SUBST([YAML_LDFLAGS]) |
---|
116 | AC_SUBST([YAML_FILE]) |
---|
117 | AC_SUBST([YAML_FILE1]) |
---|
118 | |
---|
119 | # =========================================================================== |
---|
120 | # Detect if fastcgi is available |
---|
121 | # =========================================================================== |
---|
122 | |
---|
123 | AC_ARG_WITH([fastcgi], |
---|
124 | [AS_HELP_STRING([--with-fastcgi=PATH], [Specifies an alternative location for the fastcgi library])], |
---|
125 | [FCGIPATH="$withval"], [FCGIPATH="/usr"]) |
---|
126 | |
---|
127 | # Extract the linker and include flags |
---|
128 | FCGI_LDFLAGS="-L$FCGIPATH/lib" |
---|
129 | FCGI_CPPFLAGS="-I$FCGIPATH/include" |
---|
130 | |
---|
131 | # Check headers file |
---|
132 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
133 | CPPFLAGS="$FCGI_CPPFLAGS" |
---|
134 | LIBS_SAVE="$LIBS" |
---|
135 | LIBS="$FCGI_LDFLAGS" |
---|
136 | AC_CHECK_LIB([fcgi], [main]) |
---|
137 | AC_CHECK_HEADERS([fcgi_stdio.h], |
---|
138 | [], [AC_MSG_ERROR([could not find headers include related to fastcgi])]) |
---|
139 | LIBS="$LIBS_SAVE" |
---|
140 | AC_SUBST([FCGI_CPPFLAGS]) |
---|
141 | AC_SUBST([FCGI_LDFLAGS]) |
---|
142 | |
---|
143 | # =========================================================================== |
---|
144 | # Detect if libxml2 is installed |
---|
145 | # =========================================================================== |
---|
146 | |
---|
147 | AC_ARG_WITH([xml2config], |
---|
148 | [AS_HELP_STRING([--with-xml2config=FILE], [Specifies an alternative xml2-config file])], |
---|
149 | [XML2CONFIG="$withval"], [XML2CONFIG=""]) |
---|
150 | |
---|
151 | if test "x$XML2CONFIG" = "x"; then |
---|
152 | # XML2CONFIG was not specified, so search within the current path |
---|
153 | AC_PATH_PROG([XML2CONFIG], [xml2-config]) |
---|
154 | |
---|
155 | # If we couldn't find xml2-config, display a warning |
---|
156 | if test "x$XML2CONFIG" = "x"; then |
---|
157 | AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.]) |
---|
158 | fi |
---|
159 | else |
---|
160 | # XML2CONFIG was specified; display a message to the user |
---|
161 | if test "x$XML2CONFIG" = "xyes"; then |
---|
162 | AC_MSG_ERROR([you must Specifies a parameter to --with-xml2config, e.g. --with-xml2config=/path/to/xml2-config]) |
---|
163 | else |
---|
164 | if test -f $XML2CONFIG; then |
---|
165 | AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG]) |
---|
166 | else |
---|
167 | AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist]) |
---|
168 | fi |
---|
169 | fi |
---|
170 | fi |
---|
171 | |
---|
172 | # Extract the linker and include flags |
---|
173 | XML2_LDFLAGS=`$XML2CONFIG --libs` |
---|
174 | XML2_CPPFLAGS=`$XML2CONFIG --cflags` |
---|
175 | |
---|
176 | # Check headers file |
---|
177 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
178 | CPPFLAGS="$XML2_CPPFLAGS" |
---|
179 | AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h], |
---|
180 | [], [AC_MSG_ERROR([could not find headers include related to libxml2])]) |
---|
181 | |
---|
182 | # Ensure we can link against libxml2 |
---|
183 | LIBS_SAVE="$LIBS" |
---|
184 | LIBS="$XML2_LDFLAGS" |
---|
185 | AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], []) |
---|
186 | |
---|
187 | AC_SUBST([XML2_CPPFLAGS]) |
---|
188 | AC_SUBST([XML2_LDFLAGS]) |
---|
189 | LIBS="$LIBS_SAVE" |
---|
190 | |
---|
191 | |
---|
192 | GLIB_LDFLAGS=`pkg-config --libs glib-2.0` |
---|
193 | GLIB_CPPFLAGS=`pkg-config --cflags glib-2.0` |
---|
194 | |
---|
195 | AC_SUBST([GLIB_CPPFLAGS]) |
---|
196 | AC_SUBST([GLIB_LDFLAGS]) |
---|
197 | |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | # =========================================================================== |
---|
202 | # Detect if libxslt is installed |
---|
203 | # =========================================================================== |
---|
204 | |
---|
205 | AC_ARG_WITH([xsltconfig], |
---|
206 | [AS_HELP_STRING([--with-xsltconfig=FILE], [Specifies an alternative xslt-config file])], |
---|
207 | [XSLTCONFIG="$withval"], [XSLTCONFIG=""]) |
---|
208 | |
---|
209 | if test "x$XSLTCONFIG" = "x"; then |
---|
210 | # XSLTCONFIG was not specified, so search within the current path |
---|
211 | AC_PATH_PROG([XSLTCONFIG], [xslt-config]) |
---|
212 | |
---|
213 | # If we couldn't find xslt-config, display a warning |
---|
214 | if test "x$XSLTCONFIG" = "x"; then |
---|
215 | AC_MSG_ERROR([could not find xslt-config from libxslt within the current path. You may need to try re-running configure with a --with-xtltconfig parameter.]) |
---|
216 | fi |
---|
217 | else |
---|
218 | # XSLTCONFIG was specified; display a message to the user |
---|
219 | if test "x$XSLTCONFIG" = "xyes"; then |
---|
220 | AC_MSG_ERROR([you must Specifies a parameter to --with-xsltconfig, e.g. --with-xsltconfig=/path/to/xslt-config]) |
---|
221 | else |
---|
222 | if test -f $XSLTCONFIG; then |
---|
223 | AC_MSG_RESULT([Using user-specified xslt-config file: $XSLTCONFIG]) |
---|
224 | else |
---|
225 | AC_MSG_ERROR([the user-specified xslt-config file $XSLTCONFIG does not exist]) |
---|
226 | fi |
---|
227 | fi |
---|
228 | fi |
---|
229 | |
---|
230 | # Extract the linker and include flags |
---|
231 | XSLT_LDFLAGS=`$XSLTCONFIG --libs` |
---|
232 | XSLT_CPPFLAGS=`$XSLTCONFIG --cflags` |
---|
233 | |
---|
234 | # Check headers file |
---|
235 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
236 | CPPFLAGS="$XSLT_CPPFLAGS" |
---|
237 | AC_CHECK_HEADERS([libxslt/xslt.h libxslt/xsltInternals.h libxslt/transform.h libxslt/xsltutils.h], |
---|
238 | [], [AC_MSG_ERROR([could not find headers include related to libxlst])]) |
---|
239 | |
---|
240 | AC_SUBST([XSLT_CPPFLAGS]) |
---|
241 | AC_SUBST([XSLT_LDFLAGS]) |
---|
242 | |
---|
243 | #============================================================================ |
---|
244 | # Detect if gdal is installed |
---|
245 | #============================================================================ |
---|
246 | |
---|
247 | AC_ARG_WITH([gdal-config], |
---|
248 | [AS_HELP_STRING([--with-gdal-config=FILE], [Specifies an alternative gdal-config file])], |
---|
249 | [GDAL_CONFIG="$withval"], [GDAL_CONFIG=""]) |
---|
250 | if test -z $GDAL_CONFIG; |
---|
251 | then |
---|
252 | AC_PATH_PROG([GDAL_CONFIG], [gdal-config]) |
---|
253 | if test -z $GDAL_CONFIG; |
---|
254 | then |
---|
255 | AC_MSG_ERROR([could not find gdal-config from libgdal within the current path. You may need to try re-running configure with a --with-gdal-config parameter.]) |
---|
256 | fi |
---|
257 | |
---|
258 | else |
---|
259 | if test -f $GDAL_CONFIG; then |
---|
260 | AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG]) |
---|
261 | else |
---|
262 | AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist]) |
---|
263 | fi |
---|
264 | fi |
---|
265 | |
---|
266 | GDAL_CFLAGS="`$GDAL_CONFIG --cflags`" |
---|
267 | GDAL_LIBS="`$GDAL_CONFIG --libs`" |
---|
268 | |
---|
269 | AC_SUBST([GDAL_CFLAGS]) |
---|
270 | AC_SUBST([GDAL_LIBS]) |
---|
271 | |
---|
272 | # =========================================================================== |
---|
273 | # Detect if proj is installed |
---|
274 | # =========================================================================== |
---|
275 | |
---|
276 | AC_ARG_WITH([proj], |
---|
277 | [AS_HELP_STRING([--with-proj=PATH], [Specifies an alternative location for PROJ4 setup])], |
---|
278 | [PROJPATH="$withval"], [PROJPATH=""]) |
---|
279 | |
---|
280 | # Extract the linker and include flags |
---|
281 | PROJ_LDFLAGS="-L$PROJPATH/lib" |
---|
282 | PROJ_CPPFLAGS="-I$PROJPATH/include" |
---|
283 | |
---|
284 | # Check headers file |
---|
285 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
286 | CPPFLAGS="$PROJ_CPPFLAGS" |
---|
287 | AC_CHECK_HEADERS([proj_api.h], |
---|
288 | [], [AC_MSG_ERROR([could not find headers include related to PROJ4])]) |
---|
289 | |
---|
290 | AC_SUBST([PROJ_CPPFLAGS]) |
---|
291 | AC_SUBST([PROJ_LDFLAGS]) |
---|
292 | |
---|
293 | # =========================================================================== |
---|
294 | # Detect if libgeos is installed |
---|
295 | # =========================================================================== |
---|
296 | |
---|
297 | AC_ARG_WITH([geosconfig], |
---|
298 | [AS_HELP_STRING([--with-geosconfig=FILE], [Specifies an alternative geos-config file])], |
---|
299 | [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) |
---|
300 | |
---|
301 | if test "x$GEOSCONFIG" = "x"; then |
---|
302 | # GEOSCONFIG was not specified, so search within the current path |
---|
303 | AC_PATH_PROG([GEOSCONFIG], [geos-config]) |
---|
304 | |
---|
305 | # If we couldn't find geos-config, display a warning |
---|
306 | if test "x$GEOSCONFIG" = "x"; then |
---|
307 | AC_MSG_WARN([could not find geos-config from libgeos within the current path. You may need to try re-running configure with a --with-geosconfig parameter.]) |
---|
308 | fi |
---|
309 | else |
---|
310 | # GEOSCONFIG was specified; display a message to the user |
---|
311 | if test "x$GEOSCONFIG" = "xyes"; then |
---|
312 | AC_MSG_WARN([you must Specifies a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config]) |
---|
313 | else |
---|
314 | if test -f $GEOSCONFIG; then |
---|
315 | AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG]) |
---|
316 | else |
---|
317 | AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist]) |
---|
318 | fi |
---|
319 | fi |
---|
320 | fi |
---|
321 | |
---|
322 | GEOS_LDFLAGS=`$GEOSCONFIG --libs` |
---|
323 | GEOS_CPPFLAGS=`$GEOSCONFIG --cflags` |
---|
324 | |
---|
325 | # Check headers file |
---|
326 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
327 | CPPFLAGS="$GEOS_CPPFLAGS" |
---|
328 | AC_CHECK_HEADERS([geos_c.h], |
---|
329 | [], [AC_MSG_WARN([could not find headers include related to libgeos])]) |
---|
330 | |
---|
331 | AC_SUBST([GEOS_CPPFLAGS]) |
---|
332 | AC_SUBST([GEOS_LDFLAGS]) |
---|
333 | |
---|
334 | |
---|
335 | # =========================================================================== |
---|
336 | # Detect if cgal is installed |
---|
337 | # =========================================================================== |
---|
338 | |
---|
339 | AC_ARG_WITH([cgal], |
---|
340 | [AS_HELP_STRING([--with-cgal=PATH], [Specifies an alternative location for CGAL setup])], |
---|
341 | [CGALPATH="$withval"], [CGALPATH="/usr"]) |
---|
342 | |
---|
343 | |
---|
344 | # Check headers file |
---|
345 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
346 | CPPFLAGS="$CGAL_CPPFLAGS" |
---|
347 | AC_CHECK_HEADERS([CGAL/Delaunay_triangulation_2.h], |
---|
348 | [], [AC_MSG_WARN([could not find headers include related to libCGAL])]) |
---|
349 | |
---|
350 | # Extract the linker and include flags |
---|
351 | CGAL_LDFLAGS="-L$CGALPATH/lib" |
---|
352 | CGAL_CPPFLAGS="-I$CGALPATH/include" |
---|
353 | |
---|
354 | |
---|
355 | AC_SUBST([CGAL_CPPFLAGS]) |
---|
356 | AC_SUBST([CGAL_LDFLAGS]) |
---|
357 | #============================================================================ |
---|
358 | # Detect if mapserver is installed |
---|
359 | #============================================================================ |
---|
360 | |
---|
361 | AC_ARG_WITH([mapserver], |
---|
362 | [AS_HELP_STRING([--with-mapserver=PATH], [Specifies the path for MapServer compiled source tree])], |
---|
363 | [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""]) |
---|
364 | |
---|
365 | if test -z $MS_SRC_PATH; |
---|
366 | then |
---|
367 | MS_CPPFLAGS="" |
---|
368 | MS_LDFLAGS="" |
---|
369 | else |
---|
370 | if test "x$MS_SRC_PATH" = "xmacos"; |
---|
371 | then |
---|
372 | MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl" |
---|
373 | MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver " |
---|
374 | AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree]) |
---|
375 | AC_MSG_RESULT([Using MacOS X Framework for MapServer]) |
---|
376 | else |
---|
377 | if test -d $MS_SRC_PATH; then |
---|
378 | MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`" |
---|
379 | MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH " |
---|
380 | |
---|
381 | AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH]) |
---|
382 | else |
---|
383 | AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist]) |
---|
384 | fi |
---|
385 | fi |
---|
386 | MS_FILE="service_internal_ms.o" |
---|
387 | fi |
---|
388 | |
---|
389 | MS_CFLAGS="$MS_CPPFLAGS" |
---|
390 | MS_LIBS="$MS_LDFLAGS" |
---|
391 | |
---|
392 | AC_SUBST([MS_CFLAGS]) |
---|
393 | AC_SUBST([MS_LIBS]) |
---|
394 | AC_SUBST([MS_FILE]) |
---|
395 | |
---|
396 | # =========================================================================== |
---|
397 | # Detect if python is installed |
---|
398 | # =========================================================================== |
---|
399 | |
---|
400 | AC_ARG_WITH([python], |
---|
401 | [AS_HELP_STRING([--with-python=PATH], [To enable python support or Specifies an alternative directory for python installation, disabled by default])], |
---|
402 | [PYTHON_PATH="$withval"; PYTHON_ENABLED="-DUSE_PYTHON"], [PYTHON_ENABLED=""]) |
---|
403 | |
---|
404 | AC_ARG_WITH([pyvers], |
---|
405 | [AS_HELP_STRING([--with-pyvers=NUM], [To use a specific python version])], |
---|
406 | [PYTHON_VERS="$withval"], [PYTHON_VERS=""]) |
---|
407 | |
---|
408 | |
---|
409 | if test -z "$PYTHON_ENABLED" |
---|
410 | then |
---|
411 | PYTHON_FILE="" |
---|
412 | else |
---|
413 | PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config" |
---|
414 | PYTHON_FILE="service_internal_python.o" |
---|
415 | if test "$PYTHON_PATH" = "yes" |
---|
416 | then |
---|
417 | # PHP was not specified, so search within the current path |
---|
418 | PYTHONCFG_PATH=`which python${PYTHON_VERS}-config` |
---|
419 | if test -z "${PYTHONCFG_PATH}" ; then |
---|
420 | AC_PATH_PROG([PYTHONCONFIG], [python-config-${PYTHON_VERS}]) |
---|
421 | else |
---|
422 | AC_PATH_PROG([PYTHONCONFIG], [python${PYTHON_VERS}-config]) |
---|
423 | fi |
---|
424 | else |
---|
425 | PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config" |
---|
426 | fi |
---|
427 | |
---|
428 | # Extract the linker and include flags |
---|
429 | PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags` |
---|
430 | PYTHON_CPPFLAGS=`$PYTHONCONFIG --includes` |
---|
431 | |
---|
432 | # Check headers file |
---|
433 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
434 | CPPFLAGS="$PYTHON_CPPFLAGS" |
---|
435 | AC_CHECK_HEADERS([Python.h], |
---|
436 | [], [AC_MSG_ERROR([could not find headers include related to libpython])]) |
---|
437 | |
---|
438 | # Ensure we can link against libphp |
---|
439 | LIBS_SAVE="$LIBS" |
---|
440 | LIBS="$PYTHON_LDFLAGS" |
---|
441 | #PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'` |
---|
442 | #PY_LIB=`$PYTHONCONFIG --libs` |
---|
443 | #AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) |
---|
444 | AC_SUBST([PYTHON_CPPFLAGS]) |
---|
445 | AC_SUBST([PYTHON_LDFLAGS]) |
---|
446 | LIBS="$LIBS_SAVE" |
---|
447 | fi |
---|
448 | |
---|
449 | AC_SUBST([PYTHON_ENABLED]) |
---|
450 | AC_SUBST([PYTHON_FILE]) |
---|
451 | |
---|
452 | # =========================================================================== |
---|
453 | # Detect if spidermonkey is installed |
---|
454 | # =========================================================================== |
---|
455 | |
---|
456 | AC_ARG_WITH([js], |
---|
457 | [AS_HELP_STRING([--with-js=PATH], [Specifies --with-js=path-to-js to enable js support, specify --with-js on linux debian like, js support is disabled by default ])], |
---|
458 | [JSHOME="$withval";JS_ENABLED="-DUSE_JS"], [JS_ENABLED=""]) |
---|
459 | |
---|
460 | if test -z "$JS_ENABLED" |
---|
461 | then |
---|
462 | JS_FILE="" |
---|
463 | else |
---|
464 | JS_FILE="service_internal_js.o" |
---|
465 | if test "$JSHOME" = "yes" |
---|
466 | then |
---|
467 | |
---|
468 | #on teste si on est sous debian like |
---|
469 | if test -f "/usr/bin/dpkg" |
---|
470 | then |
---|
471 | if test -n "`dpkg -l | grep libmozjs185-dev`" |
---|
472 | then |
---|
473 | JS_CPPFLAGS="-I/usr/include/js/" |
---|
474 | JS_LDFLAGS="-L/usr/lib -lmozjs185 -lm" |
---|
475 | JS_LIB="mozjs185" |
---|
476 | else |
---|
477 | XUL_VERSION="`dpkg -l | grep xulrunner | grep dev | head -1| awk '{print $3;}' | cut -d'+' -f1`" |
---|
478 | if test -n "$XUL_VERSION" |
---|
479 | then |
---|
480 | JS_CPPFLAGS="-I/usr/include/xulrunner-$XUL_VERSION" |
---|
481 | JS_LDFLAGS="-L/usr/lib/xulrunner-$XUL_VERSION -lmozjs -lm" |
---|
482 | JS_LIB="mozjs" |
---|
483 | else |
---|
484 | AC_MSG_ERROR([You must install libmozjs185-dev or xulrunner-dev ]) |
---|
485 | fi |
---|
486 | fi |
---|
487 | else |
---|
488 | AC_MSG_ERROR([You must specify your custom install of libmozjs185]) |
---|
489 | fi |
---|
490 | else |
---|
491 | JS_CPPFLAGS="-I$JSHOME/include/js/" |
---|
492 | JS_LDFLAGS="-L$JSHOME/lib -lmozjs185 -lm" |
---|
493 | JS_LIB="mozjs185" |
---|
494 | |
---|
495 | fi |
---|
496 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
497 | CPPFLAGS="$JS_CPPFLAGS" |
---|
498 | AC_LANG_PUSH([C++]) |
---|
499 | AC_CHECK_HEADERS([jsapi.h], |
---|
500 | [], [AC_MSG_ERROR([could not find headers include related to libjs])]) |
---|
501 | |
---|
502 | AC_LANG_POP([C++]) |
---|
503 | LIBS_SAVE="$LIBS" |
---|
504 | LIBS="$JS_LDFLAGS" |
---|
505 | |
---|
506 | AC_CHECK_LIB([$JS_LIB], [JS_CompileFile,JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], []) |
---|
507 | LIBS="$LIBS_SAVE" |
---|
508 | |
---|
509 | AC_SUBST([JS_CPPFLAGS]) |
---|
510 | AC_SUBST([JS_LDFLAGS]) |
---|
511 | fi |
---|
512 | |
---|
513 | AC_SUBST([JS_ENABLED]) |
---|
514 | AC_SUBST([JS_FILE]) |
---|
515 | |
---|
516 | # =========================================================================== |
---|
517 | # Detect if php is installed |
---|
518 | # =========================================================================== |
---|
519 | |
---|
520 | AC_ARG_WITH([php], |
---|
521 | [AS_HELP_STRING([--with-php=PATH], [To enable php support or specify an alternative directory for php installation, disabled by default])], |
---|
522 | [PHP_PATH="$withval"; PHP_ENABLED="-DUSE_PHP"], [PHP_ENABLED=""]) |
---|
523 | |
---|
524 | |
---|
525 | if test -z "$PHP_ENABLED" |
---|
526 | then |
---|
527 | PHP_FILE="" |
---|
528 | else |
---|
529 | PHPCONFIG="$PHP_PATH/bin/php-config" |
---|
530 | PHP_FILE="service_internal_php.o" |
---|
531 | if test "$PHP_PATH" = "yes" |
---|
532 | then |
---|
533 | # PHP was not specified, so search within the current path |
---|
534 | AC_PATH_PROG([PHPCONFIG], [php-config]) |
---|
535 | else |
---|
536 | PHPCONFIG="$PHP_PATH/bin/php-config" |
---|
537 | fi |
---|
538 | |
---|
539 | # Extract the linker and include flags |
---|
540 | PHP_LDFLAGS="-L/`$PHPCONFIG --prefix`/lib -lphp5" |
---|
541 | PHP_CPPFLAGS=`$PHPCONFIG --includes` |
---|
542 | |
---|
543 | # Check headers file |
---|
544 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
545 | CPPFLAGS="$PHP_CPPFLAGS" |
---|
546 | AC_CHECK_HEADERS([sapi/embed/php_embed.h], |
---|
547 | [], [AC_MSG_ERROR([could not find headers include related to libphp])]) |
---|
548 | |
---|
549 | # Ensure we can link against libphp |
---|
550 | LIBS_SAVE="$LIBS" |
---|
551 | LIBS="$PHP_LDFLAGS" |
---|
552 | # Shouldn't we get php here rather than php5 :) ?? |
---|
553 | AC_CHECK_LIB([php5], [call_user_function], [], [AC_MSG_ERROR([could not find libphp])], []) |
---|
554 | LIBS="$LIBS_SAVE" |
---|
555 | AC_SUBST([PHP_CPPFLAGS]) |
---|
556 | AC_SUBST([PHP_LDFLAGS]) |
---|
557 | fi |
---|
558 | |
---|
559 | AC_SUBST([PHP_ENABLED]) |
---|
560 | AC_SUBST([PHP_FILE]) |
---|
561 | |
---|
562 | # =========================================================================== |
---|
563 | # Detect if java is installed |
---|
564 | # =========================================================================== |
---|
565 | |
---|
566 | AC_ARG_WITH([java], |
---|
567 | [AS_HELP_STRING([--with-java=PATH], [To enable java support, specify a JDK_HOME, disabled by default])], |
---|
568 | [JDKHOME="$withval"; JAVA_ENABLED="-DUSE_JAVA"], [JAVA_ENABLED=""]) |
---|
569 | |
---|
570 | if test -z "$JAVA_ENABLED" |
---|
571 | then |
---|
572 | JAVA_FILE="" |
---|
573 | else |
---|
574 | JAVA_FILE="service_internal_java.o" |
---|
575 | if test "x$JDKHOME" = "x"; |
---|
576 | then |
---|
577 | AC_MSG_ERROR([could not find java installation path within the current path. You may need to try re-running configure with a --with-java parameter.]) |
---|
578 | fi # JAVA was specified; display a message to the user |
---|
579 | if test "x$JDKHOME" = "xyes"; |
---|
580 | then |
---|
581 | AC_MSG_ERROR([you must specify a parameter to --with-java, e.g. --with-java=/path/to/java]) |
---|
582 | fi |
---|
583 | |
---|
584 | # Extract the linker and include flags |
---|
585 | if test "x$JDKHOME" = "xmacos"; |
---|
586 | then |
---|
587 | JAVA_LDFLAGS="-framework JavaVM" |
---|
588 | JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" |
---|
589 | else |
---|
590 | if test -d "$JDKHOME/jre/lib/i386"; |
---|
591 | then |
---|
592 | JAVA_LDFLAGS="-L$JDKHOME/jre/lib/i386/server/ -ljvm -lpthread" |
---|
593 | JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" |
---|
594 | else |
---|
595 | JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/server/ -ljvm -lpthread" |
---|
596 | JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" |
---|
597 | fi |
---|
598 | fi |
---|
599 | |
---|
600 | # Check headers file (second time we check that in fact) |
---|
601 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
602 | CPPFLAGS="$JAVA_CPPFLAGS" |
---|
603 | AC_CHECK_HEADERS([jni.h], |
---|
604 | [], [AC_MSG_ERROR([could not find jni.h file])]) |
---|
605 | |
---|
606 | # Ensure we can link against libjava |
---|
607 | LIBS_SAVE="$LIBS" |
---|
608 | LIBS="$JAVA_LDFLAGS" |
---|
609 | if test "x$JDKHOME" != "xmacos"; |
---|
610 | then |
---|
611 | AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjvm])], []) |
---|
612 | fi |
---|
613 | LIBS="$LIBS_SAVE" |
---|
614 | |
---|
615 | AC_SUBST([JAVA_CPPFLAGS]) |
---|
616 | AC_SUBST([JAVA_LDFLAGS]) |
---|
617 | fi |
---|
618 | |
---|
619 | AC_SUBST([JAVA_ENABLED]) |
---|
620 | AC_SUBST([JAVA_FILE]) |
---|
621 | |
---|
622 | |
---|
623 | # =========================================================================== |
---|
624 | # Detect if json-c is available |
---|
625 | # =========================================================================== |
---|
626 | |
---|
627 | AC_CHECK_LIB([json-c], [main]) |
---|
628 | JSON_LDFLAGS=`pkg-config --libs json-c` |
---|
629 | JSON_CPPFLAGS=`pkg-config --cflags json-c` |
---|
630 | |
---|
631 | AC_SUBST([JSON_LDFLAGS]) |
---|
632 | AC_SUBST([JSON_CPPFLAGS]) |
---|
633 | |
---|
634 | |
---|
635 | # =========================================================================== |
---|
636 | # Detect if ruby is installed |
---|
637 | # =========================================================================== |
---|
638 | AC_ARG_WITH([ruby], |
---|
639 | [AS_HELP_STRING([--with-ruby=PATH], [To enable ruby support or specify an alternative directory for ruby installation, disabled by default])], |
---|
640 | [RUBY_PATH="$withval"; RUBY_ENABLED="-DUSE_RUBY"], [RUBY_ENABLED=""]) |
---|
641 | |
---|
642 | AC_ARG_WITH([rvers], |
---|
643 | [AS_HELP_STRING([--with-rvers=NUM], [To use a specific ruby version])], |
---|
644 | [RUBY_VERS="$withval"], [RUBY_VERS=""]) |
---|
645 | |
---|
646 | |
---|
647 | if test -z "$RUBY_ENABLED" |
---|
648 | then |
---|
649 | RUBY_FILE="" |
---|
650 | else |
---|
651 | RUBY_FILE="service_internal_ruby.o" |
---|
652 | |
---|
653 | # Extract the linker and include flags |
---|
654 | RUBY_LDFLAGS="-lruby" |
---|
655 | RUBY_CPPFLAGS="-I$RUBY_PATH -I$RUBY_PATH/x86_64-darwin13.0/ -DZRUBY_VERSION=$RUBY_VERS" |
---|
656 | |
---|
657 | # Check headers file |
---|
658 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
659 | CPPFLAGS="$RUBY_CPPFLAGS" |
---|
660 | AC_CHECK_HEADERS([ruby.h], |
---|
661 | [], [AC_MSG_ERROR([could not find headers include related to libruby])]) |
---|
662 | |
---|
663 | # Ensure we can link against libphp |
---|
664 | LIBS_SAVE="$LIBS" |
---|
665 | LIBS="$RUBY_LDFLAGS" |
---|
666 | # AC_CHECK_LIB([lruby], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) |
---|
667 | LIBS="$LIBS_SAVE" |
---|
668 | AC_SUBST([RUBY_CPPFLAGS]) |
---|
669 | AC_SUBST([RUBY_LDFLAGS]) |
---|
670 | fi |
---|
671 | |
---|
672 | AC_SUBST([RUBY_ENABLED]) |
---|
673 | AC_SUBST([RUBY_FILE]) |
---|
674 | |
---|
675 | # =========================================================================== |
---|
676 | # Detect if perl is installed |
---|
677 | # =========================================================================== |
---|
678 | |
---|
679 | AC_ARG_WITH([perl], |
---|
680 | [AS_HELP_STRING([--with-perl=PATH], [To enable perl support or specify an alternative directory for perl installation, disabled by default])], |
---|
681 | [PERL_PATH="$withval"; PERL_ENABLED="-DUSE_PERL"], [PERL_ENABLED=""]) |
---|
682 | |
---|
683 | |
---|
684 | if test -z "$PERL_ENABLED" |
---|
685 | then |
---|
686 | PERL_FILE="" |
---|
687 | else |
---|
688 | PERL_FILE="service_internal_perl.o" |
---|
689 | if test "$PERL_PATH" = "yes" |
---|
690 | then |
---|
691 | # Perl was not specified, so search within the current path |
---|
692 | AC_PATH_PROG([PERLCONFIG], [perl]) |
---|
693 | else |
---|
694 | PERLCONFIG="$PERL_PATH/bin/perl" |
---|
695 | fi |
---|
696 | |
---|
697 | # Extract the linker and include flags |
---|
698 | PERL_LDFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ldopts` |
---|
699 | PERL_CPPFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ccopts` |
---|
700 | |
---|
701 | # Check headers file |
---|
702 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
703 | CPPFLAGS="$PERL_CPPFLAGS" |
---|
704 | AC_CHECK_HEADERS([EXTERN.h], |
---|
705 | [], [AC_MSG_ERROR([could not find headers include related to libperl])]) |
---|
706 | |
---|
707 | AC_SUBST([PERL_CPPFLAGS]) |
---|
708 | AC_SUBST([PERL_LDFLAGS]) |
---|
709 | fi |
---|
710 | |
---|
711 | AC_SUBST([PERL_ENABLED]) |
---|
712 | AC_SUBST([PERL_FILE]) |
---|
713 | |
---|
714 | # =========================================================================== |
---|
715 | # Detect if otb is available |
---|
716 | # =========================================================================== |
---|
717 | |
---|
718 | AC_ARG_WITH([itk], |
---|
719 | [AS_HELP_STRING([--with-itk=PATH], [Specifies an alternative location for the itk library])], |
---|
720 | [ITKPATH="$withval"], [ITKPATH=""]) |
---|
721 | |
---|
722 | AC_ARG_WITH([itk-version], |
---|
723 | [AS_HELP_STRING([--with-itk-version=VERSION], [Specifies an alternative version for the itk library])], |
---|
724 | [ITKVERS="$withval"], [ITKVERS=""]) |
---|
725 | |
---|
726 | AC_ARG_WITH([otb], |
---|
727 | [AS_HELP_STRING([--with-otb=PATH], [Specifies an alternative location for the otb library])], |
---|
728 | [OTBPATH="$withval"], [OTBPATH=""]) |
---|
729 | |
---|
730 | if test -z "$OTBPATH" |
---|
731 | then |
---|
732 | OTB_LDFLAGS="" |
---|
733 | OTB_CPPFLAGS="" |
---|
734 | OTB_FILE="" |
---|
735 | OTB_ENABLED="" |
---|
736 | else |
---|
737 | if test -z "$ITKVERS" |
---|
738 | then |
---|
739 | ITKVERS="4.5" |
---|
740 | fi |
---|
741 | OTB_ENABLED="-DUSE_OTB" |
---|
742 | OTB_LDFLAGS="-L$OTBPATH/lib/otb -lOTBIO -lOTBCommon -lOTBApplicationEngine -L$ITKPATH/lib -lITKBiasCorrection-$ITKVERS -lITKCommon-$ITKVERS -lITKIOImageBase-$ITKVERS -lITKKLMRegionGrowing-$ITKVERS -lITKLabelMap-$ITKVERS -lITKMesh-$ITKVERS -lITKMetaIO-$ITKVERS -lITKOptimizers-$ITKVERS -lITKPath-$ITKVERS -lITKPolynomials-$ITKVERS -lITKQuadEdgeMesh-$ITKVERS -lITKSpatialObjects-$ITKVERS -lITKStatistics-$ITKVERS -lITKVNLInstantiation-$ITKVERS -lITKWatersheds-$ITKVERS -litkNetlibSlatec-$ITKVERS -litksys-$ITKVERS -litkdouble-conversion-$ITKVERS -litkv3p_lsqr-$ITKVERS -litkv3p_netlib-$ITKVERS -litkvcl-$ITKVERS -litkvnl-$ITKVERS -litkvnl_algo-$ITKVERS -litkzlib-$ITKVERS" |
---|
743 | OTB_CPPFLAGS="-I$OTBPATH/include/otb/ApplicationEngine -I$OTBPATH/include/otb/Common -I$ITKPATH/include/ITK-$ITKVERS -I$OTBPATH/include/otb/Utilities/ITK -I$OTBPATH/include/otb/ -I$OTBPATH/include/otb/IO -I$OTBPATH/include/otb/UtilitiesAdapters/OssimAdapters -I$OTBPATH/include/otb/UtilitiesAdapters/CurlAdapters -I$OTBPATH/include/otb/Utilities/BGL -I$OTBPATH/include/otb/UtilitiesAdapters/ITKPendingPatches -I$OTBPATH/include/otb/Utilities/otbconfigfile $GDAL_CFLAGS" |
---|
744 | OTB_FILE="otbZooWatcher.o service_internal_otb.o" |
---|
745 | |
---|
746 | AC_LANG_PUSH([C++]) |
---|
747 | # Check headers file |
---|
748 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
749 | CPPFLAGS="$OTB_CPPFLAGS" |
---|
750 | LDFLAGS_SAVE="$LDFLAGS" |
---|
751 | LIBS="$LIBS_SAVE $OTB_LDFLAGS" |
---|
752 | AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h], |
---|
753 | [], [AC_MSG_ERROR([could not find header file $i related to OTB])]) |
---|
754 | AC_LANG_POP([C++]) |
---|
755 | AC_LANG(C++) |
---|
756 | LDFLAGS_SAVE="$LDFLAGS" |
---|
757 | LDFLAGS="$OTB_LDFLAGS" |
---|
758 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "otbWrapperApplication.h"],[std::vector<std::string> list = otb::Wrapwper::ApplicationRegistry::GetAvailableApplication();]])], |
---|
759 | [AC_MSG_RESULT([checking for GetAvailableApplication... yes])],[AC_MSG_ERROR([checking for GetAvailableApplication... failed])]) |
---|
760 | LDFLAGS="$LDFLAGS_SAVE" |
---|
761 | |
---|
762 | fi |
---|
763 | AC_SUBST([OTB_CPPFLAGS]) |
---|
764 | AC_SUBST([OTB_LDFLAGS]) |
---|
765 | AC_SUBST([OTB_FILE]) |
---|
766 | AC_SUBST([OTB_ENABLED]) |
---|
767 | |
---|
768 | # =========================================================================== |
---|
769 | # Detect if saga-gis is available |
---|
770 | # =========================================================================== |
---|
771 | |
---|
772 | AC_ARG_WITH([wx-config], |
---|
773 | [AS_HELP_STRING([--with-wx-config=PATH], [Specifies an alternative path for the wx-config tool])], |
---|
774 | [WXCFG="$withval"], [WXCFG=""]) |
---|
775 | |
---|
776 | AC_ARG_WITH([saga], |
---|
777 | [AS_HELP_STRING([--with-saga=PATH], [Specifies an alternative location for the SAGA-GIS library])], |
---|
778 | [SAGAPATH="$withval"], [SAGAPATH=""]) |
---|
779 | |
---|
780 | if test -z "$SAGAPATH" |
---|
781 | then |
---|
782 | SAGA_LDFLAGS="" |
---|
783 | SAGA_CPPFLAGS="" |
---|
784 | SAGA_FILE="" |
---|
785 | SAGA_ENABLED="" |
---|
786 | else |
---|
787 | if test -z "$WXCFG" ; then |
---|
788 | WXCFG="$(which wx-config)" |
---|
789 | fi |
---|
790 | if test "`$WXCFG --list | grep unicode`" == "" ; then |
---|
791 | AC_MSG_ERROR(SAGA requires a unicode build of wxGTK) |
---|
792 | fi |
---|
793 | WX_ISSUE="-D_WX_WXCRTVARARG_H_" |
---|
794 | SAGA_DEFS="-D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -DMODULE_LIBRARY_PATH=\\\"$SAGAPATH/lib/saga\\\"" |
---|
795 | SAGA_CPPFLAGS=" -fPIC -I$SAGAPATH/include/saga/saga_core/saga_api/ `$WXCFG --unicode=yes --static=no --cxxflags` -D_SAGA_UNICODE $SAGA_DEFS $WX_ISSUE" |
---|
796 | SAGA_LDFLAGS="-fPIC `$WXCFG --unicode=yes --static=no --libs` -lsaga_api" |
---|
797 | SAGA_ENABLED="-DUSE_SAGA" |
---|
798 | SAGA_FILE="service_internal_saga.o" |
---|
799 | |
---|
800 | AC_LANG_PUSH([C++]) |
---|
801 | # Check headers file |
---|
802 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
803 | CPPFLAGS="$SAGA_CPPFLAGS" |
---|
804 | LIBS_SAVE="$LIBS" |
---|
805 | LIBS="$SAGA_LDFLAGS" |
---|
806 | AC_CHECK_HEADERS([module_library.h], |
---|
807 | [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])]) |
---|
808 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "module_library.h"],[SG_Get_Module_Library_Manager();]])], |
---|
809 | [AC_MSG_RESULT([checking for SG_Get_Module_Library_Manager... yes])],[AC_MSG_ERROR([checking for SG_Get_Module_Library_Manager... failed])]) |
---|
810 | LIBS="$LIBS_SAVE" |
---|
811 | AC_LANG_POP([C++]) |
---|
812 | fi |
---|
813 | AC_SUBST([SAGA_CPPFLAGS]) |
---|
814 | AC_SUBST([SAGA_LDFLAGS]) |
---|
815 | AC_SUBST([SAGA_FILE]) |
---|
816 | AC_SUBST([SAGA_ENABLED]) |
---|
817 | |
---|
818 | AC_CONFIG_FILES([Makefile]) |
---|
819 | AC_CONFIG_FILES([ZOOMakefile.opts]) |
---|
820 | AC_OUTPUT |
---|