summaryrefslogtreecommitdiff
path: root/gnu/lib/libf2c/libI77/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/lib/libf2c/libI77/configure.in')
-rw-r--r--gnu/lib/libf2c/libI77/configure.in44
1 files changed, 21 insertions, 23 deletions
diff --git a/gnu/lib/libf2c/libI77/configure.in b/gnu/lib/libf2c/libI77/configure.in
index 988a8e542c3..83f98fbbabd 100644
--- a/gnu/lib/libf2c/libI77/configure.in
+++ b/gnu/lib/libf2c/libI77/configure.in
@@ -23,18 +23,6 @@ AC_PREREQ(2.12.1)
AC_INIT(ftell_.c)
AC_CONFIG_HEADER(config.h)
-# These defines are necessary to get 64-bit file size support.
-
-AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
-# The following is needed by irix6.2 so that struct timeval is declared.
-AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics])
-# The following is needed by Solaris2.5.1 so that struct timeval is declared.
-AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions])
-AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
-AC_DEFINE(_LARGEFILE_SOURCE, 1, [Define for HP-UX ftello and fseeko extension.])
-
-dnl Checks for programs.
-
dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
dnl not be able to.
define([AC_PROG_CC_WORKS],[])
@@ -43,6 +31,27 @@ define([AC_PROG_CC_WORKS],[])
# the makefiles
AC_PROG_CC
+# These defines are necessary to get 64-bit file size support.
+# NetBSD 1.4 header files does not support XOPEN_SOURCE == 600, but it
+# handles 64-bit file sizes without needing these defines.
+AC_MSG_CHECKING(whether _XOPEN_SOURCE may be defined)
+AC_TRY_COMPILE([#define _XOPEN_SOURCE 600L
+#include <unistd.h>],,
+may_use_xopen_source=yes,
+may_use_xopen_source=no)
+AC_MSG_RESULT($may_use_xopen_source)
+if test $may_use_xopen_source = yes; then
+ AC_DEFINE(_XOPEN_SOURCE, 600L, [Get Single Unix Specification semantics])
+ # The following is needed by irix6.2 so that struct timeval is declared.
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics])
+ # The following is needed by Solaris2.5.1 so that struct timeval is declared.
+ AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions])
+ AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
+ AC_DEFINE(_LARGEFILE_SOURCE, 1, [Define for HP-UX ftello and fseeko extension.])
+fi
+
+dnl Checks for programs.
+
LIBTOOL='$(SHELL) ../libtool'
AC_SUBST(LIBTOOL)
@@ -62,17 +71,6 @@ the G77 runtime system. If necessary, install gcc now with \`LANGUAGES=c',
then the target library, then build with \`LANGUAGES=f77'.])])
AC_HEADER_STDC
-dnl We could do this if we didn't know we were using gcc
-dnl AC_MSG_CHECKING(for prototype-savvy compiler)
-dnl AC_CACHE_VAL(g77_cv_sys_proto,
-dnl [AC_TRY_LINK(,
-dnl dnl looks screwy because TRY_LINK expects a function body
-dnl [return 0;} int foo (int * bar) {],
-dnl g77_cv_sys_proto=yes,
-dnl [g77_cv_sys_proto=no
-dnl AC_DEFINE(KR_headers)])])
-dnl AC_MSG_RESULT($g77_cv_sys_proto)
-
AC_MSG_CHECKING(for posix)
AC_CACHE_VAL(g77_cv_header_posix,
AC_EGREP_CPP(yes,