[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple --with-foo possible?
From: |
Ralf Wildenhues |
Subject: |
Re: Multiple --with-foo possible? |
Date: |
Sat, 5 Apr 2008 14:23:22 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hi Thomas,
* Thomas Schwinge wrote on Sat, Apr 05, 2008 at 02:06:50PM CEST:
> On Sat, Apr 05, 2008 at 12:54:39PM +0200, Ralf Wildenhues wrote:
> >
> > --with-module=foo,bar,baz
>
> That would be an option, but I also need to pass additional information
> per module, à la ``--with-module=FILE,PRIORITY,SHARE,COMMAND LINE''.
Ah, ok, then the latter method may be better.
If your FILE,PRIORITY,SHARE,COMMAND LINE arguments were from some finite
set, you could transpose:
--with-modules-using-file-ThisFile=foo,bar,baz
--with-modules-using-prio-ThisPrio=foo,bar,baz
but I assume that is not the case.
> > or
> > --with-foo-module --with-bar-module...
>
> The ``foo'', ``bar'' parts aren't preassigned, everything is possible.
> Also the number of modules isn't limited (in theory).
OK. There are a couple of issues you have to deal with then:
First, configure --help output cannot list your allowed switches, but
you may be able to either directly divert text to the HELP_WITH
diversion, or use a bogus AC_ARG_WITH([--with-*-module]...) or so as a
workaround.
Second, you have to actually get at the switches that were used. I
think you can proceed similarly to the algorithm used by _AC_CACHE_DUMP
to enumerate all variables, then work from that; see the respective
macros in autoconf/lib/autoconf/general.m4. Beware, this is tricky
code, and full of portability pitfalls, too, if you have to cater to
different shells.
Third, with Autoconf 2.62 you will need to use
AC_DISABLE_OPTION_CHECKING to avoid warnings about options not
directly recognized by the configure script.
Sorry I don't have a simpler solution.
Cheers,
Ralf