Skip VST version check to detect MIDI inputs
[ardour.git] / libs / fluidsynth / wscript
index a36c8da7bf2f14d5f30848e87a3ab36b2bf2dec6..3531e2e3d7a7154c3b0591e332e08784b4b88a4b 100644 (file)
@@ -5,9 +5,9 @@ import os
 import sys
 
 # Version of this package (even if built as a child)
-MAJOR = '1'
-MINOR = '1'
-MICRO = '6'
+MAJOR = '2'
+MINOR = '0'
+MICRO = '1'
 LIBFLUIDSYNTH_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
 
 # Variables for 'waf dist'
@@ -35,7 +35,7 @@ def build(bld):
     bld (export_includes = ['fluidsynth'],
          name = 'libfluidsynth_includes'
          )
-    bld.stlib (source = [
+    obj = bld.stlib (source = [
         'src/fluid_midi.c',
         'src/fluid_adsr_env.c',
         'src/fluid_chorus.c',
@@ -58,10 +58,14 @@ def build(bld):
         'src/fluid_hash.c',
         'src/fluid_list.c',
         'src/fluid_ringbuffer.c',
+        'src/fluid_samplecache.c',
         'src/fluid_settings.c',
+        'src/fluid_sffile.c',
+        'src/fluid_sfont.c',
+        'src/fluid_synth_monopoly.c',
         'src/fluid_sys.c'
         ],
-        cflags = [ '-fPIC', '-fvisibility=hidden' ],
+        cflags = [ bld.env['compiler_flags_dict']['pic'], '-fvisibility=hidden', '-std=gnu99' ],
         includes = ['.', 'src/' ],
                target = 'libfluidsynth',
                use    = 'libfluidsynth_includes',
@@ -69,5 +73,13 @@ def build(bld):
                defines = [ 'HAVE_CONFIG_H', 'DEFAULT_SOUNDFONT=""' ]
                )
 
+    # wine-gcc hacks:
+    # defining __MINGW32__ for wine-gcc is a workaround for fluidsynth's include
+    # strategy (which is made for mingw or windows) without it
+    # winsock2.h will complain about undeclared "u_short"
+    # we also need to explicitly define  _WIN32
+    if bld.is_defined('WINDOWS_VST_SUPPORT') and not bld.env['build_target'] == 'mingw':
+        obj.defines += [ '_WIN32', '__MINGW32__' ]
+
 def shutdown():
     autowaf.shutdown()