3 # taken from gnome-common/macros2/autogen.sh
8 IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
10 for ch_min in $ch_min_version; do
11 ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
12 if [ -z "$ch_min" ]; then break; fi
13 if [ -z "$ch_cur" ]; then ch_status=1; break; fi
14 if [ $ch_cur -gt $ch_min ]; then break; fi
15 if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
22 echo "$cmd is $1. version $required is required to build Lustre."
24 if [ -e /usr/lib/autolustre/bin/$cmd ]; then
26 You apparently already have Lustre-specific autoconf/make RPMs
27 installed on your system at /usr/lib/autolustre/share/$cmd.
28 Please set your PATH to point to those versions:
30 export PATH="/usr/lib/autolustre/bin:\$PATH"
34 Sun provides RPMs which can be installed alongside your
35 existing autoconf/make RPMs, if you are nervous about
38 http://downloads.lustre.org/public/tools/autolustre/README.autolustre
40 You may be able to download newer version from:
42 http://ftp.gnu.org/gnu/$tool/$tool-$required.tar.gz
45 [ "$cmd" = "autoconf" -a "$required" = "2.57" ] && cat >&2 <<EOF
47 or for RH9 systems you can use:
49 ftp://fr2.rpmfind.net/linux/redhat/9/en/os/i386/RedHat/RPMS/autoconf-2.57-3.noarch.rpm
51 [ "$cmd" = "automake-1.7" -a "$required" = "1.7.8" ] && cat >&2 <<EOF
53 or for RH9 systems you can use:
55 ftp://fr2.rpmfind.net/linux/fedora/core/1/i386/os/Fedora/RPMS/automake-1.7.8-1.noarch.rpm
69 echo -n "checking for $cmd $required... "
70 if ! $cmd --version >/dev/null ; then
73 version=$($cmd --version | awk "/$tool \(GNU/ { print \$4 }")
75 if ! compare_versions "$required" "$version" ; then
80 echo "Checking for a complete tree..."
81 if [ -d kernel_patches ] ; then
86 REQUIRED_DIRS="build libcfs lnet lustre"
87 OPTIONAL_DIRS="snmp portals"
88 CONFIGURE_DIRS="libsysio lustre-iokit ldiskfs spl zfs"
91 for dir in $REQUIRED_DIRS ; do
92 if [ ! -d "$dir" ] ; then
94 Your tree seems to be missing $dir.
95 Please read README.lustrecvs for details.
99 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
101 # optional directories for Lustre
102 for dir in $OPTIONAL_DIRS; do
103 if [ -d "$dir" ] ; then
104 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
108 for AMVER in 1.7 1.8 1.9 1.10 1.11; do
109 [ "$(which automake-$AMVER 2> /dev/null)" ] && break
112 [ "${AMVER#1.}" -ge "10" ] && AMOPT="-W no-portability"
114 check_version automake automake-$AMVER "1.7.8"
115 check_version autoconf autoconf "2.57"
117 echo "Running aclocal-$AMVER $ACLOCAL_FLAGS..."
118 aclocal-$AMVER $ACLOCAL_FLAGS || exit 1
119 echo "Running autoheader..."
121 echo "Running automake-$AMVER..."
122 automake-$AMVER -a -c $AMOPT || exit 1
123 echo "Running autoconf..."
126 # Run autogen.sh in these directories
127 for dir in $CONFIGURE_DIRS; do
128 if [ -d $dir ] ; then
129 pushd $dir >/dev/null
130 echo "Running autogen for $dir..."
131 sh autogen.sh || exit $?