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
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool