Re: Plugin support for FreeBSD and OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So are you suggesting that the entire block:

  LIBS="$LIBS -ldl"
  AC_MSG_CHECKING([for -ldl])
  AC_TRY_LINK(
    [#include <dlfcn.h>],
    [volatile int f = 0; if (f) dlopen ("dummy", 0);],
    [AC_MSG_RESULT([yes]); have_dl=yes],
    [AC_MSG_RESULT([no])])
  if test x"$have_dl" = x"yes"; then
    pluginlibs="$pluginlibs -ldl"
  fi

should be replaced with something based on AC_CHECK_LIB? I'll give that a test!

Thanks,
Nicholas "Indy" Ray

On Mon, Oct 5, 2009 at 3:38 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> "Nicholas \"Indy\" Ray" <arelius@xxxxxxxxx> writes:
>
>> The problem is that on FreeBSD -ldl is not available or required, the
>> functionality is provided by libc
>
> I think understand that.  What I am saying is that the configure
> script should test for that property--the fact that -ldl is not
> available or required--rather than test the type of host for which gcc
> is being configured.
>
> Ian
>
>
>> Nicholas "Indy" Ray
>>
>> On Mon, Oct 5, 2009 at 3:05 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>>> "Nicholas \"Indy\" Ray" <arelius@xxxxxxxxx> writes:
>>>
>>>> Indeed, I've sent in a small patch for a warning I got on FreeBSD,
>>>> however I'm not sure how to get autoconf to check the host system,
>>>> I'll examine other locations in the code and see if I can't cobble a
>>>> patch together.
>>>
>>> When possible, a configure script should test for features, not
>>> operating systems.  So, for example, the goal would be not to check
>>> for FreeBSD, but rather to check for the availability of -ldl, which
>>> is typically done using AC_CHECK_LIB.
>>>
>>> Ian
>>>
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux