summaryrefslogtreecommitdiff
path: root/t/ax/cc-no-c-o.in
diff options
context:
space:
mode:
Diffstat (limited to 't/ax/cc-no-c-o.in')
-rw-r--r--t/ax/cc-no-c-o.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/ax/cc-no-c-o.in b/t/ax/cc-no-c-o.in
new file mode 100644
index 000000000..c18f9b975
--- /dev/null
+++ b/t/ax/cc-no-c-o.in
@@ -0,0 +1,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 "$@"