r18961: merge from samba4:
authorStefan Metzmacher <metze@samba.org>
Wed, 27 Sep 2006 14:47:36 +0000 (14:47 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:14:51 +0000 (12:14 -0500)
fix caching of some configure tests AC_CACHE_CHECK()
*needs* '_cv_' in the shell var to do caching...

metze
(This used to be commit c460f28b68b75342bfabe3b396dd06e07a668ec4)

source3/lib/replace/dlfcn.m4
source3/lib/replace/repdir.m4

index 0f099f4bacc49facff571486be4fd3c5c45b1e3f..c9d31592e018cf93e7f74e6fa15726e474c6235c 100644 (file)
@@ -6,10 +6,10 @@ AC_SEARCH_LIBS(dlopen, dl)
 
 AC_CHECK_HEADERS(dlfcn.h)
 
-libreplace_dlfcn=no
-AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_dlfcn=yes])
+libreplace_cv_dlfcn=no
+AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes])
 
-if test x"${libreplace_dlfcn}" = x"yes";then
+if test x"${libreplace_cv_dlfcn}" = x"yes";then
        LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 fi
 
index 93bf4ec911189dcf41c53f791640d4ba1e6ad479..81025d618a6773a29fc82d37048723ce425820ac 100644 (file)
@@ -1,38 +1,38 @@
-AC_CACHE_CHECK([for broken readdir],libreplace_READDIR_NEEDED,[
+AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[
        AC_TRY_RUN([
 #define test_readdir_os2_delete main
 #include "$libreplacedir/test/os2_delete.c"],
-       [libreplace_READDIR_NEEDED=no],
-       [libreplace_READDIR_NEEDED=yes],
-       [libreplace_READDIR_NEEDED="assuming not"])
+       [libreplace_cv_READDIR_NEEDED=no],
+       [libreplace_cv_READDIR_NEEDED=yes],
+       [libreplace_cv_READDIR_NEEDED="assuming not"])
 ])
 
 #
 # try to replace with getdents() if needed
 #
-if test x"$libreplace_READDIR_NEEDED" = x"yes"; then
+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
 AC_CHECK_FUNCS(getdents)
-AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_READDIR_GETDENTS,[
+AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_cv_READDIR_GETDENTS,[
        AC_TRY_RUN([
 #define _LIBREPLACE_REPLACE_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])
+       [libreplace_cv_READDIR_GETDENTS=yes],
+       [libreplace_cv_READDIR_GETDENTS=no])
 ])
 fi
-if test x"$libreplace_READDIR_GETDENTS" = x"yes"; then
+if test x"$libreplace_cv_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
+       libreplace_cv_READDIR_NEEDED=no
 fi
 
 #
 # try to replace with getdirentries() if needed
 #
-if test x"$libreplace_READDIR_NEEDED" = x"yes"; then
+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
 AC_CHECK_FUNCS(getdirentries)
 AC_VERIFY_C_PROTOTYPE([long telldir(const DIR *dir)],
        [
@@ -51,25 +51,25 @@ AC_VERIFY_C_PROTOTYPE([int seekdir(DIR *dir, long ofs)],
        ],[],[
        #include <dirent.h>
        ])
-AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_READDIR_GETDIRENTRIES,[
+AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_cv_READDIR_GETDIRENTRIES,[
        AC_TRY_RUN([
 #define _LIBREPLACE_REPLACE_H
 #include "$libreplacedir/repdir_getdirentries.c"
 #define test_readdir_os2_delete main
 #include "$libreplacedir/test/os2_delete.c"],
-       [libreplace_READDIR_GETDIRENTRIES=yes],
-       [libreplace_READDIR_GETDIRENTRIES=no])
+       [libreplace_cv_READDIR_GETDIRENTRIES=yes],
+       [libreplace_cv_READDIR_GETDIRENTRIES=no])
 ])
 fi
-if test x"$libreplace_READDIR_GETDIRENTRIES" = x"yes"; then
+if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
        AC_DEFINE(REPLACE_READDIR,1,[replace readdir])
        AC_DEFINE(REPLACE_READDIR_GETDIRENTRIES,1,[replace readdir using getdirentries()])
        LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
-       libreplace_READDIR_NEEDED=no
+       libreplace_cv_READDIR_NEEDED=no
 fi
 
 AC_MSG_CHECKING([a usable readdir()])
-if test x"$libreplace_READDIR_NEEDED" = x"yes"; then
+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
        AC_MSG_RESULT(no)
        AC_MSG_WARN([the provided readdir() is broken])
 else