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.
This commit is contained in:
Paul Eggert 2005-05-06 05:34:43 +00:00
parent a85268ce38
commit f5b265430a
5 changed files with 24 additions and 21 deletions

View File

@ -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

View 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

View 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'

View 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').])

View 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
])