1: #line 12 "./lpsrc/flx_sdl.pak" 2: execfile("config"+os.sep+"config.py") 3: try: 4: cload(globals(),"sdl") 5: except: 6: result,SDL_VERSION = gs("sdl-config --version") 7: if result == None: 8: print "SDL SUPPORTED, version ",SDL_VERSION 9: HAVE_SDL = 1 10: result,SDL_CFLAGS = gs("sdl-config --cflags") 11: result,SDL_LIBS = gs("sdl-config --libs") 12: result,SDL_STATIC_LIBS = gs("sdl-config --static-libs") 13: 14: fname = "config" + os.sep + "sdl.fpc" 15: if not file_exists(fname): 16: print "Creating config/sdl.fpc" 17: f = open (fname,"w") 18: f.write("Name: SDL\n") 19: f.write("Description: Simple Direct Media Layer\n") 20: f.write("Version: "+SDL_VERSION+"\n") 21: f.write("cflags: "+SDL_CFLAGS+"\n") 22: f.write("requires_dlibs: '"+SDL_LIBS+"'\n") 23: f.write("requires_slibs: '"+SDL_STATIC_LIBS+"'\n") 24: f.write("flx_requires_driver: flx_arun\n") 25: f.close() 26: fname = "config" + os.sep + "gl.fpc" 27: if not file_exists(fname): 28: print "Creating config/gl.fpc" 29: f = open (fname,"w") 30: f.write("Name: OpenGL\n") 31: f.write("Description: open GL graphics\n") 32: if MACOSX: 33: f.write("provides_dlib: -framework OpenGL\n") 34: f.write("provides_slib: -framework OpenGL\n") 35: else: 36: f.write("provides_dlib: -lGL\n") 37: f.write("provides_slib: -lGL\n") 38: f.close() 39: fname = "config" + os.sep + "glu.fpc" 40: if not file_exists(fname): 41: print "Creating config/glu.fpc" 42: f = open (fname,"w") 43: f.write("Name: GLU\n") 44: f.write("Description: GLU graphics \n") 45: if MACOSX: 46: f.write("provides_dlib: -framework OpenGL\n") 47: f.write("provides_slib: -framework OpenGL\n") 48: else: 49: f.write("provides_dlib: -lGLU\n") 50: f.write("provides_slib: -lGLU\n") 51: f.write("Requires: gl\n") 52: f.close() 53: fname = "config" + os.sep + "glut.fpc" 54: if not file_exists(fname): 55: print "Creating config/glut.fpc" 56: f = open (fname,"w") 57: f.write("Name: GLUT\n") 58: f.write("Description: GLUT graphics\n") 59: if MACOSX: 60: f.write("provides_dlib: -framework GLUT\n") 61: f.write("provides_slib: -framework GLUT\n") 62: else: 63: f.write("provides_dlib: -lglut\n") 64: f.write("provides_slib: -lglut\n") 65: f.write("Requires: gl glu\n") 66: f.close() 67: else: 68: HAVE_SDL = 0 69: SDL_VERSION = "None" 70: SDL_CFLAGS = "" 71: SDL_LIBS = "" 72: SDL_STATIC_LIBS = "" 73: print "SDL NOT SUPPORTED" 74: print "SDL cpkgs/target/sdl.py" 75: f = cwrite("sdl") 76: pa(f,locals(),"HAVE_SDL") 77: pa(f,locals(),"SDL_VERSION") 78: pa(f,locals(),"SDL_CFLAGS") 79: pa(f,locals(),"SDL_LIBS") 80: pa(f,locals(),"SDL_STATIC_LIBS") 81: pa(f,locals(),"HAVE_OPENGL") 82: f.close() 83: cload(globals(),"sdl")