cvsdist 7c113d
--- autoconf-2.13/acgeneral.m4~	Tue Jun 26 17:00:28 2001
cvsdist 7c113d
+++ autoconf-2.13/acgeneral.m4	Tue Jun 26 17:00:28 2001
cvsdist 7c113d
@@ -1817,10 +1817,6 @@
cvsdist 7c113d
 [cat > conftest.$ac_ext <
cvsdist 7c113d
 [#]line __oline__ "configure"
cvsdist 7c113d
 #include "confdefs.h"
cvsdist 7c113d
-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
cvsdist 7c113d
-extern "C" void exit(int);
cvsdist 7c113d
-#endif
cvsdist 7c113d
-])dnl
cvsdist 7c113d
 [$1]
cvsdist 7c113d
 EOF
cvsdist 7c113d
 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cvsdist 7c113d
--- autoconf-2.13/acspecific.m4~	Tue Jun 26 17:04:34 2001
cvsdist 7c113d
+++ autoconf-2.13/acspecific.m4		Tue Jun 26 17:04:34 2001
cvsdist 7c113d
@@ -152,8 +152,41 @@
cvsdist 7c113d
     CXXFLAGS=
cvsdist 7c113d
   fi
cvsdist 7c113d
 fi
cvsdist 7c113d
+
cvsdist 7c113d
+AC_PROG_CXX_EXIT_DECLARATION
cvsdist 7c113d
 ])
cvsdist 7c113d
 
cvsdist 7c113d
+
cvsdist 7c113d
+# AC_PROG_CXX_EXIT_DECLARATION
cvsdist 7c113d
+# -----------------------------
cvsdist 7c113d
+# Find a valid prototype for exit and declare it in confdefs.h.
cvsdist 7c113d
+AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
cvsdist 7c113d
+[for ac_declaration in \
cvsdist 7c113d
+   ''\
cvsdist 7c113d
+   '#include <stdlib.h>' \
cvsdist 7c113d
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
cvsdist 7c113d
+   'extern "C" void std::exit (int); using std::exit;' \
cvsdist 7c113d
+   'extern "C" void exit (int) throw ();' \
cvsdist 7c113d
+   'extern "C" void exit (int);' \
cvsdist 7c113d
+   'void exit (int);'
cvsdist 7c113d
+do
cvsdist 7c113d
+  AC_TRY_COMPILE([#include <stdlib.h>
cvsdist 7c113d
+$ac_declaration], 
cvsdist 7c113d
+                 [exit (42);],
cvsdist 7c113d
+                 [],
cvsdist 7c113d
+                 [continue])
cvsdist 7c113d
+  AC_TRY_COMPILE([$ac_declaration],
cvsdist 7c113d
+                 [exit (42);],
cvsdist 7c113d
+                 [break])
cvsdist 7c113d
+done
cvsdist 7c113d
+if test -n "$ac_declaration"; then
cvsdist 7c113d
+  echo '#ifdef __cplusplus' >>confdefs.h
cvsdist 7c113d
+  echo $ac_declaration      >>confdefs.h
cvsdist 7c113d
+  echo '#endif'             >>confdefs.h
cvsdist 7c113d
+fi
cvsdist 7c113d
+])# AC_PROG_CXX_EXIT_DECLARATION
cvsdist 7c113d
+
cvsdist 7c113d
+
cvsdist 7c113d
 dnl Determine a Fortran 77 compiler to use.  If `F77' is not already set
cvsdist 7c113d
 dnl in the environment, check for `g77', `f77' and `f2c', in that order.
cvsdist 7c113d
 dnl Set the output variable `F77' to the name of the compiler found.