+dnl -------------------------------------------------------------
+dnl On DEC OSF1, when we specify "-std strict_ansi", we can include
+dnl errno.h, and still not get the definition of the error codes
+dnl such as EINTR, EPIPE, etc.
+dnl
+dnl In this case, use a workaround by explicitly including
+dnl /usr/include/errno.h, instead of just errno.h, which the compiler
+dnl maps to one of its own C/C++ compatibility headers, which only
+dnl define 3 error codes (for reasons unknown)
+dnl
+dnl Usage: DEAL_II_CHECK_ERROR_CODES_DEFINITION
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_ERROR_CODES_DEFINITION, dnl
+[
+ AC_MSG_CHECKING(for defintions of error codes in errno.h)
+ AC_LANG(C++)
+ CXXFLAGS="$CXXFLAGSG"
+ AC_TRY_COMPILE(
+ [
+#include <iostream>
+#include <errno.h>
+using namespace std;
+ ],
+ [
+ cout << EINTR << endl;
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no. working around)
+ AC_DEFINE(DEAL_II_USE_DIRECT_ERRNO_H, 1,
+ [Define if the compiler provides a <errno.g> header file
+ which does not define all error codes such as EINTR. In
+ that case, use the system include file at /usr/include
+ instead. There is probably a better way to do this, but
+ it is not apparent by looking at the C/C++ compatibility
+ header provided by the compiler.])
+ ])
+])
+
+
+
dnl ------------------------------------------------------------
dnl Check whether some of the HSL functions have been dropped
CXXFLAGSG="$CXXFLAGSG -D_POSIX_SOURCE"
CXXFLAGSO="$CXXFLAGSO -D_POSIX_SOURCE"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+
+ echo "$as_me:$LINENO: checking for defintions of error codes in errno.h" >&5
+echo $ECHO_N "checking for defintions of error codes in errno.h... $ECHO_C" >&6
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CXXFLAGS="$CXXFLAGSG"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <iostream>
+#include <errno.h>
+using namespace std;
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ cout << EINTR << endl;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no. working around" >&5
+echo "${ECHO_T}no. working around" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_USE_DIRECT_ERRNO_H 1
+_ACEOF
+
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
DEAL_II_CHECK_ISNAN
DEAL_II_CHECK_RAND_R
DEAL_II_CHECK_QUAD_DEFINE
+DEAL_II_CHECK_ERROR_CODES_DEFINITION
AC_CHECK_FUNCS(gethostname)
#include <cstdlib>
#include <unistd.h>
-#include <errno.h>
-#include <sys/errno.h>
#include <pthread.h>
#include <signal.h>
# include <strstream>
#endif
+#ifndef DEAL_II_USE_DIRECT_ERRNO_H
+# include <errno.h>
+#else
+# include </usr/include/errno.h>
+#endif
+
+#include <sys/errno.h>
+
pid_t master_pid;
#include <iostream>
#include <sys/wait.h>
#include <unistd.h>
-#include <errno.h>
+
+#ifndef DEAL_II_USE_DIRECT_ERRNO_H
+# include <errno.h>
+#else
+# include </usr/include/errno.h>
+#endif
#include <sys/errno.h>