Changeset 348


Ignore:
Timestamp:
Jun 3, 2006 2:45:26 AM (13 years ago)
Author:
andreasw
Message:

improved check for correct version of autotools

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r342 r348  
    18361836  rm -f confauto.out
    18371837
     1838  # Check if the executable autoconf is picked up from the correct location
     1839  echo "$as_me:$LINENO: checking whether autoconf is coming from the correct location" >&5
     1840echo $ECHO_N "checking whether autoconf is coming from the correct location... $ECHO_C" >&6
     1841  autoconf_dir=`which autoconf | sed -e 's=/autoconf=='`
     1842  autoconf_dir=`cd $autoconf_dir; pwd`
     1843  if test x$AUTOTOOLS_DIR = x; then
     1844    want_dir=$HOME/bin
     1845  else
     1846    want_dir=$AUTOTOOLS_DIR/bin
     1847  fi
     1848  if test $autoconf_dir = `cd $want_dir; pwd`; then
     1849    echo "$as_me:$LINENO: result: yes" >&5
     1850echo "${ECHO_T}yes" >&6
     1851  else
     1852    rm -f confauto.out
     1853    echo "$as_me:$LINENO: result: no" >&5
     1854echo "${ECHO_T}no" >&6
     1855    { { echo "$as_me:$LINENO: error: The autoconf executable should be picked up from \$HOME/bin or \$AUTOTOOLS_DIR/bin." >&5
     1856echo "$as_me: error: The autoconf executable should be picked up from \$HOME/bin or \$AUTOTOOLS_DIR/bin." >&2;}
     1857   { (exit 1); exit 1; }; }
     1858  fi
     1859
    18381860  # Check if we have automake
    18391861  # Extract the first word of "automake", so it can be a program name with args.
     
    18981920  rm -f confauto.out
    18991921
     1922  # Check if the executable automake is picked up from the correct location
     1923  echo "$as_me:$LINENO: checking whether automake is coming from the correct location" >&5
     1924echo $ECHO_N "checking whether automake is coming from the correct location... $ECHO_C" >&6
     1925  automake_dir=`which automake | sed -e 's=/automake=='`
     1926  automake_dir=`cd $automake_dir; pwd`
     1927  if test x$AUTOTOOLS_DIR = x; then
     1928    want_dir=$HOME/bin
     1929  else
     1930    want_dir=$AUTOTOOLS_DIR/bin
     1931  fi
     1932  if test $automake_dir = `cd $want_dir; pwd`; then
     1933    echo "$as_me:$LINENO: result: yes" >&5
     1934echo "${ECHO_T}yes" >&6
     1935  else
     1936    rm -f confauto.out
     1937    echo "$as_me:$LINENO: result: no" >&5
     1938echo "${ECHO_T}no" >&6
     1939    { { echo "$as_me:$LINENO: error: The automake executable should be picked up from \$HOME/bin or \$AUTOTOOLS_DIR/bin." >&5
     1940echo "$as_me: error: The automake executable should be picked up from \$HOME/bin or \$AUTOTOOLS_DIR/bin." >&2;}
     1941   { (exit 1); exit 1; }; }
     1942  fi
     1943
    19001944  # Check if we can find the libtool file
    1901   if test "${LIBTOOLPREFIX:+set}" != set; then
    1902     for p in $HOME ; do
    1903       as_ac_File=`echo "ac_cv_file_$p/share/aclocal/libtool.m4" | $as_tr_sh`
    1904 echo "$as_me:$LINENO: checking for $p/share/aclocal/libtool.m4" >&5
    1905 echo $ECHO_N "checking for $p/share/aclocal/libtool.m4... $ECHO_C" >&6
     1945  if test x$AUTOTOOLS_DIR = x; then
     1946    want_dir=$HOME/share
     1947  else
     1948    want_dir=$AUTOTOOLS_DIR/share
     1949  fi
     1950  as_ac_File=`echo "ac_cv_file_$want_dir/aclocal/libtool.m4" | $as_tr_sh`
     1951echo "$as_me:$LINENO: checking for $want_dir/aclocal/libtool.m4" >&5
     1952echo $ECHO_N "checking for $want_dir/aclocal/libtool.m4... $ECHO_C" >&6
    19061953if eval "test \"\${$as_ac_File+set}\" = set"; then
    19071954  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    19111958echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    19121959   { (exit 1); exit 1; }; }
    1913 if test -r "$p/share/aclocal/libtool.m4"; then
     1960if test -r "$want_dir/aclocal/libtool.m4"; then
    19141961  eval "$as_ac_File=yes"
    19151962else
     
    19201967echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
    19211968if test `eval echo '${'$as_ac_File'}'` = yes; then
    1922   LIBTOOLM4="$p/share/aclocal/libtool.m4"
    1923                      LIBTOOLPREFIX="$p"
    1924 fi
    1925 
    1926       if test x"$LIBTOOLM4" != x; then
    1927         break;
    1928       fi
    1929     done
    1930     if test x"$LIBTOOLM4" = x; then
    1931       { { echo "$as_me:$LINENO: error: You specified you want to use maintainer mode, but I cannot find the file libtool.m4 on your system.  Please set the prefix of the location of the correct file with the LIBTOOLPREFIX variable, so that it is in $LIBTOOLPREFIX/share/aclocal.  We assume here that it is the plain version obtained from the GNU tarball." >&5
    1932 echo "$as_me: error: You specified you want to use maintainer mode, but I cannot find the file libtool.m4 on your system.  Please set the prefix of the location of the correct file with the LIBTOOLPREFIX variable, so that it is in $LIBTOOLPREFIX/share/aclocal.  We assume here that it is the plain version obtained from the GNU tarball." >&2;}
    1933    { (exit 1); exit 1; }; }
    1934     fi
    1935   else
    1936     as_ac_File=`echo "ac_cv_file_$LIBTOOLPREFIX/share/aclocal/libtool.m4" | $as_tr_sh`
    1937 echo "$as_me:$LINENO: checking for $LIBTOOLPREFIX/share/aclocal/libtool.m4" >&5
    1938 echo $ECHO_N "checking for $LIBTOOLPREFIX/share/aclocal/libtool.m4... $ECHO_C" >&6
     1969  LIBTOOLM4="$want_dir/aclocal/libtool.m4"
     1970else
     1971  { { echo "$as_me:$LINENO: error: I cannot find the libtool.m4 file." >&5
     1972echo "$as_me: error: I cannot find the libtool.m4 file." >&2;}
     1973   { (exit 1); exit 1; }; }
     1974fi
     1975
     1976
     1977  # Check if this is the correct version of libtool (with escaped dots)
     1978  correct_version='1.5.22'
     1979  grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
     1980  as_ac_File=`echo "ac_cv_file_$want_dir/libtool/ltmain.sh" | $as_tr_sh`
     1981echo "$as_me:$LINENO: checking for $want_dir/libtool/ltmain.sh" >&5
     1982echo $ECHO_N "checking for $want_dir/libtool/ltmain.sh... $ECHO_C" >&6
    19391983if eval "test \"\${$as_ac_File+set}\" = set"; then
    19401984  echo $ECHO_N "(cached) $ECHO_C" >&6
     
    19441988echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    19451989   { (exit 1); exit 1; }; }
    1946 if test -r "$LIBTOOLPREFIX/share/aclocal/libtool.m4"; then
    1947   eval "$as_ac_File=yes"
    1948 else
    1949   eval "$as_ac_File=no"
    1950 fi
    1951 fi
    1952 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
    1953 echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
    1954 if test `eval echo '${'$as_ac_File'}'` = yes; then
    1955   LIBTOOLM4="$LIBTOOLPREFIX/share/aclocal/libtool.m4"
    1956 else
    1957   { { echo "$as_me:$LINENO: error: You specified LIBTOOLPREFIX, but I cannot find the file libtool.m4 in $LIBTOOLPREFIX/share/aclocal." >&5
    1958 echo "$as_me: error: You specified LIBTOOLPREFIX, but I cannot find the file libtool.m4 in $LIBTOOLPREFIX/share/aclocal." >&2;}
    1959    { (exit 1); exit 1; }; }
    1960 fi
    1961 
    1962   fi
    1963 
    1964   # Check if this is the correct version of libtool (with escaped dots)
    1965   correct_version='1.5.22'
    1966   grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1967   as_ac_File=`echo "ac_cv_file_$LIBTOOLPREFIX/share/libtool/ltmain.sh" | $as_tr_sh`
    1968 echo "$as_me:$LINENO: checking for $LIBTOOLPREFIX/share/libtool/ltmain.sh" >&5
    1969 echo $ECHO_N "checking for $LIBTOOLPREFIX/share/libtool/ltmain.sh... $ECHO_C" >&6
    1970 if eval "test \"\${$as_ac_File+set}\" = set"; then
    1971   echo $ECHO_N "(cached) $ECHO_C" >&6
    1972 else
    1973   test "$cross_compiling" = yes &&
    1974   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    1975 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    1976    { (exit 1); exit 1; }; }
    1977 if test -r "$LIBTOOLPREFIX/share/libtool/ltmain.sh"; then
     1990if test -r "$want_dir/libtool/ltmain.sh"; then
    19781991  eval "$as_ac_File=yes"
    19791992else
     
    19922005echo $ECHO_N "checking whether we are using the correct version ($correct_version) of libtool.... $ECHO_C" >&6
    19932006  if test $have_ltmain = yes; then
    1994     if $EGREP $grep_version $LIBTOOLPREFIX/share/libtool/ltmain.sh >/dev/null 2>&1; then
     2007    if $EGREP $grep_version $want_dir/libtool/ltmain.sh >/dev/null 2>&1; then
    19952008      echo "$as_me:$LINENO: result: yes" >&5
    19962009echo "${ECHO_T}yes" >&6
     
    19982011      echo "$as_me:$LINENO: result: no" >&5
    19992012echo "${ECHO_T}no" >&6
    2000       { { echo "$as_me:$LINENO: error: You don't have the correct version of libtool.  Please set LIBTOOLPREFIX to the correct installation prefix, so that the correct version of ltmain.sh is in $LIBTOOLPREFIX/share/libtool." >&5
    2001 echo "$as_me: error: You don't have the correct version of libtool.  Please set LIBTOOLPREFIX to the correct installation prefix, so that the correct version of ltmain.sh is in $LIBTOOLPREFIX/share/libtool." >&2;}
     2013      { { echo "$as_me:$LINENO: error: You don't have the correct version of libtool." >&5
     2014echo "$as_me: error: You don't have the correct version of libtool." >&2;}
    20022015   { (exit 1); exit 1; }; }
    20032016    fi
    20042017  else
    2005     { { echo "$as_me:$LINENO: error: I cannot find the file ltmain.sh in $LIBTOOLPREFIX/share/libtool" >&5
    2006 echo "$as_me: error: I cannot find the file ltmain.sh in $LIBTOOLPREFIX/share/libtool" >&2;}
     2018    echo "$as_me:$LINENO: result: no" >&5
     2019echo "${ECHO_T}no" >&6
     2020    { { echo "$as_me:$LINENO: error: I cannot find the ltmain.sh file." >&5
     2021echo "$as_me: error: I cannot find the ltmain.sh file." >&2;}
    20072022   { (exit 1); exit 1; }; }
    20082023  fi
Note: See TracChangeset for help on using the changeset viewer.