diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2017-02-16 22:04:11 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2017-02-20 20:36:59 -0800 |
commit | 04e9f3c5a1e8e8c72499f2ff95285ee6425ad701 (patch) | |
tree | 1295e04efd1369e9d6a226b4fa67e9dd4fb434e4 | |
parent | ee99b27efacd3ac21b3495e572b26707d10bdf9c (diff) | |
download | gjs-04e9f3c5a1e8e8c72499f2ff95285ee6425ad701.tar.gz |
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
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0ad0c9f6..fd20516e 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])]) |