--- wxPython/config.py.orig Thu Apr 29 06:01:37 2004 +++ wxPython/config.py Thu Apr 29 06:05:14 2004 @@ -664,47 +664,37 @@ WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1] - if sys.platform[:6] == "darwin": - # Flags and such for a Darwin (Max OS X) build of Python - WXPLAT = '__WXMAC__' - GENDIR = 'mac' - libs = ['stdc++'] - NO_SCRIPTS = 1 - + # Set flags for other Unix type platforms + GENDIR = WXPORT + if WXPORT == 'gtk': + WXPLAT = '__WXGTK__' + portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1] + elif WXPORT == 'gtk2': + WXPLAT = '__WXGTK__' + GENDIR = 'gtk' # no code differences so use the same generated sources + portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1] + BUILD_BASE = BUILD_BASE + '-' + WXPORT + elif WXPORT == 'x11': + WXPLAT = '__WXX11__' + portcfg = '' + BUILD_BASE = BUILD_BASE + '-' + WXPORT else: - # Set flags for other Unix type platforms - GENDIR = WXPORT - - if WXPORT == 'gtk': - WXPLAT = '__WXGTK__' - portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1] - elif WXPORT == 'gtk2': - WXPLAT = '__WXGTK__' - GENDIR = 'gtk' # no code differences so use the same generated sources - portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1] - BUILD_BASE = BUILD_BASE + '-' + WXPORT - elif WXPORT == 'x11': - WXPLAT = '__WXX11__' - portcfg = '' - BUILD_BASE = BUILD_BASE + '-' + WXPORT - else: - raise SystemExit, "Unknown WXPORT value: " + WXPORT + raise SystemExit, "Unknown WXPORT value: " + WXPORT - cflags += portcfg.split() + cflags += portcfg.split() - # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but - # wx-config doesn't output that for some reason. For now, just - # add it unconditionally but we should really check if the lib is - # really found there or wx-config should be fixed. - libdirs.append("/usr/X11R6/lib") + # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but + # wx-config doesn't output that for some reason. For now, just + # add it unconditionally but we should really check if the lib is + # really found there or wx-config should be fixed. + libdirs.append("/usr/X11R6/lib") # Move the various -I, -D, etc. flags we got from the *config scripts # into the distutils lists. cflags = adjustCFLAGS(cflags, defines, includes) lflags = adjustLFLAGS(lflags, libdirs, libs) - #---------------------------------------------------------------------- else: