summaryrefslogtreecommitdiff
path: root/infrastructure/m4
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-03-31 12:13:34 +0000
committerChris Wilson <chris+github@qwirx.com>2009-03-31 12:13:34 +0000
commit55123099c24df71186835d0d7231d3fe7206cdcf (patch)
tree0ee4d38ebc40fd3126fedb4c3ca270946fb75d1e /infrastructure/m4
parentab2312391abb678d26ab1957951c83ff715fb407 (diff)
Assume that we have no way to determine whether struct dirent has a
valid d_type when cross-compiling, as this should be the safest option.
Diffstat (limited to 'infrastructure/m4')
-rw-r--r--infrastructure/m4/ax_check_dirent_d_type.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4
index 8351f132..9c08d391 100644
--- a/infrastructure/m4/ax_check_dirent_d_type.m4
+++ b/infrastructure/m4/ax_check_dirent_d_type.m4
@@ -16,7 +16,7 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include <dirent.h>]])
if test "x$ac_cv_member_struct_dirent_d_type" = "xyes"; then
AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [box_cv_have_valid_dirent_d_type],
- [AC_RUN_IFELSE(
+ [AC_TRY_RUN(
[AC_LANG_PROGRAM([[
$ac_includes_default
#include <dirent.h>
@@ -26,7 +26,9 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
if(dir) res = readdir(dir);
return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1;
]])],
- [box_cv_have_valid_dirent_d_type=yes], [box_cv_have_valid_dirent_d_type=no]
+ [box_cv_have_valid_dirent_d_type=yes],
+ [box_cv_have_valid_dirent_d_type=no],
+ [box_cv_have_valid_dirent_d_type=cross]
)])
if test "x$box_cv_have_valid_dirent_d_type" = "xyes"; then
AC_DEFINE([HAVE_VALID_DIRENT_D_TYPE], 1, [Define to 1 if struct dirent.d_type is valid])