diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meson.build b/meson.build index c60a5c610..a1e7aa842 100644 --- a/meson.build +++ b/meson.build | |||
@@ -280,24 +280,29 @@ if cc.check_header('sys/param.h') | |||
280 | endif | 280 | endif |
281 | 281 | ||
282 | # TUN | 282 | # TUN |
283 | tun_found = false | ||
283 | if cc.check_header('if_tun.h') | 284 | if cc.check_header('if_tun.h') |
284 | if cc.has_header_symbol('if_tun.h', 'struct in6_ifreq') | 285 | if cc.has_header_symbol('if_tun.h', 'struct in6_ifreq') |
285 | add_project_arguments('-DIF_TUN_HDR="if_tun.h"', language : 'c') | 286 | add_project_arguments('-DIF_TUN_HDR="if_tun.h"', language : 'c') |
287 | tun_found = true | ||
286 | endif | 288 | endif |
287 | endif | 289 | endif |
288 | if cc.check_header('linux/if_tun.h') | 290 | if not tun_found and cc.check_header('linux/if_tun.h') |
289 | if cc.has_header_symbol('linux/if_tun.h', 'struct in6_ifreq') | 291 | if cc.has_header_symbol('linux/if_tun.h', 'struct in6_ifreq') |
290 | add_project_arguments('-DIF_TUN_HDR="linux/if_tun.h"', language : 'c') | 292 | add_project_arguments('-DIF_TUN_HDR="linux/if_tun.h"', language : 'c') |
293 | tun_found = true | ||
291 | endif | 294 | endif |
292 | endif | 295 | endif |
293 | if cc.check_header('net/if_tun.h') | 296 | if not tun_found and cc.check_header('net/if_tun.h') |
294 | if cc.has_header_symbol('net/if_tun.h', 'struct in6_ifreq') | 297 | if cc.has_header_symbol('net/if_tun.h', 'struct in6_ifreq') |
295 | add_project_arguments('-DIF_TUN_HDR="net/if_tun.h"', language : 'c') | 298 | add_project_arguments('-DIF_TUN_HDR="net/if_tun.h"', language : 'c') |
299 | tun_found = true | ||
296 | endif | 300 | endif |
297 | endif | 301 | endif |
298 | if cc.check_header('net/tun/if_tun.h') | 302 | if not tun_found and cc.check_header('net/tun/if_tun.h') |
299 | if cc.has_header_symbol('net/tun/if_tun.h', 'struct in6_ifreq') | 303 | if cc.has_header_symbol('net/tun/if_tun.h', 'struct in6_ifreq') |
300 | add_project_arguments('-DIF_TUN_HDR="net/tun/if_tun.h"', language : 'c') | 304 | add_project_arguments('-DIF_TUN_HDR="net/tun/if_tun.h"', language : 'c') |
305 | tun_found = true | ||
301 | endif | 306 | endif |
302 | endif | 307 | endif |
303 | 308 | ||