automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 05/10] objc++: add first basic test


From: Stefano Lattarini
Subject: [PATCH 05/10] objc++: add first basic test
Date: Tue, 1 May 2012 15:52:23 +0200

From: Peter Breitenlohner <address@hidden>

* t/objcxx-basic.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Peter Breitenlohner <address@hidden>
Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/list-of-tests.mk |    1 +
 t/objcxx-basic.sh  |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100755 t/objcxx-basic.sh

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..e7ba1d2
--- /dev/null
+++ b/t/objcxx-basic.sh
@@ -0,0 +1,46 @@
+#! /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
+
+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 --force; 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
+
+:
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]