Re: AC_SEARCH_LIBS and two programs

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

 



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 configure.ac 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.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux