diff options
author | Colin Walters <walters@verbum.org> | 2013-04-12 12:29:07 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-04-23 10:49:12 -0400 |
commit | 0966ffc16bbd2998d7dad3064506e7a998d54bbb (patch) | |
tree | 76c18c886920bdf5d1190056056442b098589216 /configure.ac | |
parent | 8ed4cb000ed420bf2f899770cab098dde96621f2 (diff) | |
download | polkit-0966ffc16bbd2998d7dad3064506e7a998d54bbb.tar.gz |
jsauthority: Work with mozjs-17.0 too
Based on work by Tim Lunn <tim@feathertop.org>, reworked on top of a
regular dynamically-linked js.
https://bugs.freedesktop.org/show_bug.cgi?id=59830
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 73a978e..d2eea92 100644 --- a/configure.ac +++ b/configure.ac @@ -129,7 +129,18 @@ AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_30], AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [G_ENCODE_VERSION(2,34)], [Notify us when we'll need to transition away from g_type_init()]) -PKG_CHECK_MODULES(LIBJS, [mozjs185]) +AC_ARG_WITH(mozjs, AS_HELP_STRING([--with-mozjs=@<:@mozjs185/mozjs-17.0|auto@:>@], + [Specify version of Spidermonkey to use]),, + with_mozjs=auto) +AS_IF([test x${with_mozjs} != xauto], [ + PKG_CHECK_MODULES(LIBJS, ${with_mozjs}) +], [ + PKG_CHECK_MODULES(LIBJS, [mozjs185], have_mozjs185=yes, have_mozjs185=no) + AS_IF([test x${have_mozjs185} = xno], [ + PKG_CHECK_MODULES(LIBJS, [mozjs-17.0], have_mozjs17=yes, + [AC_MSG_ERROR([Could not find mozjs185 or mozjs-17.0; see http://ftp.mozilla.org/pub/mozilla.org/js/])]) + ]) +]) AC_SUBST(LIBJS_CFLAGS) AC_SUBST(LIBJS_LIBS) |