thread-safe fftw (needs fftw-3.3.5)

see https://github.com/FFTW/fftw3/issues/16
This commit is contained in:
Robin Gareus 2015-10-17 19:23:39 +02:00
parent cbea1a4a82
commit 9ae577fb07
2 changed files with 13 additions and 0 deletions

View File

@ -25,6 +25,10 @@
#include <sigc++/bind.h>
#include <gtkmm/settings.h>
#ifdef HAVE_FFTW35F
#include <fftw3.h>
#endif
#include "pbd/error.h"
#include "pbd/file_utils.h"
#include "pbd/textreceiver.h"
@ -283,6 +287,10 @@ int main (int argc, char *argv[])
Glib::thread_init();
}
#ifdef HAVE_FFTW35F
ftwf_make_planner_thread_safe ();
#endif
#ifdef ENABLE_NLS
gtk_set_locale ();
#endif

View File

@ -291,6 +291,8 @@ def configure(conf):
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F',
mandatory=True)
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW35F',
atleast_version='3.3.5', mandatory=False)
autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
atleast_version='1.2.1')
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
@ -483,6 +485,9 @@ def build(bld):
obj.source += [ 'lv2_plugin_ui.cc' ]
obj.use += [ 'SUIL' ]
if bld.is_defined('HAVE_FFTW35F'):
obj.linkflags = ' -lfftw3_threads'
if bld.is_defined('NEED_INTL'):
obj.linkflags = ' -lintl'