Simulink has conditionals, and Simulink has triggered subsystems, but those require that the control variable be defined (but can differentiate between various values.)
To do an #ifdef you would probably need to have a MATLAB Function block that somehow tested whether that entity was "defined" ... whatever "defined" means in this context. For example with rapid acceleration turned off, the MATLAB Function Block could probably use something like
evalin('caller', 'exists(''NAME'', ''var'')')
You would then use that to as a definite signal controlling something.
However, a lot of the time #ifdef is for blocks of code compensating for different operating systems interfaces, or differences in compilers, and those kinds of things should not generally be emulated at the Simulink level. It might make some sense to want to emulate #ifdef about which interface device to use, but if so then at the Simulink level that would probably be better handled as an defined parameter with different values to control what gets invoked.