summaryrefslogtreecommitdiff
path: root/t/objcxx-basic.sh
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-04-27 01:00:27 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-02 17:33:00 +0200
commit23197cff2c48bdf0b84e91edfb9b9607a76d6ecc (patch)
treed5dd68d655825b8521b93a0c2c1a618b93588c54 /t/objcxx-basic.sh
parent6542254a9fbd32495f02317c3c84d406567a596f (diff)
downloadautomake-23197cff2c48bdf0b84e91edfb9b9607a76d6ecc.tar.gz
objc++: add first basic test
* t/objcxx-basic.sh: New test. * t/list-of-tests.mk: Add it. Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/objcxx-basic.sh')
-rwxr-xr-xt/objcxx-basic.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
new file mode 100755
index 000000000..33b801797
--- /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
+
+: