From: Peter Breitenlohner Date: Thu, 26 Apr 2012 23:00:27 +0000 (+0200) Subject: objc++: add first basic test X-Git-Tag: v1.12.0b~20^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23197cff2c48bdf0b84e91edfb9b9607a76d6ecc;p=platform%2Fupstream%2Fautomake.git objc++: add first basic test * t/objcxx-basic.sh: New test. * t/list-of-tests.mk: Add it. Signed-off-by: Peter Breitenlohner Signed-off-by: Stefano Lattarini --- diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index d692561..bc6dfe2 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -704,6 +704,7 @@ t/notrans.sh \ t/number.sh \ t/objc.sh \ t/objc2.sh \ +t/objcxx-basic.sh \ t/objext-pr10128.sh \ t/obsolete.sh \ t/oldvars.sh \ diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh new file mode 100755 index 0000000..33b8017 --- /dev/null +++ b/t/objcxx-basic.sh @@ -0,0 +1,48 @@ +#! /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. + +# Basic tests on the Objective C++ support that don't actually +# require an Objective-C++ compiler. + +. ./defs || Exit 1 + +cat > Makefile.am <<'END' +bin_PROGRAMS = hello +hello_SOURCES = hello.mm +END + +$ACLOCAL +AUTOMAKE_fails +grep "'OBJCXX'.* undefined" stderr +grep "add .*'AC_PROG_OBJCXX'" stderr + +rm -rf autom4te*.cache + +cat >> configure.ac <<'END' +dnl Support for Object C++ was introduced only in Autoconf 2.65. +AC_PREREQ([2.65]) +AC_PROG_OBJCXX +END + +if $ACLOCAL; then + : We have a modern enough autoconf, go ahead. +elif test $? -eq 63; then + skip_ "Object C++ support requires Autoconf 2.65 or later" +else + Exit 1 # Some other aclocal failure. +fi + +$AUTOMAKE +$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in + +: