ldb/tevent: Fix detection of waf paths.
[kai/samba.git] / source4 / lib / ldb / configure
index 50ff475ccad2577a4ca8f039f73cfa6b0d8e6934..137a26bcbe0e6165e00f1c49b8f5bce07803b967 100755 (executable)
@@ -2,7 +2,14 @@
 
 PREVPATH=`dirname $0`
 
-WAF=../../../buildtools/bin/waf
+if [ -f $PREVPATH/../../../buildtools/bin/waf ]; then
+       WAF=../../../buildtools/bin/waf
+elif [ -f $PREVPATH/buildtools/bin/waf ]; then
+       WAF=./buildtools/bin/waf
+else
+       echo "ldb: Unable to find waf"
+       exit 1
+fi
 
 # using JOBS=1 gives maximum compatibility with
 # systems like AIX which have broken threading in python