From 401d4119f9854b7fc2965d9b31872348deea9316 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 26 Apr 2012 15:12:39 +0200 Subject: [PATCH] objc++: test support for '.mm' suffix in _SOURCES entries * t/ext.sh: Enhance by adding a file with the '.mm' suffix in the 'foo_SOURCES' definition. * t/nodep2.sh: Likewise. Co-authored-by: Stefano Lattarini Signed-off-by: Peter Breitenlohner Signed-off-by: Stefano Lattarini --- t/ext.sh | 10 ++++++++-- t/nodep2.sh | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/t/ext.sh b/t/ext.sh index dd92e85..c62dbd3 100755 --- a/t/ext.sh +++ b/t/ext.sh @@ -22,18 +22,24 @@ cat >> configure.ac << 'END' AC_PROG_F77 AC_PROG_FC AC_PROG_OBJC +# FIXME: this is to cater to older autoconf; remove this once we +# FIXME: automake requires Autoconf 2.65 or later. +m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [ + AC_SUBST([OBJCXX], [whocares]) + AM_CONDITIONAL([am__fastdepOBJCXX], [whocares]) +]) AM_PROG_UPC END cat > Makefile.am << 'END' bin_PROGRAMS = foo -foo_SOURCES = 1.f 2.for 3.f90 4.f95 5.F 6.F90 7.F95 8.r 9.m 10.upc +foo_SOURCES = 1.f 2.for 3.f90 4.f95 5.F 6.F90 7.F95 8.r 9.m 10.mm 11.upc END $ACLOCAL $AUTOMAKE -for ext in f for f90 f95 F F90 F95 r m upc +for ext in f for f90 f95 F F90 F95 r m mm upc do # Some versions of the BSD shell wrongly exit when 'set -e' is active # if the last command within a compound statement fails and is guarded diff --git a/t/nodep2.sh b/t/nodep2.sh index edf0fa9..cc80058 100755 --- a/t/nodep2.sh +++ b/t/nodep2.sh @@ -20,7 +20,7 @@ cat > Makefile.am << 'END' bin_PROGRAMS = foo -foo_SOURCES = a.c b.cpp c.m d.S e.java f.upc +foo_SOURCES = a.c b.cpp c.m cxx.mm d.S e.java f.upc END cat > configure.ac << 'END' @@ -30,6 +30,12 @@ AC_CONFIG_FILES([Makefile]) AC_PROG_CC AC_PROG_CXX AC_PROG_OBJC +# FIXME: this is to cater to older autoconf; remove this once we +# FIXME: automake requires Autoconf 2.65 or later. +m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [ + AC_SUBST([OBJCXX], [whocares]) + AM_CONDITIONAL([am__fastdepOBJCXX], [whocares]) +]) AM_PROG_AS AM_PROG_GCJ AM_PROG_UPC -- 2.7.4