From 118077bd7b0758db852e6e4c5f973255e817668f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 4 Apr 2009 14:02:57 +0000 Subject: Blind fix for autoconf problems introduced by earlier attempt to support cross-compiling. --- infrastructure/m4/ax_check_dirent_d_type.m4 | 8 +++++--- infrastructure/m4/ax_check_syscall_lseek.m4 | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'infrastructure') diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4 index 9c08d391..078a39ee 100644 --- a/infrastructure/m4/ax_check_dirent_d_type.m4 +++ b/infrastructure/m4/ax_check_dirent_d_type.m4 @@ -17,15 +17,17 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [ 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_TRY_RUN( - [AC_LANG_PROGRAM([[ + [ $ac_includes_default #include - ]], [[ + int main() + { DIR* dir = opendir("."); struct dirent* res = NULL; 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=cross] diff --git a/infrastructure/m4/ax_check_syscall_lseek.m4 b/infrastructure/m4/ax_check_syscall_lseek.m4 index 6c26e025..9fd04c81 100644 --- a/infrastructure/m4/ax_check_syscall_lseek.m4 +++ b/infrastructure/m4/ax_check_syscall_lseek.m4 @@ -17,7 +17,7 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [box_cv_have_lseek_dummy_param], [AC_TRY_RUN( - [AC_LANG_PROGRAM([[ + [ $ac_includes_default #include #include @@ -28,7 +28,8 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ #undef syscall #define syscall __syscall #endif - ]], [[ + int main() + { int fh = creat("lseektest", 0600); int res = 0; if(fh>=0) @@ -49,7 +50,8 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ } unlink("lseektest"); return res!=-1; - ]])], + } + ], [box_cv_have_lseek_dummy_param=yes], [box_cv_have_lseek_dummy_param=no], [box_cv_have_lseek_dummy_param=no # assume not for cross-compiling] -- cgit v1.2.3