another action name fix for Push2 support
[ardour.git] / libs / fluidsynth / wscript
index d346a57d59fe246049448058706ebbb4608fd2f6..849c31f301f1b942f8bb9f8240c847b0035e61ed 100644 (file)
@@ -6,16 +6,10 @@ import sys
 
 # Version of this package (even if built as a child)
 MAJOR = '1'
-MINOR = '6'
-MICRO = '0'
+MINOR = '1'
+MICRO = '6'
 LIBFLUIDSYNTH_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
 
-# Library version (UNIX style major, minor, micro)
-# major increment <=> incompatible changes
-# minor increment <=> compatible changes (additions)
-# micro increment <=> no interface changes
-LIBLTC_LIB_VERSION = '1.1.1'
-
 # Variables for 'waf dist'
 APPNAME = 'libltc'
 VERSION = LIBFLUIDSYNTH_VERSION
@@ -30,7 +24,7 @@ def options(opt):
 
 def configure(conf):
     if conf.is_defined('USE_EXTERNAL_LIBS'):
-        autowaf.check_pkg(conf, 'fluidsynth', uselib_store='LIBFLUIDSYNTH', atleast_version=1.1.6, mandatory=True)
+        autowaf.check_pkg(conf, 'fluidsynth', uselib_store='LIBFLUIDSYNTH', atleast_version=LIBFLUIDSYNTH_VERSION, mandatory=True)
     else:
         conf.load('compiler_c')
         autowaf.configure(conf)
@@ -41,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',
@@ -75,5 +69,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()