>From 6805810d314e2b4ecb8ff14e04779d8f0ad2b4f8 Mon Sep 17 00:00:00 2001 Message-Id:
From: Stefano Lattarini Date: Mon, 26 Mar 2012 15:26:46 +0200 Subject: [PATCH] tests: workaround for automatic linker determination and conditionals See automake bug#11089. Automake is not very smart in automatically determining the command to be used to link a program whose source files' languages are conditionally defined. For example, an input like: if HAVE_CXX foo_SOURCES = more.c++ else foo_SOURCES = less.c endif will cause the build rules for 'foo' to *unconditionally* use the C++ compiler for linking, even when the 'HAVE_CXX' conditional evaluates to false (which might mean that no C++ compiler is available). This behaviour is not really correct, but it's easy enough to work around, and it's only relevant for fringe use cases (at best). So let's just test that the workaround really works. * tests/link_cond.test: New test. * tests/list-of-tests.mk: Add it. * THANKS: Update. Signed-off-by: Stefano Lattarini --- THANKS | 1 + tests/link_cond.test | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/list-of-tests.mk | 1 + 3 files changed, 92 insertions(+), 0 deletions(-) create mode 100755 tests/link_cond.test diff --git a/THANKS b/THANKS index 455cc62..702c97b 100644 --- a/THANKS +++ b/THANKS @@ -149,6 +149,7 @@ James Youngman address@hidden Jan Engelhardt address@hidden Janos Farkas address@hidden Jared Davis address@hidden +Jason DeVinney address@hidden Jason Duell address@hidden Jason Molenda address@hidden Javier Jardón address@hidden diff --git a/tests/link_cond.test b/tests/link_cond.test new file mode 100755 index 0000000..0d61865 --- /dev/null +++ b/tests/link_cond.test @@ -0,0 +1,90 @@ +#! /bin/sh +# Copyright (C) 2012 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