Commit 1422ea4e authored by Ian Lynagh's avatar Ian Lynagh

Refactor configure.ac's: Define FIND_GCC() in aclocal.m4

parent 6d934cce
......@@ -1607,4 +1607,22 @@ AC_DEFUN([XCODE_VERSION],[
fi
])
# FIND_GCC()
# --------------------------------
# Finds where gcc is
AC_DEFUN([FIND_GCC],[
if test "$TargetOS_CPP" = "darwin" &&
test "$XCodeVersion1" -ge 4
then
# From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy
# backend (instead of the LLVM backend)
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
else
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
fi
export CC
WhatGccIsCalled="$CC"
AC_SUBST(WhatGccIsCalled)
])
# LocalWords: fi
......@@ -426,18 +426,7 @@ AC_SUBST([SplitObjsBroken])
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
if test "$TargetOS_CPP" = "darwin" &&
test "$XCodeVersion1" -ge 4
then
# From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy
# backend (instead of the LLVM backend)
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
else
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
fi
export CC
WhatGccIsCalled="$CC"
AC_SUBST(WhatGccIsCalled)
FIND_GCC()
dnl ** Which ld to use?
dnl --------------------------------------------------------------
......
......@@ -51,18 +51,7 @@ XCODE_VERSION()
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
if test "$TargetOS_CPP" = "darwin" &&
test "$XCodeVersion1" -ge 4
then
# From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy backend (instead of the LLVM
# backend)
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
else
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
fi
export CC
WhatGccIsCalled="$CC"
AC_SUBST(WhatGccIsCalled)
FIND_GCC()
FP_GCC_VERSION
AC_PROG_CPP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment