1085.1.4
by Monty Taylor
pandora-build v1 |
1 |
dnl Copyright (C) 2009 Sun Microsystems |
2 |
dnl This file is free software; Sun Microsystems |
|
3 |
dnl gives unlimited permission to copy and/or distribute it, |
|
4 |
dnl with or without modifications, as long as this notice is preserved. |
|
5 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
6 |
dnl If the user is on a Mac and didn't ask for a specific compiler |
7 |
dnl You're gonna get 4.2. |
|
8 |
AC_DEFUN([PANDORA_MAC_GCC42], |
|
1081.1.1
by Monty Taylor
Whole boat-load of build fixes. |
9 |
[AS_IF([test "$GCC" = "yes"],[ |
10 |
AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ |
|
1081.1.2
by Monty Taylor
Added file existence test for gcc-4.2 check on osx. |
11 |
AS_IF([test -f /usr/bin/gcc-4.2], |
12 |
[ |
|
13 |
CPP="/usr/bin/gcc-4.2 -E"
|
|
14 |
CC=/usr/bin/gcc-4.2
|
|
15 |
CXX=/usr/bin/g++-4.2
|
|
16 |
]) |
|
1081.1.1
by Monty Taylor
Whole boat-load of build fixes. |
17 |
]) |
18 |
]) |
|
19 |
]) |
|
20 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
21 |
dnl |
22 |
AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[ |
|
23 |
AC_REQUIRE([PANDORA_MAC_GCC42]) |
|
1081.1.1
by Monty Taylor
Whole boat-load of build fixes. |
24 |
AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent], |
25 |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
|
26 |
#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))
|
|
27 |
# error GCC is Too Old!
|
|
28 |
#endif
|
|
29 |
]])], |
|
30 |
[ac_cv_gcc_recent=yes], |
|
31 |
[ac_cv_gcc_recent=no])]) |
|
32 |
AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"], |
|
33 |
AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2])) |
|
1085.1.4
by Monty Taylor
pandora-build v1 |
34 |
AS_IF([test "$ac_cv_gcc_recent" = "no"], |
1081.1.1
by Monty Taylor
Whole boat-load of build fixes. |
35 |
AC_MSG_ERROR([Your version of GCC is too old. At least version 4.1 is required])) |
36 |
]) |