I would recommend a "radio button" approach for mutually exclusive modes
which have associated source files. Something like:
cdl_interface CYGINT_LWIP_MODES {
display "Enabled lwIP modes"
no_define
requires 1 == CYGINT_LWIP_MODES
description "This interface is used to force mutually exclusive
selection of the available lwIP modes."
}
cdl_option CYGFUN_LWIP_MODE_SIMPLE {
display "Simple mode"
implements CYGINT_LWIP_MODES
compile ecos/simple.c
}
cdl_option CYGFUN_LWIP_MODE_SEQUENTIAL {
display "Sequential mode"
implements CYGINT_LWIP_MODES
compile ecos/sequential.c
}
The same applies to sio. I can add a new package CYGPKG_LWIP_SIO which
is required by both PPPoS and SLIPIF. I think the best place would be
the "APIs" section as the SIO may be also used for other purposes than
lwIP's internal. So a user could enable sio without using SLIPIF or PPPoS.
It would be best to use another CDL interface to enable compilation of
this code. Something like:
cdl_interface CYGINT_LWIP_SIO_REQUIRED {
no_define
display "Items requiring lwIP serial operations"
description "Items requiring use of the lwIP serial operations code
should implement this interface."
}
cdl_option CYGFUN_LWIP_SIO {
display "Serial operations support"
calculated { CYGINT_LWIP_SIO_REQUIRED > 0 }
compile ecos/sio.c
}
cdl_component CYGPKG_LWIP_SLIP {
implements CYGINT_LWIP_SIO_REQUIRED
compile ...
...
}
cdl_component CYGPKG_LWIP_PPP {
implements CYGINT_LWIP_SIO_REQUIRED
compile ...
...
}
This is a little more complicated than a simple "requires
CYGFUN_LWIP_SIO" but ensures that CYGFUN_LWIP_SIO becomes disabled when
the number of components requiring it falls to zero.