summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authordas <das>2005-12-05 13:03:16 (GMT)
committerdas <das>2005-12-05 13:03:16 (GMT)
commit72a72bdbda1a618c81ce21298d38a7b66024cf95 (patch)
treede184beb12392b5d5382cd6ff21227041743df82 /unix/configure.in
parent403f07fad3a34a8d96e855e42124439774d1b8d3 (diff)
downloadtcl-72a72bdbda1a618c81ce21298d38a7b66024cf95.zip
tcl-72a72bdbda1a618c81ce21298d38a7b66024cf95.tar.gz
tcl-72a72bdbda1a618c81ce21298d38a7b66024cf95.tar.bz2
* unix/configure.in: move check for fts API to configure.in and run it
* unix/tcl.m4: on all platforms, since Linux glibc2 and *BSDs also have this; using fts is more efficient than recursive opendir/readdir. * unix/tclUnixFCmd.c (TraverseUnixTree): add support to fts code for platforms with stat64. * unix/configure: * unix/tclConfig.h.in: regen.
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/unix/configure.in b/unix/configure.in
index f64e499..decdade 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.138 2005/11/27 02:33:50 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.139 2005/12/05 13:03:18 das Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -433,6 +433,22 @@ AC_CHECK_FUNCS(chflags)
AC_CHECK_FUNCS(getattrlist)
#--------------------------------------------------------------------
+# Check for support of fts functions (readdir replacement)
+#--------------------------------------------------------------------
+
+AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [
+ AC_TRY_LINK([#include <sys/param.h>
+ #include <sys/stat.h>
+ #include <fts.h>],
+ [char*const p[2] = {"/", NULL};
+ FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
+ FTSENT *e = fts_read(f); fts_close(f);],
+ tcl_cv_api_fts=yes, tcl_cv_api_fts=no)])
+if test $tcl_cv_api_fts = yes; then
+ AC_DEFINE(HAVE_FTS, 1, [Do we have fts functions?])
+fi
+
+#--------------------------------------------------------------------
# The statements below check for systems where POSIX-style
# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
# On these systems (mostly older ones), use the old BSD-style