$OpenBSD$ --- stepmake/aclocal.m4.orig Thu Jun 1 13:30:35 2006 +++ stepmake/aclocal.m4 Sun Jun 25 20:34:47 2006 @@ -31,9 +31,14 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [ ## for compatibility reasons. ## grab the first version number in --version output. - eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' \ - | head -n 1 \ - | tr ' ' '\n' | grep '[0-9]\.[0-9]' | head -n 1 | sed 's/\([0-9.]*\).*/\1/g'\`\" + eval '_ver=\`'"$1"' --version 2>&1\` || _ver=\`'"$1"' -V 2>&1\` && + _ver=\`echo $_ver | + grep '\''[0-9]\.[0-9]'\'' | + head -n 1 | + tr '\'' '\'' '\''\n'\'' | + grep '\''[0-9]\.[0-9]'\'' | + head -n 1 | + sed '\''s/\([0-9.]*\).*/\1/g'\''\`' if test -z "$_ver"; then ## If empty, try date [fontforge] @@ -48,12 +53,9 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [ # Calculate simplistic numeric version from version string ($1) # As yet, we have no need for something more elaborate. AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [ - echo "$1" | awk -F. ' - { - if ([$]3) {three = [$]3} - else {three = 0} - } - {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + three}' + echo "$1" | awk -F. ' + NF==1 {print; next} + {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + [$]3}' ])