Anonymous avatar Anonymous committed a9f972d

config update

Comments (0)

Files changed (2)

     return 0
 
 
+#hmm, findbasepath is failing on irix, we'll avoid it for now
 def findbasepath(deps):
     "find a common prefix in all paths"
     allpaths = []
 
 def prepdep(dep, basepath):
     "add some vars to a dep"
+    dep.line = dep.name + ' = -l' + dep.lib
+    dep.varname = '$('+dep.name+')'
+    
     if not dep.found:
         if dep.name == 'SDL': #fudge if this is unfound SDL
             dep.line = 'SDL = -I/NEED_INC_PATH_FIX -L/NEED_LIB_PATH_FIX -lSDL'
         if dep.lib_dir: lid = ' -L' + dep.lib_dir
     if dep.lib: lib = ' -l'+dep.lib
     dep.line = dep.name+' =' + inc + lid + ' ' + dep.cflags + lib
-    dep.varname = '$('+dep.name+')'
 
 
 
 
     deps = CFG.main()
     if deps:
-        basepath = findbasepath(deps)
+        basepath = None  #findbasepath(deps)
         for d in deps:
             prepdep(d, basepath)
         writesetupfile(deps, basepath)
 
 
     if os.path.isfile('Setup'):
-        print """Doublecheck that the new "Setup" file looks correct, then
+        print """\nDoublecheck that the new "Setup" file looks correct, then
 run "python setup.py install" to build and install pygame."""
     else:
-        print """There was an error creating the Setup file, check for errors
+        print """\nThere was an error creating the Setup file, check for errors
 or make a copy of "Setup.in" and edit by hand."""
 
 
 
 
 class Dependency:
-    inc_hunt = ['include']
-    lib_hunt = ['VisualC\\SDL\\Release', 'VisualC\\Release', 'Release', 'lib']
     def __init__(self, name, checkhead, checklib, lib):
         self.name = name
         self.inc_dir = None
         inc = os.path.join(incdir, self.checkhead)
         lib = os.path.join(libdir, self.checklib)
         if os.path.isfile(inc) and glob(lib):
+	    print self.name + '        '[len(self.name):] + ': found'
             self.found = 1
+	else:
+	    print self.name + '        '[len(self.name):] + ': not found'
 
 
 DEPS = [
-    Dependency('SDL', 'SDL.h', 'libSDL.so', '-lSDL'),
-    Dependency('FONT', 'SDL_ttf.h.h', 'libSDL_ttf.so', '-lSDL_ttf'),
-    Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', '-lSDL_image'),
-    Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', '-lSDL_mixer'),
+    Dependency('SDL', 'SDL.h', 'libSDL.so', 'SDL'),
+    Dependency('FONT', 'SDL_ttf.h.h', 'libSDL_ttf.so', 'SDL_ttf'),
+    Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', 'SDL_image'),
+    Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', 'SDL_mixer'),
+#not a real dependency, but found in setup
+    Dependency('SMPEG', '', '', 'SMPEG'),
 ]
 
 
         for w in configinfo[:]:
             if ',' in w: configinfo.remove(w)
         configinfo = ' '.join(configinfo)
-        print 'Flags:', configinfo
+        #print 'Flags:', configinfo
     except:
         raise SystemExit, """Cannot locate command, "sdl-config". Default SDL compile
 flags have been used, which will likely require a little editing."""
 
-    print 'Hunting optional dependencies...'
+    print 'Hunting dependencies...'
     incdir = libdir = ''
     for arg in configinfo.split():
         if arg.startswith('-I'):
     for d in DEPS:
         d.configure(incdir, libdir)
 
-    d[0].inc_dir = None
-    d[0].lib_dir = None
-    d[0].cflags = configinfo
+    DEPS[0].inc_dir = None
+    DEPS[0].lib_dir = None
+    DEPS[0].cflags = configinfo
 
     return DEPS
 
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.