root/branches/libffado-scons_porting_work/admin/pkgconfig.py

Revision 521, 0.7 kB (checked in by arnonym, 17 years ago)

Move the helpers into their own directory (named "admin") so they don't clutter the base-dir

Line 
1 #!/usr/bin/python
2
3 #
4 # Taken from http://www.scons.org/wiki/UsingPkgConfig
5 #
6
7 def CheckForPKGConfig( context, version='0.0.0' ):
8         context.Message( "Checking for pkg-config (at least version %s)... " % version )
9         ret = context.TryAction( "pkg-config --atleast-pkgconfig-version=%s" %version )[0]
10         context.Result( ret )
11         return ret
12
13 def CheckForPKG( context, name, version="" ):
14         if version == "":
15                 context.Message( "Checking for %s... \t" % name )
16                 ret = context.TryAction( "pkg-config --exists '%s'" % name )[0]
17         else:
18                 context.Message( "Checking for %s (%s or higher)... \t" % (name,version) )
19                 ret = context.TryAction( "pkg-config --atleast-version=%s '%s'" % (version,name) )[0]
20         context.Result( ret )
21         return ret
22
Note: See TracBrowser for help on using the browser.