From aa4a652e1aa2523437bf180d88f89cfca69a682b Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 4 Aug 2009 12:33:08 +0000 Subject: 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 --- configure.ac | 15 +++++++++++---- 1 file 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]) -- cgit v1.2.3