I was able to get some distance down the road with:
env = Environment()
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config... ' )
ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' %
version)[0]
context.Result( ret )
return ret
def CheckPKG(context, name):
context.Message( 'Checking for %s... ' % name )
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
context.Result( ret )
return ret
# Configuration:
conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
'CheckPKG' : CheckPKG })
if not conf.CheckPKGConfig('0.15.0'):
print 'pkg-config >= 0.15.0 not found.'
Exit(1)
if not conf.CheckPKG('gtk+-2.0 >= 2.24.4'):
print 'gtk+-2.0 >= 2.24.4 not found.'
Exit(1)
if not conf.CheckPKG('glib-2.0 >= 2.28.6'):
print 'glib-2.0 >= 2.28.6 not found.'
Exit(1)
if not conf.CheckPKG('cairo >= 1.10.2'):
print 'cairo >= 1.10.2 not found.'
Exit(1)
if not conf.CheckPKG('pango >= 1.28.4'):
print 'pango >= 1.28.4 not found.'
Exit(1)
# Your extra checks here
env = conf.Finish()
Program('compo', Glob('*.d'), LIBS = [ 'gtkd', 'phobos2', 'dl', 'rt' ],
LIBPATH = [ '/usr/lib32' ], DPATH =
['/usr/local/include/d'])
This at least allows me to check for the versions of GTK+ components that I
built
against.
But I don't know how to check for the versions of DMD and gtkD.
Does your stuff get me anywhere in that direction Russel?
Steve