Changeset 46
- Timestamp:
- Dec 2, 2010, 10:03:56 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/configure.ac
r29 r46 269 269 270 270 AC_ARG_WITH([java], 271 [AS_HELP_STRING([--with-java=PATH], [ specify an alternative directory for java installation or --with-java=no to disabled java support])],272 [JDKHOME="$withval" ], [JDKHOME=""])273 274 275 if test "$JDKHOME" != "no"; 276 then 277 JAVA_ENABLED="-DUSE_JAVA" 271 [AS_HELP_STRING([--with-java=PATH], [To enabled java support, specify a JDK_HOME, disabled by default])], 272 [JDKHOME="$withval"; JAVA_ENABLED="-DUSE_JAVA"], [JAVA_ENABLED=""]) 273 274 if test -z "$JAVA_ENABLED" 275 then 276 JAVA_FILE="" 277 else 278 278 JAVA_FILE="service_internal_java.o" 279 279 if test "x$JDKHOME" = "x"; 280 280 then 281 # JAVA was not specified, so search within the current path 282 #AC_PATH_PROG([JAVACONFIG], [java]) 283 284 # If we couldn't find java-config, display a warning 285 if test "x$JDKHOME" = "x"; 286 then 287 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.]) 288 fi 289 else 290 # JAVA was specified; display a message to the user 291 if test "x$JDKHOME" = "xyes"; 292 then 293 AC_MSG_ERROR([you must specify a parameter to --with-java, e.g. --with-java=/path/to/java]) 294 else 295 if test -f $JDKHOME/include/jni.h; 296 then 297 AC_MSG_RESULT([Using specific java install dir : $JDKHOME]) 298 else 299 AC_MSG_ERROR([the specific java install dir $DKHOME does not exist]) 300 fi 301 fi 281 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.]) 282 fi # JAVA was specified; display a message to the user 283 if test "x$JDKHOME" = "xyes"; 284 then 285 AC_MSG_ERROR([you must specify a parameter to --with-java, e.g. --with-java=/path/to/java]) 302 286 fi 303 287 # Extract the linker and include flags … … 326 310 AC_SUBST([JAVA_CPPFLAGS]) 327 311 AC_SUBST([JAVA_LDFLAGS]) 328 else329 JAVA_ENABLED=""330 JAVA_FILE=""331 312 fi 332 313 … … 343 324 344 325 AC_ARG_WITH([js], 345 [AS_HELP_STRING([--with-js=PATH], [specify --with-js to enabled js support or --with-js=path-to-js js support is disabled by default ])], 346 [JSHOME="$withval"], [JSHOME=""]) 347 348 JS_ENABLED="" 349 JS_FILE="" 350 351 352 if test "$JSHOME" = "yes" 353 then 354 JS_ENABLED="-DUSE_JS" 355 JS_FILE="service_internal_js.o" 356 357 #on teste si on est sous debian like 358 if test -f "/usr/bin/dpkg" 359 then 360 if test -n "`dpkg -l | grep libmozjs-dev`" 326 [AS_HELP_STRING([--with-js=PATH], [specify --with-js=path-to-js to enabled js support, specify --with-js on linux debian like, js support is disabled by default ])], 327 [JSHOME="$withval";JS_ENABLED="-DUSE_JS"], [JS_ENABLED=""]) 328 329 if test -z "$JS_ENABLED" 330 then 331 JS_FILE="" 332 else 333 if test "$JSHOME" = "yes" 334 then 335 JS_FILE="service_internal_js.o" 336 337 #on teste si on est sous debian like 338 if test -f "/usr/bin/dpkg" 361 339 then 362 JS_CPPFLAGS="-I/usr/include/mozjs/" 363 JS_LDFLAGS="-L/usr/lib -lmozjs -lm" 364 JS_LIB="mozjs" 340 if test -n "`dpkg -l | grep libmozjs-dev`" 341 then 342 JS_CPPFLAGS="-I/usr/include/mozjs/" 343 JS_LDFLAGS="-L/usr/lib -lmozjs -lm" 344 JS_LIB="mozjs" 345 else 346 AC_MSG_ERROR([You must install libmozjs-dev or specify your custom install of libjs]) 347 fi 365 348 else 366 AC_MSG_ERROR([You must install libmozjs-dev orspecify your custom install of libjs])349 AC_MSG_ERROR([You must specify your custom install of libjs]) 367 350 fi 368 351 else 369 JS_LIB="js"370 fi371 372 CPPFLAGS_SAVE="$CPPFLAGS"373 CPPFLAGS="$JS_CPPFLAGS"374 #AC_CHECK_HEADERS([jsapi.h],375 # [], [AC_MSG_ERROR([could not find headers include related to libjs])])376 377 # Ensure we can link against libjs378 LIBS_SAVE="$LIBS"379 LIBS="$JS_LDFLAGS"380 381 AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])382 383 AC_SUBST([JS_CPPFLAGS])384 AC_SUBST([JS_LDFLAGS])385 386 387 else if test "$JSHOME" != ""388 then389 JS_ENABLED="-DUSE_JS"390 JS_FILE="service_internal_js.o"391 352 JS_CPPFLAGS="-I$JSHOME/include/js" 392 353 JS_LDFLAGS="-L$JSHOME/lib -ljs -lm" 393 354 JS_LIB="js" 394 355 395 CPPFLAGS_SAVE="$CPPFLAGS" 396 CPPFLAGS="$JS_CPPFLAGS" 397 #AC_CHECK_HEADERS([jsapi.h], 398 # [], [AC_MSG_ERROR([could not find headers include related to libjs])]) 399 400 # Ensure we can link against libjs 401 LIBS_SAVE="$LIBS" 402 LIBS="$JS_LDFLAGS" 403 404 AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], []) 405 406 AC_SUBST([JS_CPPFLAGS]) 407 AC_SUBST([JS_LDFLAGS]) 408 fi 409 fi 356 fi 357 358 CPPFLAGS_SAVE="$CPPFLAGS" 359 CPPFLAGS="$JS_CPPFLAGS" 360 361 362 #AC_CHECK_HEADERS([jsapi.h], 363 # [], [AC_MSG_ERROR([could not find headers include related to libjs])]) 364 365 366 LIBS_SAVE="$LIBS" 367 LIBS="$JS_LDFLAGS" 368 369 AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], []) 370 371 AC_SUBST([JS_CPPFLAGS]) 372 AC_SUBST([JS_LDFLAGS]) 373 fi 374 410 375 AC_SUBST([JS_ENABLED]) 411 376 AC_SUBST([JS_FILE])
Note: See TracChangeset
for help on using the changeset viewer.