]> git.donarmstrong.com Git - lilypond.git/commitdiff
STEPMAKE_CHECK_VERSION macro
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 16 May 2002 13:35:00 +0000 (13:35 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 16 May 2002 13:35:00 +0000 (13:35 +0000)
aclocal.m4
configure
stepmake/aclocal.m4

index 2e14b05f46f5f1b647d9c372de6844ac7e3c1f42..17c80f15f983961a51c28755475f5ea2b16ac23d 100644 (file)
@@ -32,10 +32,9 @@ AC_DEFUN(STEPMAKE_ADD_ENTRY, [
 ])
 
 # Check if tested program ($2) was found ($1).
-# If not, add etry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
+# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
 # We could abort here if a 'REQUIRED' program is not found
 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
-    #if test "`eval echo '$'"$1"`" = "no"; then
     STEPMAKE_CHECK_SEARCH_RESULT($1)
     if test $? -ne 0; then
        STEPMAKE_ADD_ENTRY($3, $2)
@@ -65,6 +64,21 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
 ])
 
 
+# Check version of program ($1)
+# If version is smaller than requested ($3),
+# add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
+AC_DEFUN(STEPMAKE_CHECK_VERSION, [
+    r="`eval echo '$'"$1"`"
+    AC_MSG_CHECKING("$r version")
+    exe=`STEPMAKE_GET_EXECUTABLE($r)`
+    ver=`STEPMAKE_GET_VERSION($exe)`
+    num=`STEPMAKE_NUMERIC_VERSION($ver)`
+    req=`STEPMAKE_NUMERIC_VERSION($3)`
+    AC_MSG_RESULT("$ver")
+    if test "$num" -lt "$req"; then
+       STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)")
+    fi
+])
 
 ### Macros to build configure.in
 
@@ -89,16 +103,7 @@ AC_DEFUN(STEPMAKE_BISON, [
     
     # urg.  should test functionality rather than version.
     if test "$BISON" = "bison" -a -n "$2"; then
-#    if test $? -eq 0 -a -n "$2"; then
-        AC_MSG_CHECKING("bison version")
-        exe=`STEPMAKE_GET_EXECUTABLE(bison)`
-       ver=`STEPMAKE_GET_VERSION($exe)`
-       num=`STEPMAKE_NUMERIC_VERSION($ver)`
-       req=`STEPMAKE_NUMERIC_VERSION($2)`
-       AC_MSG_RESULT("$ver")
-       if test "$num" -lt "$req"; then
-           STEPMAKE_ADD_ENTRY($1, "bison $2 (installed: $ver)")
-       fi
+       STEPMAKE_CHECK_VERSION(BISON, $1, $2)
     fi
 ])
     
@@ -372,16 +377,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
     # urg.  should test functionality rather than version.
     if test $? -eq 0 -a -n "$2"; then
-       AC_MSG_CHECKING("guile-config version")
-        exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
-       ver=`STEPMAKE_GET_VERSION($exe)`
-       set --
-       num=`STEPMAKE_NUMERIC_VERSION($ver)`
-       req=`STEPMAKE_NUMERIC_VERSION($2)`
-       AC_MSG_RESULT("$ver")
-       if test "$num" -lt "$req"; then
-           STEPMAKE_ADD_ENTRY($1, "guile-config $2 (installed: $ver)")
-       fi
+       STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
     fi
 
     AC_SUBST(GUILE_CONFIG)
