libtool
[Top][All Lists]
Advanced

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

Re: Writing Autoconf tests


From: Bob Friesenhahn
Subject: Re: Writing Autoconf tests
Date: Wed, 8 Mar 2017 17:32:18 -0600 (CST)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Wed, 8 Mar 2017, Yumiko wrote:

I have a problem with Libtool when writing test programs with Autoconf.

My macro modifies LIBS and uses the AC_RUN_IFELSE macro to link and
run a test program, but AC_RUN_IFELSE uses gcc/g++ directly,
not through libtool, and the result is that .la files are not inspected
and required flags are thus not added.
At least this is what I think is happening.

How should I write my macro so that the test program is
compiled and linked through the libtool program?

This is a facinating question. I suspect that it would be necessary to temporarily re-define the CC environment variable and restore the original value when the test is completed.

What you are attempting to do is hardly ever done.

If your project uses libtool for linking, then libtool will automatically search for the .la files and apply the dependency libraries. Unfortunately, this is not helpful for the case of when configure is testing for features.

Some/many OS distributions intentionally do not distribute the .la files.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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