autoconf
[Top][All Lists]
Advanced

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

Re: AC_LINK_IFELSE with two (or more) sources?


From: Stepan Kasal
Subject: Re: AC_LINK_IFELSE with two (or more) sources?
Date: Mon, 5 May 2008 16:22:15 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

Hello Eric,

On Fri, May 02, 2008 at 04:30:51PM -0600, Eric Lemings wrote:
> Currently, the AC_LINK_IFELSE macro only accepts one source file.  For
> some C++ linkage tests, two (or more) sources need to be linked
> together.  [...]
> (I suspect a customized AC_LANG(C++) macro to define an alternate ac_link
> variable might do the trick.)

well, there is another detail: at the end of AC_LINK_IFELSE, the
object file is deleted.  In your case, both object files have to be
deleted.

So I think you really need a new macro.  It is not obvious in which
level you hook into Autoconf.

If you write it, please submit it to autoconf-patches@, I think it
might be accepted it to Autoconf.  (Provided the necessary paperwork
is done.)

Actually, I guess that the macro will have to rely on undocumented
internals, so adding it to Autoconf itself is a good way to ensure it
will work with future releases of Autoconf.

>           int i = foo ();  // returns 0
>           int j = bar ();  // should return 1
>       
>           return !(i != j);
>       }

BTW, this looks like a check which would need to be run to get the
result.  So it looks more like AC_RUN_IFELSE.

Have a nice day,
        Stepan Kasal




reply via email to

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