Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_struct_semun.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_STRUCT_SEMUN
  8. #
  9. # DESCRIPTION
  10. #
  11. # This macro checks to see if sys/sem.h defines struct semun. Some systems
  12. # do, some systems don't. Your code must be able to deal with this
  13. # possibility; if HAVE_STRUCT_SEMUM isn't defined for a given system, you
  14. # have to define this structure before you can call functions like
  15. # semctl().
  16. #
  17. # You should call AX_SYSV_IPC before this macro, to separate the check for
  18. # System V IPC headers from the check for struct semun.
  19. #
  20. # LICENSE
  21. #
  22. # Copyright (c) 2008 Warren Young <warren@etr-usa.com>
  23. #
  24. # Copying and distribution of this file, with or without modification, are
  25. # permitted in any medium without royalty provided the copyright notice
  26. # and this notice are preserved. This file is offered as-is, without any
  27. # warranty.
  28. #serial 8
  29. AU_ALIAS([ETR_STRUCT_SEMUN], [AX_STRUCT_SEMUN])
  30. AC_DEFUN([AX_STRUCT_SEMUN],
  31. [
  32. AC_CACHE_CHECK([for struct semun], ac_cv_struct_semun, [
  33. AC_TRY_COMPILE(
  34. [
  35. #include <sys/types.h>
  36. #include <sys/ipc.h>
  37. #include <sys/sem.h>
  38. ],
  39. [ struct semun s; ],
  40. ac_cv_struct_semun=yes,
  41. ac_cv_struct_semun=no)
  42. ])
  43. if test x"$ac_cv_struct_semun" = "xyes"
  44. then
  45. AC_DEFINE(HAVE_STRUCT_SEMUN, 1,
  46. [ Define if your system's sys/sem.h file defines struct semun ])
  47. fi
  48. ]) dnl AX_STRUCT_SEMUN