[Scummvm-devel] moving -lm from LDFLAGS to LIBS

Max Horn max at quendi.de
Mon Jul 5 21:14:15 CEST 2010


Am 05.07.2010 um 19:04 schrieb begasus:

> Op zondag 04-07-2010 om 23:50 uur [tijdzone +0200], schreef Max Horn:
>> Am 03.07.2010 um 09:21 schrieb Angus Lees:
>> 
>>> I'm about to do this to ./configure.  Does anyone have a particular reason to have -lm in LDFLAGS rather than LIBS?
>> 
>> I don't see any reason, LIBS seems more logical. Since nobody complained yet, go ahead!
>> 
>> Bye,
>> Max
>> 
>>> 
>>> @@ -1987,7 +1987,7 @@
>>> cat > $TMPC << EOF
>>> int main(void) { return 0; }
>>> EOF
>>> -cc_check -lm && LDFLAGS="$LDFLAGS -lm"
>>> +cc_check -lm && LIBS="$LIBS -lm"
>>> 
>>> #
>>> # Check for Ogg Vorbis
>>> @@ -2490,12 +2490,36 @@
>>> 
>>> - Gus
> I'm not sure how this will effect other platforms ... on Haiku libm is
> integrated into libroot and for this I had to remove the dependecies for
> libm in configure.in(ac) for other ports (I haven't checked out the
> sources for a while but taking this in considiration would mean a lot
> imho.

Luc,

what you say seems at most tangential to what Angus did -- he simply moved -lm from LIBS to LDFLAGS. This is a mostly cosmetic thing and does *not* affect on which platforms -lm is added or not.
And if you look at the code, it actually checks whether -lm is supported (by test-compiling a program with "-lm" added to LDFLAGS/LIBS), and only adds it when that works. So, on platforms that don't have -lm, it would not be added.

However, none of this is new or changed by Angus.

Bye,
Max



More information about the Scummvm-devel mailing list