diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 8471209e..efc1671d 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -188,6 +188,21 @@ dnl look for programs we need to compile and run AC_PROG_AWK AC_PROG_CC AC_PROG_CXX +AC_DEFUN([AX_GCC_VERSION], [ + GCC_VERSION="" + AS_IF([test "x$GCC" = "xyes"],[ + AS_IF([test "x$ax_gcc_version_option" != "xno"],[ + AC_CACHE_CHECK([gcc version],[ax_cv_gcc_version],[ + ax_cv_gcc_version="`$CC -dumpversion`" + AS_IF([test "x$ax_cv_gcc_version" = "x"],[ + ax_cv_gcc_version="" + ]) + ]) + GCC_VERSION=$ax_cv_gcc_version + ]) + ]) + AC_SUBST([GCC_VERSION]) +]) AX_GCC_VERSION dnl if the compiler is gcc, test for gcc >= 4.8 AS_IF([test "x$GCC_VERSION" = "x"],[],