Hash :
db6cb184
Author :
Date :
2013-07-21T13:46:48
test: avoid false positives in 'cc-no-c-o' script Fixes automake bug#14911. * t/ax/cc-no-c-o.in: Be more careful in determining whether both the '-c' and '-o' options have been passed on the command line to the compiler. In particular, do not spuriously complain in the face of options like '-compatibility_version' or '-current_version' (seen on Mac OS X 10.7). * THANKS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
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 30 31 32 33 34 35 36 37 38 39 40 41
#! @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@'}
seen_c=false
seen_o=false
for arg
do
case $arg in
-c)
seen_c=true;;
# It is acceptable not to leave a space between the '-o' option
# and its argument, so we have to cater for that.
-o|-o*)
seen_o=true;;
esac
if $seen_c && $seen_o; then
echo "$0: both '-o' and '-c' seen on the command line" >&2
exit 2
fi
done
exec $am_CC "$@"