Package Menuconfig Options Toggle

I'm looking to create the package configuration for Suricata 6.

In my Config.in

        config SURICATA_ENABLE_LUA
                depends on PACKAGE_suricata6
                depends on !SURICATA_ENABLE_LUAJIT
                bool "Enable LUA Support"
                default n

        config SURICATA_ENABLE_LUAJIT
                depends on PACKAGE_suricata6
                depends on !SURICATA_ENABLE_LUA
                bool "Enable LuaJIT Support"
                default n

The goal is to ensure that both LUA and LUAJIT aren't enabled at the same time - one or the other or neither, but not both.

How can I do this?

I ended up changing it to this:

        choice
                prompt "LUA / LuaJit Support"
                default SURICATA_NO_LUA

                config SURICATA_ENABLE_LUA
                        bool "LUA Support"

                config SURICATA_ENABLE_LUAJIT
                        bool "LuaJIT Support"

                config SURICATA_NO_LUA
                        bool "No LUA/LuaJit Support"
        endchoice

Thanks to @guidosarducci for pointing me in the right direction!

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.