Enable/disable a menu item programatically depending on a variable value
The usual way to enable a menu item only in certain circumstances is to use a custom access callback, in which you would evaluate whether this option is set. So:

'access callback' = 'my_module_access_callback',
...

function my_module_access_callback() {
   return my_module_test_option_is_true();
}


But it's a little hard to be sure if this will work for your case as you haven't given us much to go on.