Skip to content
Snippets Groups Projects
Commit 879c4fa1 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

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

parent 9b875cd4
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment