summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-08-04 12:33:08 +0000
committerJan Lehnardt <jan@apache.org>2009-08-04 12:33:08 +0000
commitaa4a652e1aa2523437bf180d88f89cfca69a682b (patch)
treecde6843c84a048e539667b10e54e4aae9f1155f1
parentafb9467fbe19d0741559253d3042627c299abbcf (diff)
search for jsapi.h in in $includedir and $includedir/js as a fallback, patch by Alessandro Decina
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@800757 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--configure.ac15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 72e8aef3..5044953e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,8 @@ AC_ARG_WITH([erlang], [AC_HELP_STRING([--with-erlang=PATH],
AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH],
[set PATH to the SpiderMonkey include directory])], [
- JS_FLAGS="-I$withval"
+ JS_INCLUDE="$withval"
+ JS_FLAGS="-I$JS_INCLUDE"
], [
JS_FLAGS="-I/usr/include"
JS_FLAGS="$JS_FLAGS -I/usr/include/js"
@@ -92,9 +93,15 @@ AC_CHECK_LIB([mozjs], [JS_NewContext], [], [
Is the Mozilla SpiderMonkey library installed?])])])
AC_CHECK_HEADER([jsapi.h], [], [
- AC_MSG_ERROR([Could not find the jsapi header.
-
-Are the Mozilla SpiderMonkey headers installed?])])
+ AC_CHECK_HEADER([js/jsapi.h],
+ [
+ CPPFLAGS="$CPPFLAGS -I$JS_INCLUDE/js"
+ ],
+ [
+ AC_MSG_ERROR([Could not find the jsapi header.
+
+Are the Mozilla SpiderMonkey headers installed?])
+ ])])
AC_CHECK_ICU([3])