OSDN Git Service

2003-11-03 Petur Runolfsson <peturr02@ru.is>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / aclocal.m4
index b0ecb7d..ea472fd 100644 (file)
@@ -553,7 +553,7 @@ dnl Check whether poll is available in <poll.h>, and define HAVE_POLL.
 dnl
 AC_DEFUN(GLIBCXX_CHECK_POLL, [
   AC_CACHE_VAL(glibcxx_cv_POLL, [
-    AC_TRY_COMPILE(
+    AC_TRY_LINK(
       [#include <poll.h>],
       [struct pollfd pfd[1];
        pfd[0].events = POLLIN;
@@ -572,7 +572,7 @@ dnl Check whether writev is available in <sys/uio.h>, and define HAVE_WRITEV.
 dnl
 AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
   AC_CACHE_VAL(glibcxx_cv_WRITEV, [
-    AC_TRY_COMPILE(
+    AC_TRY_LINK(
       [#include <sys/uio.h>],
       [struct iovec iov[2];
        writev(0, iov, 0);],
@@ -586,6 +586,46 @@ AC_DEFUN(GLIBCXX_CHECK_WRITEV, [
 
 
 dnl
+dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
+dnl
+AC_DEFUN(GLIBCXX_CHECK_INT64_T, [
+  AC_CACHE_VAL(glibcxx_cv_INT64_T, [
+    AC_TRY_COMPILE(
+      [#include <stdint.h>],
+      [int64_t var;],
+      [glibcxx_cv_INT64_T=yes],
+      [glibcxx_cv_INT64_T=no])
+  ])
+  if test $glibcxx_cv_INT64_T = yes; then
+    AC_DEFINE(HAVE_INT64_T)
+  fi
+])
+
+
+dnl
+dnl Check whether LFS support is available.
+dnl
+AC_DEFUN(GLIBCXX_CHECK_LFS, [
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS    
+  AC_CACHE_VAL(glibcxx_cv_LFS, [
+    AC_TRY_LINK(
+      [#include <unistd.h>
+       #include <stdio.h>
+      ],
+      [fopen64("t", "w");
+       lseek64(1, 0, SEEK_CUR);],      
+      [glibcxx_cv_LFS=yes],
+      [glibcxx_cv_LFS=no])
+  ])
+  if test $glibcxx_cv_LFS = yes; then
+    AC_DEFINE(_GLIBCXX_USE_LFS)
+  fi
+  AC_LANG_RESTORE      
+])
+
+
+dnl
 dnl Does any necessary configuration of the testsuite directory.  Generates
 dnl the testsuite_hooks.h header.
 dnl
@@ -969,7 +1009,7 @@ AC_DEFUN(GLIBCXX_ENABLE_CLOCALE, [
   # Default to "generic".
   if test $enable_clocale_flag = auto; then
     case x${target_os} in
-      xlinux* | xgnu*)
+      xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
         AC_EGREP_CPP([_GLIBCXX_ok], [
         #include <features.h>
         #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
@@ -1166,11 +1206,7 @@ AC_DEFUN(GLIBCXX_ENABLE_CSTDIO, [
       ;;
   esac
 
-  dnl Set directory for fpos.h
-  FPOS_H=$fpos_include_dir
-
   AC_SUBST(CSTDIO_H)
-  AC_SUBST(FPOS_H)
   AC_SUBST(BASIC_FILE_H)
   AC_SUBST(BASIC_FILE_CC)
 ])