mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Added tests for presence of dlinfo() and its options on building host.
Thanks to Alex for patch for configure.ac.
This commit is contained in:
parent
9226fcdb12
commit
b1d1195256
12
configure.ac
12
configure.ac
@ -983,6 +983,18 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
AC_CHECK_FUNCS(poll)
|
||||
AC_CHECK_FUNCS(dlinfo)
|
||||
if test "$ac_cv_func_dlinfo" = "yes"; then
|
||||
AC_MSG_CHECKING(if dlinfo supports RTLD_DI_LINKMAP)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
|
||||
#include <link.h>
|
||||
#include <dlfcn.h>]], [[struct link_map info; dlinfo(0, RTLD_DI_LINKMAP, &info);]])],[AC_DEFINE(HAVE_RTLD_DI_LINKMAP, [1], [Linkmap info support]) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
|
||||
|
||||
AC_MSG_CHECKING(if dlinfo supports RTLD_DI_ORIGIN)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
|
||||
#include <link.h>
|
||||
#include <dlfcn.h>]], [[char info[256]; dlinfo(0, RTLD_DI_ORIGIN, info);]])],[AC_DEFINE(HAVE_RTLD_DI_ORIGIN, [1], [Origin info support]) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
|
||||
fi
|
||||
|
||||
dnl Check for time function
|
||||
AC_SEARCH_LIBS(clock_gettime, rt)
|
||||
|
@ -208,8 +208,10 @@ void* DlfcnModule::findSymbol(ISC_STATUS* status, const Firebird::string& symNam
|
||||
|
||||
bool DlfcnModule::getRealPath(Firebird::PathName& realPath)
|
||||
{
|
||||
#ifdef HAVE_DLINFO
|
||||
char b[PATH_MAX];
|
||||
/*
|
||||
|
||||
#ifdef HAVE_RTLD_DI_ORIGIN
|
||||
if (dlinfo(module, RTLD_DI_ORIGIN, b) == 0)
|
||||
{
|
||||
realPath = b;
|
||||
@ -222,7 +224,9 @@ bool DlfcnModule::getRealPath(Firebird::PathName& realPath)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RTLD_DI_LINKMAP
|
||||
struct link_map* lm;
|
||||
if (dlinfo(module, RTLD_DI_LINKMAP, &lm) == 0)
|
||||
{
|
||||
@ -232,6 +236,8 @@ bool DlfcnModule::getRealPath(Firebird::PathName& realPath)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user