import os import sbms # get env object and clone it Import('*') env = env.Clone() # This program needs X11/Xlib.h which doesn't seem to be # installed in a standard place on OS X. Look for it in # /opt/X11 and warn user if it's not there when running on # darwin machines. Go ahead and try the build anyway just # in case they have configured their system to have it in # a standard search path. if os.getenv('OSTYPE', 'none') == 'darwin': if os.path.exists('/opt/X11/include/X11/Xlib.h'): env.AppendUnique(CPPPATH=['/opt/X11/include'], LIBPATH=['/opt/X11/lib']) else: print '' print 'WARNING: You are compiling on a darwin system (Mac OS X) and' print 'the file /opt/X11/Xlib.h does not exist. I\'ll try the build' print 'anyway, but it will likely fail.' print '' env.AppendUnique(LIBS=['X11']) sbms.executable(env)