[439] | 1 | AC_INIT([ZOO Kernel], [1.3.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([fcgi], [main]) |
---|
| 17 | AC_CHECK_LIB([ssl], [main]) |
---|
| 18 | |
---|
| 19 | # Checks for header files. |
---|
| 20 | AC_FUNC_ALLOCA |
---|
| 21 | AC_CHECK_HEADERS([fcntl.h inttypes.h libintl.h malloc.h stddef.h stdlib.h string.h unistd.h]) |
---|
| 22 | |
---|
| 23 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 24 | AC_HEADER_STDBOOL |
---|
| 25 | AC_TYPE_INT16_T |
---|
| 26 | AC_TYPE_INT32_T |
---|
| 27 | AC_TYPE_INT8_T |
---|
| 28 | AC_TYPE_PID_T |
---|
| 29 | AC_TYPE_SIZE_T |
---|
| 30 | AC_TYPE_UINT16_T |
---|
| 31 | AC_TYPE_UINT32_T |
---|
| 32 | AC_TYPE_UINT8_T |
---|
| 33 | |
---|
| 34 | # Checks for library functions. |
---|
| 35 | AC_FUNC_FORK |
---|
| 36 | AC_FUNC_MALLOC |
---|
| 37 | AC_FUNC_REALLOC |
---|
| 38 | AC_CHECK_FUNCS([dup2 getcwd memset setenv strdup strstr]) |
---|
| 39 | |
---|
| 40 | #============================================================================ |
---|
| 41 | # Detect if gdal is installed |
---|
| 42 | #============================================================================ |
---|
| 43 | |
---|
| 44 | AC_ARG_WITH([gdal-config], |
---|
| 45 | [AS_HELP_STRING([--with-gdal-config=FILE], [specify an alternative gdal-config file])], |
---|
| 46 | [GDAL_CONFIG="$withval"], [GDAL_CONFIG=""]) |
---|
| 47 | if test -z $GDAL_CONFIG; |
---|
| 48 | then |
---|
| 49 | AC_PATH_PROG([GDAL_CONFIG], [gdal-config]) |
---|
| 50 | if test -z $GDAL_CONFIG; |
---|
| 51 | then |
---|
| 52 | 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.]) |
---|
| 53 | fi |
---|
| 54 | |
---|
| 55 | else |
---|
| 56 | if test -f $GDAL_CONFIG; then |
---|
| 57 | AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG]) |
---|
| 58 | else |
---|
| 59 | AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist]) |
---|
| 60 | fi |
---|
| 61 | fi |
---|
| 62 | |
---|
| 63 | GDAL_CFLAGS="`$GDAL_CONFIG --cflags`" |
---|
| 64 | GDAL_LIBS="`$GDAL_CONFIG --libs`" |
---|
| 65 | |
---|
| 66 | AC_SUBST([GDAL_CFLAGS]) |
---|
| 67 | AC_SUBST([GDAL_LIBS]) |
---|
| 68 | |
---|
| 69 | # =========================================================================== |
---|
| 70 | # Detect if libxml2 is installed |
---|
| 71 | # =========================================================================== |
---|
| 72 | |
---|
| 73 | AC_ARG_WITH([xml2config], |
---|
| 74 | [AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])], |
---|
| 75 | [XML2CONFIG="$withval"], [XML2CONFIG=""]) |
---|
| 76 | |
---|
| 77 | if test "x$XML2CONFIG" = "x"; then |
---|
| 78 | # XML2CONFIG was not specified, so search within the current path |
---|
| 79 | AC_PATH_PROG([XML2CONFIG], [xml2-config]) |
---|
| 80 | |
---|
| 81 | # If we couldn't find xml2-config, display a warning |
---|
| 82 | if test "x$XML2CONFIG" = "x"; then |
---|
| 83 | 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.]) |
---|
| 84 | fi |
---|
| 85 | else |
---|
| 86 | # XML2CONFIG was specified; display a message to the user |
---|
| 87 | if test "x$XML2CONFIG" = "xyes"; then |
---|
| 88 | AC_MSG_ERROR([you must specify a parameter to --with-xml2config, e.g. --with-xml2config=/path/to/xml2-config]) |
---|
| 89 | else |
---|
| 90 | if test -f $XML2CONFIG; then |
---|
| 91 | AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG]) |
---|
| 92 | else |
---|
| 93 | AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist]) |
---|
| 94 | fi |
---|
| 95 | fi |
---|
| 96 | fi |
---|
| 97 | |
---|
| 98 | # Extract the linker and include flags |
---|
| 99 | XML2_LDFLAGS=`$XML2CONFIG --libs` |
---|
| 100 | XML2_CPPFLAGS=`$XML2CONFIG --cflags` |
---|
| 101 | |
---|
| 102 | # Check headers file |
---|
| 103 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
| 104 | CPPFLAGS="$XML2_CPPFLAGS" |
---|
| 105 | AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h], |
---|
| 106 | [], [AC_MSG_ERROR([could not find headers include related to libxml2])]) |
---|
| 107 | |
---|
| 108 | # Ensure we can link against libxml2 |
---|
| 109 | LIBS_SAVE="$LIBS" |
---|
| 110 | LIBS="$XML2_LDFLAGS" |
---|
| 111 | AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], []) |
---|
| 112 | |
---|
| 113 | AC_SUBST([XML2_CPPFLAGS]) |
---|
| 114 | AC_SUBST([XML2_LDFLAGS]) |
---|
| 115 | |
---|
[297] | 116 | #============================================================================ |
---|
| 117 | # Detect if mapserver is installed |
---|
| 118 | #============================================================================ |
---|
| 119 | |
---|
| 120 | AC_ARG_WITH([mapserver], |
---|
| 121 | [AS_HELP_STRING([--with-mapserver=PATH], [specify the path for MapServer compiled source tree])], |
---|
| 122 | [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""]) |
---|
[305] | 123 | |
---|
[297] | 124 | if test -z $MS_SRC_PATH; |
---|
| 125 | then |
---|
[305] | 126 | MS_CPPFLAGS="" |
---|
| 127 | MS_LDFLAGS="" |
---|
[297] | 128 | else |
---|
| 129 | if test "x$MS_SRC_PATH" = "xmacos"; |
---|
| 130 | then |
---|
| 131 | MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl" |
---|
| 132 | MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver " |
---|
| 133 | AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree]) |
---|
| 134 | AC_MSG_RESULT([Using MacOS X Framework for MapServer]) |
---|
| 135 | else |
---|
| 136 | if test -d $MS_SRC_PATH; then |
---|
| 137 | MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`" |
---|
| 138 | MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH " |
---|
| 139 | |
---|
| 140 | AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH]) |
---|
| 141 | else |
---|
| 142 | AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist]) |
---|
| 143 | fi |
---|
| 144 | fi |
---|
| 145 | MS_FILE="service_internal_ms.o" |
---|
| 146 | fi |
---|
| 147 | |
---|
| 148 | MS_CFLAGS="$MS_CPPFLAGS" |
---|
| 149 | MS_LIBS="$MS_LDFLAGS" |
---|
| 150 | |
---|
| 151 | AC_SUBST([MS_CFLAGS]) |
---|
| 152 | AC_SUBST([MS_LIBS]) |
---|
| 153 | AC_SUBST([MS_FILE]) |
---|
| 154 | |
---|
[1] | 155 | # =========================================================================== |
---|
| 156 | # Detect if python is installed |
---|
| 157 | # =========================================================================== |
---|
| 158 | |
---|
| 159 | AC_ARG_WITH([python], |
---|
[208] | 160 | [AS_HELP_STRING([--with-python=PATH], [To enable python support or specify an alternative directory for python installation, disabled by default])], |
---|
[29] | 161 | [PYTHON_PATH="$withval"; PYTHON_ENABLED="-DUSE_PYTHON"], [PYTHON_ENABLED=""]) |
---|
[1] | 162 | |
---|
[285] | 163 | AC_ARG_WITH([pyvers], |
---|
| 164 | [AS_HELP_STRING([--with-pyvers=NUM], [To use a specific python version])], |
---|
[284] | 165 | [PYTHON_VERS="$withval"], [PYTHON_VERS=""]) |
---|
[1] | 166 | |
---|
[284] | 167 | |
---|
[29] | 168 | if test -z "$PYTHON_ENABLED" |
---|
| 169 | then |
---|
| 170 | PYTHON_FILE="" |
---|
[1] | 171 | else |
---|
[284] | 172 | PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config" |
---|
[29] | 173 | PYTHON_FILE="service_internal_python.o" |
---|
| 174 | if test "$PYTHON_PATH" = "yes" |
---|
| 175 | then |
---|
| 176 | # PHP was not specified, so search within the current path |
---|
[370] | 177 | PYTHONCFG_PATH=`which python${PYTHON_VERS}-config` |
---|
| 178 | if test -z "${PYTHONCFG_PATH}" ; then |
---|
| 179 | AC_PATH_PROG([PYTHONCONFIG], [python-config-${PYTHON_VERS}]) |
---|
| 180 | else |
---|
[284] | 181 | AC_PATH_PROG([PYTHONCONFIG], [python${PYTHON_VERS}-config]) |
---|
[370] | 182 | fi |
---|
[1] | 183 | else |
---|
[284] | 184 | PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config" |
---|
[1] | 185 | fi |
---|
| 186 | |
---|
[29] | 187 | # Extract the linker and include flags |
---|
| 188 | PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags` |
---|
| 189 | PYTHON_CPPFLAGS=`$PYTHONCONFIG --cflags` |
---|
[1] | 190 | |
---|
[29] | 191 | # Check headers file |
---|
| 192 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
| 193 | CPPFLAGS="$PYTHON_CPPFLAGS" |
---|
| 194 | AC_CHECK_HEADERS([Python.h], |
---|
[1] | 195 | [], [AC_MSG_ERROR([could not find headers include related to libpython])]) |
---|
| 196 | |
---|
[29] | 197 | # Ensure we can link against libphp |
---|
| 198 | LIBS_SAVE="$LIBS" |
---|
| 199 | LIBS="$PYTHON_LDFLAGS" |
---|
| 200 | PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'` |
---|
| 201 | AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) |
---|
| 202 | AC_SUBST([PYTHON_CPPFLAGS]) |
---|
| 203 | AC_SUBST([PYTHON_LDFLAGS]) |
---|
| 204 | fi |
---|
[1] | 205 | |
---|
[29] | 206 | AC_SUBST([PYTHON_ENABLED]) |
---|
| 207 | AC_SUBST([PYTHON_FILE]) |
---|
[1] | 208 | |
---|
| 209 | # =========================================================================== |
---|
| 210 | # Detect if php is installed |
---|
| 211 | # =========================================================================== |
---|
| 212 | |
---|
| 213 | AC_ARG_WITH([php], |
---|
[208] | 214 | [AS_HELP_STRING([--with-php=PATH], [To enable php support or specify an alternative directory for php installation, disabled by default])], |
---|
[28] | 215 | [PHP_PATH="$withval"; PHP_ENABLED="-DUSE_PHP"], [PHP_ENABLED=""]) |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | if test -z "$PHP_ENABLED" |
---|
| 219 | then |
---|
| 220 | PHP_FILE="" |
---|
| 221 | else |
---|
[1] | 222 | PHPCONFIG="$PHP_PATH/bin/php-config" |
---|
| 223 | PHP_FILE="service_internal_php.o" |
---|
[28] | 224 | if test "$PHP_PATH" = "yes" |
---|
[1] | 225 | then |
---|
[28] | 226 | # PHP was not specified, so search within the current path |
---|
| 227 | AC_PATH_PROG([PHPCONFIG], [php-config]) |
---|
[1] | 228 | else |
---|
[28] | 229 | PHPCONFIG="$PHP_PATH/bin/php-config" |
---|
[1] | 230 | fi |
---|
[28] | 231 | |
---|
[1] | 232 | # Extract the linker and include flags |
---|
| 233 | PHP_LDFLAGS="-L/`$PHPCONFIG --prefix`/lib -lphp5" |
---|
| 234 | PHP_CPPFLAGS=`$PHPCONFIG --includes` |
---|
| 235 | |
---|
| 236 | # Check headers file |
---|
| 237 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
| 238 | CPPFLAGS="$PHP_CPPFLAGS" |
---|
| 239 | AC_CHECK_HEADERS([sapi/embed/php_embed.h], |
---|
| 240 | [], [AC_MSG_ERROR([could not find headers include related to libphp])]) |
---|
| 241 | |
---|
| 242 | # Ensure we can link against libphp |
---|
| 243 | LIBS_SAVE="$LIBS" |
---|
| 244 | LIBS="$PHP_LDFLAGS" |
---|
| 245 | # Shouldn't we get php here rather than php5 :) ?? |
---|
| 246 | AC_CHECK_LIB([php5], [call_user_function], [], [AC_MSG_ERROR([could not find libphp])], []) |
---|
| 247 | AC_SUBST([PHP_CPPFLAGS]) |
---|
| 248 | AC_SUBST([PHP_LDFLAGS]) |
---|
| 249 | fi |
---|
| 250 | |
---|
| 251 | AC_SUBST([PHP_ENABLED]) |
---|
| 252 | AC_SUBST([PHP_FILE]) |
---|
| 253 | |
---|
| 254 | # =========================================================================== |
---|
[15] | 255 | # Detect if perl is installed |
---|
| 256 | # =========================================================================== |
---|
| 257 | |
---|
[28] | 258 | AC_ARG_WITH([perl], |
---|
[208] | 259 | [AS_HELP_STRING([--with-perl=PATH], [To enable perl support or specify an alternative directory for perl installation, disabled by default])], |
---|
[28] | 260 | [PERL_PATH="$withval"; PERL_ENABLED="-DUSE_PERL"], [PERL_ENABLED=""]) |
---|
[15] | 261 | |
---|
| 262 | |
---|
[28] | 263 | if test -z "$PERL_ENABLED" |
---|
| 264 | then |
---|
| 265 | PERL_FILE="" |
---|
| 266 | else |
---|
[112] | 267 | PERL_FILE="service_internal_perl.o" |
---|
[28] | 268 | if test "$PERL_PATH" = "yes" |
---|
[15] | 269 | then |
---|
[112] | 270 | # Perl was not specified, so search within the current path |
---|
[15] | 271 | AC_PATH_PROG([PERLCONFIG], [perl]) |
---|
| 272 | else |
---|
| 273 | PERLCONFIG="$PERL_PATH/bin/perl" |
---|
| 274 | fi |
---|
| 275 | |
---|
| 276 | # Extract the linker and include flags |
---|
| 277 | PERL_LDFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ldopts` |
---|
| 278 | PERL_CPPFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ccopts` |
---|
| 279 | |
---|
| 280 | # Check headers file |
---|
| 281 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
| 282 | CPPFLAGS="$PERL_CPPFLAGS" |
---|
| 283 | AC_CHECK_HEADERS([EXTERN.h], |
---|
| 284 | [], [AC_MSG_ERROR([could not find headers include related to libperl])]) |
---|
| 285 | |
---|
| 286 | AC_SUBST([PERL_CPPFLAGS]) |
---|
| 287 | AC_SUBST([PERL_LDFLAGS]) |
---|
| 288 | fi |
---|
| 289 | |
---|
| 290 | AC_SUBST([PERL_ENABLED]) |
---|
| 291 | AC_SUBST([PERL_FILE]) |
---|
| 292 | |
---|
| 293 | # =========================================================================== |
---|
[1] | 294 | # Detect if java is installed |
---|
| 295 | # =========================================================================== |
---|
| 296 | |
---|
| 297 | AC_ARG_WITH([java], |
---|
[208] | 298 | [AS_HELP_STRING([--with-java=PATH], [To enable java support, specify a JDK_HOME, disabled by default])], |
---|
[46] | 299 | [JDKHOME="$withval"; JAVA_ENABLED="-DUSE_JAVA"], [JAVA_ENABLED=""]) |
---|
[1] | 300 | |
---|
[46] | 301 | if test -z "$JAVA_ENABLED" |
---|
[1] | 302 | then |
---|
[46] | 303 | JAVA_FILE="" |
---|
| 304 | else |
---|
[1] | 305 | JAVA_FILE="service_internal_java.o" |
---|
| 306 | if test "x$JDKHOME" = "x"; |
---|
| 307 | then |
---|
[46] | 308 | 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.]) |
---|
| 309 | fi # JAVA was specified; display a message to the user |
---|
| 310 | if test "x$JDKHOME" = "xyes"; |
---|
| 311 | then |
---|
| 312 | AC_MSG_ERROR([you must specify a parameter to --with-java, e.g. --with-java=/path/to/java]) |
---|
[1] | 313 | fi |
---|
[77] | 314 | |
---|
[1] | 315 | # Extract the linker and include flags |
---|
[77] | 316 | if test "x$JDKHOME" = "xmacos"; |
---|
[1] | 317 | then |
---|
[77] | 318 | JAVA_LDFLAGS="-framework JavaVM" |
---|
[393] | 319 | JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" |
---|
[1] | 320 | else |
---|
[77] | 321 | if test -d "$JDKHOME/jre/lib/i386"; |
---|
| 322 | then |
---|
| 323 | JAVA_LDFLAGS="-L$JDKHOME/jre/lib/i386/client/ -ljvm -lpthread" |
---|
| 324 | JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" |
---|
| 325 | else |
---|
| 326 | JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/client/ -ljvm -lpthread" |
---|
| 327 | JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" |
---|
| 328 | fi |
---|
[1] | 329 | fi |
---|
| 330 | |
---|
| 331 | # Check headers file (second time we check that in fact) |
---|
| 332 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
| 333 | CPPFLAGS="$JAVA_CPPFLAGS" |
---|
| 334 | AC_CHECK_HEADERS([jni.h], |
---|
| 335 | [], [AC_MSG_ERROR([could not find headers include related to libjava])]) |
---|
| 336 | |
---|
| 337 | # Ensure we can link against libjava |
---|
| 338 | LIBS_SAVE="$LIBS" |
---|
| 339 | LIBS="$JAVA_LDFLAGS" |
---|
[77] | 340 | if test "x$JDKHOME" != "xmacos"; |
---|
| 341 | then |
---|
| 342 | AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjava])], []) |
---|
| 343 | fi |
---|
[1] | 344 | |
---|
| 345 | AC_SUBST([JAVA_CPPFLAGS]) |
---|
| 346 | AC_SUBST([JAVA_LDFLAGS]) |
---|
| 347 | fi |
---|
| 348 | |
---|
| 349 | AC_SUBST([JAVA_ENABLED]) |
---|
| 350 | AC_SUBST([JAVA_FILE]) |
---|
| 351 | |
---|
| 352 | # =========================================================================== |
---|
| 353 | # Detect if spidermonkey is installed |
---|
| 354 | # =========================================================================== |
---|
| 355 | |
---|
| 356 | AC_ARG_WITH([js], |
---|
[208] | 357 | [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 ])], |
---|
[46] | 358 | [JSHOME="$withval";JS_ENABLED="-DUSE_JS"], [JS_ENABLED=""]) |
---|
[3] | 359 | |
---|
[46] | 360 | if test -z "$JS_ENABLED" |
---|
[1] | 361 | then |
---|
[46] | 362 | JS_FILE="" |
---|
| 363 | else |
---|
[274] | 364 | JS_FILE="service_internal_js.o" |
---|
[46] | 365 | if test "$JSHOME" = "yes" |
---|
| 366 | then |
---|
[1] | 367 | |
---|
[46] | 368 | #on teste si on est sous debian like |
---|
| 369 | if test -f "/usr/bin/dpkg" |
---|
[3] | 370 | then |
---|
[274] | 371 | if test -n "`dpkg -l | grep libmozjs185-dev`" |
---|
[46] | 372 | then |
---|
[274] | 373 | JS_CPPFLAGS="-I/usr/include/js/" |
---|
| 374 | JS_LDFLAGS="-L/usr/lib -lmozjs185 -lm" |
---|
| 375 | JS_LIB="mozjs185" |
---|
[89] | 376 | else |
---|
[288] | 377 | XUL_VERSION="`dpkg -l | grep xulrunner | grep dev | head -1| awk '{print $3;}' | cut -d'+' -f1`" |
---|
[89] | 378 | if test -n "$XUL_VERSION" |
---|
| 379 | then |
---|
| 380 | JS_CPPFLAGS="-I/usr/include/xulrunner-$XUL_VERSION" |
---|
| 381 | JS_LDFLAGS="-L/usr/lib/xulrunner-$XUL_VERSION -lmozjs -lm" |
---|
| 382 | JS_LIB="mozjs" |
---|
| 383 | else |
---|
[274] | 384 | AC_MSG_ERROR([You must install libmozjs185-dev or xulrunner-dev ]) |
---|
[89] | 385 | fi |
---|
[46] | 386 | fi |
---|
[3] | 387 | else |
---|
[274] | 388 | AC_MSG_ERROR([You must specify your custom install of libmozjs185]) |
---|
[3] | 389 | fi |
---|
| 390 | else |
---|
[274] | 391 | JS_CPPFLAGS="-I$JSHOME/include/js/" |
---|
| 392 | JS_LDFLAGS="-L$JSHOME/lib -lmozjs185 -lm" |
---|
| 393 | JS_LIB="mozjs185" |
---|
[46] | 394 | |
---|
| 395 | fi |
---|
[1] | 396 | CPPFLAGS_SAVE="$CPPFLAGS" |
---|
[3] | 397 | CPPFLAGS="$JS_CPPFLAGS" |
---|
[46] | 398 | |
---|
| 399 | #AC_CHECK_HEADERS([jsapi.h], |
---|
[3] | 400 | # [], [AC_MSG_ERROR([could not find headers include related to libjs])]) |
---|
[1] | 401 | |
---|
[46] | 402 | |
---|
| 403 | LIBS_SAVE="$LIBS" |
---|
[3] | 404 | LIBS="$JS_LDFLAGS" |
---|
[1] | 405 | |
---|
[288] | 406 | AC_CHECK_LIB([$JS_LIB], [JS_CompileFile,JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], []) |
---|
[46] | 407 | |
---|
[3] | 408 | AC_SUBST([JS_CPPFLAGS]) |
---|
| 409 | AC_SUBST([JS_LDFLAGS]) |
---|
[46] | 410 | fi |
---|
[3] | 411 | |
---|
[1] | 412 | AC_SUBST([JS_ENABLED]) |
---|
| 413 | AC_SUBST([JS_FILE]) |
---|
| 414 | |
---|
| 415 | AC_CONFIG_FILES([Makefile]) |
---|
[284] | 416 | AC_CONFIG_FILES([ZOOMakefile.opts]) |
---|
[1] | 417 | AC_OUTPUT |
---|