On 17/04/2008, Dennis Sacks <[EMAIL PROTECTED]> wrote:
> ./configure  outout errors with this:
>
>  checking for JS_NewContext in -ljs... no
>  checking for JS_NewContext in -lmozjs... no
>
>  configure: error: Could not find the js library.
>
>  Is the Mozilla SpiderMonkey library installed?
>
>  I specified --with-js-lib=/usr/local/lib or without (doesn't seem to matter)
>
>  libjs.so is in /usr/local/lib, and /usr/local/lib is in the ld cache. I
>  verified JS_NewContext exists as a symbol in libjs.so ...
>
>  Help?!
>

Try applying the attached patch to configure.ac.

I had this problem on an Ubuntu machine. gcc doesn't seem to like
having non-existent directories, e.g. /opt/local, in its paths.

Let me know if it works for you too and I'll submit a patch to the
issues tracker.

- Matt
Index: configure.ac
===================================================================
--- configure.ac	(revision 649003)
+++ configure.ac	(working copy)
@@ -54,7 +54,6 @@
     ERLANG_FLAGS="-I${libdir}/erlang/usr/include"
     ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/lib/erlang/usr/include"
     ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/local/lib/erlang/usr/include"
-    ERLANG_FLAGS="$ERLANG_FLAGS -I/opt/local/lib/erlang/usr/include"
 ])
 
 AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH],
@@ -64,7 +63,6 @@
     JS_INCLUDE_FLAGS="-I/usr/include/js"
     JS_INCLUDE_FLAGS="$JS_INCLUDE_FLAGS -I/usr/include/mozjs"
     JS_INCLUDE_FLAGS="$JS_INCLUDE_FLAGS -I/usr/local/include/js"
-    JS_INCLUDE_FLAGS="$JS_INCLUDE_FLAGS -I/opt/local/include/js"
 ])
 
 AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH],
@@ -72,7 +70,7 @@
     [JS_LIB_FLAGS="-L$withval"], [])
 
 # XP_UNIX required for jsapi.h and has been tested to work on Linux and Darwin.
-LIB_FLAGS="-L/usr/local/lib -L/opt/local/lib $JS_LIB_FLAGS"
+LIB_FLAGS="-L/usr/local/lib $JS_LIB_FLAGS"
 LIBS="$LIB_FLAGS $LIBS"
 FLAGS="$LIB_FLAGS $ERLANG_FLAGS $JS_INCLUDE_FLAGS -DXP_UNIX $FLAGS"
 CPPFLAGS="$FLAGS $CPPFLAGS"

Reply via email to