@@ -740,18 +736,24 @@ AC_DEFUN(STEPMAKE_MSGFMT, [
 AC_DEFUN(STEPMAKE_PATH_PROG, [
     AC_CHECK_PROGS($1, $2, no)
     STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
-#    if ! expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
-    if test $? -ne 0; then
+    if test $? -eq 0; then
        AC_PATH_PROG($1, $2)
+       if test -n "$4"; then
+           STEPMAKE_CHECK_VERSION($1, $3, $4)
+       fi
     fi
 ])
 
 
 # Check for program in set of names ($2), set result to ($1) .
 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
+# If exists, and a minimal version ($4) is required
 AC_DEFUN(STEPMAKE_PROGS, [
     AC_CHECK_PROGS($1, $2, no)
     STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
+    if test $? -eq 0 -a -n "$4"; then
+       STEPMAKE_CHECK_VERSION($1, $3, $4)
+    fi
 ])
 
 
index 01b95a63f1725fd0d520d1219d560454641af902..2bcb1c57b884882e9ce0e1c6f2f8efe698c985ec 100755 (executable)
--- a/configure
+++ b/configure
@@ -818,7 +818,6 @@ done
 test -n "$MAKE" || MAKE="no"
 
     
-    #if test "`eval echo '$'"MAKE"`" = "no"; then
     
     r="`eval echo '$'"MAKE"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"MAKE"`' : '.*\(echo\)' > /dev/null; then
@@ -844,6 +843,41 @@ test -n "$MAKE" || MAKE="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"MAKE"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:851: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
     
     for ac_prog in find
@@ -851,7 +885,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:855: checking for $ac_word" >&5
+echo "configure:889: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -882,7 +916,6 @@ done
 test -n "$FIND" || FIND="no"
 
     
-    #if test "`eval echo '$'"FIND"`" = "no"; then
     
     r="`eval echo '$'"FIND"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"FIND"`' : '.*\(echo\)' > /dev/null; then
@@ -908,6 +941,41 @@ test -n "$FIND" || FIND="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"FIND"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:949: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
     
@@ -916,7 +984,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:920: checking for $ac_word" >&5
+echo "configure:988: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -947,7 +1015,6 @@ done
 test -n "$TAR" || TAR="no"
 
     
-    #if test "`eval echo '$'"TAR"`" = "no"; then
     
     r="`eval echo '$'"TAR"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"TAR"`' : '.*\(echo\)' > /dev/null; then
@@ -973,13 +1040,48 @@ test -n "$TAR" || TAR="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"TAR"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:1048: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
     if test "x`uname`" = "xHP-UX"; then
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:983: checking for $ac_word" >&5
+echo "configure:1085: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1019,7 +1121,7 @@ fi
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1023: checking for $ac_word" >&5
+echo "configure:1125: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1056,7 +1158,7 @@ fi
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1060: checking for $ac_word" >&5
+echo "configure:1162: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1099,7 +1201,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1103: checking for $ac_word" >&5
+echo "configure:1205: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PYTHON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1130,7 +1232,6 @@ done
 test -n "$PYTHON" || PYTHON="no"
 
     
-    #if test "`eval echo '$'"PYTHON"`" = "no"; then
     
     r="`eval echo '$'"PYTHON"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"PYTHON"`' : '.*\(echo\)' > /dev/null; then
@@ -1156,12 +1257,11 @@ test -n "$PYTHON" || PYTHON="no"
        true
     fi
 
-#    if ! expr '`eval echo '$'"PYTHON"`' : '.*\(echo\)' > /dev/null; then
-    if test $? -ne 0; then
+    if test $? -eq 0; then
        # Extract the first word of "python", so it can be a program name with args.
 set dummy python; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1165: checking for $ac_word" >&5
+echo "configure:1265: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1193,6 +1293,41 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+       if test -n ""; then
+           
+    r="`eval echo '$'"PYTHON"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:1301: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+       fi
     fi
 
 
@@ -1338,7 +1473,7 @@ EOF
     # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1342: checking for $ac_word" >&5
+echo "configure:1477: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1368,7 +1503,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1372: checking for $ac_word" >&5
+echo "configure:1507: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1419,7 +1554,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1423: checking for $ac_word" >&5
+echo "configure:1558: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1451,7 +1586,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1455: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1590: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1462,12 +1597,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1466 "configure"
+#line 1601 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1493,12 +1628,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1497: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1632: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1502: checking whether we are using GNU C" >&5
+echo "configure:1637: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1507,7 +1642,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1526,7 +1661,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1530: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1665: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1558,7 +1693,6 @@ else
 fi
 
     
-    #if test "`eval echo '$'"CC"`" = "no"; then
     
     r="`eval echo '$'"CC"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"CC"`' : '.*\(echo\)' > /dev/null; then
@@ -1591,7 +1725,7 @@ fi
     CPPFLAGS=${CPPFLAGS-""}
 
     echo $ac_n "checking for IEEE-conformance compiler flags""... $ac_c" 1>&6
-echo "configure:1595: checking for IEEE-conformance compiler flags" >&5
+echo "configure:1729: checking for IEEE-conformance compiler flags" >&5
     save_cflags="$CFLAGS"
     case "$host" in
         alpha*-*-*)
@@ -1613,7 +1747,7 @@ echo "configure:1595: checking for IEEE-conformance compiler flags" >&5
 
 # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1617: checking how to run the C preprocessor" >&5
+echo "configure:1751: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1628,13 +1762,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1632 "configure"
+#line 1766 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1645,13 +1779,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1649 "configure"
+#line 1783 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1662,13 +1796,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1666 "configure"
+#line 1800 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1696,17 +1830,17 @@ for ac_hdr in assert.h sys/stat.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1700: checking for $ac_hdr" >&5
+echo "configure:1834: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1705 "configure"
+#line 1839 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1733,12 +1867,12 @@ fi
 done
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:1737: checking whether stat file-mode macros are broken" >&5
+echo "configure:1871: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1742 "configure"
+#line 1876 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1790,7 +1924,7 @@ fi
 
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1794: checking how to run the C++ preprocessor" >&5
+echo "configure:1928: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1803,12 +1937,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1807 "configure"
+#line 1941 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1845,7 +1979,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1849: checking for $ac_word" >&5
+echo "configure:1983: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1877,7 +2011,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1881: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:2015: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1888,12 +2022,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1892 "configure"
+#line 2026 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1919,12 +2053,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1923: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2057: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1928: checking whether we are using GNU C++" >&5
+echo "configure:2062: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1933,7 +2067,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1952,7 +2086,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1956: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:2090: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1984,7 +2118,6 @@ else
 fi
 
     
-    #if test "`eval echo '$'"CXX"`" = "no"; then
     
     r="`eval echo '$'"CXX"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"CXX"`' : '.*\(echo\)' > /dev/null; then
@@ -2013,17 +2146,17 @@ fi
 
     ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:2017: checking for FlexLexer.h" >&5
+echo "configure:2150: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2022 "configure"
+#line 2155 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2060,7 +2193,7 @@ fi
 
 
     echo $ac_n "checking "g++ version"""... $ac_c" 1>&6
-echo "configure:2064: checking "g++ version"" >&5
+echo "configure:2197: checking "g++ version"" >&5
     cxx_version=`$CXX --version`
     echo "$ac_t"""$cxx_version"" 1>&6
         # urg, egcs: how to check for egcs >= 1.1?
@@ -2081,12 +2214,12 @@ echo "configure:2064: checking "g++ version"" >&5
 
 
     echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6
-echo "configure:2085: checking whether explicit instantiation is needed" >&5
+echo "configure:2218: checking whether explicit instantiation is needed" >&5
 if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2090 "configure"
+#line 2223 "configure"
 #include "confdefs.h"
 
     template <class T> struct foo { static int baz; };
@@ -2096,7 +2229,7 @@ int main() {
  return foo<int>::baz; 
 ; return 0; }
 EOF
-if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lily_cv_need_explicit_instantiation=no
 else
@@ -2123,7 +2256,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2127: checking for $ac_word" >&5
+echo "configure:2260: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2160,7 +2293,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2164: checking for $ac_word" >&5
+echo "configure:2297: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2191,7 +2324,6 @@ done
 test -n "$BISON" || BISON="no"
 
     
-    #if test "`eval echo '$'"BISON"`" = "no"; then
     
     r="`eval echo '$'"BISON"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"BISON"`' : '.*\(echo\)' > /dev/null; then
@@ -2217,20 +2349,56 @@ test -n "$BISON" || BISON="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"BISON"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:2357: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
     
     # urg.  should test functionality rather than version.
     if test "$BISON" = "bison" -a -n "1.25"; then
-#    if test $? -eq 0 -a -n "1.25"; then
-        echo $ac_n "checking "bison version"""... $ac_c" 1>&6
-echo "configure:2227: checking "bison version"" >&5
-        exe=`
-    type -p "bison" 2>&1 | awk '{print $NF}'
+       
+    r="`eval echo '$'"BISON"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:2395: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
 `
-       ver=`
+    ver=`
     "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
 `
-       num=`
+    num=`
     echo "$ver" | awk -F. '
     {
       if ($3) {last = $3}
@@ -2238,7 +2406,7 @@ echo "configure:2227: checking "bison version"" >&5
     }
     {printf "%s%s%s\n",$1*100, $2*10,last}'
 `
-       req=`
+    req=`
     echo "1.25" | awk -F. '
     {
       if ($3) {last = $3}
@@ -2246,12 +2414,13 @@ echo "configure:2227: checking "bison version"" >&5
     }
     {printf "%s%s%s\n",$1*100, $2*10,last}'
 `
-       echo "$ac_t"""$ver"" 1>&6
-       if test "$num" -lt "$req"; then
-           
-    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""bison 1.25 (installed: $ver)"\"`\"
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 1.25 (installed: $ver)"\"`\"
+
+    fi
 
-       fi
     fi
 
 
@@ -2268,7 +2437,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2272: checking for $ac_word" >&5
+echo "configure:2441: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2299,7 +2468,6 @@ done
 test -n "$FLEX" || FLEX="no"
 
     
-    #if test "`eval echo '$'"FLEX"`" = "no"; then
     
     r="`eval echo '$'"FLEX"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"FLEX"`' : '.*\(echo\)' > /dev/null; then
@@ -2325,6 +2493,41 @@ test -n "$FLEX" || FLEX="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"FLEX"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:2501: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
 
@@ -2334,7 +2537,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2338: checking for $ac_word" >&5
+echo "configure:2541: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2365,7 +2568,6 @@ done
 test -n "$AR" || AR="no"
 
     
-    #if test "`eval echo '$'"AR"`" = "no"; then
     
     r="`eval echo '$'"AR"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"AR"`' : '.*\(echo\)' > /dev/null; then
@@ -2391,11 +2593,46 @@ test -n "$AR" || AR="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"AR"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:2601: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
     # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2399: checking for $ac_word" >&5
+echo "configure:2636: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2423,7 +2660,6 @@ else
 fi
 
     
-    #if test "`eval echo '$'"RANLIB"`" = "no"; then
     
     r="`eval echo '$'"RANLIB"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"RANLIB"`' : '.*\(echo\)' > /dev/null; then
@@ -2474,7 +2710,7 @@ fi
 
 
     echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:2478: checking language" >&5    
+echo "configure:2714: checking language" >&5    
     case "$language" in
       En* | en* | Am* | am* | US* | us*)
            lang=English;;
