For support of new GCC v4, obtain the full and major versions of the
llvm-gcc command. This will help distinguish which version is being used
so the makefiles can accommodate.
llvm-svn: 27461
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac
index 81dc0aa..ad34c88 100644
--- a/llvm/autoconf/configure.ac
+++ b/llvm/autoconf/configure.ac
@@ -592,6 +592,10 @@
AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath)
llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
AC_SUBST(LLVMGCCDIR,$llvmgccdir)
+ llvmgccversion=[`"$LLVMGCC" -v 2>&1 | grep '^gcc version' | sed 's/^gcc version \([0-9.]*\).*/\1/'`]
+ llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`]
+ AC_SUBST(LLVMGCC_VERSION,$llvmgccversion)
+ AC_SUBST(LLVMGCC_MAJVERS,$llvmgccmajvers)
fi
dnl Propagate the shared library extension that the libltdl checks did to