cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Building the static libcurl and $LIBS

From: Mason <mpeg.blue_at_free.fr>
Date: Mon, 12 Mar 2012 10:57:48 +0100

Dan Fandrich wrote:

> Mason wrote:
>
>> I'm trying to build the static libcurl.
>> How do I get configure to use the appropriate library
>> when running the link tests, but the actual build should
>> ignore whatever LIBS I provided to configure?
>
> You could try adding "-Llwip_files -llwip" to LDFLAGS instead.

I should have read configure's help message more carefully!

Some influential environment variables:
  CC C compiler command
  CFLAGS C compiler flags
  LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Thus, the solution to my problem was to replace

  LIBS="lwip_files/lwip.a"

with

  LDFLAGS="-Llwip_files" (libtool barfs if there is a space bewteen -L and lwip_files)
  LIBS="-llwip"

(And rename lwip.a to liblwip.a because -lfoo looks for libfoo.a)

-- 
Regards.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-12