diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-12-11 03:55:19 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-12-11 03:55:19 +0000 |
commit | 5f29c3b769fcdb2532d4948aa1c649d4330304b9 (patch) | |
tree | 6f0ed37c27aa70679bf5a81341e07a9e0d5c5f68 /sca-cpp/trunk/unmaintained/modules/js/configure.ac | |
parent | ae0b7c0063db6236be2d7cf01ddbf2159f77c98c (diff) |
Use Jansson to read/write JSON instead of Mozilla SpiderMonkey.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1419986 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/unmaintained/modules/js/configure.ac')
-rw-r--r-- | sca-cpp/trunk/unmaintained/modules/js/configure.ac | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/sca-cpp/trunk/unmaintained/modules/js/configure.ac b/sca-cpp/trunk/unmaintained/modules/js/configure.ac new file mode 100644 index 0000000000..6d46dd90d4 --- /dev/null +++ b/sca-cpp/trunk/unmaintained/modules/js/configure.ac @@ -0,0 +1,63 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Enable Javascript support. +AC_MSG_CHECKING([whether to enable Javascript support]) +AC_ARG_ENABLE(js, [AS_HELP_STRING([--enable-js], [enable Javascript support [default=no]])], +[ case "${enableval}" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + want_js=true + ;; + esac ], +[ + AC_MSG_RESULT(no) +]) +if test "${want_js}" = "true"; then + + # Configure path to libmozjs includes and lib. + AC_MSG_CHECKING([for js-include]) + AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH], [path to installed SpiderMonkey include dir + [default=/usr/include]])], [ + JS_INCLUDE="${withval}" + AC_MSG_RESULT("${withval}") + ], [ + JS_INCLUDE="/usr/include" + AC_MSG_RESULT(/usr/include) + ]) + AC_MSG_CHECKING([for js-lib]) + AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH], [path to installed SpiderMonkey lib dir [default=/usr/lib]])], [ + JS_LIB="${withval}" + AC_MSG_RESULT("${withval}") + ], [ + JS_LIB="/usr/lib" + AC_MSG_RESULT(/usr/lib) + ]) + AC_SUBST(JS_INCLUDE) + AC_SUBST(JS_LIB) + LIBS="-L${JS_LIB} ${defaultlibs}" + AC_CHECK_LIB([mozjs], [JS_NewContext], [], [AC_MSG_ERROR([couldn't find a suitable libmozjs, use --with-js-lib=PATH])]) + AM_CONDITIONAL([WANT_JS], true) + AC_DEFINE([WANT_JS], 1, [enable Javascript support]) + +else + AM_CONDITIONAL([WANT_JS], false) +fi + |