From 8f153c6128dd15fb132d8ddb1752e793bd6a5985 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 Sep 2006 22:49:20 +0000 Subject: r18644: bring in libreplace in lib/replace metze (This used to be commit 596cbe73dd268742acf456fccd8a234376fb0c97) --- source3/lib/replace/dlfcn.m4 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 source3/lib/replace/dlfcn.m4 (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 new file mode 100644 index 0000000000..0f099f4bac --- /dev/null +++ b/source3/lib/replace/dlfcn.m4 @@ -0,0 +1,18 @@ +dnl dummies provided by dlfcn.c if not available +save_LIBS="$LIBS" +LIBS="" + +AC_SEARCH_LIBS(dlopen, dl) + +AC_CHECK_HEADERS(dlfcn.h) + +libreplace_dlfcn=no +AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_dlfcn=yes]) + +if test x"${libreplace_dlfcn}" = x"yes";then + LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o" +fi + +LIBDL="$LIBS" +AC_SUBST(LIBDL) +LIBS="$save_LIBS" -- cgit From 3ae0baefa18dac1d94c7fb0a92816e195c07f2b0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Sep 2006 14:47:36 +0000 Subject: r18961: merge from samba4: 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index 0f099f4bac..c9d31592e0 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -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 -- cgit From 0b24e3d02147e68256bc8c64b3a9dcca9fda3a9b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Dec 2006 17:17:16 +0000 Subject: r20385: merge from samba4: only try to find dlfcn.h if the dlopen symbol was found, it hopefully fixes systems where dlfcn.h but no library with dlopen metze (This used to be commit b303e929d1ac6f1d931d0b92bdecdf292e1598cd) --- source3/lib/replace/dlfcn.m4 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index c9d31592e0..2d5b2c5141 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -4,13 +4,15 @@ LIBS="" AC_SEARCH_LIBS(dlopen, dl) -AC_CHECK_HEADERS(dlfcn.h) +if test "$ac_cv_search_dlopen" != no; then + AC_CHECK_HEADERS(dlfcn.h) -libreplace_cv_dlfcn=no -AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) + libreplace_cv_dlfcn=no + AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) -if test x"${libreplace_cv_dlfcn}" = x"yes";then - LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o" + if test x"${libreplace_cv_dlfcn}" = x"yes";then + LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o" + fi fi LIBDL="$LIBS" -- cgit From 4f1d0a2d8fb786f3ad823f02ab818598407a3353 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 16 May 2007 11:15:16 +0000 Subject: r22931: 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 (This used to be commit 2c72980a808a9ebe5518c6e03baa66e6b97cc7db) --- source3/lib/replace/dlfcn.m4 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index 2d5b2c5141..d42409ac63 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -2,17 +2,18 @@ dnl dummies provided by dlfcn.c if not available 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" -- cgit From e893d7f021d149803aa85e347e0a8acefde210ac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 2 Jun 2007 09:10:08 +0000 Subject: r23309: sync lib/replace with SAMBA_4_0 metze (This used to be commit 20965d800fcac0c55853fb12cdd36b5836fc7e56) --- source3/lib/replace/dlfcn.m4 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index d42409ac63..a1b57d10ec 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -5,12 +5,17 @@ LIBS="" libreplace_cv_dlfcn=no AC_SEARCH_LIBS(dlopen, dl) -if test x"${ac_cv_search_dlopen}" = x"no"; then - libreplace_cv_dlfcn=yes -else - AC_CHECK_HEADERS(dlfcn.h) - AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) -fi +AC_CHECK_HEADERS(dlfcn.h) +AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) + +AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)], + [ + return 0; + ],[ + AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsinged int flags]) + ],[],[ + #include + ]) if test x"${libreplace_cv_dlfcn}" = x"yes";then LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o" -- cgit From 68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Sep 2007 14:57:20 +0000 Subject: r25232: sync lib/replace with SAMBA_4_0 metze (This used to be commit 828d2ca0610ab5ee3b96d187b3432b9b4fea72f8) --- source3/lib/replace/dlfcn.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index a1b57d10ec..c5b7597d7a 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -12,7 +12,7 @@ AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)], [ return 0; ],[ - AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsinged int flags]) + AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags]) ],[],[ #include ]) -- cgit From 29303bd12eaf9f9845d9432c6e041d704bfc885e Mon Sep 17 00:00:00 2001 From: jelmer Date: Tue, 6 Nov 2007 03:43:50 +0000 Subject: Check for HPUX dl functions. git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25855 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 9f862e9faf0fa9cddfcc2f87d9f247082718b3e0) --- source3/lib/replace/dlfcn.m4 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/replace/dlfcn.m4') diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4 index c5b7597d7a..42f56f26be 100644 --- a/source3/lib/replace/dlfcn.m4 +++ b/source3/lib/replace/dlfcn.m4 @@ -8,6 +8,11 @@ AC_SEARCH_LIBS(dlopen, dl) AC_CHECK_HEADERS(dlfcn.h) AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) +libreplace_cv_shl=no +AC_SEARCH_LIBS(shl_load, sl) +AC_CHECK_HEADERS(dl.h) +AC_CHECK_FUNCS([shl_load shl_unload shl_findsym],[],[libreplace_cv_shl=yes]) + AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)], [ return 0; -- cgit