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 <[email protected]> --- autogen.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/autogen.sh b/autogen.sh index 25151c4..fcedd32 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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 _______________________________________________ fedfs-utils-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel
