+echo "Checking for a complete tree..."
+REQUIRED_DIRS="build libcfs lnet lustre"
+OPTIONAL_DIRS="snmp portals"
+CONFIGURE_DIRS="libsysio lustre-iokit ldiskfs"
+
+for dir in $REQUIRED_DIRS ; do
+ if [ ! -d "$dir" ] ; then
+ cat >&2 <<EOF
+Your tree seems to be missing $dir.
+Please read README.lustrecvs for details.
+EOF
+ exit 1
+ fi
+ ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
+done
+# optional directories for Lustre
+for dir in $OPTIONAL_DIRS; do
+ if [ -d "$dir" ] ; then
+ ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
+ fi
+done