<p>Thank you Daniel, the example from above works now. Unfortunately the opposite condition still not work:</p>
<blockquote>
<p>$./kamailio -c -f ../etc/test-define.cfg -Y /root<br>
0(10801) CRITICAL:  [core/cfg.y:3532]: yyerror_at(): parse error in config file /home/henning/repositories/kamailio/src/../etc/test-define.cfg, from line 19, column 2 to line 20, column 0: syntax error<br>
ERROR: bad config file (1 errors)<br>
0(10801) WARNING:  [core/ppcfg.c:223]: pp_ifdef_level_check(): different number of preprocessor directives: 1 more #!if[n]def as #!endif</p>
</blockquote>
<pre><code>$ cat test-define.cfg
#!KAMAILIO

#!define foo

#!ifdef foobar1
#!ifdef foobar2
#!ifdef foobar3
#!endif
#!endif

#!ifdef bar
invalid=123
#else 
children=8
#!endif

request_route {
        ;
}
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2057?email_source=notifications&email_token=ABO7UZPEUPZXEJ3GCKWRSNTQI2T7HA5CNFSM4IUHEH7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I3MZI#issuecomment-529643109">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNRCMJL5ODTM4BDQE3QI2T7HANCNFSM4IUHEH7A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZNBOEQPOQHVBYZI3YDQI2T7HA5CNFSM4IUHEH7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I3MZI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2057?email_source=notifications\u0026email_token=ABO7UZPEUPZXEJ3GCKWRSNTQI2T7HA5CNFSM4IUHEH7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I3MZI#issuecomment-529643109",
"url": "https://github.com/kamailio/kamailio/issues/2057?email_source=notifications\u0026email_token=ABO7UZPEUPZXEJ3GCKWRSNTQI2T7HA5CNFSM4IUHEH7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6I3MZI#issuecomment-529643109",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>