#
import sys, os, glob, subprocess
import distutils, distutils.command.clean, distutils.dir_util
-from .gen_external import generate_external, header, output_path
+from gen_external import generate_external, header, output_path
from this_version import get_aubio_version
# define macros (waf puts them in build/src/config.h)
for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H',
'HAVE_MATH_H', 'HAVE_STRING_H',
- 'HAVE_C99_VARARGS_MACROS',
+ 'HAVE_ERRNO_H', 'HAVE_C99_VARARGS_MACROS',
'HAVE_LIMITS_H', 'HAVE_STDARG_H',
'HAVE_MEMCPY_HACKS']:
ext.define_macros += [(define_macro, 1)]
ext.define_macros += [('HAVE_WAVWRITE', 1)]
ext.define_macros += [('HAVE_WAVREAD', 1)]
- # TODO:
- # add cblas
+
+ # TODO: add cblas
if 0:
ext.libraries += ['cblas']
ext.define_macros += [('HAVE_ATLAS_CBLAS_H', 1)]
else:
print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs))
+def add_libav_on_win(ext):
+ """ no pkg-config on windows, simply assume these libs are available """
+ ext.libraries += ['avformat', 'avutil', 'avcodec', 'swresample']
+ for define_macro in ['HAVE_LIBAV', 'HAVE_SWRESAMPLE']:
+ ext.define_macros += [(define_macro, 1)]
+
class CleanGenerated(distutils.command.clean.clean):
def run(self):
if os.path.isdir(output_path):
else:
# check for external dependencies
add_external_deps(extension, usedouble=enable_double)
+ # force adding libav on windows
+ if os.name == 'nt' and ('WITH_LIBAV' in os.environ \
+ or 'CONDA_PREFIX' in os.environ):
+ add_libav_on_win(extension)
# add libaubio sources and look for optional deps with pkg-config
add_local_aubio_sources(extension)
# generate files python/gen/*.c, python/gen/aubio-generated.h