fix marker rendering and layout
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 61fedb7f1f9c14017d5da26b28f6572b468b02af..4bd7776632a09bbccefba054b6af222224b964f7 100644 (file)
--- a/wscript
+++ b/wscript
@@ -55,16 +55,17 @@ compiler_flags_dictionaries= {
         'c99': '-std=c99',
     },
     'msvc' : {
-        'debuggable' : ['/Od', '/Zi', '/MTd'],
-        'linker-debuggable' : ['/DEBUG' ],
-        'nondebuggable' : [ '/MD', '-DNDEBUG' ],
+        'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
+        'linker-debuggable' : ['/DEBUG', '/INCREMENTAL' ],
+        'nondebuggable' : ['/DNDEBUG', '/Ob1', '/MD', '/Gd', '/EHsc'],
         'profile' : '',
+        'sse' : '/arch:SSE',
         'silence-unused-arguments' : '',
         'sse' : '',
-        'fpmath-see' : '',
+        'fpmath-sse' : '',
         'xmmintrinsics' : '',
         'pipe' : '',
-        'full-optimization' : '',
+        'full-optimization' : '/O2',
         'no-frame-pointer' : '',
         'fast-math' : '',
         'strength-reduce' : '',
@@ -78,7 +79,7 @@ compiler_flags_dictionaries= {
         'c-strict' : '',
         'cxx-strict' : '',
         'strict' : '',
-        'c99': '-TP',
+        'c99': '/TP',
     },
 }
 
@@ -100,6 +101,7 @@ clang_dict['silence-unused-arguments'] = '-Qunused-arguments'
 clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags' ]
 clang_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-fstrict-overflow' ]
 clang_dict['strict'] = ['-Wall', '-Wcast-align', '-Wextra', '-Wwrite-strings' ]
+clang_dict['generic-x86'] = [ '-arch', 'i386' ]
 compiler_flags_dictionaries['clang'] = clang_dict;
 
 clang_darwin_dict = compiler_flags_dictionaries['clang'].copy();
@@ -255,11 +257,11 @@ int main() { return 0; }''',
                          msg       = 'Checking for clang')
 
     if is_clang:
-        if platform == darwin:
+        if platform == 'darwin':
             compiler_name = 'clang-darwin'
         else:
             compiler_name = 'clang'
-    elif conf.env['CC'][0].find ('msvc') != -1:
+    elif conf.env['MSVC_COMPILER']:
             compiler_name = 'msvc'
     else:
         if platform == 'darwin':
@@ -267,8 +269,6 @@ int main() { return 0; }''',
         else:
             compiler_name = 'gcc'
 
-    print "Compiler name is ", compiler_name, "\n"
-
     flags_dict = compiler_flags_dictionaries[compiler_name]
             
     autowaf.set_basic_compiler_flags (conf,flags_dict)
@@ -472,10 +472,10 @@ int main() { return 0; }''',
             break
 
     if prepend_opt_flags:
-        optimization_flags[:0] = [ flags_dict['full-optimization'] ]
+        optimization_flags[:0] = flags_dict['full-optimization']
 
     if opt.debug_symbols:
-        optimization_flags += [ flags_dict['debuggable'] ]
+        optimization_flags += flags_dict['debuggable']
 
     if opt.stl_debug:
         cxx_flags.append("-D_GLIBCXX_DEBUG")
@@ -594,6 +594,8 @@ def options(opt):
                     help='Compile with support for linuxVST plugins')
     opt.add_option('--no-lxvst', action='store_false', dest='lxvst',
                     help='Compile without support for linuxVST plugins')
+    opt.add_option('--no-lrdf', action='store_true', dest='no_lrdf',
+                    help='Compile without support for LRDF LADSPA data even if present')
     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')
@@ -660,6 +662,11 @@ def configure(conf):
         conf.env['MSVC_TARGETS'] = ['x64']
         conf.load('msvc')
 
+    if Options.options.debug:
+        # Nuke user CFLAGS/CXXFLAGS if debug is set (they likely contain -O3, NDEBUG, etc)
+        conf.env['CFLAGS'] = []
+        conf.env['CXXFLAGS'] = []
+
     conf.env['VERSION'] = VERSION
     conf.env['MAJOR'] = MAJOR
     conf.env['MINOR'] = MINOR
@@ -800,7 +807,8 @@ def configure(conf):
 
     # executing a test program is n/a when cross-compiling
     if Options.options.dist_target != 'mingw':
-        conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
+        if Options.options.dist_target != 'msvc':
+            conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
         conf.check_cxx(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
                   execute = "1",
                   mandatory = True,