Re: configure scripts and non-standard library paths

From: Dan Espen (daneNO_at_SPAM.mk.telcordia.com)
Date: 09/16/05


Date: Fri, 16 Sep 2005 08:50:10 -0400

Lionel B <me@privacy.net> writes:

> Kilian A. Foth wrote:
>> Lionel B <me@privacy.net> wrote:
>>
>>>Greetings,
>>
>>> I have some non-standard lib/include paths on my system, which
>>> frequently causes problems when trying to compile tarballs;
>>> specifically, configure scripts often fail to find required
>>> libraries (as far as I can make out, this seems to be due to
>>> failure of the AC_CHECK_LIB and AC_CHECK_HEADER macros).
>>
>>> Not being an autoconf expert, can anyone suggest a "generic hack"
>>> (maybe a configure.in hack?) for telling a configure script to
>>> include additional directories in its library/include search paths,
>>> either for all libraries or just specific libraries?
>> Have you tried a global export CFLAGS="-I/my/strange/path/include
>> -L/my/strange/path/lib"
>> yet?
>
> Right, got it... I find I have to specify flags in the configure
> command line (for some reason just setting/exporting the env vars
> doesn't seem to work):
>
> ./configure ... LDFLAGS=-L/my/strange/path/lib
> CPPFLAGS=-I/my/strange/path/include
>
> gets me a clean configure/make/make install. Then I also have to add
> /my/strange/path/lib to LD_LIBRARY_PATH (else the binary fails to find
> the dynamic libs) and all is hunk-dory.

Using LD_LIBRARY_PATH is not recommended. (Do some Google searches.)
Try this instead:

LDFLAGS='-L/my/strange/path/lib -Wl,-rpath /my/strange/path/lib'



Relevant Pages

  • Accesing structures data (getting lengthy!)
    ... > assignment statement just won't stand out amongst all the other ... > meaningless dummy variables that you have to keep track of. ... > comparitively easy to pick out of a long, boring, command line history, ... > original, for some reason, wraps me up in knots. ...
    (comp.soft-sys.matlab)
  • Re: My Weekly Drash - Vayera
    ... you're asking what reason there might be for a ... >> literally speaking in one voice) and concluding that the law had never ... I have problem with that understanding, ... Because when the command _to him_ is to do ...
    (soc.culture.jewish.moderated)
  • Re: My Weekly Drash - Vayera
    ... >>> while I said I prefer to know the purpose of a law. ... > a reason. ... >> impart a reson to G-d's command. ... Moshe Schorr ...
    (soc.culture.jewish.moderated)
  • Re: 8.0 rc.d scripts less verbose?
    ... bug, but it's a bug that we've come to depend on. ... This late in the release cycle I'm comfortable adding a knob, ... pre-command routine or the command itself failed. ... whatever reason), it is nice to have an approximate idea which one ...
    (freebsd-stable)
  • Re: Some Comments on an "Adventure Engine"
    ... a brass lantern with rusted hinges. ... So there is no reason to deal with explicit numeric equivalences. ... If you're expecting the player to enter these numeric values ... instead of typing a command (gee, ...
    (alt.lang.asm)