Mercurial > hg > octave-nkf
diff configure.ac @ 15170:a44ff4f0a20b
Add AX_COMPARE_VERSION.m4 macro m4/ dir to make configure.ac simpler.
* configure.ac: Use new AX_COMPARE_VERSION macro in place of case statements
* m4/module.mk: Add ax_compare_version.m4 to the build system.
* m4/ax_compare_version.m4: New macro to compare versions in Autoconf files.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 13 Aug 2012 15:43:49 -0700 |
parents | 66dcad99b55e |
children | c7d466a02065 |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -237,11 +237,9 @@ gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` - case "$gxx_version" in - 1.* | 2.[[0123456789]].* | 3.[[01234]].*) - AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave]) - ;; - esac + AX_COMPARE_VERSION([$gxx_version], [lt], [3.5], + [AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave])]) + GXX_VERSION="$gxx_version" fi AC_SUBST(GXX_VERSION) @@ -286,12 +284,10 @@ gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` - case "$gcc_version" in - [12].*) - warn_gcc_version="gcc version $gcc_version is likely to cause problems" - OCTAVE_CONFIGURE_WARNING([warn_gcc_version]) - ;; - esac + AX_COMPARE_VERSION([$gcc_version], [lt], [3], + [warn_gcc_version="gcc version $gcc_version is likely to cause problems" + OCTAVE_CONFIGURE_WARNING([warn_gcc_version])]) + GCC_VERSION="$gcc_version" fi AC_SUBST(CC_VERSION)