Author: rvs
Date: Tue Oct 25 05:35:51 2011
New Revision: 1188518
URL: http://svn.apache.org/viewvc?rev=1188518&view=rev
Log:
BIGTOP-156. Only run autoreconf when autotools >= 2.61 is installed (patch by
Bruno Mahe)
Modified:
incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/do-component-build
Modified:
incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/do-component-build
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/do-component-build?rev=1188518&r1=1188517&r2=1188518&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/do-component-build
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/do-component-build
Tue Oct 25 05:35:51 2011
@@ -19,6 +19,25 @@ set -ex
# FIXME: BIGTOP-137
chmod 777 src/c++/task-controller/configure
+
+# This is a poor man version comparison of autoconf.
+# Current autotools files target autotools 2.61 or sup.
+# There will be some build issues if we try to regenerate them with a lesser
version of autotools
+# So we will only regenerate the autotools files if they are installed and
their version is greater than
+# 2.60
+DO_AUTORECONF=""
+if [ -n `which autoconf` ]; then
+
+ AUTOCONF_VERSION=`autoconf --version | head -n 1 | sed -e 's/.*
\([.0-9]\+\)$/\1/'`
+ echo $AUTOCONF_VERSION
+
+ if [[ $AUTOCONF_VERSION > 2.60 ]]; then
+ DO_AUTORECONF="create-c++-configure"
+ fi
+fi
+
+
+
# FIXME: the LDFLAGS="-lcrypto" is a workaround for MAPREDUCE-2127
# FIXME: the FUSE_HOME="..." and LDFLAGS="-lm" is a workaround for HADOOP-3344
LDFLAGS="-lcrypto -lm" FUSE_HOME=`pwd`/build/c++/${HADOOP_ARCH} ant \
@@ -28,7 +47,7 @@ LDFLAGS="-lcrypto -lm" FUSE_HOME=`pwd`/b
-Dcompile.native=true \
-Dhadoop.conf.dir=/etc/hadoop/conf \
-Dlibhdfs=1 -Dfusedfs=true -Dcompile.c++=true
-Djdiff.build.dir=build/docs/jdiff-cloudera \
- create-c++-configure task-controller api-report bin-package compile-contrib
package \
+ $DO_AUTORECONF task-controller api-report bin-package compile-contrib
package \
"$@"