Skip to content

Commit

Permalink
Build on modern Debian.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Wilkinson committed Oct 31, 2014
1 parent f2d7909 commit f5c26a5
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ env = Environment()
if not env.GetOption("clean"):
conf = Configure(env)

# check for GL
if conf.CheckLib('GL', 'glLightfv'):
if conf.CheckCHeader('GL/gl.h'):
conf.env.AppendUnique(CPPFLAGS=['-DHAVE_GL'])
else:
print "GL header file not found!"
Exit(1)
else:
print "GL library not found!"
Exit(1)
# check for GLU
if conf.CheckLib('GLU', 'gluOrtho2D'):
if conf.CheckCHeader('GL/glu.h'):
conf.env.AppendUnique(CPPFLAGS=['-DHAVE_GLU'])
else:
print "GLU header file not found!"
Exit(1)
else:
print "GLU library not found!"
Exit(1)
# check for GLUT
if conf.CheckLib('glut', 'glutMainLoop'):
if conf.CheckCHeader('GL/glut.h'):
Expand All @@ -18,6 +38,16 @@ if not env.GetOption("clean"):
else:
print "GLUT library not found!"
Exit(1)
# check for libm
if conf.CheckLib('m', 'fmod'):
if conf.CheckCHeader('math.h'):
conf.env.AppendUnique(CPPFLAGS=['-DHAVE_GLUT'])
else:
print "GLUT header file not found!"
Exit(1)
else:
print "GLUT library not found!"
Exit(1)

# check whether gettimeofday() exists, and how many arguments it has
print "Checking for gettimeofday() semantics...",
Expand Down Expand Up @@ -62,4 +92,4 @@ env.AppendUnique(CCFLAGS=['-W%s' % (w,) for w in warnings])
glsnake_sources = 'glsnake.c'

glsnake = env.Program('glsnake', glsnake_sources,
LIBS=['glut'])
LIBS=['glut', 'GLU', 'GL', 'm'])

0 comments on commit f5c26a5

Please sign in to comment.