python/lib/moresetuptools.py: always define HAVE_C99_VARARGS_MACROS
[aubio.git] / python / lib / moresetuptools.py
index 3c2e4cb..f7ebf54 100644 (file)
@@ -21,11 +21,11 @@ def add_packages(packages, ext=None, **kw):
              }
 
     for package in packages:
+        cmd = ['pkg-config', '--libs', '--cflags', package]
         try:
-            cmd = ['pkg-config', '--libs', '--cflags', package]
             tokens = subprocess.check_output(cmd)
-        except subprocess.CalledProcessError:
-            print("{:s} could not be found".format(package))
+        except Exception as e:
+            print("Running \"{:s}\" failed: {:s}".format(' '.join(cmd), repr(e)))
             continue
         tokens = tokens.decode('utf8').split()
         for token in tokens:
@@ -64,6 +64,7 @@ def add_local_aubio_sources(ext):
     # 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_LIMITS_H', 'HAVE_MEMCPY_HACKS']:
         ext.define_macros += [(define_macro, 1)]
 
@@ -92,7 +93,7 @@ def add_local_aubio_sources(ext):
 
     # add accelerate on darwin
     if sys.platform.startswith('darwin'):
-        ext.extra_link_args += ['-framework', 'accelerate']
+        ext.extra_link_args += ['-framework', 'Accelerate']
         ext.define_macros += [('HAVE_ACCELERATE', 1)]
 
     ext.define_macros += [('HAVE_WAVWRITE', 1)]