[SCM] GNU Autoconf source repository branch, master, updated. v2.63-285-gee55d77
"Ralf Wildenhues" <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=ee55d7737cc623ad00cab035a51a1f96be7ef774
The branch, master has been updated
via ee55d7737cc623ad00cab035a51a1f96be7ef774 (commit)
from 98647c53e4a73b8d215b97c3ce8aa08d38788a8b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ee55d7737cc623ad00cab035a51a1f96be7ef774
Author: Ralf Wildenhues <[email protected]>
Date: Mon Mar 9 19:25:18 2009 +0100
New test for SunStudio `restrict' handling.
* tests/c.at (AC_C_RESTRICT and C++): New test.
Prompted by bug report from Rolf Vandevaart.
Signed-off-by: Ralf Wildenhues <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++++
tests/c.at | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 413950f..c81ac4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-09 Ralf Wildenhues <[email protected]>
+
+ New test for SunStudio `restrict' handling.
+ * tests/c.at (AC_C_RESTRICT and C++): New test.
+ Prompted by bug report from Rolf Vandevaart.
+
2009-03-08 Ralf Wildenhues <[email protected]>
Manual: testsuite depends on package.m4.
diff --git a/tests/c.at b/tests/c.at
index d7a1886..33b2684 100644
--- a/tests/c.at
+++ b/tests/c.at
@@ -2,8 +2,8 @@
AT_BANNER([C low level compiling/preprocessing macros.])
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free
-# Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 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
@@ -259,3 +259,66 @@ AC_DEFINE([__EXTENSIONS__], [1], [Manually defined for Solaris])
]])
AT_CLEANUP
+
+
+## ----------------------- ##
+## AC_C_RESTRICT and C++. ##
+## ----------------------- ##
+
+AT_SETUP([AC_C_RESTRICT and C++])
+
+# In some compiler suites, the left hand doesn't know about everything
+# the right hand does; or the user mixes the C compiler from one suite
+# with the C++ compiler from another. In this case, Sun WorkShop CC
+# not like the _Restrict accepted by cc.
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_PROG_CC
+AC_PROG_CXX
+AC_C_RESTRICT
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+]])
+
+AT_DATA([Makefile.in],
+[[CC = @CC@
+CXX = @CXX@
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+CPPFLAGS = -I. @CPPFLAGS@
+OBJEXT = @OBJEXT@
+all: foo.$(OBJEXT) bar.$(OBJEXT)
+cpp-works:
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c cpp-works.cpp
+foo.$(OBJEXT): foo.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c foo.c
+bar.$(OBJEXT): bar.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c bar.cpp
+]])
+
+AT_DATA([foo.c],
+[[#include <config.h>
+
+int foo (int * restrict i1, int * restrict i2)
+{
+ return i1[0] + i2[0];
+}
+]])
+
+cp foo.c bar.cpp
+
+AT_DATA([cpp-works.cpp],
+[[// This file is just to test whether we have a working C++ compiler at all
+class foo { int x; };
+class foo foobar;
+]])
+
+AT_CHECK([autoconf])
+AT_CHECK([autoheader])
+AT_CHECK([./configure], [], [ignore], [ignore])
+AT_CHECK([${MAKE-make} cpp-works || exit 77], [], [ignore], [ignore])
+AT_CHECK([${MAKE-make}], [], [ignore], [ignore])
+
+AT_CLEANUP
hooks/post-receive
--
GNU Autoconf source repository