summaryrefslogtreecommitdiff
path: root/t/ax/cc-no-c-o.in
blob: c18f9b9752ba5624e7a18ac3921fb36e722daaef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! @AM_TEST_RUNNER_SHELL@
# Copyright (C) 2012-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# A "C compiler" that chokes when the '-c' and '-o' options are passed
# together to it on the command line.  See also automake bug#13378.

am_CC=${AM_TESTSUITE_GNU_CC-'@GNU_CC@'}

case " $* " in
 *\ -c*\ -o* | *\ -o*\ -c*)
    echo "$0: both '-o' and '-c' seen on the command line" >&2
    exit 2
    ;;
esac

exec $am_CC "$@"