diff options
author | Chris Wilson <chris+github@qwirx.com> | 2009-03-31 12:13:34 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2009-03-31 12:13:34 +0000 |
commit | 55123099c24df71186835d0d7231d3fe7206cdcf (patch) | |
tree | 0ee4d38ebc40fd3126fedb4c3ca270946fb75d1e /infrastructure/m4 | |
parent | ab2312391abb678d26ab1957951c83ff715fb407 (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.m4 | 6 |
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]) |