diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-08-27 17:13:27 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-08-27 17:13:27 +0000 |
commit | 16c6afde285551e9aa598ba38ca0db426f6b3777 (patch) | |
tree | 244f793d9e62c1dd41fdb8177d1bc4d629afa676 /bundled/replace/dlfcn.m4 | |
parent | 535c5143dbc331707a60e1987a7708075585e486 (diff) |
Add bundled tdb from latest trunk, rsynced from http://tdb.samba.org/.
Diffstat (limited to 'bundled/replace/dlfcn.m4')
-rw-r--r-- | bundled/replace/dlfcn.m4 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bundled/replace/dlfcn.m4 b/bundled/replace/dlfcn.m4 new file mode 100644 index 00000000..722e0246 --- /dev/null +++ b/bundled/replace/dlfcn.m4 @@ -0,0 +1,31 @@ +dnl dummies provided by dlfcn.c if not available +save_LIBS="$LIBS" +LIBS="" + +libreplace_cv_dlfcn=no +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; + ],[ + AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags]) + ],[],[ + #include <dlfcn.h> + ]) + +if test x"${libreplace_cv_dlfcn}" = x"yes";then + LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/dlfcn.o" +fi + +LIBDL="$LIBS" +AC_SUBST(LIBDL) +LIBS="$save_LIBS" |