source: branches/samba-3.3.x/source/lib/replace/dlfcn.m4

Last change on this file was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

File size: 741 bytes
Line 
1dnl dummies provided by dlfcn.c if not available
2save_LIBS="$LIBS"
3LIBS=""
4
5libreplace_cv_dlfcn=no
6AC_SEARCH_LIBS(dlopen, dl)
7
8AC_CHECK_HEADERS(dlfcn.h)
9AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes])
10
11libreplace_cv_shl=no
12AC_SEARCH_LIBS(shl_load, sl)
13AC_CHECK_HEADERS(dl.h)
14AC_CHECK_FUNCS([shl_load shl_unload shl_findsym],[],[libreplace_cv_shl=yes])
15
16AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)],
17 [
18 return 0;
19 ],[
20 AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags])
21 ],[],[
22 #include <dlfcn.h>
23 ])
24
25if test x"${libreplace_cv_dlfcn}" = x"yes";then
26 LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
27fi
28
29LIBDL="$LIBS"
30AC_SUBST(LIBDL)
31LIBS="$save_LIBS"
Note: See TracBrowser for help on using the repository browser.