[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_LIB: Library is found on build host but is not on a target
From: |
Sergio Belkin |
Subject: |
Re: AC_CHECK_LIB: Library is found on build host but is not on a target host |
Date: |
Mon, 27 Sep 2010 12:04:53 -0300 |
2010/9/27 Sergio Belkin <address@hidden>:
> 2010/8/23 Eric Blake <address@hidden>:
>
>>>> Ah - the difference is the presence of -L/usr/lib/mysql in the working
>>>> command line. For your configure test to work, you'd also have to
>>>> provide
>>>> that same -L option to LDFLAGS prior to using AC_CHECK_LIB (or the better
>>>> AC_SEARCH_LIBS).
>>>
>>> But I don't understand why... with AC_CHECK_LIB I have no need to use
>>> LDFLAGS on Mandriva or Ubuntu...
>>
>> Most likely, because Mandriva or Ubuntu chooses to install the package
>> directly into /usr/lib instead of Fedora's choice of installing into
>> /usr/lib/mysql (I don't use Ubuntu myself to state that with certainty). I
>> can't say whether the difference in layout between the distros is worthy of
>> a bug report (or even to which distro you should file such a bug report),
>> but that's one of the joys you get to encounter when porting software to
>> multiple platforms. More importantly, you should remember that someone
>> might not have mysql installed anywhere under /usr/lib at all; perhaps they
>> installed it in $HOME/lib instead.
>>
>> Hence, the autoconf approach is to expose LDFLAGS as the desired way of
>> letting the user tune where to look for particular libraries, and both the
>> autoconf-archives and gnulib projects have written wrapper macros that make
>> it easier to search in several default candidate locations (including the
>> location relative to ${prefix}) to set the correct LDFLAGS for a given
>> library.
>>
>> --
>> Eric Blake address@hidden +1-801-349-2682
>> Libvirt virtualization library http://libvirt.org
>>
>
>
> Hi, I've added
>
> LDFLAGS="-L/usr/lib/mysql $LDFLAGS"
>
>
> and it worked. I wonder if the proper way to do it.
>
> Thanks in advance!!
Clarification: I meant added to configure.ac
TIA
--
--
Sergio Belkin http://www.sergiobelkin.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -