diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-05 19:43:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-05 19:43:40 +0000 |
commit | f5c94674711fdab177cda41cfd84f5b017a846e0 (patch) | |
tree | a434bedb06cdc08b0197fdd18005f453da041b86 /autoconf | |
parent | 9dc7ab538ee845e2477519c740a2c736a19bc30d (diff) | |
download | external_llvm-f5c94674711fdab177cda41cfd84f5b017a846e0.zip external_llvm-f5c94674711fdab177cda41cfd84f5b017a846e0.tar.gz external_llvm-f5c94674711fdab177cda41cfd84f5b017a846e0.tar.bz2 |
Make the check for GCC version more robust, fix shared library
dependencies in makefile, and fix llvm_cv_no_link_all_option
on darwin.
Patch by Shantonu Sen, more info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012410.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 98f0fe6..db9fddd 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -119,7 +119,7 @@ AC_CACHE_CHECK([type of operating system we're going to host on], llvm_cv_platform_type="Unix" ;; *-*-darwin*) llvm_cv_link_all_option="-Wl,-all_load" - llvm_cv_link_all_option="-Wl,-noall_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" llvm_cv_os_type="Darwin" llvm_cv_platform_type="Unix" ;; *-*-freebsd*) @@ -656,11 +656,10 @@ fi dnl Verify that GCC is version 3.0 or higher if test "$GCC" = "yes" then - gccmajor=`$CC --version | head -n 1 | sed 's/[[^0-9]]*\([[0-9.]]\).*/\1/'` - if test "$gccmajor" -lt "3" - then - AC_MSG_ERROR([gcc 3.x required, but you have a lower version]) - fi + AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 +#error Unsupported GCC version +#endif +]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) fi dnl Check for GNU Make. We use its extensions, so don't build without it |