+AS_IF([test "x$ac_cv_func_dirfd" = "xyes"],
+ [AX_CONFIG_FEATURE_ENABLE(dirfd)],
+ [AX_CONFIG_FEATURE_DISABLE(dirfd)]
+)
+AX_CONFIG_FEATURE(
+ [dirfd], [Use directory file descriptors],
+ [COMPAT_DIRFD], [This platform supports directory file descriptors.],
+ [enable_dirfd="yes"], [enable_dirfd="no"]
+)
+AM_CONDITIONAL([COMPAT_DIRFD], [ test "$enable_dirfd" = "yes" ])
+