Author: obnox
Date: 2007-05-16 11:15:16 +0000 (Wed, 16 May 2007)
New Revision: 22931

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22931

Log:
Fix logic in detection of the need to replace dlopen and friends.
Originally, dlfcn.o was only added to LIBREPLACEOBJ if dlopen
was found in libdl but header dlfcn.h was not appropriate.

Michael


Modified:
   branches/SAMBA_3_0/source/lib/replace/dlfcn.m4
   branches/SAMBA_3_0_25/source/lib/replace/dlfcn.m4
   branches/SAMBA_3_0_26/source/lib/replace/dlfcn.m4
   branches/SAMBA_4_0/source/lib/replace/dlfcn.m4


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/dlfcn.m4
===================================================================
--- branches/SAMBA_3_0/source/lib/replace/dlfcn.m4      2007-05-16 10:59:04 UTC 
(rev 22930)
+++ branches/SAMBA_3_0/source/lib/replace/dlfcn.m4      2007-05-16 11:15:16 UTC 
(rev 22931)
@@ -2,17 +2,18 @@
 save_LIBS="$LIBS"
 LIBS=""
 
+libreplace_cv_dlfcn=no
 AC_SEARCH_LIBS(dlopen, dl)
 
-if test "$ac_cv_search_dlopen" != no; then
+if test x"${ac_cv_search_dlopen}" = x"no"; then
+       libreplace_cv_dlfcn=yes
+else
        AC_CHECK_HEADERS(dlfcn.h)
-
-       libreplace_cv_dlfcn=no
        AC_CHECK_FUNCS([dlopen dlsym dlerror 
dlclose],[],[libreplace_cv_dlfcn=yes])
+fi
 
-       if test x"${libreplace_cv_dlfcn}" = x"yes";then
-               LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
-       fi
+if test x"${libreplace_cv_dlfcn}" = x"yes";then
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 fi
 
 LIBDL="$LIBS"

Modified: branches/SAMBA_3_0_25/source/lib/replace/dlfcn.m4
===================================================================
--- branches/SAMBA_3_0_25/source/lib/replace/dlfcn.m4   2007-05-16 10:59:04 UTC 
(rev 22930)
+++ branches/SAMBA_3_0_25/source/lib/replace/dlfcn.m4   2007-05-16 11:15:16 UTC 
(rev 22931)
@@ -2,17 +2,18 @@
 save_LIBS="$LIBS"
 LIBS=""
 
+libreplace_cv_dlfcn=no
 AC_SEARCH_LIBS(dlopen, dl)
 
-if test "$ac_cv_search_dlopen" != no; then
+if test x"${ac_cv_search_dlopen}" = x"no"; then
+       libreplace_cv_dlfcn=yes
+else
        AC_CHECK_HEADERS(dlfcn.h)
-
-       libreplace_cv_dlfcn=no
        AC_CHECK_FUNCS([dlopen dlsym dlerror 
dlclose],[],[libreplace_cv_dlfcn=yes])
+fi
 
-       if test x"${libreplace_cv_dlfcn}" = x"yes";then
-               LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
-       fi
+if test x"${libreplace_cv_dlfcn}" = x"yes";then
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 fi
 
 LIBDL="$LIBS"

Modified: branches/SAMBA_3_0_26/source/lib/replace/dlfcn.m4
===================================================================
--- branches/SAMBA_3_0_26/source/lib/replace/dlfcn.m4   2007-05-16 10:59:04 UTC 
(rev 22930)
+++ branches/SAMBA_3_0_26/source/lib/replace/dlfcn.m4   2007-05-16 11:15:16 UTC 
(rev 22931)
@@ -2,17 +2,18 @@
 save_LIBS="$LIBS"
 LIBS=""
 
+libreplace_cv_dlfcn=no
 AC_SEARCH_LIBS(dlopen, dl)
 
-if test "$ac_cv_search_dlopen" != no; then
+if test x"${ac_cv_search_dlopen}" = x"no"; then
+       libreplace_cv_dlfcn=yes
+else
        AC_CHECK_HEADERS(dlfcn.h)
-
-       libreplace_cv_dlfcn=no
        AC_CHECK_FUNCS([dlopen dlsym dlerror 
dlclose],[],[libreplace_cv_dlfcn=yes])
+fi
 
-       if test x"${libreplace_cv_dlfcn}" = x"yes";then
-               LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
-       fi
+if test x"${libreplace_cv_dlfcn}" = x"yes";then
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 fi
 
 LIBDL="$LIBS"

Modified: branches/SAMBA_4_0/source/lib/replace/dlfcn.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/dlfcn.m4      2007-05-16 10:59:04 UTC 
(rev 22930)
+++ branches/SAMBA_4_0/source/lib/replace/dlfcn.m4      2007-05-16 11:15:16 UTC 
(rev 22931)
@@ -2,17 +2,18 @@
 save_LIBS="$LIBS"
 LIBS=""
 
+libreplace_cv_dlfcn=no
 AC_SEARCH_LIBS(dlopen, dl)
 
-if test "$ac_cv_search_dlopen" != no; then
+if test x"${ac_cv_search_dlopen}" = x"no"; then
+       libreplace_cv_dlfcn=yes
+else
        AC_CHECK_HEADERS(dlfcn.h)
-
-       libreplace_cv_dlfcn=no
        AC_CHECK_FUNCS([dlopen dlsym dlerror 
dlclose],[],[libreplace_cv_dlfcn=yes])
+fi
 
-       if test x"${libreplace_cv_dlfcn}" = x"yes";then
-               LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
-       fi
+if test x"${libreplace_cv_dlfcn}" = x"yes";then
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 fi
 
 LIBDL="$LIBS"

Reply via email to