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 CFS provides RPMs which can be installed alongside your
35 existing autoconf/make RPMs, if you are nervous about
38 ftp://ftp.lustre.org/pub/other/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
85 REQUIRED_DIRS="build lnet lustre"
86 OPTIONAL_DIRS="snmp portals"
87 CONFIGURE_DIRS="libsysio ldiskfs"
90 for dir in $REQUIRED_DIRS ; do
91 if [ ! -d "$dir" ] ; then
93 Your tree seems to be missing $dir.
94 Please read README.lustrecvs for details.
98 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
100 # optional directories for Lustre
101 for dir in $OPTIONAL_DIRS; do
102 if [ -d "$dir" ] ; then
103 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
107 check_version automake automake-1.7 "1.7.8"
108 check_version autoconf autoconf "2.57"
110 echo "Running aclocal-1.7 $ACLOCAL_FLAGS..."
111 aclocal-1.7 $ACLOCAL_FLAGS
112 echo "Running autoheader..."
114 echo "Running automake-1.7..."
116 echo "Running autoconf..."
119 # Run autogen.sh in these directories
120 for dir in $CONFIGURE_DIRS; do
121 if [ -d $dir ] ; then
122 pushd $dir >/dev/null
123 echo "Running autogen for $dir..."