Re: The autoconf macros business.

Drazen Kacar <> writes:
> Tim Janik wrote:
> > also, the --libs-only-L and --libs-only-l options featured by gnome-config
> > should probably also be featured by gtk-config and glib-config and even
> > be furtherly split up into --libs-only-L, --libs-only-l, --libs-only-l-self
> > and --libs-only-l-system (where --libs-only-l is a superset of
> > --libs-only-l-self (e.g. -lglib -lgmodule -lgthread) and
> > --libs-only-l-system (e.g. -lpthread -ldl -lm) so we can implement
> > proper implementation-level-ordered chaining of the *-config scripts.

I'm working on a detailed response to these and other stuff in Tim's
mail.  I need some time :-)
> What is the intended behaviour with -R flag if I ask for --libs-only-L?
> I've changed all *-config scripts, so they now output -L/usr/local/lib
> and -R/usr/local/lib on my systems. If I ask for --libs-only-L, I
> currently get both of them, which is fine with me, but I'm not sure
> that someone who uses that in his config script or Makefile would agree
> with me.
> There is no --libs-only-R or --libs-only-L-and-R, so I'm somewhat clueless.

Whoa.  The --libs-only-{L,l} is a kind of misnomer.  The basic issue
is to separate out things that go into $LDFLAGS and those that go into
$LIBS.  The linker is usually invoked as

        $(LD) $(LDFLAGS) -o output objects.o $(LIBS)

The heuristic is that libraries go into $(LIBS) and all other stuff
meant for the linker goes into $(LDFLAGS).  On hindsight, I would've
liked to call those flags --ldflags and --libs instead of using --libs
for the union of those and using --libs-only-L and --libs-only-l as
somewhat contrived names.

- Hari
Raja R Harinath ------------------------------
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

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