]> git.ipfire.org Git - thirdparty/asterisk.git/commit
menuselect: Add a new 'options' support type
authorGeorge Joseph <gjoseph@digium.com>
Mon, 13 Mar 2017 15:45:47 +0000 (09:45 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 13 Mar 2017 16:08:17 +0000 (10:08 -0600)
commit5ad96b7ce183d91dd44a76579732ce69919a0b85
tree19b310d46a8d4428ce8560ad5ae51b5f1a28f537
parent37a7e7596915bfc74469e398f2dfaf673baf9e93
menuselect: Add a new 'options' support type

The Binaural Rendering patches in the master branch required
menuselect to be updated with a new support type called 'option'.
This allows binaural rendering to be turned on or off when
bridge_softmix is built.  This patch backports the 'option'
functionality to the 13 and 14 branches.

Here's what it looks like in menuselect:

  [*] bridge_simple
  [*] bridge_softmix
      --- Module Options ---
  [ ] binaural_rendering_in_bridge_softmix

To create an option for a module, you can create (or update) the
menuselect-tree xml snippet in the directory where the module
resides and add a member element with an 'option' support_level.

Example (abbreviated) from bridges/bridges.xml:

<member name="binaural_rendering_in_bridge_softmix"
displayname="Enable binaural rendering in bridge_softmix"
remove_on_change="bridges/bridge_softmix.o bridges/bridge_softmix.so">
<support_level>option</support_level>
<depend>bridge_softmix</depend>
<depend>fftw3</depend>
<defaultenabled>no</defaultenabled>
</member>

The 'name' will be added or removed from the MENUSELECT_<dir>
make variable following the standard module "missing means yes"
rules.

Example (abbreviated) from bridges/Makefile:

ifeq ($(findstring binaural_rendering,$(MENUSELECT_BRIDGES)),)
bridge_softmix.o: _ASTCFLAGS+=-DBINAURAL_RENDERING
bridge_softmix.so: LIBS+=$(FFTW3_LIB)
endif

Change-Id: I66d23755ed6e81f8d439cad410f2ffa7c30f25ad
menuselect/menuselect.c
menuselect/menuselect.h