summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-04-12 12:29:07 -0400
committerColin Walters <walters@verbum.org>2013-04-12 12:36:54 -0400
commit637c9918ddc14968cd701a40d69b3bd257e75b95 (patch)
treeef7ae11943e3e3303c6cc2f54c92f2861c01c7cd
parent1918a056c320dbf6728131d586698a214fed28dd (diff)
downloadpolkit-wip/mozjs17.tar.gz
build: Look for mozjs17 toowip/mozjs17
-rw-r--r--configure.ac13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a9c24c4..68b02eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,7 +125,18 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-2.0 >= 2.30.0])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-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)