Changeset 640 for trunk/zoo-project/zoo-kernel/configure.ac
- Timestamp:
- May 28, 2015, 4:25:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/configure.ac
r637 r640 51 51 AC_SUBST([CGI_DIR]) 52 52 53 54 # =========================================================================== 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 53 359 # =========================================================================== 54 360 # Detect if python is installed … … 100 406 AC_SUBST([PYTHON_CPPFLAGS]) 101 407 AC_SUBST([PYTHON_LDFLAGS]) 408 LIBS="$LIBS_SAVE" 102 409 fi 103 410 … … 151 458 CPPFLAGS_SAVE="$CPPFLAGS" 152 459 CPPFLAGS="$JS_CPPFLAGS" 153 154 #AC_CHECK_HEADERS([jsapi.h],155 #[], [AC_MSG_ERROR([could not find headers include related to libjs])])156 157 460 AC_LANG_PUSH([C++]) 461 AC_CHECK_HEADERS([jsapi.h], 462 [], [AC_MSG_ERROR([could not find headers include related to libjs])]) 463 464 AC_LANG_POP([C++]) 158 465 LIBS_SAVE="$LIBS" 159 466 LIBS="$JS_LDFLAGS" 160 467 161 468 AC_CHECK_LIB([$JS_LIB], [JS_CompileFile,JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], []) 162 469 LIBS="$LIBS_SAVE" 470 163 471 AC_SUBST([JS_CPPFLAGS]) 164 472 AC_SUBST([JS_LDFLAGS]) … … 206 514 # Shouldn't we get php here rather than php5 :) ?? 207 515 AC_CHECK_LIB([php5], [call_user_function], [], [AC_MSG_ERROR([could not find libphp])], []) 516 LIBS="$LIBS_SAVE" 208 517 AC_SUBST([PHP_CPPFLAGS]) 209 518 AC_SUBST([PHP_LDFLAGS]) … … 264 573 AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjvm])], []) 265 574 fi 575 LIBS="$LIBS_SAVE" 266 576 267 577 AC_SUBST([JAVA_CPPFLAGS]) … … 304 614 LIBS="$RUBY_LDFLAGS" 305 615 # AC_CHECK_LIB([lruby], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) 616 LIBS="$LIBS_SAVE" 306 617 AC_SUBST([RUBY_CPPFLAGS]) 307 618 AC_SUBST([RUBY_LDFLAGS]) … … 387 698 CPPFLAGS="$OTB_CPPFLAGS" 388 699 LDFLAGS_SAVE="$LDFLAGS" 389 L DFLAGS="$OTB_LDFLAGS"700 LIBS="$LIBS_SAVE $OTB_LDFLAGS" 390 701 AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h], 391 702 [], [AC_MSG_ERROR([could not find header file $i related to OTB])]) 392 703 AC_LANG_POP([C++]) 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 393 711 fi 394 712 AC_SUBST([OTB_CPPFLAGS]) … … 435 753 LIBS_SAVE="$LIBS" 436 754 LIBS="$SAGA_LDFLAGS" 437 AC_MSG_RESULT(CPPFLAGS are $CPPFLAGS)438 755 AC_CHECK_HEADERS([module_library.h], 439 756 [], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])]) 440 LIBS_SAVE="$LIBS" 441 AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager]) 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" 442 760 AC_LANG_POP([C++]) 443 761 fi … … 447 765 AC_SUBST([SAGA_ENABLED]) 448 766 449 # ===========================================================================450 # Detect if libyaml is available451 # ===========================================================================452 453 AC_ARG_WITH([yaml],454 [AS_HELP_STRING([--with-yaml=PATH], [specify an alternative location for the yaml library])],455 [YAMLPATH="$withval"], [YAMLPATH=""])456 457 if test -z "$YAMLPATH"458 then459 YAML_LDFLAGS=""460 YAML_CPPFLAGS=""461 YAML_FILE=""462 YAML_FILE1=""463 else464 465 # Extract the linker and include flags466 YAML_LDFLAGS="-L$YAMLPATH/lib -lyaml"467 YAML_CPPFLAGS="-I$YAMLPATH/include -DYAML"468 YAML_FILE="service_yaml.o"469 YAML_FILE1="zcfg2yaml"470 471 # Check headers file472 CPPFLAGS_SAVE="$CPPFLAGS"473 CPPFLAGS="$YAML_CPPFLAGS"474 LIBS_SAVE="$LIBS"475 LIBS="$YAML_LDFLAGS"476 AC_CHECK_LIB([yaml], [yaml_parser_initialize,yaml_parser_set_input_file,yaml_parser_scan])477 AC_CHECK_HEADERS([yaml.h],478 [], [AC_MSG_ERROR([could not find headers include related to YAML])])479 LIBS="$LIBS_SAVE"480 fi481 AC_SUBST([YAML_CPPFLAGS])482 AC_SUBST([YAML_LDFLAGS])483 AC_SUBST([YAML_FILE])484 AC_SUBST([YAML_FILE1])485 486 # ===========================================================================487 # Detect if fastcgi is available488 # ===========================================================================489 490 AC_ARG_WITH([fastcgi],491 [AS_HELP_STRING([--with-fastcgi=PATH], [specify an alternative location for the fastcgi library])],492 [FCGIPATH="$withval"], [FCGIPATH="/usr"])493 494 # Extract the linker and include flags495 FCGI_LDFLAGS="-L$FCGIPATH/lib"496 FCGI_CPPFLAGS="-I$FCGIPATH/include"497 498 # Check headers file499 CPPFLAGS_SAVE="$CPPFLAGS"500 CPPFLAGS="$FCGI_CPPFLAGS"501 LIBS_SAVE="$LIBS"502 LIBS="$FCGI_LDFLAGS"503 AC_CHECK_LIB([fcgi], [main])504 AC_CHECK_HEADERS([fcgi_stdio.h],505 [], [AC_MSG_ERROR([could not find headers include related to fastcgi])])506 LIBS="$LIBS_SAVE"507 AC_SUBST([FCGI_CPPFLAGS])508 AC_SUBST([FCGI_LDFLAGS])509 510 511 # ===========================================================================512 # Detect if libxml2 is installed513 # ===========================================================================514 515 AC_ARG_WITH([xml2config],516 [AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])],517 [XML2CONFIG="$withval"], [XML2CONFIG=""])518 519 if test "x$XML2CONFIG" = "x"; then520 # XML2CONFIG was not specified, so search within the current path521 AC_PATH_PROG([XML2CONFIG], [xml2-config])522 523 # If we couldn't find xml2-config, display a warning524 if test "x$XML2CONFIG" = "x"; then525 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.])526 fi527 else528 # XML2CONFIG was specified; display a message to the user529 if test "x$XML2CONFIG" = "xyes"; then530 AC_MSG_ERROR([you must specify a parameter to --with-xml2config, e.g. --with-xml2config=/path/to/xml2-config])531 else532 if test -f $XML2CONFIG; then533 AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])534 else535 AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])536 fi537 fi538 fi539 540 # Extract the linker and include flags541 XML2_LDFLAGS=`$XML2CONFIG --libs`542 XML2_CPPFLAGS=`$XML2CONFIG --cflags`543 544 # Check headers file545 CPPFLAGS_SAVE="$CPPFLAGS"546 CPPFLAGS="$XML2_CPPFLAGS"547 AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h],548 [], [AC_MSG_ERROR([could not find headers include related to libxml2])])549 550 # Ensure we can link against libxml2551 LIBS_SAVE="$LIBS"552 LIBS="$XML2_LDFLAGS"553 AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], [])554 555 AC_SUBST([XML2_CPPFLAGS])556 AC_SUBST([XML2_LDFLAGS])557 558 # ===========================================================================559 # Detect if libxslt is installed560 # ===========================================================================561 562 AC_ARG_WITH([xsltconfig],563 [AS_HELP_STRING([--with-xsltconfig=FILE], [specify an alternative xslt-config file])],564 [XSLTCONFIG="$withval"], [XSLTCONFIG=""])565 566 if test "x$XSLTCONFIG" = "x"; then567 # XSLTCONFIG was not specified, so search within the current path568 AC_PATH_PROG([XSLTCONFIG], [xslt-config])569 570 # If we couldn't find xslt-config, display a warning571 if test "x$XSLTCONFIG" = "x"; then572 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.])573 fi574 else575 # XSLTCONFIG was specified; display a message to the user576 if test "x$XSLTCONFIG" = "xyes"; then577 AC_MSG_ERROR([you must specify a parameter to --with-xsltconfig, e.g. --with-xsltconfig=/path/to/xslt-config])578 else579 if test -f $XSLTCONFIG; then580 AC_MSG_RESULT([Using user-specified xslt-config file: $XSLTCONFIG])581 else582 AC_MSG_ERROR([the user-specified xslt-config file $XSLTCONFIG does not exist])583 fi584 fi585 fi586 587 # Extract the linker and include flags588 XSLT_LDFLAGS=`$XSLTCONFIG --libs`589 XSLT_CPPFLAGS=`$XSLTCONFIG --cflags`590 591 # Check headers file592 CPPFLAGS_SAVE="$CPPFLAGS"593 CPPFLAGS="$XSLT_CPPFLAGS"594 AC_CHECK_HEADERS([libxslt/xslt.h libxslt/xsltInternals.h libxslt/transform.h libxslt/xsltutils.h],595 [], [AC_MSG_ERROR([could not find headers include related to libxlst])])596 597 AC_SUBST([XSLT_CPPFLAGS])598 AC_SUBST([XSLT_LDFLAGS])599 600 #============================================================================601 # Detect if gdal is installed602 #============================================================================603 604 AC_ARG_WITH([gdal-config],605 [AS_HELP_STRING([--with-gdal-config=FILE], [specify an alternative gdal-config file])],606 [GDAL_CONFIG="$withval"], [GDAL_CONFIG=""])607 if test -z $GDAL_CONFIG;608 then609 AC_PATH_PROG([GDAL_CONFIG], [gdal-config])610 if test -z $GDAL_CONFIG;611 then612 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.])613 fi614 615 else616 if test -f $GDAL_CONFIG; then617 AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG])618 else619 AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist])620 fi621 fi622 623 GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"624 GDAL_LIBS="`$GDAL_CONFIG --libs`"625 626 AC_SUBST([GDAL_CFLAGS])627 AC_SUBST([GDAL_LIBS])628 629 # ===========================================================================630 # Detect if proj is installed631 # ===========================================================================632 633 AC_ARG_WITH([proj],634 [AS_HELP_STRING([--with-proj=PATH], [specify an alternative location for PROJ4 setup])],635 [PROJPATH="$withval"], [PROJPATH=""])636 637 # Extract the linker and include flags638 PROJ_LDFLAGS="-L$PROJPATH/lib"639 PROJ_CPPFLAGS="-I$PROJPATH/include"640 641 # Check headers file642 CPPFLAGS_SAVE="$CPPFLAGS"643 CPPFLAGS="$PROJ_CPPFLAGS"644 AC_CHECK_HEADERS([proj_api.h],645 [], [AC_MSG_ERROR([could not find headers include related to PROJ4])])646 647 AC_SUBST([PROJ_CPPFLAGS])648 AC_SUBST([PROJ_LDFLAGS])649 650 # ===========================================================================651 # Detect if libgeos is installed652 # ===========================================================================653 654 AC_ARG_WITH([geosconfig],655 [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])],656 [GEOSCONFIG="$withval"], [GEOSCONFIG=""])657 658 if test "x$GEOSCONFIG" = "x"; then659 # GEOSCONFIG was not specified, so search within the current path660 AC_PATH_PROG([GEOSCONFIG], [geos-config])661 662 # If we couldn't find geos-config, display a warning663 if test "x$GEOSCONFIG" = "x"; then664 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.])665 fi666 else667 # GEOSCONFIG was specified; display a message to the user668 if test "x$GEOSCONFIG" = "xyes"; then669 AC_MSG_WARN([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config])670 else671 if test -f $GEOSCONFIG; then672 AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG])673 else674 AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist])675 fi676 fi677 fi678 679 GEOS_LDFLAGS=`$GEOSCONFIG --libs`680 GEOS_CPPFLAGS=`$GEOSCONFIG --cflags`681 682 # Check headers file683 CPPFLAGS_SAVE="$CPPFLAGS"684 CPPFLAGS="$GEOS_CPPFLAGS"685 AC_CHECK_HEADERS([geos_c.h],686 [], [AC_MSG_WARN([could not find headers include related to libgeos])])687 688 AC_SUBST([GEOS_CPPFLAGS])689 AC_SUBST([GEOS_LDFLAGS])690 691 692 # ===========================================================================693 # Detect if cgal is installed694 # ===========================================================================695 696 AC_ARG_WITH([cgal],697 [AS_HELP_STRING([--with-cgal=PATH], [specify an alternative location for CGAL setup])],698 [CGALPATH="$withval"], [CGALPATH="/usr"])699 700 701 # Check headers file702 CPPFLAGS_SAVE="$CPPFLAGS"703 CPPFLAGS="$CGAL_CPPFLAGS"704 AC_CHECK_HEADERS([CGAL/Delaunay_triangulation_2.h],705 [], [AC_MSG_WARN([could not find headers include related to libCGAL])])706 707 # Extract the linker and include flags708 CGAL_LDFLAGS="-L$CGALPATH/lib"709 CGAL_CPPFLAGS="-I$CGALPATH/include"710 711 712 AC_SUBST([CGAL_CPPFLAGS])713 AC_SUBST([CGAL_LDFLAGS])714 #============================================================================715 # Detect if mapserver is installed716 #============================================================================717 718 AC_ARG_WITH([mapserver],719 [AS_HELP_STRING([--with-mapserver=PATH], [specify the path for MapServer compiled source tree])],720 [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""])721 722 if test -z $MS_SRC_PATH;723 then724 MS_CPPFLAGS=""725 MS_LDFLAGS=""726 else727 if test "x$MS_SRC_PATH" = "xmacos";728 then729 MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl"730 MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver "731 AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree])732 AC_MSG_RESULT([Using MacOS X Framework for MapServer])733 else734 if test -d $MS_SRC_PATH; then735 MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`"736 MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH "737 738 AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH])739 else740 AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist])741 fi742 fi743 MS_FILE="service_internal_ms.o"744 fi745 746 MS_CFLAGS="$MS_CPPFLAGS"747 MS_LIBS="$MS_LDFLAGS"748 749 AC_SUBST([MS_CFLAGS])750 AC_SUBST([MS_LIBS])751 AC_SUBST([MS_FILE])752 753 767 AC_CONFIG_FILES([Makefile]) 754 768 AC_CONFIG_FILES([ZOOMakefile.opts])
Note: See TracChangeset
for help on using the changeset viewer.