@@ -2510,7 +2746,7 @@ EOF
 
 
     echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:2514: checking for gettext in -lintl" >&5
+echo "configure:2750: checking for gettext in -lintl" >&5
 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2518,7 +2754,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2522 "configure"
+#line 2758 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2532,7 +2768,7 @@ int main() {
 gettext()
 ; return 0; }
 EOF
-if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2562,12 +2798,12 @@ fi
     for ac_func in gettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2566: checking for $ac_func" >&5
+echo "configure:2802: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2571 "configure"
+#line 2807 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2593,7 +2829,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2625,7 +2861,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2629: checking for $ac_word" >&5
+echo "configure:2865: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2656,7 +2892,6 @@ done
 test -n "$MSGFMT" || MSGFMT="no"
 
     
-    #if test "`eval echo '$'"MSGFMT"`" = "no"; then
     
     r="`eval echo '$'"MSGFMT"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"MSGFMT"`' : '.*\(echo\)' > /dev/null; then
@@ -2682,6 +2917,41 @@ test -n "$MSGFMT" || MSGFMT="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"MSGFMT"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:2925: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
 
@@ -2693,7 +2963,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2697: checking for $ac_word" >&5
+echo "configure:2967: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2724,7 +2994,6 @@ done
 test -n "$METAFONT" || METAFONT="no"
 
     
