246 fi |
246 fi |
247 |
247 |
248 |
248 |
249 ### Locate C compiler (CC) |
249 ### Locate C compiler (CC) |
250 |
250 |
251 # gcc is almost always present, but on Windows we |
251 # On windows, only cl.exe is supported. |
252 # prefer cl.exe and on Solaris we prefer CC. |
252 # On Solaris, cc is preferred to gcc. |
253 # Thus test for them in this order. |
253 # Elsewhere, gcc is preferred to cc. |
254 if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
254 |
255 # Do not probe for cc on MacOSX. |
255 if test "x$CC" != x; then |
256 COMPILER_CHECK_LIST="cl gcc" |
256 COMPILER_CHECK_LIST="$CC" |
|
257 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
|
258 COMPILER_CHECK_LIST="cl" |
|
259 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
|
260 COMPILER_CHECK_LIST="cc gcc" |
257 else |
261 else |
258 COMPILER_CHECK_LIST="cl cc gcc" |
262 COMPILER_CHECK_LIST="gcc cc" |
259 fi |
263 fi |
260 |
264 |
261 TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST]) |
265 TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST]) |
262 # Now that we have resolved CC ourself, let autoconf have it's go at it |
266 # Now that we have resolved CC ourself, let autoconf have its go at it |
263 AC_PROG_CC([$CC]) |
267 AC_PROG_CC([$CC]) |
264 |
268 |
265 ### Locate C++ compiler (CXX) |
269 ### Locate C++ compiler (CXX) |
266 |
270 |
267 if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
271 if test "x$CXX" != x; then |
268 # Do not probe for CC on MacOSX. |
272 COMPILER_CHECK_LIST="$CXX" |
269 COMPILER_CHECK_LIST="cl g++" |
273 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
|
274 COMPILER_CHECK_LIST="cl" |
|
275 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
|
276 COMPILER_CHECK_LIST="CC g++" |
270 else |
277 else |
271 COMPILER_CHECK_LIST="cl CC g++" |
278 COMPILER_CHECK_LIST="g++ CC" |
272 fi |
279 fi |
|
280 |
273 TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST]) |
281 TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST]) |
274 # Now that we have resolved CXX ourself, let autoconf have it's go at it |
282 # Now that we have resolved CXX ourself, let autoconf have its go at it |
275 AC_PROG_CXX([$CXX]) |
283 AC_PROG_CXX([$CXX]) |
276 |
284 |
277 ### Locate other tools |
285 ### Locate other tools |
278 |
286 |
279 if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
287 if test "x$OPENJDK_TARGET_OS" = xmacosx; then |