Permalink
Browse files

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
  • Loading branch information...
1 parent afb9467 commit aa4a652e1aa2523437bf180d88f89cfca69a682b @janl janl committed Aug 4, 2009
Showing with 11 additions and 4 deletions.
  1. +11 −4 configure.ac
View
@@ -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])

0 comments on commit aa4a652

Please sign in to comment.