more changes to wscript files to catch up with waf 1.6 and fix OS X issues
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 3e39f8992ba03c88e40c571ee720f466fa9fffde..e400b6e198edf5f1b58ed570d52e462e7dab6216 100644 (file)
--- a/wscript
+++ b/wscript
@@ -35,17 +35,22 @@ children = [
         'gtk2_ardour',
         'templates',
         'export',
-# this needs to be conditional at some point, since
-# we will not build it or use it on OS X
-        'tools/sanity_check'
 ]
 
+#if config[config_arch] != 'apple':
+#  children += [ 'tools/sanity_check' ]
+
 i18n_children = [
         'gtk2_ardour',
         'libs/ardour',
         'libs/gtkmm2ext',
 ]
 
+if sys.platform != 'darwin':
+    children += [ 'tools/sanity_check' ]
+else:
+    children += [ 'libs/appleutility' ]
+
 # Version stuff
 
 def fetch_svn_revision (path):
@@ -230,7 +235,7 @@ def set_compiler_flags (conf,opt):
             print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")
 
     # check this even if we aren't using FPU optimization
-    if not conf.env['HAVE_POSIX_MEMALIGN']:
+    if not conf.is_defined('HAVE_POSIX_MEMALIGN'):
         optimization_flags.append("-DNO_POSIX_MEMALIGN")
 
     # end optimization section
@@ -377,7 +382,8 @@ def options(opt):
     opt.add_option('--nls', action='store_true', default=True, dest='nls',
                     help='Enable i18n (native language support) (default)')
     opt.add_option('--no-nls', action='store_false', dest='nls')
-    opt.add_option('--phone-home', action='store_false', default=True, dest='phone_home')
+    opt.add_option('--optimize', action='store_false', dest='debug')
+    opt.add_option('--phone-home', action='store_false', default=False, dest='phone_home')
     opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug',
                     help='Build with debugging for the STL')
     opt.add_option('--rt-alloc-debug', action='store_true', default=False, dest='rt_alloc_debug',
@@ -509,8 +515,6 @@ def configure(conf):
     autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
     autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
 
-    if sys.platform == 'darwin':
-        sub_config_and_use(conf, 'libs/appleutility')
     for i in children:
         sub_config_and_use(conf, i)
 
@@ -552,7 +556,7 @@ def configure(conf):
         conf.define('LXVST_SUPPORT', 1)
         conf.env['LXVST_SUPPORT'] = True
     if bool(conf.env['JACK_SESSION']):
-        conf.define ('HAVE_JACK_SESSION', 1)
+        conf.define('HAVE_JACK_SESSION', 1)
     if opts.wiimote:
         conf.define('WIIMOTE', 1)
         conf.env['WIIMOTE'] = True
@@ -560,7 +564,7 @@ def configure(conf):
     conf.env['PROGRAM_NAME'] = opts.program_name
     if opts.rt_alloc_debug:
         conf.define('DEBUG_RT_ALLOC', 1)
-    if not conf.env['HAVE_CPPUNIT']:
+    if not conf.is_defined('HAVE_CPPUNIT'):
         conf.env['BUILD_TESTS'] = False
 
     set_compiler_flags (conf, Options.options)
@@ -629,8 +633,7 @@ def build(bld):
     bld.path.find_dir ('libs/pbd/pbd')
 
     autowaf.set_recursive()
-    if sys.platform == 'darwin':
-        bld.add_subdirs('libs/appleutility')
+
     for i in children:
         bld.recurse(i)