Re: Writing Autoconf tests
Peter Johansson <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Yumiko, On 03/09/2017 09:32 AM, Bob Friesenhahn wrote: >> 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. I have a few macros that I think might be useful for you. http://dev.thep.lu.se/yat/svn/tags/0.14.2/m4/yat_lt_link_ifelse.m4 Have a look at YAT_LT_LINK_IFELSE(PROG, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) basically works like 'AC_LINK_IFELSE' but redefines $ac_link such that the linker is called via libtool. Cheers, Peter _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool