[gjs] build: Check for Intl API in mozjs
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Check for Intl API in mozjs
- Date: Tue, 21 Feb 2017 04:42:51 +0000 (UTC)
commit 04e9f3c5a1e8e8c72499f2ff95285ee6425ad701
Author: Philip Chimento <philip chimento gmail com>
Date: Thu Feb 16 22:04:11 2017 -0800
build: Check for Intl API in mozjs
Make sure that SpiderMonkey was configured with the flag --with-intl-api.
Otherwise, GJS will not be full-featured.
https://bugzilla.gnome.org/show_bug.cgi?id=778780
configure.ac | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0ad0c9f..fd20516 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,9 +57,10 @@ m4_define(glib_required_version, 2.50.0)
GOBJECT_INTROSPECTION_REQUIRE([1.41.4])
+ESR=38
GOBJECT_REQUIREMENT="gobject-2.0 >= glib_required_version"
gjs_base_packages="$GOBJECT_REQUIREMENT gio-2.0"
-common_packages="gthread-2.0 gio-2.0 >= glib_required_version mozjs-38"
+common_packages="gthread-2.0 gio-2.0 >= glib_required_version mozjs-$ESR"
gjs_packages="gobject-introspection-1.0 libffi $common_packages"
gjs_cairo_packages="cairo cairo-gobject $common_packages"
gjs_gtk_packages="gtk+-3.0 >= 3.20"
@@ -72,6 +73,16 @@ PKG_CHECK_MODULES([GJS_GDBUS], [$gjs_base_packages])
PKG_CHECK_MODULES([GJS_CONSOLE], [$gjs_base_packages])
PKG_CHECK_MODULES([GJSTESTS], [$gjstests_packages])
+# Check that SpiderMonkey was compiled --with-intl-api. Easiest way to do
+# this is to check and see if the JS source "Intl" executes correctly.
+AC_PATH_PROG([JS_INTERP], ["js$ESR" js])
+AC_MSG_CHECKING([for SpiderMonkey with ES6 Intl API])
+"$JS_INTERP" -e Intl >>config.log 2>&1
+AS_IF([test $? -eq 0], [AC_MSG_RESULT([found])], [AC_MSG_ERROR([not found
+The detected SpiderMonkey executable, $JS_INTERP,
+does not have the ECMAScript Internationalization API compiled in. Make
+sure to add the --with-intl-api configure flag to SpiderMonkey.])])
+
# Optional cairo dep (enabled by default)
AC_ARG_WITH(cairo,
[AS_HELP_STRING([--without-cairo], [Don't build cairo module])])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]