Changeset 601
- Timestamp:
- 08/30/07 06:39:58 (15 years ago)
- Files:
-
- trunk/libffado/admin/pkgconfig.py (modified) (1 diff)
- trunk/libffado/SConstruct (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/admin/pkgconfig.py
r590 r601 37 37 return ret 38 38 39 # 40 # Checks for the existance of the package and returns the packages flags. 41 # 42 # This should allow caching of the flags so that pkg-config is called only once. 43 # 44 def GetPKGFlags( context, name, version="" ): 45 import os 46 47 if version == "": 48 context.Message( "Checking for %s... \t" % name ) 49 ret = context.TryAction( "pkg-config --exists '%s'" % name )[0] 50 else: 51 context.Message( "Checking for %s (%s or higher)... \t" % (name,version) ) 52 ret = context.TryAction( "pkg-config --atleast-version=%s '%s'" % (version,name) )[0] 53 54 if not ret: 55 context.Result( ret ) 56 return ret 57 58 out = os.popen2( "pkg-config --cflags --libs %s" % name )[1] 59 ret = out.read() 60 61 context.Result( True ) 62 return ret 63 trunk/libffado/SConstruct
r598 r601 103 103 if not env.GetOption('clean'): 104 104 conf = Configure( env, 105 custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, ' CheckForApp' : CheckForApp },105 custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, 'GetPKGFlags' : GetPKGFlags, 'CheckForApp' : CheckForApp }, 106 106 conf_dir="cache/" + build_base, 107 107 log_file="cache/" + build_base + 'config.log' ) … … 112 112 113 113 allpresent = 1; 114 allpresent &= conf.CheckForPKGConfig();115 allpresent &= conf.CheckForPKG( 'libraw1394', "1.3.0" )116 allpresent &= conf.CheckForPKG( 'libavc1394', "0.5.3" )117 allpresent &= conf.CheckForPKG( 'libiec61883', "1.1.0" )118 allpresent &= conf.CheckForPKG( 'alsa', "1.0.0" )119 allpresent &= conf.CheckForPKG( 'libxml++-2.6', "2.13.0" )120 allpresent &= conf.CheckForPKG( 'liblo', "0.22" )121 allpresent &= conf.CheckForPKG( 'dbus-1', "1.0" )122 114 allpresent &= conf.CheckHeader( "expat.h" ) 123 115 allpresent &= conf.CheckLib( 'expat', 'XML_ExpatVersion', '#include <expat.h>' ) 124 116 117 allpresent &= conf.CheckForPKGConfig(); 118 119 pkgs = { 120 'libraw1394' : '1.3.0', 121 'libavc1394' : '0.5.3', 122 'libiec61883' : '1.1.0', 123 'alsa' : '1.0.0', 124 'libxml++-2.6' : '2.13.0', 125 'liblo' : '0.22', 126 'dbus-1' : '1.0', 127 } 128 for pkg in pkgs: 129 name2 = pkg.replace("+","").replace(".","").replace("-","").upper() 130 env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, pkgs[pkg] ) 131 if env['%s_FLAGS'%name2] == 0: 132 allpresent &= 0 133 125 134 if not allpresent: 126 135 print """