use RTLD_NOLOAD if it's available to make loading dynamic modules a little faster and less resource-intensive

also, keep trying to dlclose() a module until it actually goes away, since it may have other modules it brought in when it was loaded (thanks PCadach for pointing this problem out to me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-08-23 19:28:13 +00:00
parent e690d7d34c
commit 7eecf0bfbc
4 changed files with 106 additions and 9 deletions

View File

@@ -237,6 +237,15 @@ AC_LINK_IFELSE(
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(checking for RTLD_NOLOAD)
AC_LINK_IFELSE(
AC_LANG_PROGRAM([#include <dlfcn.h>],
[int foo = RTLD_NOLOAD;]),
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_RTLD_NOLOAD], 1, [Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.]),
AC_MSG_RESULT(no)
)
AST_GCC_ATTRIBUTE(pure)
AST_GCC_ATTRIBUTE(malloc)
AST_GCC_ATTRIBUTE(const)