tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / m4 / minuso.m4
1 ##                                                          -*- Autoconf -*-
2 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
3 #
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # AM_PROG_CC_C_O
9 # --------------
10 # Like AC_PROG_CC_C_O, but changed for automake.
11 AC_DEFUN([AM_PROG_CC_C_O],
12 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
13 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
14 AC_REQUIRE_AUX_FILE([compile])dnl
15 # FIXME: we rely on the cache variable name because
16 # there is no other way.
17 set dummy $CC
18 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
19 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
20 if test "$am_t" != yes; then
21    # Losing compiler, so override with the script.
22    # FIXME: It is wrong to rewrite CC.
23    # But if we don't then we get into trouble of one sort or another.
24    # A longer-term fix would be to have automake use am__CC in this case,
25    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
26    CC="$am_aux_dir/compile $CC"
27 fi
28 dnl Make sure AC_PROG_CC is never called again, or it will override our
29 dnl setting of CC.
30 m4_define([AC_PROG_CC],
31           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
32 ])