]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for build errors when the media lib was not built.
authorRobin Dunn <robin@alldunn.com>
Sat, 18 Nov 2006 21:22:50 +0000 (21:22 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 18 Nov 2006 21:22:50 +0000 (21:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/config.py
wxPython/setup.py

index 5a00a2179f891da54ef418fe917631b1db9956dc..15349bf3f34e46099e44b446d10bb5c8c2f2e5b3 100644 (file)
@@ -552,6 +552,19 @@ def makeLibName(name):
     return [libname]
 
 
+def findLib(name, libdirs):
+    name = makeLibName(name)[0]
+    if os.name == 'posix':
+        dirs = libdirs + ['/usr/lib', '/usr/local/lib']
+        name = 'lib'+name
+    else:
+        dirs = libdirs[:]
+    for d in dirs:
+        p = os.path.join(d, name)
+        if glob.glob(p+'*') != []:
+            return True
+    return False
+
 
 def adjustCFLAGS(cflags, defines, includes):
     '''Extract the raw -I, -D, and -U flags and put them into
index 9191aae872f93983565d4f8b1164990e9735805d..1e6cbd820cc80d3a27c83d4785f7bccbd485c67e 100755 (executable)
@@ -405,7 +405,7 @@ wxpExtensions.append(ext)
 
 
 mediaLibs = libs[:]
-if not MONOLITHIC:
+if not MONOLITHIC and findLib('media', libdirs):
     mediaLibs += makeLibName('media')
 swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
                         USE_SWIG, swig_force, swig_args, swig_deps)
@@ -459,7 +459,8 @@ swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
                           'src/_xml.i',
                           'src/_xmlhandler.i',
                           ])
-if not MONOLITHIC:
+
+if not MONOLITHIC and findLib('xrc', libdirs):
     xrcLib = makeLibName('xrc')
 else:
     xrcLib = []
@@ -481,7 +482,7 @@ wxpExtensions.append(ext)
 
 swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
                         USE_SWIG, swig_force, swig_args, swig_deps)
-if not MONOLITHIC:
+if not MONOLITHIC and findLib('richtext', libdirs):
     richLib = makeLibName('richtext')
 else:
     richLib = []
@@ -507,7 +508,7 @@ swig_sources = run_swig(['aui.i'], 'src', GENDIR, PKGDIR,
                                      opj(WXDIR, 'include/wx/aui/dockart.h'),
                                      opj(WXDIR, 'include/wx/aui/auibook.h'),
                                      ])
-if not MONOLITHIC:
+if not MONOLITHIC and findLib('aui', libdirs):
     auiLib = makeLibName('aui')
 else:
     auiLib = []