- CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
- AC_TRY_COMPILE(
- [#include <sys/types.h>
- #include <dirent.h>],
- [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
- dir_fd_found=yes
- )
- CFLAGS=$dirfd_save_CFLAGS
- test "$dir_fd_found" = yes && break
- done
- test "$dir_fd_found" = yes || ac_expr=no_such_member
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <dirent.h>]],
+ [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])],
+ [dir_fd_found=yes]
+ )
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member