Index: wscript
===================================================================
--- wscript	(revision 403e9dd73f79f60cdf7ff2426d0e8dfc43bf0601)
+++ wscript	(revision 6b1435146ce5b7358e5ea0bbe303e5adc9c9a3dc)
@@ -14,27 +14,29 @@
 APPNAME = 'aubio'
 
-# read from VERSION
+# source VERSION
 for l in open('VERSION').readlines(): exec (l.strip())
 
-VERSION = '.'.join \
-	([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
-	+ AUBIO_VERSION_STATUS
-LIB_VERSION = '.'.join \
-	([str(x) for x in [LIBAUBIO_LT_CUR, LIBAUBIO_LT_REV, LIBAUBIO_LT_AGE]])
-
-import os.path, sys
-if os.path.exists('src/config.h') or os.path.exists('Makefile'):
-    print "Please run 'make distclean' to clean-up autotools files before using waf"
-    sys.exit(1)
+VERSION = '.'.join ([str(x) for x in [
+    AUBIO_MAJOR_VERSION,
+    AUBIO_MINOR_VERSION,
+    AUBIO_PATCH_VERSION
+    ]]) + AUBIO_VERSION_STATUS
+
+LIB_VERSION = '.'.join ([str(x) for x in [
+    LIBAUBIO_LT_CUR,
+    LIBAUBIO_LT_REV,
+    LIBAUBIO_LT_AGE]])
 
 top = '.'
 out = 'build'
 
-def add_option_enable_disable(ctx, name, default = None, help_str = None, help_disable_str = None):
+def add_option_enable_disable(ctx, name, default = None,
+        help_str = None, help_disable_str = None):
   if help_str == None:
       help_str = 'enable ' + name + ' support'
   if help_disable_str == None:
       help_disable_str = 'do not ' + help_str
-  ctx.add_option('--enable-' + name, action = 'store_true', default = default,
+  ctx.add_option('--enable-' + name, action = 'store_true'
+          default = default,
           dest = 'enable_' + name.replace('-','_'),
           help = help_str)
@@ -46,17 +48,24 @@
 def options(ctx):
   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')
+          help_str = 'compile with fftw3f instead of ooura (recommended)',
+          help_disable_str = 'do not compile with fftw3f')
   add_option_enable_disable(ctx, 'fftw3', default = False,
-          help_str = 'compile with fftw3 instead of ooura', help_disable_str = 'do not compile with fftw3')
+          help_str = 'compile with fftw3 instead of ooura',
+          help_disable_str = 'do not compile with fftw3')
   add_option_enable_disable(ctx, 'complex', default = False,
-          help_str ='compile with C99 complex', help_disable_str = 'do not use C99 complex (default)' )
+          help_str ='compile with C99 complex',
+          help_disable_str = 'do not use C99 complex (default)' )
   add_option_enable_disable(ctx, 'jack', default = None,
-          help_str = 'compile with jack (auto)', help_disable_str = 'disable jack support')
+          help_str = 'compile with jack (auto)',
+          help_disable_str = 'disable jack support')
   add_option_enable_disable(ctx, 'sndfile', default = None,
-          help_str = 'compile with sndfile (auto)', help_disable_str = 'disable sndfile')
+          help_str = 'compile with sndfile (auto)',
+          help_disable_str = 'disable sndfile')
   add_option_enable_disable(ctx, 'avcodec', default = None,
-          help_str = 'compile with libavcodec (auto)', help_disable_str = 'disable libavcodec')
+          help_str = 'compile with libavcodec (auto)',
+          help_disable_str = 'disable libavcodec')
   add_option_enable_disable(ctx, 'samplerate', default = None,
-          help_str = 'compile with samplerate (auto)', help_disable_str = 'disable samplerate')
+          help_str = 'compile with samplerate (auto)',
+          help_disable_str = 'disable samplerate')
   add_option_enable_disable(ctx, 'memcpy', default = True,
           help_str = 'use memcpy hacks (default)',
@@ -101,6 +110,7 @@
     ctx.env.CFLAGS += ['-std=c99']
     if target_platform == 'ios':
-        DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
-        SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
+        DEVROOT = "/Applications/Xcode.app/Contents"
+        DEVROOT += "/Developer/Platforms/iPhoneOS.platform/Developer"
+        SDKROOT = "%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
         ctx.env.CFLAGS += [ '-arch', 'arm64' ]
         ctx.env.CFLAGS += [ '-arch', 'armv7' ]
@@ -112,6 +122,7 @@
         ctx.env.LINKFLAGS += [ '-miphoneos-version-min=' + MINSDKVER ]
     else:
-        DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer"
-        SDKROOT="%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
+        DEVROOT = "/Applications/Xcode.app/Contents"
+        DEVROOT += "/Developer/Platforms/iPhoneSimulator.platform/Developer"
+        SDKROOT = "%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
         ctx.env.CFLAGS += [ '-arch', 'i386' ]
         ctx.env.CFLAGS += [ '-arch', 'x86_64' ]
@@ -165,5 +176,5 @@
           args = '--cflags --libs', mandatory = False)
       if (ctx.options.enable_double == True):
-        ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!')
+        ctx.msg('Warning', 'fftw3f enabled, but compiling in double precision!')
     else:
       # fftw3f not enabled, take most sensible one according to enable_double
