diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 306746d556..13c475e27c 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -18,19 +18,17 @@ */ +#include #include -#include #ifdef COMPILER_MSVC #include /* isinf() & isnan() are C99 standards, which older MSVC doesn't provide */ -#define isinf(val) !((bool)_finite((double)val)) -#define isnan(val) (bool)_isnan((double)val) -#endif - -#ifdef __APPLE__ -#define isinf(val) std::isinf((val)) -#define isnan(val) std::isnan((val)) +#define ISINF(val) !((bool)_finite((double)val)) +#define ISNAN(val) (bool)_isnan((double)val) +#else +#define ISINF(val) std::isinf((val)) +#define ISNAN(val) std::isnan((val)) #endif #include @@ -777,13 +775,13 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr) } */ - if (isinf(power)) { + if (ISINF(power)) { if (power < 0) { power = _min_dB - 1.0; } else { power = _max_dB - 1.0; } - } else if (isnan(power)) { + } else if (ISNAN(power)) { power = _min_dB - 1.0; } diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 777eb62616..a8b46f1f57 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -64,6 +64,10 @@ using Gtkmm2ext::Keyboard; sigc::signal DPIReset; +#ifdef PLATFORM_WINDOWS +#define random() rand() +#endif + /** Add an element to a menu, settings its sensitivity. * @param m Menu to add to. diff --git a/gtk2_ardour/vst_plugin_ui.cc b/gtk2_ardour/vst_plugin_ui.cc index 35f59a71f5..3afb17a652 100644 --- a/gtk2_ardour/vst_plugin_ui.cc +++ b/gtk2_ardour/vst_plugin_ui.cc @@ -17,10 +17,18 @@ */ +#include #include "ardour/vst_plugin.h" #include "ardour/vst_types.h" #include "vst_plugin_ui.h" + +#ifdef PLATFORM_WINDOWS +#include +#elif defined __APPLE__ +// TODO +#else #include +#endif VSTPluginUI::VSTPluginUI (boost::shared_ptr insert, boost::shared_ptr plugin) : PlugUIBase (insert) diff --git a/gtk2_ardour/windows_vst_plugin_ui.cc b/gtk2_ardour/windows_vst_plugin_ui.cc index 72e9952dec..1ce83f8992 100644 --- a/gtk2_ardour/windows_vst_plugin_ui.cc +++ b/gtk2_ardour/windows_vst_plugin_ui.cc @@ -18,6 +18,7 @@ */ #include +#include #include #include #include "ardour/plugin_insert.h" @@ -25,12 +26,12 @@ #include "windows_vst_plugin_ui.h" -#ifdef GDK_WINDOWING_X11 -#include -#elif defined GDK_WINDOWING_WIN32 +#ifdef PLATFORM_WINDOWS #include -#elif defined GDK_WINDOWING_QUARTZ -/* not yet supported */ +#elif defined __APPLE__ +// TODO +#else +#include #endif using namespace Gtk; @@ -42,17 +43,21 @@ WindowsVSTPluginUI::WindowsVSTPluginUI (boost::shared_ptr pi, boos { #ifdef GDK_WINDOWING_WIN32 - GtkWindow* wobj = win->gobj(); + +#if 0 // TODO verify window vs vbox-widget WRT to plugin_analysis_expander + GtkWindow* wobj = GTK_WINDOW(gtk_widget_get_toplevel(this->gobj())); +#else + GtkVBox* wobj = this->gobj(); +#endif + gtk_widget_realize(GTK_WIDGET(wobj)); void* hWndHost = gdk_win32_drawable_get_handle(GTK_WIDGET(wobj)->window); fst_run_editor (_vst->state(), hWndHost); #else fst_run_editor (_vst->state(), NULL); -#endif - - pack_start (plugin_analysis_expander, true, true); +#endif } WindowsVSTPluginUI::~WindowsVSTPluginUI () diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 008b0f4884..92f584fc1f 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -398,14 +398,11 @@ def build(bld): obj.source = gtk2_ardour_sources obj.target = 'ardour-' + bld.env['VERSION'] obj.includes = ['.'] + obj.ldflags = ['-no-undefined'] if bld.is_defined('WINDOWS_VST_SUPPORT'): # Windows VST support mingw - obj.source += ( - '../libs/fst/fst.c', - '../libs/fst/vstwin.c', - '../vst/winmain.c', - ) + obj.source += [ '../vst/winmain.c' ] obj.includes += [ '../libs/fst' ] # at this point, "obj" refers to either the normal native executable @@ -459,7 +456,8 @@ def build(bld): if bld.is_defined('WINDOWS_VST_SUPPORT'): obj.source += [ 'windows_vst_plugin_ui.cc' ] obj.defines += [ 'WINDOWS_VST_SUPPORT' ] - obj.use += [ 'X11' ] + if bld.env['build_target'] != 'mingw': + obj.use += [ 'X11' ] if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ] diff --git a/headless/load_session.cc b/headless/load_session.cc index 20c83ed628..dc2644c428 100644 --- a/headless/load_session.cc +++ b/headless/load_session.cc @@ -16,6 +16,10 @@ using namespace std; using namespace ARDOUR; using namespace PBD; +#ifdef PLATFORM_WINDOWS +#define sleep(X) Sleep((X) * 1000) +#endif + static const char* localedir = LOCALEDIR; TestReceiver test_receiver; diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index a393ef2b5a..1b443dc192 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -20,6 +20,7 @@ #ifndef __ardour_vst_types_h__ #define __ardour_vst_types_h__ +#include #include "ardour/libardour_visibility.h" #include "ardour/vestige/aeffectx.h" diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 3ea103a7b7..1eb553c073 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -351,29 +351,7 @@ VSTPlugin::load_plugin_preset (PresetRecord r) #else sscanf (r.uri.c_str(), "VST:%d:%d", &id, &index); #endif - -#ifdef PLATFORM_WINDOWS - int const vst_version = _plugin->dispatcher (_plugin, effGetVstVersion, 0, 0, NULL, 0); - if (vst_version >= 2) { - _plugin->dispatcher (_plugin, effBeginSetProgram, 0, 0, NULL, 0); - } - - _plugin->dispatcher (_plugin, effSetProgram, 0, index, NULL, 0); - - if (vst_version >= 2) { - _plugin->dispatcher (_plugin, effEndSetProgram, 0, 0, NULL, 0); - } - - //unfortunately, we don't get any opcodes back from the plugin when this happens (?!) - //so we have to manually update param values from the plugin to our listeners - for (int n = 0; n < parameter_count(); n++ ) { - float p = get_parameter(n); //ask the plugin what its new setting is - Plugin::set_parameter (which, newval); - } - -#else _state->want_program = index; -#endif return true; } diff --git a/libs/ardour/vst_search_path.cc b/libs/ardour/vst_search_path.cc index 78814306cd..6dea1b70a7 100644 --- a/libs/ardour/vst_search_path.cc +++ b/libs/ardour/vst_search_path.cc @@ -24,6 +24,8 @@ #ifdef PLATFORM_WINDOWS +#include +#include // CSIDL_* #include "pbd/windows_special_dirs.h" namespace ARDOUR { @@ -56,7 +58,7 @@ vst_search_path () if (p == 0) { char *pVSTx86 = 0; - char *pProgFilesX86 = get_win_special_folder (CSIDL_PROGRAM_FILESX86); + char *pProgFilesX86 = PBD::get_win_special_folder (CSIDL_PROGRAM_FILESX86); if (pProgFilesX86) { // Look for a VST folder under C:\Program Files (x86) @@ -75,7 +77,7 @@ vst_search_path () if (p == 0) { // Look for a VST folder under C:\Program Files char *pVST = 0; - char *pProgFiles = get_win_special_folder (CSIDL_PROGRAM_FILES); + char *pProgFiles = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES); if (pProgFiles) { if (pVST = g_build_filename (pProgFiles, "Steinberg", "VSTPlugins", 0)) { @@ -92,7 +94,7 @@ vst_search_path () if (p == 0) { // If all else failed, assume the plugins are under "My Documents" - user_home = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); + user_home = (char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); if (user_home) { p = g_build_filename (user_home, "Plugins", "VST", 0); } else { @@ -103,7 +105,7 @@ vst_search_path () } else { // Concatenate the registry path with the user's personal path - user_home = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); + user_home = (char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); if (user_home) { p = g_build_path (";", p, g_build_filename(user_home, "Plugins", "VST", 0), 0); diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 10ee3a7dbd..e13a96b912 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -294,7 +294,7 @@ def configure(conf): # controls whether we actually use it in preference to soundtouch # Note: as of 2104, soundtouch (WSOLA) has been out-of-use for years. - conf.define('USE_RUBBERBAND', 1) + conf.define('USE_RUBBERBAND', 1) conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION) @@ -315,6 +315,11 @@ def configure(conf): autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp') + if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw': + conf.check(compiler='cxx', + lib='gdi32', + mandatory=True, + uselib_store='GDI32') def build(bld): @@ -341,11 +346,13 @@ def build(bld): obj.target = 'ardour' obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID', 'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS', - 'OSX','BOOST','CURL','DL','TAGLIB','VAMPSDK','VAMPHOSTSDK','RUBBERBAND'] + 'OSX','BOOST','CURL','TAGLIB','VAMPSDK','VAMPHOSTSDK','RUBBERBAND'] obj.use = ['libpbd','libmidipp','libevoral', - 'libaudiographer', + 'libaudiographer', 'libtimecode', ] + if bld.env['build_target'] != 'mingw': + obj.uselib += ['DL'] if bld.is_defined('USE_EXTERNAL_LIBS'): obj.uselib.extend(['VAMPSDK', 'LIBLTC']) else: @@ -367,7 +374,7 @@ def build(bld): #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o' if bld.is_defined('HAVE_LILV') : - obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc'] + obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc'] obj.uselib += ['LILV'] if bld.is_defined('HAVE_SUIL'): obj.uselib += ['SUIL'] @@ -377,7 +384,8 @@ def build(bld): obj.includes += [ '../fst' ] obj.defines += [ 'WINDOWS_VST_SUPPORT' ] if bld.env['build_target'] == 'mingw': - obj.source += [ '../fst/vstwin.c'] + obj.source += [ '../fst/vstwin.c', '../fst/fst.c'] + obj.uselib += ['GDI32'] if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'lxvst_plugin.cc', 'linux_vst_support.cc' ] diff --git a/libs/canvas/debug.cc b/libs/canvas/debug.cc index 82bceeaf31..1f5de7faea 100644 --- a/libs/canvas/debug.cc +++ b/libs/canvas/debug.cc @@ -58,6 +58,7 @@ ArdourCanvas::checkpoint (string group, string message) map::iterator last = last_time.find (group); if (last != last_time.end ()) { +#if 0 time_t seconds = now.tv_sec - last->second.tv_sec; suseconds_t useconds = now.tv_usec - last->second.tv_usec; if (useconds < 0) { @@ -65,6 +66,7 @@ ArdourCanvas::checkpoint (string group, string message) --seconds; } cout << (now.tv_sec + ((double) now.tv_usec / 1e6)) << " [" << (seconds + ((double) useconds / 1e6)) << "]: " << message << "\n"; +#endif } else { cout << message << "\n"; } diff --git a/libs/fst/scanner.cc b/libs/fst/scanner.cc index ca95b25471..99177b51db 100644 --- a/libs/fst/scanner.cc +++ b/libs/fst/scanner.cc @@ -4,7 +4,9 @@ #include #include "ardour/filesystem_paths.h" +#ifdef LXVST_SUPPORT #include "ardour/linux_vst_support.h" +#endif #include "ardour/vst_info_file.h" /* make stupid waf happy. @@ -16,7 +18,9 @@ * ...but waf does track include dependencies. */ #include "../ardour/vst_info_file.cc" +#ifdef LXVST_SUPPORT #include "../ardour/linux_vst_support.cc" +#endif #include "../ardour/filesystem_paths.cc" #include "../ardour/directory_names.cc" #include "../pbd/error.cc" diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index d37c5dffbb..4c4e2888f5 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -4,9 +4,9 @@ #ifdef PLATFORM_WINDOWS -#include -#include +#include static UINT_PTR idle_timer_id = 0; +extern char *basename(char *path); #else /* linux + wine */ @@ -116,9 +116,9 @@ idle_hands( } } + pthread_mutex_lock (&fst->lock); #ifndef PLATFORM_WINDOWS /* linux + wine */ /* Dispatch messages to send keypresses to the plugin */ - pthread_mutex_lock (&fst->lock); int i; for (i = 0; i < fst->n_pending_keys; ++i) { @@ -141,6 +141,7 @@ idle_hands( } fst->n_pending_keys = 0; +#endif /* See comment for maybe_set_program call below */ maybe_set_program (fst); @@ -158,7 +159,6 @@ idle_hands( maybe_set_program (fst); fst->program_set_without_editor = 1; } -#endif pthread_mutex_unlock (&fst->lock); } diff --git a/libs/fst/wscript b/libs/fst/wscript index e15613d9c0..44ff9a8128 100644 --- a/libs/fst/wscript +++ b/libs/fst/wscript @@ -27,6 +27,11 @@ def configure(conf): conf.load('misc') conf.load('compiler_cxx') autowaf.configure(conf) + if conf.env['WINDOWS_VST_SUPPORT'] == True and bld.env['build_target'] == 'mingw': + conf.check(compiler='cxx', + lib='gdi32', + mandatory=True, + uselib_store='GDI32') # Add a waf `feature' to allow compilation of things using winegcc from waflib.TaskGen import feature @@ -59,9 +64,15 @@ def build(bld): ) obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] obj.target = 'ardour-vst-scanner.exe.so' + obj.uselib = ['GIOMM', 'DL'] else: obj = bld (features = 'cxx c cxxprogram') - obj.source = ( 'scanner.cc' ) + if bld.is_defined('WINDOWS_VST_SUPPORT'): + obj.source = ( 'scanner.cc', 'fst.c', 'vstwin.c' ) + obj.uselib = ['GIOMM', 'DL', 'GDI32'] + else: + obj.source = ( 'scanner.cc' ) + obj.uselib = ['GIOMM', 'DL'] obj.target = 'ardour-vst-scanner' obj.includes = [ '../pbd/', '../ardour/', '.' ] @@ -72,4 +83,3 @@ def build(bld): 'PACKAGE="' + I18N_PACKAGE + '"', ] obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst') - obj.uselib = ['GIOMM', 'DL'] diff --git a/libs/pbd/localtime_r.cc b/libs/pbd/localtime_r.cc index c72e3eb458..fc16fb08b5 100644 --- a/libs/pbd/localtime_r.cc +++ b/libs/pbd/localtime_r.cc @@ -39,3 +39,19 @@ localtime_r(const time_t *const timep, struct tm *p_tm) } #endif + +#ifdef __MINGW64__ + struct tm * +__cdecl localtime(const long int *_Time) +{ + if (_Time == NULL) + { + return localtime((const time_t *const)NULL); // Unpredictable behavior in case of _Time == NULL; + } + else + { + const time_t tempTime = *_Time; + return localtime(&tempTime); + } +} +#endif diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index dc5620b2ef..04d0a38e85 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -75,7 +75,7 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI }; typedef typename RequestBuffer::rw_vector RequestBufferVector; -#if defined(__MINGW32__) && !defined (__MINGW64__) +#ifdef COMPILER_MSVC // ?? (not needed for ming32 nor mingw64) struct pthread_cmp { diff --git a/libs/pbd/pbd/localtime_r.h b/libs/pbd/pbd/localtime_r.h index ad5b89d134..1e810ec084 100644 --- a/libs/pbd/pbd/localtime_r.h +++ b/libs/pbd/pbd/localtime_r.h @@ -3,11 +3,22 @@ #include #ifdef COMPILER_MSVC - #define localtime_r( _clock, _result ) \ - ( *(_result) = *localtime( (_clock) ), \ - (_result) ) -#else - extern struct tm *localtime_r(const time_t *const timep, struct tm *p_tm); + +#define localtime_r( _clock, _result ) \ + ( *(_result) = *localtime( (_clock) ), (_result) ) + +#elif defined __MINGW64__ + +# ifdef (localtime_r) +# undef localtime_r +# endif + +// As in 64 bit time_t is 64 bit integer, compiler breaks compilation +// everytime implicit cast from long int* to time_t* worked in +// the past (32 bit). To unblock such a cast we added the localtime below: +extern struct tm *localtime(const long int *_Time); +extern struct tm *localtime_r(const time_t *const timep, struct tm *p_tm); + #endif #endif diff --git a/libs/pbd/pbd/system_exec.h b/libs/pbd/pbd/system_exec.h index f08191654d..0ca523085a 100644 --- a/libs/pbd/pbd/system_exec.h +++ b/libs/pbd/pbd/system_exec.h @@ -30,7 +30,7 @@ #define STDERR_FILENO 2 #endif -#if defined (__MINGW64__) +#ifdef PLATFORM_WINDOWS #include #ifdef interface diff --git a/libs/pbd/windows_special_dirs.cc b/libs/pbd/windows_special_dirs.cc index 1a477bad45..5e924f57e1 100644 --- a/libs/pbd/windows_special_dirs.cc +++ b/libs/pbd/windows_special_dirs.cc @@ -40,7 +40,7 @@ // char * -get_win_special_folder (int csidl) +PBD::get_win_special_folder (int csidl) { wchar_t path[PATH_MAX+1]; HRESULT hr; diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 77a7d555d4..f424ae4c41 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -106,9 +106,14 @@ def configure(conf): # Boost headers autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') + if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw': + conf.check(compiler='cxx', + lib='ole32', + mandatory=True, + uselib_store='OLE') def build(bld): - + # Make signals_generated.h using signals.py bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h') @@ -143,14 +148,14 @@ def build(bld): obj.vnum = LIBPBD_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', - 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' + 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' ] - + if bld.env['build_target'] == 'x86_64': obj.defines += [ 'USE_X86_64_ASM' ] if bld.env['build_target'] == 'mingw': obj.source += [ 'windows_special_dirs.cc' ] - obj.linkflags = ['-lole'] + obj.uselib += ' OLE' if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): # Unit tests diff --git a/libs/plugins/reasonablesynth.lv2/lv2.c b/libs/plugins/reasonablesynth.lv2/lv2.c index 586ca54c86..87f930b3c4 100644 --- a/libs/plugins/reasonablesynth.lv2/lv2.c +++ b/libs/plugins/reasonablesynth.lv2/lv2.c @@ -100,7 +100,7 @@ instantiate(const LV2_Descriptor* descriptor, self->synth = synth_alloc(); synth_init(self->synth, rate); - +#ifndef PLATFORM_WINDOWS // easter egg is for sane platforms with native support for localtime_r only struct tm date; time_t now; time(&now); @@ -109,6 +109,7 @@ instantiate(const LV2_Descriptor* descriptor, printf("reasonable synth.lv2 says: happy holidays!\n"); self->xmas = true; } +#endif return (LV2_Handle)self; } diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 1893e31b8d..2b9167e386 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -58,6 +58,19 @@ using namespace std; using namespace ARDOUR; using namespace PBD; +#ifndef timeradd /// only avail with __USE_BSD +#define timeradd(a,b,result) \ + do { \ + (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ + if ((result)->tv_usec >= 1000000) \ + { \ + ++(result)->tv_sec; \ + (result)->tv_usec -= 1000000; \ + } \ + } while (0) +#endif + #define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */ Strip::Strip (Surface& s, const std::string& name, int index, const map& strip_buttons) diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index e252d22e3d..8bc791a1ee 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/wscript b/wscript index 0ba30eba4f..e9cedd216d 100644 --- a/wscript +++ b/wscript @@ -740,9 +740,10 @@ def configure(conf): if opts.windows_vst: conf.define('WINDOWS_VST_SUPPORT', 1) conf.env['WINDOWS_VST_SUPPORT'] = True - conf.env.append_value('CFLAGS', '-I' + Options.options.wine_include) - conf.env.append_value('CXXFLAGS', '-I' + Options.options.wine_include) - autowaf.check_header(conf, 'cxx', 'windows.h', mandatory = True) + if not Options.options.dist_target == 'mingw': + conf.env.append_value('CFLAGS', '-I' + Options.options.wine_include) + conf.env.append_value('CXXFLAGS', '-I' + Options.options.wine_include) + autowaf.check_header(conf, 'cxx', 'windows.h', mandatory = True) if opts.lxvst: if sys.platform == 'darwin': conf.env['LXVST_SUPPORT'] = False