--- wscript.orig	2015-08-01 10:24:35 UTC
+++ wscript
@@ -75,6 +75,9 @@ def options(ctx):
     add_option_enable_disable(ctx, 'fat', default = False,
             help_str = 'build fat binaries (darwin only)',
             help_disable_str = 'do not build fat binaries (default)')
+    ctx.add_option('--disable-doxygen', action = 'store_true',
+            dest = 'disable_doxygen',
+            help = 'disable doxygen even if found')
 
     ctx.add_option('--with-target-platform', type='string',
             help='set target platform for cross-compilation', dest='target_platform')
@@ -258,6 +261,9 @@ def configure(ctx):
     # check if doxygen is installed, optional
     try:
       ctx.find_program('doxygen', var='DOXYGEN')
+      if ctx.options.disable_doxygen:
+        from sys import stderr
+        print >> stderr, 'doxygen found, but disabled with --disable-doxygen'
     except ctx.errors.ConfigurationError:
       ctx.to_log('doxygen was not found (ignoring)')
 
@@ -295,11 +301,11 @@ def build(bld):
         bld( source = bld.path.ant_glob('doc/*.txt') )
 
     # build documentation from source files using doxygen
-    if bld.env['DOXYGEN']:
+    if bld.env['DOXYGEN'] and not bld.options.disable_doxygen:
         bld( name = 'doxygen', rule = 'doxygen ${SRC} > /dev/null',
                 source = 'doc/web.cfg',
                 cwd = 'doc')
-        bld.install_files( '${PREFIX}' + '/share/doc/libaubio-doc',
+        bld.install_files( '${PREFIX}' + '/share/doc/aubio',
                 bld.path.ant_glob('doc/web/html/**'),
                 cwd = bld.path.find_dir ('doc/web'),
                 relative_trick = True)
