Index: JavaScript-1.16/Makefile.PL
--- JavaScript-1.16/Makefile.PL.orig	2010-02-20 22:27:39.000000000 +0100
+++ JavaScript-1.16/Makefile.PL	2011-03-12 10:03:06.000000000 +0100
@@ -93,7 +93,7 @@
 if (exists $ENV{JS_LIB}) {
     @libs = get_paths($ENV{JS_LIB});
     $ENV{DYLD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} = $ENV{JS_LIB};
-    $lib = "js";
+    $lib = "js -lm";
 }
 if (exists $ENV{JS_INC}) {
     @incs = get_paths($ENV{JS_INC});
@@ -108,7 +108,7 @@
     push @defines, "JS_THREADSAFE" if $ENV{JS_THREADSAFE};
 }
 else {
-    my $enable_threadsafe = prompt("Is your SpiderMonkey compiled with JS_THREADSAFE (most things will fail if you answer wrong)? [y/N]");
+    my $enable_threadsafe = 'n';
     push @defines, "JS_THREADSAFE" if $enable_threadsafe eq "y";
 }
 
@@ -125,7 +125,7 @@
     push @defines, "JS_C_STRINGS_ARE_UTF8" if $ENV{JS_UTF8};
 }
 else {
-    my $enable_utf8 = prompt("Is your SpiderMonkey compiled with support for unicode (t/23-unicode.t will fail if you answer wrong) ? [y/N]", "N");
+    my $enable_utf8 = 'n';
     push @defines, "JS_C_STRINGS_ARE_UTF8" if $enable_utf8 eq "y";
 }
 
@@ -137,7 +137,7 @@
     }
 }
 else {
-    my $enable_e4x = prompt("Do you want support for E4X (requires SpiderMonkey > 1.5) ? [y/N]", "N");
+    my $enable_e4x = 'n';
     if ($enable_e4x eq "y") {
         push @extra_headers, "jsxml";
         push @defines, "JS_ENABLE_E4X";     
@@ -177,7 +177,7 @@
     close $test_script;
 
     my $exe = tmpnam();;
-    my $cc = join(" ", $Config{cc}, @ccflags, "-o", $exe, "test_js.c", "-I.", (map { "-I$_" } @incs), $libs, "-l${lib}" );
+    my $cc = join(" ", $Config{cc}, @ccflags, (map { "-I$_" } @incs), "-o", $exe, "test_js.c", $libs, split(/\s+/, "-l${lib}"));
     qx($cc);
     if ($?) {
         print "Failed compiling test_js.c. ABORTING\n\n$cc\n";
@@ -188,11 +188,6 @@
     # Get js version and require 1.7 or later
     my ($engine, $version, $date) = split/\s+/, qx($exe);
     my ($v2) = $version =~ /^(\d+\.\d+)/;
-    if ($v2 < 1.7) {
-        if (prompt("I require SpiderMonkey version 1.7 or later but found ${version}. Try anyways? [y/N]", "N") ne "y") {
-            exit 0;
-        }
-    }
 
     # Dispose temp stuff
     unlink($exe);
Index: JavaScript-1.16/PJS_Context.c
--- JavaScript-1.16/PJS_Context.c.orig	2010-02-17 23:34:16.000000000 +0100
+++ JavaScript-1.16/PJS_Context.c	2011-03-12 10:03:06.000000000 +0100
@@ -96,7 +96,9 @@
         croak("Failed to create JSContext");
     }
 
+#ifdef JSOPTION_DONT_REPORT_UNCAUGHT
     JS_SetOptions(pcx->cx, JSOPTION_DONT_REPORT_UNCAUGHT);
+#endif
 
     obj = JS_NewObject(pcx->cx, &global_class, NULL, NULL);
     if (JS_InitStandardClasses(pcx->cx, obj) == JS_FALSE) {
Index: JavaScript-SpiderMonkey-0.21/Makefile.PL
--- JavaScript-SpiderMonkey-0.21/Makefile.PL.orig	2010-05-29 08:43:06.000000000 +0200
+++ JavaScript-SpiderMonkey-0.21/Makefile.PL	2011-03-12 10:03:06.000000000 +0100
@@ -31,6 +31,7 @@
 );
 
 my %possible_install_paths = (
+  "../js/.libs"      => "../js/src",
   "../js/src/*"      => "../js/src",
   "/usr/lib"         => "/usr/include",
   "/usr/local/lib"   => "/usr/local/include",
Index: JavaScript-SpiderMonkey-0.21/SpiderMonkey.pm
--- JavaScript-SpiderMonkey-0.21/SpiderMonkey.pm.orig	2010-05-29 08:49:31.000000000 +0200
+++ JavaScript-SpiderMonkey-0.21/SpiderMonkey.pm	2011-03-12 10:03:06.000000000 +0100
@@ -75,7 +75,6 @@
 use strict;
 use warnings;
 use Data::Dumper;
-use Log::Log4perl qw(:easy);
 
 require Exporter;
 require DynaLoader;
@@ -583,14 +582,7 @@
 ##################################################
 sub debug_enabled {
 ##################################################
-    my $logger = Log::Log4perl::get_logger("JavaScript::SpiderMonkey");
-    if(Log::Log4perl->initialized() and $logger->is_debug()) {
-        # print "DEBUG IS ENABLED\n";
-        return 1;
-    } else {
-        # print "DEBUG IS DISABLED\n";
-        return 0;
-    }
+    return 0;
 }
 
 1;
Index: js-1.6.20070208/jslint.js
--- js-1.6.20070208/jslint.js.orig	2007-02-08 10:28:02.000000000 +0100
+++ js-1.6.20070208/jslint.js	2011-03-12 10:03:06.000000000 +0100
@@ -2567,7 +2567,7 @@
 var script = file.readAll();
 file.close();
 
-if (!jslint(script, { passfail: true })) {
+if (!jslint(script, options)) {
     var e = jslint.errors[0];
     print('jslint: line ' + (e.line + 1) + ' character ' + (e.character + 1) + ': ' + e.reason);
     print((e.evidence || ''). replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
Index: js-1.6.20070208/src/perlconnect/Makefile.PL.in
--- js-1.6.20070208/src/perlconnect/Makefile.PL.in.orig	2006-07-24 21:53:02.000000000 +0200
+++ js-1.6.20070208/src/perlconnect/Makefile.PL.in	2011-03-12 10:03:06.000000000 +0100
@@ -7,5 +7,6 @@
 	INC          => "-I..",
 	LIBS         => "-L../../.libs -ljs @LIBS@",
 	VERSION_FROM => 'JS.pm',
+	INSTALLDIRS  => 'vendor',
 );
 
