From 33c0cebd75a3b94f551587b5fc2d067b7b887211 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 3 Oct 2007 21:14:20 +0000 Subject: r25494: Sanity check --with-samba4srcdir argument. (This used to be commit d05bf1fbeeb5504d3b372b03db1ab5fd535f7b2e) --- source3/configure.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'source3') 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 ]) -- cgit