### Special for the MAC: universal flags
universal_flags = '-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4'

### We need to use gcc 4.0 on Snow Leopard (10.6) for MacOSX10.4u.sdk
import platform
if platform.mac_ver()[0][:4] == '10.6':
    env['CC']  = 'gcc-4.0'
    env['CXX'] = 'g++-4.0'

LoadTool('gcc-generic', env, gcc_extra_options=universal_flags)

env.AppendUnique(CFLAGS          = '-fno-common')
env.AppendUnique(FRAMEWORKSFLAGS = '-flat_namespace -undefined suppress')
