<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spidermonkey/Linux-i686/jsautocfg.h</filename>
    </added>
    <added>
      <filename>spidermonkey/Linux-i686/jsautokw.h</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,10 @@
+import glob
 import sys
 import traceback
-sys.path.insert(0, &quot;./build/lib.macosx-10.4-i386-2.5/&quot;)
+
+libdirs = glob.glob(&quot;./build/lib*&quot;)
+if len(libdirs) &gt; 0:
+    sys.path.insert(0, libdirs[0])
 
 def raises(fn, *args, **kwargs):
     try:</diff>
      <filename>go.py</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.
 &quot;&quot;&quot;,
 
 import os
+import subprocess as sp
 import sys
 import ez_setup
 ez_setup.use_setuptools()
@@ -20,27 +21,38 @@ def find_sources(extensions=[&quot;.c&quot;, &quot;.cpp&quot;]):
                 ret.append(os.path.join(dpath, fname))
     return ret
 
+def nspr_config():
+    pipe = sp.Popen(&quot;nspr-config --cflags --libs&quot;,
+                        shell=True, stdout=sp.PIPE, stderr=sp.PIPE)
+    (stdout, stderr) = pipe.communicate()
+    if pipe.wait() != 0:
+        raise RuntimeError(&quot;Failed to get nspr config.&quot;)
+    bits = stdout.split()
+    ret = {&quot;include_dirs&quot;: [], &quot;library_dirs&quot;: [], &quot;libraries&quot;: []}
+    prfx = {&quot;-I&quot;: &quot;include_dirs&quot;, &quot;-L&quot;: &quot;library_dirs&quot;, &quot;-l&quot;: &quot;libraries&quot;}
+    for b in bits:
+        ret[prfx[b[:2]]].append(b[2:])
+    return ret
+
 def platform_config():
     sysname = os.uname()[0]
     machine = os.uname()[-1]
-    
-    configs = {
-        &quot;Darwin&quot;: {
-            &quot;extra_compile_args&quot;: [
-                &quot;-DXP_UNIX&quot;,
-                &quot;-DJS_THREADSAFE&quot;,
-                &quot;-DPOSIX_SOURCE&quot;,
-                &quot;-D_BSD_SOURCE&quot;,
-                &quot;-Wno-strict-prototypes&quot;
-            ],
-            &quot;include_dirs&quot;: [
-                &quot;spidermonkey/%s-%s&quot; % (sysname, machine),
-                &quot;/opt/local/include/nspr&quot;
-            ],
-            &quot;libraries&quot;: [&quot;nspr4&quot;]
-        }
-    }
-    return configs[os.uname()[0]]
+   
+    config = nspr_config()
+    config[&quot;include_dirs&quot;].append(&quot;spidermonkey/%s-%s&quot; % (sysname, machine))
+    config[&quot;extra_compile_args&quot;] = [
+        &quot;-DJS_THREADSAFE&quot;,
+        &quot;-DPOSIX_SOURCE&quot;,
+        &quot;-D_BSD_SOURCE&quot;,
+        &quot;-Wno-strict-prototypes&quot;
+    ]
+
+    if sysname in [&quot;Darwin&quot;, &quot;Linux&quot;]:
+        config[&quot;extra_compile_args&quot;].append(&quot;-DXP_UNIX&quot;)
+    else:
+        raise RuntimeError(&quot;Unknown system name: %s&quot; % sysname)
+
+    return config
 
 setup(
     name = &quot;python-spidermonkey&quot;,</diff>
      <filename>setup.py</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 
 URL=http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
 
-CFG=spidermonkey/`uname -s`-`uname -p`
+CFG=spidermonkey/`uname -s`-`uname -m`
 DEST=spidermonkey/libjs
 CWD=`pwd`
 TMP=tmp</diff>
      <filename>update-libjs.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4b71904af8334061cc891cdd543ae3aa9a4b954f</id>
    </parent>
  </parents>
  <author>
    <name>Paul Davis</name>
    <email>davisp@puny.(none)</email>
  </author>
  <url>http://github.com/davisp/python-spidermonkey/commit/3b4988ad691c01f5c848cb40a6162e2c3ffddcc3</url>
  <id>3b4988ad691c01f5c848cb40a6162e2c3ffddcc3</id>
  <committed-date>2009-02-27T19:49:12-08:00</committed-date>
  <authored-date>2009-02-27T19:49:12-08:00</authored-date>
  <message>Builds on linux. Distracted by BSG. More tomorrow.</message>
  <tree>6a4808592f99e0a67f5f56a2cfa75f305b045b29</tree>
  <committer>
    <name>Paul Davis</name>
    <email>davisp@puny.(none)</email>
  </committer>
</commit>
