|
From: | Eric Blake |
Subject: | Re: AC_CHECK_LIB: Library is found on build host but is not on a target host |
Date: | Mon, 23 Aug 2010 16:13:11 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
[I reiterate - I do NOT want these mails coming only to me, when I have asked for them to go to the list]Sorry it was not my will send mails to you only :( Either is a fault on gmail or (perhaps?) the mailing list... I *always* have clicked on Reply button... in fact recent now I realize of that, I haven't this problem on other lists....
In general, on technical lists you should use the 'Reply-All' button, not the 'Reply' button. Most likely, the other lists you refer to used reply-to-munging, but that is considered harmful on this list.
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
[Prev in Thread] | Current Thread | [Next in Thread] |