Re: calling AC_CANONICAL_HOST twice?

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

 



On Tue, Jun 14, 2005 at 01:11:55PM +0200, Harald Dunkel wrote:
> Why am I not allowed to call AC_CANONICAL_HOST twice?

Its definition uses AC_DEFUN_ONCE.  If we let the macro expand twice, `--host'
would appear in help output twice.  Feel welcome to post a patch eliminating
that limitation.

> If I try, then I get several lines like
> 
> configure.ac:160: warning: AC_CANONICAL_HOST invoked multiple times
> 
> Is there some kind of "if-statement" possible to avoid
> this warning?

If you currently call AC_CANONICAL_HOST from one of your own macros, replace
those calls with `AC_REQUIRE([AC_CANONICAL_HOST])'.  If you call it from the top
level, defun a macro that makes that call and then call your macro.  Like this:

AC_DEFUN([some_name], [AC_REQUIRE([AC_CANONICAL_HOST])])
some_name


_______________________________________________
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