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