fix up some logic so that we don't replicate the session dir path twice in the search...
[ardour.git] / libs / audiographer / wscript
index 1c651e834aab14da354888659a377b88bc9677b9..66f4e80b724171c39e564617b259cb2497eebe77 100644 (file)
@@ -26,10 +26,9 @@ def options(opt):
     autowaf.set_options(opt)
 
 def configure(conf):
+    conf.load('compiler_cxx')
     autowaf.configure(conf)
 
-    conf.check_tool('compiler_cxx')
-
     autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
     autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=False)
     autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=False)
@@ -45,13 +44,15 @@ def configure(conf):
 def build(bld):
 
     # Headers
-    #bld.install_files('${INCLUDEDIR}/audiographer', 'audiographer/*.h')
-    #bld.install_files('${INCLUDEDIR}/audiographer/general', 'audiographer/general/*.h')
-    #bld.install_files('${INCLUDEDIR}/audiographer/sndfile', 'audiographer/sndfile/*.h')
-    #bld.install_files('${INCLUDEDIR}/audiographer/utils', 'audiographer/utils/*.h')
+    #bld.install_files('${INCLUDEDIR}/audiographer', bld.path.ant_glob('audiographer/*.h'))
+    #bld.install_files('${INCLUDEDIR}/audiographer/general', bld.path.ant_glob('audiographer/general/*.h'))
+    #bld.install_files('${INCLUDEDIR}/audiographer/sndfile', bld.path.ant_glob('audiographer/sndfile/*.h'))
+    #bld.install_files('${INCLUDEDIR}/audiographer/utils', bld.path.ant_glob('audiographer/utils/*.h'))
 
     #bld.env['BUILD_TESTS'] = True
-    bld.env['HAVE_ALL_GTHREAD'] = bld.env['HAVE_GLIB'] and bld.env['HAVE_GLIBMM'] and bld.env['HAVE_GTHREAD']
+    bld.env['HAVE_ALL_GTHREAD'] = (bld.is_defined('HAVE_GLIB')
+                                   and bld.is_defined('HAVE_GLIBMM')
+                                   and bld.is_defined('HAVE_GTHREAD'))
 
     audiographer = bld(features = 'cxx cxxshlib')
     audiographer.source = '''
@@ -62,7 +63,7 @@ def build(bld):
             src/general/broadcast_info.cc
     '''
 
-    if bld.env['HAVE_SAMPLERATE']:
+    if bld.is_defined('HAVE_SAMPLERATE'):
         audiographer.source += '''
                 src/general/sr_converter.cc
         '''
@@ -77,7 +78,7 @@ def build(bld):
     audiographer.install_path   = os.path.join(bld.env['LIBDIR'], 'ardour3')
 
 
-    if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+    if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
         # Unit tests
         obj              = bld(features = 'cxx cxxprogram')
         obj.source       = '''
@@ -94,17 +95,17 @@ def build(bld):
                 tests/general/silence_trimmer_test.cc
         '''
 
-        if bld.env['HAVE_ALL_GTHREAD']:
+        if bld.is_defined('HAVE_ALL_GTHREAD'):
             obj.source += '''
                     tests/general/threader_test.cc
             '''
 
-        if bld.env['HAVE_SNDFILE']:
+        if bld.is_defined('HAVE_SNDFILE'):
             obj.source += '''
                     tests/sndfile/tmp_file_test.cc
             '''
 
-        if bld.env['HAVE_SAMPLERATE']:
+        if bld.is_defined('HAVE_SAMPLERATE'):
             obj.source += '''
                     tests/general/sr_converter_test.cc
             '''