summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorkeithmarshall <keithmarshall>2006-08-18 19:21:56 +0000
committerkeithmarshall <keithmarshall>2006-08-18 19:21:56 +0000
commit98d4a2da7cda373986b256a5d4c8aa291e387c4b (patch)
tree5070c93cb227ac517cc08e8328c2f2fed72f2803 /m4
parent3bc7f2ea168802e66fc4920f578446096086dfaf (diff)
downloadgroff-98d4a2da7cda373986b256a5d4c8aa291e387c4b.tar.gz
* m4/groff.m4 (GROFF_MAKEINFO): Correct `makeinfo version testing
logic; it previously caused an `expr' syntax error, if no version of `makinfo' was present. Also, remove dependency on `makeinfo' in VPATH builds, if an up to date `groff.info' is present in either `builddir' or in `srcdir'.
Diffstat (limited to 'm4')
-rw-r--r--m4/groff.m435
1 files changed, 10 insertions, 25 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4
index f2dc478b..2a8a2916 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -71,35 +71,20 @@ AC_DEFUN([GROFF_MAKEINFO],
| sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`]
AC_MSG_RESULT([$makeinfo_version])
# Consider only the first two numbers in version number string.
- [makeinfo_version_major=`echo $makeinfo_version \
- | sed 's/^\([0-9]*\).*$/\1/'`]
- if test -z "$makeinfo_version_major"; then
- makeinfo_version_major=0
- makeinfo_version_minor=0
- else
- [makeinfo_version_minor=`echo $makeinfo_version \
- | sed 's/^[^.][^.]*\(.*\)$/\1/'`]
- # No minor version number at all?
- if test -z "$makeinfo_version_minor"; then
- makeinfo_version_minor=0
- else
- [makeinfo_version_minor=`echo $makeinfo_version_minor \
- | sed 's/\.\([0-9]*\).*$/\1/'`]
- if test -z "$makeinfo_version_minor"; then
- makeinfo_version_minor=0
- fi
- fi
+ makeinfo_version_major=`IFS=.; set x $makeinfo_version; echo 0${2}`
+ makeinfo_version_minor=`IFS=.; set x $makeinfo_version; echo 0${3}`
+ makeinfo_version_numeric=`
+ expr ${makeinfo_version_major}000 \+ ${makeinfo_version_minor}`
+ if test $makeinfo_version_numeric -lt 4008; then
+ missing="\`makeinfo' is too old."
fi
fi
- makeinfo_version_numeric=`expr $makeinfo_version_major '*' 1000 \
- '+' $makeinfo_version_minor`
- if test $makeinfo_version_numeric -lt 4008; then
- missing="\`makeinfo' is too old."
- fi
if test -n "$missing"; then
- if test ! -f doc/groff.info \
- || test ${srcdir}/doc/groff.texinfo -nt doc/groff.info; then
+ infofile=doc/groff.info
+ test -f ${infofile} || infofile=${srcdir}/${infofile}
+ if test ! -f ${infofile} \
+ || test ${srcdir}/doc/groff.texinfo -nt ${infofile}; then
AC_MSG_ERROR($missing
[Get the `texinfo' package version 4.8 or newer.])
else