]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix C++ related problems reported by Werner Lemberg.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 May 2005 05:34:43 +0000 (05:34 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 May 2005 05:34:43 +0000 (05:34 +0000)
* doc/autoconf.texi (C++ Compiler): Mention .cpp extension.
* lib/autoconf/c.m4 (AC_LANG(C++)): Set ac_ext to .cpp, not .cc.
* lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Simplify test, to
avoid problems with C++ and throw.
* tests/compile.at: .cpp, not .cc.

ChangeLog
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/types.m4
tests/compile.at

index 577002a1fd8e014c83b5abd7fc9553b066319ccb..4ebfc4a0883f7f68a6375c6ed6bc40e3fa165c36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,19 @@
+2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix C++ related problems reported by Werner Lemberg.
+       * doc/autoconf.texi (C++ Compiler): Mention .cpp extension.
+       * lib/autoconf/c.m4 (AC_LANG(C++)): Set ac_ext to .cpp, not .cc.
+       * lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Simplify test, to
+       avoid problems with C++ and throw.
+       * tests/compile.at: .cpp, not .cc.
+
+       * tests/semantics.at: Prepend LIBOBJDIR, as per 2005-05-02 change.
+
 2005-05-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * doc/autoconf.texi (Generic Functions): Typos.
 
-2004-05-02  Gary V. Vaughan  <gary@gnu.org>
+2005-05-02  Gary V. Vaughan  <gary@gnu.org>
 
        * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each
        object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as
index a9c900f9a46353327ce075f39febce4e0a6c13e9..0841f939b232433c6ce999479cd7044f66b40d04 100644 (file)
@@ -5990,8 +5990,8 @@ compilers.
 @ovindex CXXCPP
 Set output variable @code{CXXCPP} to a command that runs the C++
 preprocessor.  If @samp{$CXX -E} doesn't work, @file{/lib/cpp} is used.
-It is only portable to run @code{CXXCPP} on files with a @file{.c},
-@file{.C}, or @file{.cc} extension.
+It is portable to run @code{CXXCPP} only on files with a @file{.c},
+@file{.C}, @file{.cc}, or @file{.cpp} extension.
 
 Some preprocessors don't indicate missing include files by the error
 status.  For such preprocessors an internal variable is set that causes
index b72710fe9af5f1b5d89784f99ae8ab0b6e6c02d5..28647e813a228ccf71b69433704afe9ea450ad2d 100644 (file)
@@ -90,7 +90,7 @@ m4_define([_AC_LANG_PREFIX(C)], [C])
 # ------------
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 m4_define([AC_LANG(C++)],
-[ac_ext=cc
+[ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
index 85c5fd93716d2c4cc5fe37a99c14a85d4c6dc1f4..b6a17632c8a6a2553b82140200fdc570abe71651 100644 (file)
@@ -1,6 +1,6 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Type related macros: existence, sizeof, and structure members.
-# Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2004, 2005 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
@@ -355,18 +355,10 @@ AC_DEFUN([AC_TYPE_SIGNAL],
 [AC_COMPILE_IFELSE(
 [AC_LANG_PROGRAM([#include <sys/types.h>
 #include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
 ],
-                [int i;])],
-                  [ac_cv_type_signal=void],
-                  [ac_cv_type_signal=int])])
+                [return *(signal (0, 0)) (0) == 1;])],
+                  [ac_cv_type_signal=int],
+                  [ac_cv_type_signal=void])])
 AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal,
                   [Define as the return type of signal handlers
                    (`int' or `void').])
index 797245bb6834d09ab55d799773f9e8e9d0c96db2..d47492bdc24da59f4c908ad986d01a0e56e00a20 100644 (file)
@@ -2,7 +2,7 @@
 
 AT_BANNER([Low level compiling/preprocessing macros.])
 
-# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2005 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
@@ -59,11 +59,11 @@ AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0,
 [c
 c
 c
-cc
-cc
+cpp
+cpp
 f
-cc
-cc
+cpp
+cpp
 c
 c
 ])