From 71ce4de9db36dc8974a6982ce6d1f2245e8ccdf7 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 24 Nov 2009 12:03:29 +0100 Subject: [PATCH 2/2] Support for Objective C++ * tests/ext.test, tests/nodep2.test: Add Objective C++. * tests/objcxx.test, tests.objcxx2.test: New tests. * tests/Makefile.am: Adjust. Signed-off-by: Peter Breitenlohner --- tests/Makefile.am | 2 + tests/objcxx.test | 34 +++++++++++++++++++++++++ tests/objcxx2.test | 33 ++++++++++++++++++++++++ 12 files changed, 181 insertions(+), 16 deletions(-) create mode 100755 tests/objcxx.test create mode 100755 tests/objcxx2.test diff --git a/tests/Makefile.am b/tests/Makefile.am index 8936ff1..49708c8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -485,6 +485,8 @@ notrans.test \ number.test \ objc.test \ objc2.test \ +objcxx.test \ +objcxx2.test \ obsolete.test \ order.test \ outdir.test \ diff --git a/tests/objcxx.test b/tests/objcxx.test new file mode 100755 index 0000000..2dafeb5 --- /dev/null +++ b/tests/objcxx.test @@ -0,0 +1,34 @@ +#! /bin/sh +# Copyright (C) 2009 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 . + +# Test that `.mm' extension works. +# From Ralf Corsepius (for C++). + +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_PROG_OBJCXX +END + +cat > Makefile.am << 'END' +bin_PROGRAMS = hello +hello_SOURCES = hello.mm +END + +$ACLOCAL || Exit 1 +$AUTOMAKE || Exit 1 + +grep '^\.SUFFIXES:.*\.mm' Makefile.in diff --git a/tests/objcxx2.test b/tests/objcxx2.test new file mode 100755 index 0000000..558db21 --- /dev/null +++ b/tests/objcxx2.test @@ -0,0 +1,33 @@ +#! /bin/sh +# Copyright (C) 2009 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 . + +# Test that Automake suggests using AC_PROG_OBJCXX if Objective C++ +# sources are used. + +. ./defs || Exit 1 + +set -e + +echo AC_PROG_CC >>configure.in + +cat >Makefile.am <<'END' +bin_PROGRAMS = hello +hello_SOURCES = hello.mm +END + +$ACLOCAL +AUTOMAKE_fails +grep AC_PROG_OBJCXX stderr -- 1.6.4