diff --git a/configure.ac b/configure.ac index 4cab93f3d8..018042c7ae 100644 --- a/configure.ac +++ b/configure.ac @@ -563,7 +563,7 @@ AC_MSG_CHECKING([__pmResult padding]) ans=`sed conftest.c #include #include @@ -2518,14 +2523,16 @@ my_select(const struct dirent *foo) { return 0; } int main() { struct dirent **list; return scandir(".", &list, my_select, NULL); } End-of-File (eval $ac_compile) 2>conftest.out +_ret=$? cat conftest.out >&5 -if test -s conftest.out +if test $_ret != 0 then AC_MSG_RESULT(no) else AC_DEFINE(HAVE_CONST_DIRENT, [1], [const arg for scandir() select method]) AC_MSG_RESULT(yes) fi +CFLAGS="$save_CFLAGS" rm -f conftest.* dnl check if struct dirent has a d_off (directory offset) field @@ -2537,8 +2544,9 @@ cat <conftest.c int main() { struct dirent d; d.d_off = 0; } End-of-File (eval $ac_compile) 2>conftest.out +_ret=$? cat conftest.out >&5 -if test -s conftest.out +if test $_ret != 0 then AC_MSG_RESULT(no) else