Skip to content

Commit

Permalink
build/pkgs/info/spkg-configure.m4: check for version >= 7.0
Browse files Browse the repository at this point in the history
Some distros still provide 6.x versions of GNU info, but v7.0.0
includes an important bugfix for the standalone "info" reader: it
fixes the exit code when the section you want to read does not exist.
Our singular interface now relies on this, so we require a newer
version if the system package is going to be used.
  • Loading branch information
orlitzky committed Nov 7, 2024
1 parent 0d04a2c commit e2bfed6
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions build/pkgs/info/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
SAGE_SPKG_CONFIGURE([info], [
AC_PATH_PROG(INFO, info)
AS_IF([test -z "${INFO}"], [sage_spkg_install_info=yes
], [
dnl very old makeinfo are not texi2any, newer are symlinks to texi2any
AC_PATH_PROG(TEXI2ANY, texi2any)
AS_IF([test -z "${TEXI2ANY}"], [sage_spkg_install_info=yes
], [
AS_IF([makeinfo -c foo 2>&1 | grep -q invalid], [
dnl makeinfo found, but too old, and does not support all options that ecl likes to use
sage_spkg_install_info=yes])
rm -f stdin.info
])
AS_IF([test -z "${INFO}"], [
sage_spkg_install_info=yes
],[
AC_MSG_CHECKING([for GNU info >= 7.0])
info_major=$(info --version | head -n1 | cut -d' ' -f4 | cut -d. -f1)
AS_IF([test $info_major -lt 7], [
AC_MSG_RESULT([no])
sage_spkg_install_info=yes
],[
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for texi2any])
AC_PATH_PROG(TEXI2ANY, texi2any)
AS_IF([test -z "${TEXI2ANY}"], [
AC_MSG_RESULT([no])
sage_spkg_install_info=yes
],[
AC_MSG_RESULT([yes])
])
])
])
])

0 comments on commit e2bfed6

Please sign in to comment.