[aubio_priv.h] only define AUBIO_DBG in debug mode
[aubio.git] / wscript
diff --git a/wscript b/wscript
index 86208cd..2d1630a 100644 (file)
--- a/wscript
+++ b/wscript
@@ -45,6 +45,9 @@ def options(ctx):
             help = 'whether to compile with (--build-type=release)' \
                     ' or without (--build-type=debug)' \
                     ' compiler opimizations [default: release]')
+    ctx.add_option('--debug', action = 'store_const',
+            dest = 'build_type', const = 'debug',
+            help = 'build in debug mode (see --build-type)')
     add_option_enable_disable(ctx, 'fftw3f', default = False,
             help_str = 'compile with fftw3f instead of ooura (recommended)',
             help_disable_str = 'do not compile with fftw3f')
@@ -139,6 +142,7 @@ def configure(ctx):
     ctx.check(header_name='stdio.h')
     ctx.check(header_name='math.h')
     ctx.check(header_name='string.h')
+    ctx.check(header_name='errno.h')
     ctx.check(header_name='limits.h')
     ctx.check(header_name='stdarg.h')
     ctx.check(header_name='getopt.h', mandatory = False)
@@ -555,9 +559,10 @@ def doxygen(bld):
                     + bld.path.find_dir('src').ant_glob('**/*.h'),
                 target = bld.path.find_or_declare('api/index.html'),
                 cwd = bld.path.find_dir('doc'))
+        # evaluate nodes lazily to prevent build directory traversal warnings
         bld.install_files('${DATAROOTDIR}/doc/libaubio-doc/api',
-                bld.path.find_or_declare('api').ant_glob('**/*'),
-                cwd=bld.path.find_or_declare('api'),
+                bld.path.find_or_declare('api').ant_glob('**/*',
+                    generator=True), cwd=bld.path.find_or_declare('api'),
                 relative_trick=True)
 
 def sphinx(bld):
@@ -579,9 +584,10 @@ def sphinx(bld):
                 cwd = bld.path.find_dir('doc'),
                 source = bld.path.find_dir('doc').ant_glob('*.rst'),
                 target = bld.path.find_or_declare('manual/index.html'))
+        # evaluate nodes lazily to prevent build directory traversal warnings
         bld.install_files('${DATAROOTDIR}/doc/libaubio-doc/manual',
-                bld.path.find_or_declare('manual').ant_glob('**/*'),
-                cwd=bld.path.find_or_declare('manual'),
+                bld.path.find_or_declare('manual').ant_glob('**/*',
+                    generator=True), cwd=bld.path.find_or_declare('manual'),
                 relative_trick=True)
 
 # register the previous rules as build rules