[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calling AC_CANONICAL_HOST twice?
From: |
Noah Misch |
Subject: |
Re: calling AC_CANONICAL_HOST twice? |
Date: |
Wed, 15 Jun 2005 18:15:53 -0700 |
User-agent: |
Mutt/1.5.5.1i |
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