Move configure()s down to the appropriate level.
authorCarl Hetherington <cth@carlh.net>
Mon, 16 Jul 2012 00:01:12 +0000 (01:01 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 16 Jul 2012 00:01:12 +0000 (01:01 +0100)
src/gtk/wscript
src/lib/wscript
src/wscript
test/wscript
wscript

index c68efea90c42c0ad935860cbbe521e4a1cc4f589..e5611b028932cae4df9a80a480d609dad19baa82 100644 (file)
@@ -1,3 +1,8 @@
+def configure(conf):
+    conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
+    conf.check_cfg(package = 'gtkmm-2.4', args = '--cflags --libs', uselib_store = 'GTKMM', mandatory = True)
+    conf.check_cfg(package = 'cairomm-1.0', args = '--cflags --libs', uselib_store = 'CAIROMM', mandatory = True)
+
 def build(bld):
     obj = bld(features = 'cxx cxxshlib')
     obj.name   = 'libdvdomatic-gtk'
index ec5a723e46ce0055979e7a420732a87ea555eb39..f60a63f85ea9a70dce847daebe80fddff377cfd3 100644 (file)
@@ -1,3 +1,8 @@
+def configure(conf):
+    if conf.options.debug_hash:
+        conf.env.append_value('CXXFLAGS', '-DDEBUG_HASH')
+        conf.check_cc(msg = 'Checking for library libmhash', function_name = 'mhash_init', header_name = 'mhash.h', lib = 'mhash', uselib_store = 'MHASH')
+
 def build(bld):
     obj = bld(features = 'cxx cxxshlib')
     obj.name = 'libdvdomatic'
index 9ae35d507546d46ec848237187eb407b3875aa81..2ddd90f5c2cc89c511aaa67503af390f5d8b4d18 100644 (file)
@@ -1,3 +1,8 @@
+def configure(conf):
+    conf.recurse('lib')
+    if not conf.env.DISABLE_GUI:
+        conf.recurse('gtk')
+
 def build(bld):
     bld.recurse('lib')
     bld.recurse('tools')
index 7ea02a80471debcb6202b1297c07cce205cef7c1..2869cd52c5e6054f9513dad0a35dd92d72d69547 100644 (file)
@@ -1,3 +1,10 @@
+def configure(conf):
+    conf.check_cxx(fragment = """
+                              #define BOOST_TEST_MODULE Config test\n
+                             #include <boost/test/unit_test.hpp>\n
+                              int main() {}
+                              """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework', uselib_store = 'BOOST_TEST')
+
 def build(bld):
     obj = bld(features = 'cxx cxxprogram')
     obj.name   = 'short-unit-tests'
diff --git a/wscript b/wscript
index 98fa0f6f7e46d5454c956d1346904cab11f2745a..f10f225a2b530a6853b188669d716dae6ceaef25 100644 (file)
--- a/wscript
+++ b/wscript
@@ -14,9 +14,6 @@ def configure(conf):
     conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_VERSION="%s"' % VERSION])
 
     conf.env.DEBUG_HASH = conf.options.debug_hash
-    if conf.options.debug_hash:
-        conf.env.append_value('CXXFLAGS', '-DDEBUG_HASH')
-        conf.check_cc(msg = 'Checking for library libmhash', function_name = 'mhash_init', header_name = 'mhash.h', lib = 'mhash', uselib_store = 'MHASH')
 
     if conf.options.enable_debug:
         conf.env.append_value('CXXFLAGS', '-g')
@@ -24,10 +21,6 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-O3')
 
     conf.env.DISABLE_GUI = conf.options.disable_gui
-    if conf.options.disable_gui is False:
-        conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
-        conf.check_cfg(package = 'gtkmm-2.4', args = '--cflags --libs', uselib_store = 'GTKMM', mandatory = True)
-        conf.check_cfg(package = 'cairomm-1.0', args = '--cflags --libs', uselib_store = 'CAIROMM', mandatory = True)
 
     conf.check_cfg(package = 'sigc++-2.0', args = '--cflags --libs', uselib_store = 'SIGC++', mandatory = True)
     conf.check_cfg(package = 'libavformat', args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = True)
@@ -65,11 +58,9 @@ def configure(conf):
                              #include <boost/filesystem.hpp>\n
                              int main() { boost::filesystem::copy_file ("a", "b"); }\n
                              """, msg = 'Checking for boost filesystem library', libpath = '/usr/local/lib', lib = ['boost_filesystem', 'boost_system'], uselib_store = 'BOOST_FILESYSTEM')
-    conf.check_cxx(fragment = """
-                              #define BOOST_TEST_MODULE Config test\n
-                             #include <boost/test/unit_test.hpp>\n
-                              int main() {}
-                              """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework', uselib_store = 'BOOST_TEST')
+
+    conf.recurse('src')
+    conf.recurse('test')
 
 def build(bld):
     bld.recurse('src')