PATCH RFA: Do not require dlopen to be in -ldl
Ian Lance Taylor
iant@google.com
Fri Oct 9 16:02:00 GMT 2009
Paolo Bonzini <bonzini@gnu.org> writes:
> Ian Lance Taylor wrote:
>> I am told that on FreeBSD dlopen is libc, not libdl. This patch has
>> been confirmed to permit plugins to work on FreeBSD. I have
>> bootstrapped it on i686-pc-linux-gnu and confirmed that the plugin.exp
>> tests all pass.
>>
>> OK for mainline?
>
> Can you use AC_SEARCH_LIBS instead?
>
> like
>
> AC_SEARCH_LIBS([dlopen], [dl])
> if test x"$ac_cv_search_dlopen" = x-ldl; then
> pluginlibs=-ldl
> fi
> ...
> if test x"$have_pic_shared" != xyes || test
> x"$ac_cv_search_libs_dlopen" = xno; then
> pluginlibs=
> enable_plugin=no
> fi
I considered using AC_SEARCH_LIBS, but as your example shows I would
have to use the undocumented ac_cv_search_dlopen and
ac_cv_search_libs_dlopen shell variables. I will do it that way if
you prefer, but I think my approach is cleaner.
Ian
More information about the Gcc-patches
mailing list