Permalink
Browse files

Fix SpiderMonkey header detection

My last commit broke because the header detection wasn't using the
JS_CPPFLAGS that includes the search paths. Fix is simply to move that
variable assignment to before the header check.
  • Loading branch information...
1 parent d59cdd7 commit 572b561adbf852e08c7397519070f299d0b401e4 @davisp davisp committed Jan 22, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 configure.ac
View
@@ -206,6 +206,11 @@ AS_CASE([$(uname -s)],
AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE])
+OLD_LIBS="$LIBS"
+LIBS="$JS_LIBS $LIBS"
+OLD_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$JS_CFLAGS $CPPFLAGS"
+
AC_CHECK_HEADER([jsapi.h], [], [
AC_CHECK_HEADER([js/jsapi.h],
[
@@ -217,10 +222,6 @@ AC_CHECK_HEADER([jsapi.h], [], [
Are the Mozilla SpiderMonkey headers installed?])
])])
-OLD_LIBS="$LIBS"
-LIBS="$JS_LIBS $LIBS"
-OLD_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$JS_CFLAGS $CPPFLAGS"
AC_CHECK_LIB([mozjs185], [JS_NewContext], [JS_LIB_BASE=mozjs185], [
AC_CHECK_LIB([mozjs185-1.0], [JS_NewContext], [JS_LIB_BASE=mozjs185-1.0], [
AC_CHECK_LIB([mozjs], [JS_NewContext], [JS_LIB_BASE=mozjs], [

0 comments on commit 572b561

Please sign in to comment.