summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-10-24 14:45:47 -0700
committerRoland McGrath <roland@hack.frob.com>2014-10-24 14:45:47 -0700
commit461a7b1e4551ee9018f7542c21ff32b0f9872e7f (patch)
tree9b94af8d879cb7ab5a1d9ede3eaa5baecd48c12c /configure.ac
parent70996a373dd38296254029423ae6d87c02e7184a (diff)
downloadglibc-461a7b1e4551ee9018f7542c21ff32b0f9872e7f.tar.gz
Rework compiler version check in configure.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 82d0896c31..9dd2c686a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -910,9 +910,6 @@ AC_CHECK_PROG_VER(LD, $LD, --version,
# These programs are version sensitive.
AC_CHECK_TOOL_PREFIX
-AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
- [version \([egcygnustpi-]*[0-9.]*\)], [4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ],
- critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
[3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
@@ -933,6 +930,16 @@ AC_CHECK_PROG_VER(AWK, gawk, --version,
[GNU Awk[^0-9]*\([0-9][0-9.]*\)],
[3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk")
+AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [
+AC_TRY_COMPILE([], [
+#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
+#error insufficient compiler
+#endif],
+ [libc_cv_compiler_ok=yes],
+ [libc_cv_compiler_ok=no])])
+AS_IF([test $libc_cv_compiler_ok != yes],
+ [critic_missing="$critic_missing compiler"])
+
AC_CHECK_TOOL(NM, nm, false)
if test "x$maintainer" = "xyes"; then