autoconf
[Top][All Lists]
Advanced

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

Serious problem with Autoconf on RedHat 7


From: Morten Eriksen
Subject: Serious problem with Autoconf on RedHat 7
Date: 29 Sep 2000 18:17:09 +0200
User-agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.3

Hi,

I just discovered a nasty problem with the latest CVS Autoconf on Red
Hat Linux v7 (default setup, i.e. with g++ 2.96). In short, the
AC_TRY_COMPILE in the configure.in script below will fail:

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

AC_INIT(configure.in)
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <stdlib.h>], [], , AC_MSG_ERROR(sorr-ee))
AC_OUTPUT()

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

Here's the relevant part of config.log:

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

[...]
configure:1141: g++ -c -g -O2  conftest.cpp >&5
In file included from configure:1135:
/usr/include/stdlib.h:578: declaration of `void exit (int) throw ()' 
throws different exceptions
configure:1132: than previous declaration `void exit (int)'
configure: failed program was:
#line 1130 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <stdlib.h>
int
main ()
{

  ;
  return 0;
}

->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--->8-->8--

Now, this is obviously due to the "extern" forward declaration of
exit() not matching the exit() defined by the stdlib.h of GCC 2.96
when run as a C++ compiler.

Why is the explicit exit() declaration there anyway? Removing it will
of course make the configure script run correctly.

Regards,
Morten



reply via email to

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