2011-07-03 Francisco Blas Izquierdo Riera * SConstruct: Check for the libnotify flag --- a/SConstruct 2011-07-03 04:05:24.116044261 +0200 +++ b/SConstruct 2011-07-03 03:37:01.052044212 +0200 @@ -106,6 +106,7 @@ vars.AddVariables( BoolVariable('debug', 'Compile the program with debug information', 0), BoolVariable('release', 'Compile the program with optimizations', 0), + BoolVariable('libnotify', 'Enable notifications through libnotify', 1), BoolVariable('profile', 'Compile the program with profiling information', 0), PathVariable('PREFIX', 'Compile the program with PREFIX as the root for installation', '/usr/local', PathVariable.PathIsDir), ('FAKE_ROOT', 'Make scons install the program under a fake root', '') @@ -263,14 +264,15 @@ conf.env.Append(CPPDEFINES = 'HAVE_IFADDRS_H') # TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies - if not conf.CheckPKG('libnotify >= 0.4.1'): - print '\tlibnotify >= 0.4.1 not found, disabling notifications.' - print '\tNote: You might have the lib but not the headers' - else: - conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY') - conf.env.ParseConfig('pkg-config --libs libnotify') - if conf.CheckPKG('libnotify >= 0.7'): - conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7') + if env.get('libnotify'): + if not conf.CheckPKG('libnotify >= 0.4.1'): + print '\tlibnotify >= 0.4.1 not found, disabling notifications.' + print '\tNote: You might have the lib but not the headers' + else: + conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY') + conf.env.ParseConfig('pkg-config --libs libnotify') + if conf.CheckPKG('libnotify >= 0.7'): + conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7') conf.CheckBZRRevision()