diff options
author | Tomas Chvatal <tchvatal@suse.cz> | 2012-05-06 12:49:33 +0200 |
---|---|---|
committer | Tomas Chvatal <tchvatal@suse.cz> | 2012-05-06 12:52:55 +0200 |
commit | 32af02b32f1ab7f2683749e6c949470847175da0 (patch) | |
tree | ba407c1c7de6d9807f91d5786007498a64c2e388 /configure.in | |
parent | b3d63df541ff6b2bf9c77699c8c076ebcde2d6cf (diff) |
Allow usage of system rhino wrt fdo#42977
It is done the same way the beanshell is handled.
Currently it can't be enabled by default as internal version has
patched-in debug interface.
We can choose two paths, rewrite the code to the new rhino debug
interface or just strip the current one out.
Change-Id: I48af18c635816db8269f13a649b62e9c454ee1e6
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 209efe6ace40..43a6544b1eae 100644 --- a/configure.in +++ b/configure.in @@ -1266,6 +1266,19 @@ AC_ARG_WITH(beanshell-jar, [Specify path to jarfile manually.]), BSH_JAR=$withval) +AC_ARG_WITH(system-rhino, + AS_HELP_STRING([--with-system-rhino], + [Use rhino already on system.]),,) +# [with_system_rhino="$with_system_jars"]) +# Above is not used as we have different debug interface +# patched into internal rhino. This code needs to be fixed +# before we can enable it by default. + +AC_ARG_WITH(rhino-jar, + AS_HELP_STRING([--with-rhino-jar=JARFILE], + [Specify path to jarfile manually.]), + RHINO_JAR=$withval) + AC_ARG_WITH(commons-codec-jar, AS_HELP_STRING([--with-commons-codec-jar=JARFILE], [Specify path to jarfile manually.]), @@ -9195,13 +9208,32 @@ AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then AC_MSG_RESULT([yes]) ENABLE_SCRIPTING_JAVASCRIPT=YES - BUILD_TYPE="$BUILD_TYPE RHINO" + + dnl =================================================================== + dnl Check for system rhino + dnl =================================================================== + AC_MSG_CHECKING([which rhino to use]) + if test "$with_system_rhino" = "yes"; then + AC_MSG_RESULT([external]) + SYSTEM_RHINO=YES + if test -z $RHINO_JAR; then + RHINO_JAR=/usr/share/java/js.jar + fi + AC_CHECK_FILE($RHINO_JAR, [], + [AC_MSG_ERROR(js.jar not found.)], []) + else + AC_MSG_RESULT([internal]) + SYSTEM_RHINO=NO + BUILD_TYPE="$BUILD_TYPE RHINO" + fi else AC_MSG_RESULT([no]) ENABLE_SCRIPTING_JAVASCRIPT=NO SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT" fi AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT) +AC_SUBST(SYSTEM_RHINO) +AC_SUBST(RHINO_JAR) dnl Scripting provider for Python extension? dnl We always provide this unless we have disabled Python completely |