Commits

Anonymous committed bd1629a

config_darwin updates

Comments (0)

Files changed (1)

 
 class FrameworkDependency(Dependency):
     def configure(self, incdirs, libdirs):
-      default_frameworks = ['/Library/Frameworks','/Local/Library/Frameworks/','/System/Library/Frameworks/']
-      user_frameworks = [os.path.expanduser('~/Library/Frameworks/')]
-      for framework_root in default_frameworks + user_frameworks:
-        if os.path.isfile(framework_root+self.lib+'.framework/Versions/Current/'+self.lib):
+      for n in '/Library/Frameworks/','~/Library/Frameworks/','/System/Library/Frameworks/':
+        if os.path.isfile(n+self.lib+'.framework/Versions/Current/'+self.lib):
           print 'Framework '+self.lib+' found'
           self.found = 1
-          self.inc_dir = framework_root+self.lib+'.framework/Versions/Current/Headers'
-          self.cflags = '-Ddarwin -Xlinker "-F'+framework_root+self.lib+'.framework" -Xlinker "-framework" -Xlinker "'+self.lib+'"'
+          self.inc_dir = n+self.lib+'.framework/Versions/Current/Headers'
+          self.cflags = '-Ddarwin -Xlinker "-F'+n+self.lib+'.framework" -Xlinker "-framework" -Xlinker "'+self.lib+'"'
           self.origlib = self.lib
           self.lib = ''
           return
     global DEPS
     
     print 'calling "sdl-config"'
+    configinfo = "-I/usr/local/include -framework SDL" # This line is in case sdl-config not found but SDL installed (not likely)
     try:
         configinfo = os.popen(configcommand).readlines()
-        if configinfo:
-            print 'Found SDL version:', configinfo[0]
-        else:
-            raise RuntimeError('"%s" did not return string'%configcommand)
+        print 'Found SDL version:', configinfo[0]
         configinfo = ' '.join(configinfo[1:])
         configinfo = configinfo.split()
         configinfo.append("-framework SDL")
         for w in configinfo[:]:
             if ',' in w: configinfo.remove(w)
         configinfo = ' '.join(configinfo)
+        #print 'Flags:', configinfo
     except:
-        print """Error running "sdl-config". Default SDL compile flags
-have been used, which may require a little editing.  (E.g. If you are
-using the Mac OS X SDL binary framework install, try appending
--Xlinker "/Users/YOUR_USERNAME/Library/Frameworks" to the SDL line in
-the file Setup)"""
-        configinfo = "-framework SDL" # This line is in case sdl-config not found but SDL installed (e.g. if SDL binary framework distribution used)
+        raise SystemExit, """Cannot locate command, "sdl-config". Default SDL compile
+flags have been used, which will likely require a little editing."""
 
     print 'Hunting dependencies...'
     incdirs = ['/usr/local/include/smpeg']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.