diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2024-05-21 10:51:54 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2024-05-21 10:51:54 +0200 |
commit | 86e97f0ffb6cc6270d13154a342d0921489ee1a5 (patch) | |
tree | 9b5f90a042eaf49cc71b8bfb381c4605b3a2f0d5 | |
parent | 7d545bc0200e5ba70a9f0d79545ce96a4c586d3a (diff) | |
download | gnunet-86e97f0ffb6cc6270d13154a342d0921489ee1a5.tar.gz gnunet-86e97f0ffb6cc6270d13154a342d0921489ee1a5.zip |
meson: add more syscall header detection
-rw-r--r-- | meson.build | 126 |
1 files changed, 110 insertions, 16 deletions
diff --git a/meson.build b/meson.build index b7926939f..64f4c990c 100644 --- a/meson.build +++ b/meson.build | |||
@@ -349,13 +349,6 @@ endif | |||
349 | 349 | ||
350 | add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language : 'c') | 350 | add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language : 'c') |
351 | 351 | ||
352 | if cc.check_header('sys/time.h') | ||
353 | add_project_arguments('-DHAVE_SYS_TIME_H', language : 'c') | ||
354 | endif | ||
355 | if cc.check_header('sys/param.h') | ||
356 | add_project_arguments('-DHAVE_SYS_PARAM_H', language : 'c') | ||
357 | endif | ||
358 | |||
359 | # NSS | 352 | # NSS |
360 | have_nss = false | 353 | have_nss = false |
361 | if cc.check_header('nss.h') | 354 | if cc.check_header('nss.h') |
@@ -390,9 +383,6 @@ if not tun_found and cc.check_header('net/tun/if_tun.h') | |||
390 | endif | 383 | endif |
391 | endif | 384 | endif |
392 | 385 | ||
393 | |||
394 | |||
395 | |||
396 | # NSS | 386 | # NSS |
397 | if cc.check_header('nss.h') | 387 | if cc.check_header('nss.h') |
398 | add_project_arguments('-DHAVE_GLIBCNSS', language : 'c') | 388 | add_project_arguments('-DHAVE_GLIBCNSS', language : 'c') |
@@ -467,9 +457,6 @@ endif | |||
467 | if cc.has_function('freeifaddrs') | 457 | if cc.has_function('freeifaddrs') |
468 | cdata.set('HAVE_FREEIFADDRS', 1) | 458 | cdata.set('HAVE_FREEIFADDRS', 1) |
469 | endif | 459 | endif |
470 | if cc.check_header('ifaddrs.h') | ||
471 | add_project_arguments('-DHAVE_IFADDRS_H', language : 'c') | ||
472 | endif | ||
473 | if cc.has_function('getresgid') | 460 | if cc.has_function('getresgid') |
474 | cdata.set('HAVE_RESGID', 1) | 461 | cdata.set('HAVE_RESGID', 1) |
475 | endif | 462 | endif |
@@ -500,9 +487,6 @@ endif | |||
500 | if cc.has_function('statvfs') | 487 | if cc.has_function('statvfs') |
501 | cdata.set('HAVE_STATVFS', 1) | 488 | cdata.set('HAVE_STATVFS', 1) |
502 | endif | 489 | endif |
503 | if cc.check_header('sys/statvfs.h') | ||
504 | add_project_arguments('-DHAVE_SYS_STATVFS_H', language : 'c') | ||
505 | endif | ||
506 | if cc.has_function('wait4') | 490 | if cc.has_function('wait4') |
507 | cdata.set('HAVE_WAIT4', 1) | 491 | cdata.set('HAVE_WAIT4', 1) |
508 | endif | 492 | endif |
@@ -519,6 +503,116 @@ if cc.has_function('gethostbyname') | |||
519 | cdata.set('HAVE_GETHOSTBYNAME', 1) | 503 | cdata.set('HAVE_GETHOSTBYNAME', 1) |
520 | endif | 504 | endif |
521 | 505 | ||
506 | if cc.check_header('stdatomic.h') | ||
507 | add_project_arguments('-DHAVE_STDATOMIC_H', language : 'c') | ||
508 | endif | ||
509 | if cc.check_header('malloc.h') | ||
510 | add_project_arguments('-DHAVE_MALLOC_H', language : 'c') | ||
511 | endif | ||
512 | if cc.check_header('malloc/malloc.h') | ||
513 | add_project_arguments('-DHAVE_MALLOC_MALLOC_H', language : 'c') | ||
514 | endif | ||
515 | if cc.check_header('malloc/malloc_np.h') | ||
516 | add_project_arguments('-DHAVE_MALLOC_MALLOC_NP_H', language : 'c') | ||
517 | endif | ||
518 | if cc.check_header('langinfo.h') | ||
519 | add_project_arguments('-DHAVE_LANGINFO_H', language : 'c') | ||
520 | endif | ||
521 | if cc.check_header('sys/param.h') | ||
522 | add_project_arguments('-DHAVE_SYS_PARAM_H', language : 'c') | ||
523 | endif | ||
524 | if cc.check_header('sys/mount.h') | ||
525 | add_project_arguments('-DHAVE_SYS_MOUNT_H', language : 'c') | ||
526 | endif | ||
527 | if cc.check_header('sys/statvfs.h') | ||
528 | add_project_arguments('-DHAVE_SYS_STATVFS_H', language : 'c') | ||
529 | endif | ||
530 | if cc.check_header('sys/select.h') | ||
531 | add_project_arguments('-DHAVE_SYS_SELECT_H', language : 'c') | ||
532 | endif | ||
533 | if cc.check_header('sockLib.h') | ||
534 | add_project_arguments('-DHAVE_SOCKLIB_H', language : 'c') | ||
535 | endif | ||
536 | if cc.check_header('sys/mman.h') | ||
537 | add_project_arguments('-DHAVE_SYS_MMAN_H', language : 'c') | ||
538 | endif | ||
539 | if cc.check_header('sys/msg.h') | ||
540 | add_project_arguments('-DHAVE_SYS_MSG_H', language : 'c') | ||
541 | endif | ||
542 | if cc.check_header('sys/vfs.h') | ||
543 | add_project_arguments('-DHAVE_SYS_VFS_H', language : 'c') | ||
544 | endif | ||
545 | if cc.check_header('arpa/inet.h') | ||
546 | add_project_arguments('-DHAVE_ARPA_INET_H', language : 'c') | ||
547 | endif | ||
548 | if cc.check_header('libintl.h') | ||
549 | add_project_arguments('-DHAVE_LIBINTL_H', language : 'c') | ||
550 | endif | ||
551 | if cc.check_header('netdb.h') | ||
552 | add_project_arguments('-DHAVE_NETDB_H', language : 'c') | ||
553 | endif | ||
554 | if cc.check_header('netinet/in.h') | ||
555 | add_project_arguments('-DHAVE_NETINET_IN_H', language : 'c') | ||
556 | endif | ||
557 | if cc.check_header('sys/ioctl.h') | ||
558 | add_project_arguments('-DHAVE_SYS_IOCTL_H', language : 'c') | ||
559 | endif | ||
560 | if cc.check_header('sys/socket.h') | ||
561 | add_project_arguments('-DHAVE_SYS_SOCKET_H', language : 'c') | ||
562 | endif | ||
563 | if cc.check_header('sys/time.h') | ||
564 | add_project_arguments('-DHAVE_SYS_TIME_H', language : 'c') | ||
565 | endif | ||
566 | if cc.check_header('sys/sysinfo.h') | ||
567 | add_project_arguments('-DHAVE_SYS_SYSINFO_H', language : 'c') | ||
568 | endif | ||
569 | if cc.check_header('sys/file.h') | ||
570 | add_project_arguments('-DHAVE_SYS_FILE_H', language : 'c') | ||
571 | endif | ||
572 | if cc.check_header('sys/resource.h') | ||
573 | add_project_arguments('-DHAVE_SYS_RESOURCE_H', language : 'c') | ||
574 | endif | ||
575 | if cc.check_header('ifaddrs.h') | ||
576 | add_project_arguments('-DHAVE_IFADDRS_H', language : 'c') | ||
577 | endif | ||
578 | if cc.check_header('mach/mach.h') | ||
579 | add_project_arguments('-DHAVE_MACH_MACH_H', language : 'c') | ||
580 | endif | ||
581 | if cc.check_header('sys/timeb.h') | ||
582 | add_project_arguments('-DHAVE_SYS_TIMEB_H', language : 'c') | ||
583 | endif | ||
584 | if cc.check_header('argz.h') | ||
585 | add_project_arguments('-DHAVE_ARGZ_H', language : 'c') | ||
586 | endif | ||
587 | if cc.check_header('ucred.h') | ||
588 | add_project_arguments('-DHAVE_UCRED_H', language : 'c') | ||
589 | endif | ||
590 | if cc.check_header('sys/ucred.h') | ||
591 | add_project_arguments('-DHAVE_SYS_UCRED_H', language : 'c') | ||
592 | endif | ||
593 | if cc.check_header('endian.h') | ||
594 | add_project_arguments('-DHAVE_ENDIAN_H', language : 'c') | ||
595 | endif | ||
596 | if cc.check_header('sys/endian.h') | ||
597 | add_project_arguments('-DHAVE_SYS_ENDIAN_H', language : 'c') | ||
598 | endif | ||
599 | if cc.check_header('execinfo.h') | ||
600 | add_project_arguments('-DHAVE_EXECINFO_H', language : 'c') | ||
601 | endif | ||
602 | if cc.check_header('byteswap.h') | ||
603 | add_project_arguments('-DHAVE_BYTESWAP_H', language : 'c') | ||
604 | endif | ||
605 | |||
606 | |||
607 | |||
608 | |||
609 | |||
610 | |||
611 | |||
612 | |||
613 | |||
614 | |||
615 | |||
522 | configure_file(#input: 'gnunet_private_config.h.in', | 616 | configure_file(#input: 'gnunet_private_config.h.in', |
523 | output : 'gnunet_private_config.h', | 617 | output : 'gnunet_private_config.h', |
524 | configuration : cdata) | 618 | configuration : cdata) |