@@ -24,9 +24,21 @@
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
#
-RM=/bin/rm
-FIND=/bin/find
-XARGS=/usr/bin/xargs
+RM=`which rm`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+FIND=`which find`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+XARGS=`which xargs`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
REMOVE="aclocal.m4 configure compile config.* depcomp install-sh ltmain.sh missing mkinstalldirs libtool stamp-h1 ar-lib"
@@ -54,11 +66,39 @@ ${FIND} . -type f -name 'Makefile' -print0 | ${XARGS} -r0 ${RM} -f --
echo ' done'
if test x"${1}" = x"clean"; then
- exit
+ exit 0
+fi
+
+LIBTOOLIZE=`which libtoolize`
+if [ $? -ne 0 ];
+then
+ exit 1
fi
+ACLOCAL=`which aclocal`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+AUTOHEADER=`which autoheader`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+AUTOMAKE=`which automake`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+AUTOCONF=`which autoconf`
+if [ $? -ne 0 ];
+then
+ exit 1
+fi
+
+${LIBTOOLIZE} --force --copy --install
+${ACLOCAL}
+${AUTOHEADER}
+${AUTOMAKE} --add-missing --copy --gnu
+${AUTOCONF}
-libtoolize --force --copy --install
-aclocal
-autoheader
-automake --add-missing --copy --gnu
-autoconf
+exit 0
Sanity: Don't try to generate the build environment unless all of the required tools are installed on the build system. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- autogen.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 9 deletions(-)