Author: jan
Date: Tue Aug  4 12:33:08 2009
New Revision: 800757

URL: http://svn.apache.org/viewvc?rev=800757&view=rev
Log:
search for jsapi.h in in $includedir and $includedir/js as a fallback, patch by 
Alessandro Decina

Modified:
    couchdb/trunk/configure.ac

Modified: couchdb/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/configure.ac?rev=800757&r1=800756&r2=800757&view=diff
==============================================================================
--- couchdb/trunk/configure.ac (original)
+++ couchdb/trunk/configure.ac Tue Aug  4 12:33:08 2009
@@ -59,7 +59,8 @@
 
 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 @@
 Is the Mozilla SpiderMonkey library installed?])])])
 
 AC_CHECK_HEADER([jsapi.h], [], [
-    AC_MSG_ERROR([Could not find the jsapi header.
+    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?])])
+Are the Mozilla SpiderMonkey headers installed?])
+        ])])
 
 AC_CHECK_ICU([3])
 


Reply via email to