summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure b/configure
index 28b6988a..4d84d8ad 100755
--- a/configure
+++ b/configure
@@ -125,6 +125,7 @@ have_unistd=
have_sys_time=
have_syslog=
have_glob=
+have_ftw=
have_windows_h=
have_windres=
have_posix_sigs=
@@ -660,6 +661,9 @@ have_syslog := $have_syslog
# do we compile in glob support?
have_glob := $have_glob
+# do we compile in ftwsupport?
+have_ftw := $have_ftw
+
# do we modern posix signal handling?
have_posix_sigs := $have_posix_sigs
@@ -2096,6 +2100,41 @@ else
printf "no\n"
fi
+printf "Checking for nftw ... "
+
+cat > conftest.c <<!
+#include <ftw.h>
+#include <stdlib.h>
+
+static int callback(const char *fpath, const struct stat *sb,
+ int tflag, struct FTW *ftwbuf)
+{
+ switch (tflag) {
+ case FTW_D:
+ case FTW_DP:
+ case FTW_NS:
+ case FTW_SLN:
+ break;
+ }
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ int flags = FTW_DEPTH | FTW_PHYS;
+ int res = nftw(argv[1], callback, 20, flags);
+ return (res == -1) ? EXIT_FAILURE : 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_FTW 1\n" >> $config_h
+ have_ftw=y
+else
+ printf "no\n"
+fi
+
printf "Checking for windres ... "
if output=$(windres -V 2> /dev/null) ; then