[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically using /usr/local/{include,lib}

From: Ralf Wildenhues
Subject: Re: Automatically using /usr/local/{include,lib}
Date: Mon, 6 Feb 2006 10:50:39 +0100
User-agent: Mutt/1.5.11

Hi Guillaume,

* Guillaume Rousse wrote on Mon, Feb 06, 2006 at 10:44:02AM CET:
> Default LDPATH and CPPFLAGS values are empty, making all AC_LIB_CHECK
> and AC_HEADER_CHECK unable to detect libraries installed under
> /usr/local.

This is not generally true.  In fact, it is much more a system/compiler/
linker setting to not search these directories.

> Whereas an knowledgeable user will export these variable
> before running ./configure, many other will just be unable to build
> software properly (and some maintainers may even workaround it by
> introducing configure wrappers, I've seen it).

Sure.  I don't see such a harm in a configure wrapper, by the way
(if done by the user, not the developer).

> Is there any disadvantage setting default values to thoses variables in
>, such as:
> LDFLAGS=-L/usr/local/lib
> CPPFLAGS=-I/usr/local/include

Hard setting without overriding is bad practice: on another system, for
another user with different needs than yours, it may just be very bad to
have this pre-set.  Note that the user may even desire to have them
unset, for example beause she does _not_ want to use the libraries
installed below /usr/local.

> Or is there any other recommended practice ?

Yes: Write a file once and install it so configure scripts
will find it.  This is documented in the Autoconf manual.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]