-    #if test "`eval echo '$'"METAFONT"`" = "no"; then
     
     r="`eval echo '$'"METAFONT"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"METAFONT"`' : '.*\(echo\)' > /dev/null; then
@@ -2750,6 +3019,41 @@ test -n "$METAFONT" || METAFONT="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"METAFONT"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3027: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval ""=\"`eval echo \"'$'\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
     
     for ac_prog in inimf inimfont
@@ -2757,7 +3061,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2761: checking for $ac_word" >&5
+echo "configure:3065: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2788,7 +3092,6 @@ done
 test -n "$INIMETAFONT" || INIMETAFONT="no"
 
     
-    #if test "`eval echo '$'"INIMETAFONT"`" = "no"; then
     
     r="`eval echo '$'"INIMETAFONT"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"INIMETAFONT"`' : '.*\(echo\)' > /dev/null; then
@@ -2814,10 +3117,45 @@ test -n "$INIMETAFONT" || INIMETAFONT="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"INIMETAFONT"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3125: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval ""=\"`eval echo \"'$'\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
     echo $ac_n "checking for working metafont mode""... $ac_c" 1>&6
-echo "configure:2821: checking for working metafont mode" >&5
+echo "configure:3159: checking for working metafont mode" >&5
     modelist='ljfour lj4 lj3 lj2 ljet laserjet'
     for MFMODE in $modelist; do
        $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
@@ -2848,7 +3186,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2852: checking for $ac_word" >&5
+echo "configure:3190: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_KPSEWHICH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2879,7 +3217,6 @@ done
 test -n "$KPSEWHICH" || KPSEWHICH="no"
 
     
-    #if test "`eval echo '$'"KPSEWHICH"`" = "no"; then
     
     r="`eval echo '$'"KPSEWHICH"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"KPSEWHICH"`' : '.*\(echo\)' > /dev/null; then
@@ -2905,14 +3242,49 @@ test -n "$KPSEWHICH" || KPSEWHICH="no"
        true
     fi
 
-
-    echo $ac_n "checking for tfm path""... $ac_c" 1>&6
-echo "configure:2911: checking for tfm path" >&5
-
-    TFM_FONTS="cmr msam"
-
-    if test "x$tfm_path" = xauto ; then
-       if test "x$KPSEWHICH" != "xno" ; then
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"KPSEWHICH"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3250: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
+
+    echo $ac_n "checking for tfm path""... $ac_c" 1>&6
+echo "configure:3283: checking for tfm path" >&5
+
+    TFM_FONTS="cmr msam"
+
+    if test "x$tfm_path" = xauto ; then
+       if test "x$KPSEWHICH" != "xno" ; then
            for i in $TFM_FONTS; do
                dir=`$KPSEWHICH tfm ${i}10.tfm`
                TFM_PATH="$TFM_PATH `dirname $dir`"
@@ -2933,119 +3305,15 @@ echo "configure:2911: checking for tfm path" >&5
     
 
 
