summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m417
1 files changed, 7 insertions, 10 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 14b848143f..5becadbbb4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2033,22 +2033,19 @@ AC_DEFUN([FIND_GHC_BOOTSTRAP_PROG],[
# $2 = the with option name
# $3 = the command to look for
AC_DEFUN([FIND_GCC],[
- if test "$TargetOS_CPP" = "darwin" &&
- test "$XCodeVersion1" -eq 4 &&
- test "$XCodeVersion2" -lt 2
- then
- # In Xcode 4.1, 'gcc-4.2' is the gcc legacy backend (rather
- # than the LLVM backend). We prefer the legacy gcc, but in
- # Xcode 4.2 'gcc-4.2' was removed.
- FP_ARG_WITH_PATH_GNU_PROG([$1], [gcc-4.2], [gcc-4.2])
- elif test "$windows" = YES
+ if test "$windows" = YES
then
$1="$CC"
else
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [$2], [$3])
+ # fallback to CC if set and no --with-$2=... was used
+ if test -z "$With_$2" -a -n "$CC"
+ then
+ With_$2="$CC"
+ $1="$CC"
# From Xcode 5 on/, OS X command line tools do not include gcc
# anymore. Use clang.
- if test -z "$$1"
+ elif test -z "$$1"
then
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [clang], [clang])
fi