[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HAVE_DLADDR not being defined?
From: |
SPUeNTRUP - Kai Henningsen |
Subject: |
Re: HAVE_DLADDR not being defined? |
Date: |
Thu, 9 Sep 2010 18:24:22 +0200 |
Hello David,
Am Thu, 9 Sep 2010 15:20:23 +0100
schrieb David Chisnall <address@hidden>:
> The dladdr() test is failing for me, and presumably a lot of other people,
> because the compile command for this test contains -ldl. It then complains
> that the dl library can not be found. On GNU/Linux and *BSD (and Solaris?),
> dladdr() is provided by libc, so this flag is not needed.
>
> Can someone who understands the configure stuff have a go at fixing this?
Looking at ltdl.m4, it seems that a solution would be something similar to
AC_SEARCH_LIBS([dlopen], [dl],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
if test "$ac_cv_search_dlopen" != "none required" ; then
LIBADD_DLOPEN="-ldl"
fi
libltdl_cv_lib_dl_dlopen="yes"
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
# include <dlfcn.h>
#endif
]], [[dlopen(0, 0);]])],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
libltdl_cv_func_dlopen="yes"
LT_DLLOADERS="$LT_DLLOADERS
${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
[AC_CHECK_LIB([svld], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
LT_DLLOADERS="$LT_DLLOADERS
${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
Mit freundlichen Grüßen aus Münster /
with kind regards - Kai Henningsen
--
SPUeNTRUP Software
An der Kleimannbrücke 52
D-48157 Münster, Germany
Reg: Münster Nr.29047
Fon: +49 700 CALL CATS (=22552287)
Fon: +49 251 322 311 0
Fax: +49 251 322 311 99
Web: http://www.cats.ms
Mail: address@hidden