tools: Fix ax_cxx_version discrepancies.

This commit is contained in:
Jason Volk 2020-02-21 13:22:01 -08:00
parent fca41d5e22
commit f2ff0f170d
1 changed files with 20 additions and 2 deletions

View File

@ -3,7 +3,16 @@ AC_DEFUN([AX_CXX_VERSION],
[
AC_CACHE_CHECK([cxx version], [ax_cv_cxx_version],
[
ax_cv_cxx_version="`$CXX -dumpfullversion`"
AM_COND_IF(GCC,
[
ax_cv_cxx_version="`$CXX -dumpfullversion`"
])
AM_COND_IF(CLANG,
[
ax_cv_cxx_version="`$CXX -dumpversion`"
])
AS_IF([test "x$ax_cv_cxx_version" = "x"],
[
ax_cv_cxx_version=""
@ -18,7 +27,16 @@ AC_DEFUN([AX_CXX_EPOCH],
[
AC_CACHE_CHECK([cxx epoch], [ax_cv_cxx_epoch],
[
ax_cv_cxx_epoch="`$CXX -dumpversion`"
AM_COND_IF(GCC,
[
ax_cv_cxx_epoch="`$CXX -dumpversion`"
])
AM_COND_IF(CLANG,
[
ax_cv_cxx_epoch="`$CXX -dumpversion | cut -d'.' -f1`"
])
AS_IF([test "x$ax_cv_cxx_epoch" = "x"],
[
ax_cv_cxx_epoch=""