--- Minimal version to consider, thanks to Wolfgang Lux for patience Changes: -v2: bogus changes dropped, generated configure dropped
ChangeLog | 6 ++++++ configure.ac | 47 ++++++++++++++-------------------------- 3 files changed, 40 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01eb3de4..5362169f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-01-11 Ladislav Michl <la...@linux-mips.org> + + * configure: + * configure.ac: + Simplify GNU Make version detection. + 2020-01-11 Ladislav Michl <la...@linux-mips.org> * configure: diff --git a/configure.ac b/configure.ac index ad4b581c..eb13a5d1 100644 --- a/configure.ac +++ b/configure.ac @@ -1785,35 +1785,25 @@ gs_cv_make_version=`($GNUMAKE --version | head -1 | sed -e 's/^[[^0-9]]*//') 2>& # Now check for the major/minor version numbers. gs_cv_make_major_version=`(echo ${gs_cv_make_version} | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]]\([[0-9]][[0-9]]*\).*/\1/') 2>&5` gs_cv_make_minor_version=`(echo ${gs_cv_make_version} | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]]\([[0-9]][[0-9]]*\).*/\2/') 2>&5` -AC_MSG_RESULT(version: ${gs_cv_make_major_version}.${gs_cv_make_minor_version}) +AC_MSG_RESULT(${gs_cv_make_version} compared as ${gs_cv_make_major_version}.${gs_cv_make_minor_version}) + +if test -z "${gs_cv_make_major_version}" -o -z "${gs_cv_make_minor_version}" >&5 2>&5; then + AC_MSG_WARN([could not parse make version.]) + gs_cv_make_major_version=0 + gs_cv_make_minor_version=0 +fi #-------------------------------------------------------------------- # Check for GNU Make >= 3.79 #-------------------------------------------------------------------- # We want to emit a warning if they are using GNU make < 3.79 as it's # no longer supported. We let them install everything at their own -# risk though. -AC_MSG_CHECKING(for GNU Make >= 3.79) -SUPPORTED_MAKE=no -if test "${gs_cv_make_major_version}" = "3" >&5 2>&5; then - if test "${gs_cv_make_minor_version}" -ge "79" >&5 2>&5; then - SUPPORTED_MAKE=yes - fi -fi - -if test "${gs_cv_make_major_version}" -ge "4" >&5 2>&5; then - SUPPORTED_MAKE=yes -fi - -if test "${SUPPORTED_MAKE}" = "yes" >&5 2>&5; then - AC_MSG_RESULT(yes) -else - # We do not abort mostly because the checks for GNU make might have - # gone wrong and returned the wrong version, and because GNU make < - # 3.79.1 probably works anyway (with the exception of parallel - # building). - AC_MSG_RESULT(no) - AC_MSG_WARN(GNU Make >= 3.79.1 is recommended! Older versions are no longer supported. Continue at your own risk.) +# risk though, as GNU make < 3.79.1 probably works anyway (with the +# exception of parallel building). +# We do not abort mostly because the checks for GNU make might have +# gone wrong and returned the wrong version. +if test "${gs_cv_make_major_version}" -eq 3 -a "${gs_cv_make_minor_version}" -lt 79 -o "${gs_cv_make_major_version}" -lt 3 >&5 2>&5; then + AC_MSG_WARN([GNU Make >= 3.79.1 is recommended! Older versions are no longer supported. Continue at your own risk.]) fi #-------------------------------------------------------------------- @@ -1824,14 +1814,9 @@ AC_MSG_CHECKING(if GNU Make has the info function) # Things may go wrong (eg, make couldn't be found in one of the # previous steps), so by default we assume 'no' here. If things go # wrong, you'll lost some non-essential features. -MAKE_WITH_INFO_FUNCTION=no -if test "${gs_cv_make_major_version}" = "3" >&5 2>&5; then - if test "${gs_cv_make_minor_version}" -ge "81" >&5 2>&5; then - MAKE_WITH_INFO_FUNCTION=yes - fi -fi - -if test "${gs_cv_make_major_version}" -ge "4" >&5 2>&5; then +if test "${gs_cv_make_major_version}" -eq 3 -a "${gs_cv_make_minor_version}" -lt 81 -o "${gs_cv_make_major_version}" -lt 3 >&5 2>&5; then + MAKE_WITH_INFO_FUNCTION=no +else MAKE_WITH_INFO_FUNCTION=yes fi -- 2.25.0.rc2