summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 2eb06bdcac..1a74583b3b 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -427,10 +427,19 @@ AC_ARG_WITH(samba4srcdir,
AC_MSG_ERROR([--with-samba4srcdir should take a path])
;;
* )
- samba4srcdir="$withval"
- if test -z "$samba4srcdir" -a ! -f $samba4srcdir; then
- AC_MSG_ERROR(['$samba4srcdir' does not exist!])
+ if test -z "$withval" -a ! -f $withval; then
+ AC_MSG_ERROR(['$withval' does not exist!])
fi
+
+ if test -f "$withval/selftest/selftest.pl"; then
+ samba4srcdir="$withval"
+ else
+ if test -f "$withval/source/selftest/selftest.pl"; then
+ samba4srcdir="$withval/source"
+ else
+ AC_MSG_ERROR([unable to find selftest.pl in '$withval'!])
+ fi
+ fi
;;
esac
])