-    
-    for ac_prog in guile
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2943: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GUILE'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$GUILE"; then
-  ac_cv_prog_GUILE="$GUILE" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_GUILE="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-GUILE="$ac_cv_prog_GUILE"
-if test -n "$GUILE"; then
-  echo "$ac_t""$GUILE" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$GUILE" && break
-done
-test -n "$GUILE" || GUILE="no"
-
-    
-    #if test "`eval echo '$'"GUILE"`" = "no"; then
-    
-    r="`eval echo '$'"GUILE"`"
-    if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"GUILE"`' : '.*\(echo\)' > /dev/null; then
-       ##STEPMAKE_WARN(cannot find . )
-       false
-    else
-       true
-    fi
-
-    if test $? -ne 0; then
-       
-    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"guile\"`\"
-
-       if test "OPTIONAL" = "REQUIRED"; then
-           command="echo ERROR: guile not found"
-           # abort configure process here?
-       else
-           command="- echo guile not found"
-       fi
-       eval "GUILE"='$command'
-       false
-    else
-       true
-    fi
-
-#    if ! expr '`eval echo '$'"GUILE"`' : '.*\(echo\)' > /dev/null; then
-    if test $? -ne 0; then
-       # Extract the first word of "guile", so it can be a program name with args.
-set dummy guile; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3005: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$GUILE" in
-  /*)
-  ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GUILE="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac
-fi
-GUILE="$ac_cv_path_GUILE"
-if test -n "$GUILE"; then
-  echo "$ac_t""$GUILE" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-    fi
-
-
-
     ## First, let's just see if we can find Guile at all.
     echo $ac_n "checking "for guile-config"""... $ac_c" 1>&6
-echo "configure:3043: checking "for guile-config"" >&5
+echo "configure:3311: checking "for guile-config"" >&5
     for guile_config in guile-config $target-guile-config $build-guile-config; do
        echo "$ac_t"""$guile_config"" 1>&6
        if ! $guile_config --version > /dev/null 2>&1 ; then
            echo "configure: warning: "cannot execute $guile_config"" 1>&2
            echo $ac_n "checking "if we are cross compiling"""... $ac_c" 1>&6
-echo "configure:3049: checking "if we are cross compiling"" >&5
+echo "configure:3317: checking "if we are cross compiling"" >&5
            GUILE_CONFIG='echo no guile-config'
        else
            GUILE_CONFIG=$guile_config
@@ -3053,7 +3321,6 @@ echo "configure:3049: checking "if we are cross compiling"" >&5
        fi
     done
     
-    #if test "`eval echo '$'"GUILE_CONFIG"`" = "no"; then
     
     r="`eval echo '$'"GUILE_CONFIG"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"GUILE_CONFIG"`' : '.*\(echo\)' > /dev/null; then
@@ -3097,16 +3364,17 @@ echo "configure:3049: checking "if we are cross compiling"" >&5
 
     # urg.  should test functionality rather than version.
     if test $? -eq 0 -a -n "1.3.4"; then
-       echo $ac_n "checking "guile-config version"""... $ac_c" 1>&6
-echo "configure:3102: checking "guile-config version"" >&5
-        exe=`
-    type -p "$guile_config" 2>&1 | awk '{print $NF}'
+       
+    r="`eval echo '$'"GUILE_CONFIG"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3371: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
 `
-       ver=`
+    ver=`
     "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
 `
-       set --
-       num=`
+    num=`
     echo "$ver" | awk -F. '
     {
       if ($3) {last = $3}
@@ -3114,7 +3382,7 @@ echo "configure:3102: checking "guile-config version"" >&5
     }
     {printf "%s%s%s\n",$1*100, $2*10,last}'
 `
-       req=`
+    req=`
     echo "1.3.4" | awk -F. '
     {
       if ($3) {last = $3}
@@ -3122,12 +3390,13 @@ echo "configure:3102: checking "guile-config version"" >&5
     }
     {printf "%s%s%s\n",$1*100, $2*10,last}'
 `
-       echo "$ac_t"""$ver"" 1>&6
-       if test "$num" -lt "$req"; then
-           
-    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""guile-config 1.3.4 (installed: $ver)"\"`\"
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 1.3.4 (installed: $ver)"\"`\"
+
+    fi
 
-       fi
     fi
 
     
@@ -3141,11 +3410,11 @@ echo "configure:3102: checking "guile-config version"" >&5
 `
     if test -x $exe; then
        echo $ac_n "checking "guile compile flags"""... $ac_c" 1>&6
-echo "configure:3145: checking "guile compile flags"" >&5
+echo "configure:3414: checking "guile compile flags"" >&5
        GUILE_CFLAGS="`$guile_config compile`"
        echo "$ac_t""$GUILE_CFLAGS" 1>&6
        echo $ac_n "checking "guile link flags"""... $ac_c" 1>&6
-echo "configure:3149: checking "guile link flags"" >&5
+echo "configure:3418: checking "guile link flags"" >&5
        GUILE_LDFLAGS="`$guile_config link`"
        echo "$ac_t""$GUILE_LDFLAGS" 1>&6
     fi
@@ -3179,17 +3448,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3183: checking for $ac_hdr" >&5
+echo "configure:3452: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3188 "configure"
+#line 3457 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3216,7 +3485,7 @@ fi
 done
 
        echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6
-echo "configure:3220: checking for kpse_find_file in -lkpathsea" >&5
+echo "configure:3489: checking for kpse_find_file in -lkpathsea" >&5
 ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3224,7 +3493,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkpathsea  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3228 "configure"
+#line 3497 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -3238,7 +3507,7 @@ int main() {
 kpse_find_file()
 ; return 0; }
 EOF
-if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3268,12 +3537,12 @@ fi
        for ac_func in kpse_find_file
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3272: checking for $ac_func" >&5
+echo "configure:3541: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3277 "configure"
+#line 3546 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3299,7 +3568,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3326,7 +3595,7 @@ done
 
     fi
     echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6
-echo "configure:3330: checking whether to use kpathsea" >&5
+echo "configure:3599: checking whether to use kpathsea" >&5
     if test "$kpathsea_b" != no; then
         echo "$ac_t""yes" 1>&6
        KPATHSEA=1
@@ -3348,7 +3617,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3352: checking for $ac_word" >&5
+echo "configure:3621: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3379,7 +3648,6 @@ done
 test -n "$MAKEINFO" || MAKEINFO="no"
 
     
-    #if test "`eval echo '$'"MAKEINFO"`" = "no"; then
     
     r="`eval echo '$'"MAKEINFO"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"MAKEINFO"`' : '.*\(echo\)' > /dev/null; then
@@ -3405,10 +3673,45 @@ test -n "$MAKEINFO" || MAKEINFO="no"
        true
     fi
 
+    if test $? -eq 0 -a -n ""; then
+       
+    r="`eval echo '$'"MAKEINFO"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3681: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
     if test "$MAKEINFO" = "makeinfo"; then
        echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6
-echo "configure:3412: checking whether makeinfo can split html by @node" >&5
+echo "configure:3715: checking whether makeinfo can split html by @node" >&5
        mkdir -p out
        makeinfo --html --output=out/split <<EOF
 \input texinfo
@@ -3437,17 +3740,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3441: checking for $ac_hdr" >&5
+echo "configure:3744: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3446 "configure"
+#line 3749 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3480,7 +3783,148 @@ done
     fi
 
 
-##need perl for help2man.
+
+## Optional tools for building documentation, website, extra fonts.
+
+# guile executable for some scripts
+
+    
+    for ac_prog in guile
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3798: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GUILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$GUILE"; then
+  ac_cv_prog_GUILE="$GUILE" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_GUILE="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+GUILE="$ac_cv_prog_GUILE"
+if test -n "$GUILE"; then
+  echo "$ac_t""$GUILE" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$GUILE" && break
+done
+test -n "$GUILE" || GUILE="no"
+
+    
+    
+    r="`eval echo '$'"GUILE"`"
+    if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"GUILE"`' : '.*\(echo\)' > /dev/null; then
+       ##STEPMAKE_WARN(cannot find . )
+       false
+    else
+       true
+    fi
+
+    if test $? -ne 0; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"guile\"`\"
+
+       if test "OPTIONAL" = "REQUIRED"; then
+           command="echo ERROR: guile not found"
+           # abort configure process here?
+       else
+           command="- echo guile not found"
+       fi
+       eval "GUILE"='$command'
+       false
+    else
+       true
+    fi
+
+    if test $? -eq 0; then
+       # Extract the first word of "guile", so it can be a program name with args.
+set dummy guile; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3858: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GUILE" in
+  /*)
+  ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GUILE="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+GUILE="$ac_cv_path_GUILE"
+if test -n "$GUILE"; then
+  echo "$ac_t""$GUILE" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+       if test -n ""; then
+           
+    r="`eval echo '$'"GUILE"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:3894: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r  (installed: $ver)"\"`\"
+
+    fi
+
+       fi
+    fi
+
+
+# perl for help2man.
 
     
     for ac_prog in perl
@@ -3488,7 +3932,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3492: checking for $ac_word" >&5
+echo "configure:3936: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3519,7 +3963,6 @@ done
 test -n "$PERL" || PERL="no"
 
     
-    #if test "`eval echo '$'"PERL"`" = "no"; then
     
     r="`eval echo '$'"PERL"`"
     if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"PERL"`' : '.*\(echo\)' > /dev/null; then
@@ -3545,12 +3988,11 @@ test -n "$PERL" || PERL="no"
        true
     fi
 
-#    if ! expr '`eval echo '$'"PERL"`' : '.*\(echo\)' > /dev/null; then
-    if test $? -ne 0; then
+    if test $? -eq 0; then
        # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3554: checking for $ac_word" >&5
+echo "configure:3996: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3582,8 +4024,241 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+       if test -n ""; then
+           
+    r="`eval echo '$'"PERL"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:4032: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r  (installed: $ver)"\"`\"
+
     fi
 
+       fi
+    fi
+
+
+# pktrace for generating pfa's, pfb's
+
+    for ac_prog in pktrace
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4073: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_PKTRACE'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$PKTRACE"; then
+  ac_cv_prog_PKTRACE="$PKTRACE" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_PKTRACE="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+PKTRACE="$ac_cv_prog_PKTRACE"
+if test -n "$PKTRACE"; then
+  echo "$ac_t""$PKTRACE" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$PKTRACE" && break
+done
+test -n "$PKTRACE" || PKTRACE="no"
+
+    
+    
+    r="`eval echo '$'"PKTRACE"`"
+    if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"PKTRACE"`' : '.*\(echo\)' > /dev/null; then
+       ##STEPMAKE_WARN(cannot find . )
+       false
+    else
+       true
+    fi
+
+    if test $? -ne 0; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"pktrace\"`\"
+
+       if test "OPTIONAL" = "REQUIRED"; then
+           command="echo ERROR: pktrace not found"
+           # abort configure process here?
+       else
+           command="- echo pktrace not found"
+       fi
+       eval "PKTRACE"='$command'
+       false
+    else
+       true
+    fi
+
+    if test $? -eq 0 -a -n "1.0.3"; then
+       
+    r="`eval echo '$'"PKTRACE"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:4133: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "1.0.3" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r 1.0.3 (installed: $ver)"\"`\"
+
+    fi
+
+    fi
+
+# new makeinfo for multi-page website docs
+
+    for ac_prog in makeinfo
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4172: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$MAKEINFO"; then
+  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_MAKEINFO="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+MAKEINFO="$ac_cv_prog_MAKEINFO"
+if test -n "$MAKEINFO"; then
+  echo "$ac_t""$MAKEINFO" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$MAKEINFO" && break
+done
+test -n "$MAKEINFO" || MAKEINFO="no"
+
+    
+    
+    r="`eval echo '$'"MAKEINFO"`"
+    if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"MAKEINFO"`' : '.*\(echo\)' > /dev/null; then
+       ##STEPMAKE_WARN(cannot find . )
+       false
+    else
+       true
+    fi
+
+    if test $? -ne 0; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"makeinfo\"`\"
+
+       if test "OPTIONAL" = "REQUIRED"; then
+           command="echo ERROR: makeinfo not found"
+           # abort configure process here?
+       else
+           command="- echo makeinfo not found"
+       fi
+       eval "MAKEINFO"='$command'
+       false
+    else
+       true
+    fi
+
+    if test $? -eq 0 -a -n "4.1"; then
+       
+    r="`eval echo '$'"MAKEINFO"`"
+    echo $ac_n "checking "$r version"""... $ac_c" 1>&6
+echo "configure:4232: checking "$r version"" >&5
+    exe=`
+    type -p "$r" 2>&1 | awk '{print $NF}'
+`
+    ver=`
+    "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+`
+    num=`
+    echo "$ver" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    req=`
+    echo "4.1" | awk -F. '
+    {
+      if ($3) {last = $3}
+      else {last =0}
+    }
+    {printf "%s%s%s\n",$1*100, $2*10,last}'
+`
+    echo "$ac_t"""$ver"" 1>&6
+    if test "$num" -lt "$req"; then
+       
+    eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r 4.1 (installed: $ver)"\"`\"
+
+    fi
+
+    fi
 
 
 
@@ -3597,7 +4272,7 @@ fi
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3601: checking for 8-bit clean memcmp" >&5
+echo "configure:4276: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3605,7 +4280,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3609 "configure"
+#line 4284 "configure"
 #include "confdefs.h"
 #ifdef __cplusplus
 extern "C" void exit(int);
@@ -3618,7 +4293,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -3636,12 +4311,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:3640: checking for vprintf" >&5
+echo "configure:4315: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3645 "configure"
+#line 4320 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -3667,7 +4342,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -3691,12 +4366,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:3695: checking for _doprnt" >&5
+echo "configure:4370: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3700 "configure"
+#line 4375 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -3722,7 +4397,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -3749,12 +4424,12 @@ fi
 for ac_func in memmem snprintf vsnprintf gettext isinf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3753: checking for $ac_func" >&5
+echo "configure:4428: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3758 "configure"
+#line 4433 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3780,7 +4455,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3814,6 +4489,7 @@ cat >> confdefs.h <<EOF
 EOF
 
 
+# Gather requirements and generate output.
 
     
     
@@ -4001,14 +4677,15 @@ s%@INIMETAFONT@%$INIMETAFONT%g
 s%@MFMODE@%$MFMODE%g
 s%@KPSEWHICH@%$KPSEWHICH%g
 s%@TFM_PATH@%$TFM_PATH%g
-s%@GUILE@%$GUILE%g
 s%@GUILE_CONFIG@%$GUILE_CONFIG%g
 s%@GUILE_CFLAGS@%$GUILE_CFLAGS%g
 s%@GUILE_LDFLAGS@%$GUILE_LDFLAGS%g
 s%@KPATHSEA@%$KPATHSEA%g
 s%@MAKEINFO@%$MAKEINFO%g
 s%@SPLITTING_MAKEINFO@%$SPLITTING_MAKEINFO%g
+s%@GUILE@%$GUILE%g
 s%@PERL@%$PERL%g
+s%@PKTRACE@%$PKTRACE%g
 s%@LIBOBJS@%$LIBOBJS%g
 s%@OPTIONAL@%$OPTIONAL%g
 s%@REQUIRED@%$REQUIRED%g
@@ -4355,6 +5032,7 @@ fi
     fi
 
 
+
 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
 
 cat <<EOF
index 2e14b05f46f5f1b647d9c372de6844ac7e3c1f42..17c80f15f983961a51c28755475f5ea2b16ac23d 100644 (file)
@@ -32,10 +32,9 @@ AC_DEFUN(STEPMAKE_ADD_ENTRY, [
 ])
 
 # Check if tested program ($2) was found ($1).
-# If not, add etry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
+# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
 # We could abort here if a 'REQUIRED' program is not found
 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
-    #if test "`eval echo '$'"$1"`" = "no"; then
     STEPMAKE_CHECK_SEARCH_RESULT($1)
     if test $? -ne 0; then
        STEPMAKE_ADD_ENTRY($3, $2)
@@ -65,6 +64,21 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
 ])
 
 
+# Check version of program ($1)
+# If version is smaller than requested ($3),
+# add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
+AC_DEFUN(STEPMAKE_CHECK_VERSION, [
+    r="`eval echo '$'"$1"`"
+    AC_MSG_CHECKING("$r version")
+    exe=`STEPMAKE_GET_EXECUTABLE($r)`
+    ver=`STEPMAKE_GET_VERSION($exe)`
+    num=`STEPMAKE_NUMERIC_VERSION($ver)`
+    req=`STEPMAKE_NUMERIC_VERSION($3)`
+    AC_MSG_RESULT("$ver")
+    if test "$num" -lt "$req"; then
+       STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)")
+    fi
+])
 
 ### Macros to build configure.in
 
@@ -89,16 +103,7 @@ AC_DEFUN(STEPMAKE_BISON, [
     
     # urg.  should test functionality rather than version.
     if test "$BISON" = "bison" -a -n "$2"; then
-#    if test $? -eq 0 -a -n "$2"; then
-        AC_MSG_CHECKING("bison version")
-        exe=`STEPMAKE_GET_EXECUTABLE(bison)`
-       ver=`STEPMAKE_GET_VERSION($exe)`
-       num=`STEPMAKE_NUMERIC_VERSION($ver)`
-       req=`STEPMAKE_NUMERIC_VERSION($2)`
-       AC_MSG_RESULT("$ver")
-       if test "$num" -lt "$req"; then
-           STEPMAKE_ADD_ENTRY($1, "bison $2 (installed: $ver)")
-       fi
+       STEPMAKE_CHECK_VERSION(BISON, $1, $2)
     fi
 ])
     
@@ -372,16 +377,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
     # urg.  should test functionality rather than version.
     if test $? -eq 0 -a -n "$2"; then
-       AC_MSG_CHECKING("guile-config version")
-        exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
-       ver=`STEPMAKE_GET_VERSION($exe)`
-       set --
-       num=`STEPMAKE_NUMERIC_VERSION($ver)`
-       req=`STEPMAKE_NUMERIC_VERSION($2)`
-       AC_MSG_RESULT("$ver")
-       if test "$num" -lt "$req"; then
-           STEPMAKE_ADD_ENTRY($1, "guile-config $2 (installed: $ver)")
-       fi
+       STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2)
     fi
 
     AC_SUBST(GUILE_CONFIG)
@@ -740,18 +736,24 @@ AC_DEFUN(STEPMAKE_MSGFMT, [
 AC_DEFUN(STEPMAKE_PATH_PROG, [
     AC_CHECK_PROGS($1, $2, no)
     STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
-#    if ! expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
-    if test $? -ne 0; then
+    if test $? -eq 0; then
        AC_PATH_PROG($1, $2)
+       if test -n "$4"; then
+           STEPMAKE_CHECK_VERSION($1, $3, $4)
+       fi
     fi
 ])
 
 
 # Check for program in set of names ($2), set result to ($1) .
 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
+# If exists, and a minimal version ($4) is required
 AC_DEFUN(STEPMAKE_PROGS, [
     AC_CHECK_PROGS($1, $2, no)
     STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
+    if test $? -eq 0 -a -n "$4"; then
+       STEPMAKE_CHECK_VERSION($1, $3, $4)
+    fi
 ])