From c564344766c1e888c0ab3f866ea4b3318135d0e5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Sep 2006 09:56:21 +0000 Subject: r18451: move repdir/ into the top dir metze (This used to be commit a564194817d9b78e353abb6bf0548b2dd9eb130b) --- source4/lib/replace/repdir.m4 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 source4/lib/replace/repdir.m4 (limited to 'source4/lib/replace/repdir.m4') diff --git a/source4/lib/replace/repdir.m4 b/source4/lib/replace/repdir.m4 new file mode 100644 index 0000000000..d15e4cb7af --- /dev/null +++ b/source4/lib/replace/repdir.m4 @@ -0,0 +1,30 @@ +AC_CACHE_CHECK([for broken readdir],libreplace_READDIR_NEEDED,[ + AC_TRY_RUN([ +#define test_readdir_os2_delete main +#error +#include "$libreplacedir/test/os2_delete.c"], + [libreplace_READDIR_NEEDED=no], + [libreplace_READDIR_NEEDED=yes], + [libreplace_READDIR_NEEDED="assuming not"]) +]) + +# +# try to replace with getdents() if needed +# +if test x"$libreplace_READDIR_NEEDED" = x"yes"; then +AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_READDIR_GETDENTS,[ + AC_TRY_RUN([ +#include "confdefs.h" +#include "$libreplacedir/repdir_getdents.c" +#define test_readdir_os2_delete main +#include "$libreplacedir/test/os2_delete.c"], + [libreplace_READDIR_GETDENTS=yes], + [libreplace_READDIR_GETDENTS=no]) +]) +fi +if test x"$libreplace_READDIR_GETDENTS" = x"yes"; then + AC_DEFINE(REPLACE_READDIR,1,[replace readdir]) + AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()]) + LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o" + libreplace_READDIR_NEEDED=no +fi -- cgit