]> git.saurik.com Git - wxWidgets.git/commitdiff
Set MONOLITHIC for posix platforms based on the output of wx-config,
authorRobin Dunn <robin@alldunn.com>
Tue, 6 Jun 2006 17:49:06 +0000 (17:49 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 6 Jun 2006 17:49:06 +0000 (17:49 +0000)
use this to add the media lib if needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/config.py
wxPython/setup.py

index b42802b9d2292ce4ac53985fb4ae2ed05082580e..46250189878756a3f0e62becafc888ab606a2a99 100644 (file)
@@ -284,41 +284,6 @@ for option in ['WX_CONFIG', 'SYS_WX_CONFIG', 'WXDLLVER', 'BUILD_BASE',
 sys.argv = filter(None, sys.argv)
 
 
-#----------------------------------------------------------------------
-# build options file
-#----------------------------------------------------------------------
-
-if SYS_WX_CONFIG is None:
-    SYS_WX_CONFIG = WX_CONFIG
-
-build_options_template = """
-UNICODE=%d
-UNDEF_NDEBUG=%d
-INSTALL_MULTIVERSION=%d
-FLAVOUR="%s"
-EP_ADD_OPTS=%d
-EP_FULL_VER=%d
-WX_CONFIG="%s"
-WXPORT="%s"
-MONOLITHIC=%d
-FINAL=%d
-HYBRID=%d
-""" % (UNICODE, UNDEF_NDEBUG, INSTALL_MULTIVERSION, FLAVOUR, EP_ADD_OPTS,
-       EP_FULL_VER, SYS_WX_CONFIG, WXPORT, MONOLITHIC, FINAL, HYBRID)
-
-try: 
-    from build_options import *
-except:
-    build_options_file = os.path.join(os.path.dirname(__file__), "build_options.py")
-    if not os.path.exists(build_options_file):
-        try:
-            myfile = open(build_options_file, "w")
-            myfile.write(build_options_template)
-            myfile.close()
-        except:
-            print "WARNING: Unable to create build_options.py."
-    
-
 #----------------------------------------------------------------------
 # some helper functions
 #----------------------------------------------------------------------
@@ -793,6 +758,7 @@ elif os.name == 'posix':
         cflags.append('-O3')
 
     lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1]
+    MONOLITHIC = (lflags.find("_xrc") == -1)
     lflags = lflags.split()
 
     WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1]
@@ -847,6 +813,41 @@ else:
     raise 'Sorry, platform not supported...'
 
 
+#----------------------------------------------------------------------
+# build options file
+#----------------------------------------------------------------------
+
+if SYS_WX_CONFIG is None:
+    SYS_WX_CONFIG = WX_CONFIG
+
+build_options_template = """
+UNICODE=%d
+UNDEF_NDEBUG=%d
+INSTALL_MULTIVERSION=%d
+FLAVOUR="%s"
+EP_ADD_OPTS=%d
+EP_FULL_VER=%d
+WX_CONFIG="%s"
+WXPORT="%s"
+MONOLITHIC=%d
+FINAL=%d
+HYBRID=%d
+""" % (UNICODE, UNDEF_NDEBUG, INSTALL_MULTIVERSION, FLAVOUR, EP_ADD_OPTS,
+       EP_FULL_VER, SYS_WX_CONFIG, WXPORT, MONOLITHIC, FINAL, HYBRID)
+
+try: 
+    from build_options import *
+except:
+    build_options_file = os.path.join(os.path.dirname(__file__), "build_options.py")
+    if not os.path.exists(build_options_file):
+        try:
+            myfile = open(build_options_file, "w")
+            myfile.write(build_options_template)
+            myfile.close()
+        except:
+            print "WARNING: Unable to create build_options.py."
+    
+
 #----------------------------------------------------------------------
 # post platform setup checks and tweaks, create the full version string
 #----------------------------------------------------------------------
index 830ad30308a366fefd9a26db2d466e519d59fe25..6e605c5e167a1493a9149b4e1b44416f2459e45a 100755 (executable)
@@ -390,8 +390,8 @@ wxpExtensions.append(ext)
 
 
 mediaLibs = libs[:]
-if not MONOLITHIC and os.name == 'nt':
-    mediaLibs.append(makeLibName('media')[0])
+if not MONOLITHIC:
+    mediaLibs += makeLibName('media')
 swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
                         USE_SWIG, swig_force, swig_args, swig_deps)
 ext = Extension('_media', swig_sources,