diff -p -up ./configure.in.orig ./configure.in --- ./configure.in.orig 2009-09-13 18:23:47.010466972 +0300 +++ ./configure.in 2009-09-13 18:24:46.296215385 +0300 @@ -631,12 +631,11 @@ if test -z "$disable_spidermonkey"; then withval=""; fi for spidermonkeydir in "$withval" "" /usr /usr/local /opt/spidermonkey /opt/js; do - for spidermonkeyinclude in "/include" "/include/js" "/include/smjs" "/include/mozjs"; do for spidermonkeylib in js smjs mozjs; do if test "$cf_result" = no && test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h"; then SPIDERMONKEY_LIBS="-L$spidermonkeydir/lib -l$spidermonkeylib" - SPIDERMONKEY_CFLAGS="-I$spidermonkeydir$spidermonkeyinclude" + SPIDERMONKEY_CFLAGS="`pkg-config --cflags libjs`" LIBS="$SPIDERMONKEY_LIBS $LIBS_X" CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS" @@ -646,7 +645,6 @@ if test -z "$disable_spidermonkey"; then #include ]], [[JS_GetReservedSlot(NULL, NULL, 0, NULL)]])],[cf_result=yes],[cf_result=no]) fi done - done done fi