[Top][All Lists]

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

Re: AC_SEARCH_LIBS and two programs

From: Ralf Wildenhues
Subject: Re: AC_SEARCH_LIBS and two programs
Date: Mon, 2 Apr 2007 09:15:05 +0200
User-agent: Mutt/1.5.14 (2007-03-22)

Hi Andrey,

* Andrey Simonenko wrote on Fri, Mar 30, 2007 at 10:53:45AM CEST:
> There are two programs t1 and t2, one configure and
> one Makefile which are used for building them.
> t2 uses the cos() function, and t1 does not use cos().

Your solution looks just about right to me.

> May be "LIBS=" in can be removed, but in this case
> I see "... -lm -lz -lz" for t2.

Well, I assume the -lz parts then come from a different part of the
original code not shown in the example; optimizing that should be done
independently of the issue presented here.

FWIW, I would omit the `LIBS=' part for another reason: on some obscure
system, cos() may be found in another library.  The user knows this, but
the developer (you) doesn't.  If you don't override LIBS, then you
retain his choice by
  ./configure LIBS=-lcoolmathlib

This is no unusual example: optimized math libraries are abundant with
some compiler suites.

Hope that helps.


reply via email to

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