Blame SOURCES/autoconf-2.13-c++exit.patch

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