<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -45,7 +45,9 @@ END)
                (@libs       addObject:&quot;edit&quot;))
          (else (@libs       addObjectsFromList:(list &quot;readline&quot; &quot;m&quot; &quot;gnustep-base&quot;))
                (@inc_dirs   addObject:&quot;/usr/include/GNUstep/Headers&quot;)
-               (@lib_dirs   addObject:&quot;/usr/lib/GNUstep/System/Library/Libraries&quot;)))
+               ;; this will be set by gnustep-config:
+               ;; (@lib_dirs   addObject:&quot;/usr/lib/GNUstep/System/Library/Libraries&quot;)
+               ))
 
 (if (NSFileManager directoryExistsNamed:&quot;#{@prefix}/include&quot;) (@inc_dirs addObject:&quot;#{@prefix}/include&quot;))
 (if (NSFileManager directoryExistsNamed:&quot;#{@prefix}/lib&quot;) (@lib_dirs addObject:&quot;#{@prefix}/lib&quot;))
@@ -88,9 +90,10 @@ END)
 
 (ifDarwin
          (then (set @cflags &quot;-Wall -g -O2 -DDARWIN -DMACOSX #{@sdk} #{@leopard} -std=gnu99&quot;)
-               (set @mflags &quot;-fobjc-exceptions -fobjc-gc&quot;)) ;; Want to try Apple's new GC? Add this: &quot;-fobjc-gc&quot;
+               (set @mflags &quot;-fobjc-exceptions&quot;)) ;; Want to try Apple's new GC? Add this: &quot;-fobjc-gc&quot;
          (else (set @cflags &quot;-Wall -DLINUX -g -std=gnu99 &quot;)
-               (set @mflags &quot;-fobjc-exceptions -fconstant-string-class=NSConstantString&quot;)))
+               ;; (set @mflags &quot;-fobjc-exceptions -fconstant-string-class=NSConstantString&quot;)
+               (set @mflags ((NSString stringWithShellCommand:&quot;gnustep-config --objc-flags&quot;) chomp))))
 
 (ifDarwin
          (then (set @arch '(&quot;ppc&quot; &quot;i386&quot;)))) ;; build a universal binary
@@ -133,6 +136,10 @@ END)
            (if ((NSFileManager defaultManager) fileExistsAtPath:(+ example-dir &quot;/Nukefile&quot;))
                (SH &quot;cd #{example-dir}; nuke clobber&quot;)))))
 
+(ifLinux
+      (set @gnustep_flags ((NSString stringWithShellCommand:&quot;gnustep-config --base-libs&quot;) chomp)))
+
+
 (set nush_thin_binaries (NSMutableArray array))
 (@arch each:
        (do (architecture)
@@ -144,7 +151,7 @@ END)
                                (SH &quot;#{@cc} #{@cflags} #{@mflags} main/main.m -arch #{architecture} -F. -framework Nu #{@ldflags} -o #{(target name)}&quot;)))
                     (else
                          (file nush_thin_binary =&gt; &quot;dylib&quot; (@c_objects objectForKey:architecture) (@m_objects objectForKey:architecture) is
-                               (SH &quot;#{@cc} #{@cflags} #{@mflags} main/main.m #{@library_executable_name} #{@ldflags} -o #{(target name)}&quot;))))))
+                               (SH &quot;#{@cc} #{@cflags} #{@mflags} main/main.m #{@library_executable_name} #{@ldflags} #{@gnustep_flags} -o #{(target name)}&quot;))))))
 
 (file &quot;nush&quot; =&gt; &quot;framework&quot; nush_thin_binaries is
       (ifDarwin</diff>
      <filename>Nukefile</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,8 @@ if SYSTEM == &quot;Darwin&quot;
   @mflags = &quot;-fobjc-exceptions&quot;
 else
   @cflags = &quot;-g -O2 -Wall -DLINUX -DMININUSH -std=gnu99 #{@leopard_cflags}&quot;
-  @mflags = &quot;-fobjc-exceptions -fconstant-string-class=NSConstantString&quot;
+  # @mflags = &quot;-fobjc-exceptions -fconstant-string-class=NSConstantString&quot;
+  @mflags = `gnustep-config --objc-flags`.chomp
 end
 
 @cflags += @inc_dirs.map {|inc| &quot; -I#{inc}&quot;}.join
@@ -70,7 +71,9 @@ end
 @ldflags += @libs.map {|lib| &quot; -l#{lib}&quot;}.join
 @ldflags += @lib_dirs.map {|libdir| &quot; -L#{libdir}&quot;}.join 
 if SYSTEM == &quot;Linux&quot;
-  @ldflags += &quot; -lobjc -lNuFound&quot;
+  # @ldflags += &quot; -lobjc -lNuFound&quot;
+  @ldflags += &quot; &quot;
+  @ldflags += `gnustep-config --base-libs`.chomp
   @ldflags += &quot; -Wl,--rpath -Wl,/usr/local/lib&quot;
 end
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -151,7 +151,11 @@ int NuMain(int argc, const char *argv[], const char *envp[])
                 else {
                     // collect the command-line arguments
                     [[NuApplication sharedApplication] setArgc:argc argv:argv startingAtIndex:i+1];
+#ifdef DARWIN
                     id string = [NSString stringWithContentsOfFile:[NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding] encoding:NSUTF8StringEncoding error:NULL];
+#else
+                    id string = [NSString stringWithContentsOfFile:[NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding]];
+#endif
                     if (string) {
                         id script = [parser parse:string asIfFromFilename:argv[i]];
                         [parser eval:script];</diff>
      <filename>objc/nu.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4dbe16444b077c71563c1f551a9b01b2c655f15</id>
    </parent>
  </parents>
  <author>
    <name>Jeff Buck</name>
    <email>jeffreybuck@mac.com</email>
  </author>
  <url>http://github.com/timburks/nu/commit/4d77e9bb24a9afa7b16687756b23e513eb2ce6c2</url>
  <id>4d77e9bb24a9afa7b16687756b23e513eb2ce6c2</id>
  <committed-date>2009-07-03T01:27:44-07:00</committed-date>
  <authored-date>2009-07-03T01:27:44-07:00</authored-date>
  <message>Updated build settings for Linux</message>
  <tree>f67fe695aeed80e9c828bdcbfb53dcbab48529d2</tree>
  <committer>
    <name>Jeff Buck</name>
    <email>jeffreybuck@mac.com</email>
  </committer>
</commit>
