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.

40 lines
1.3KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_check_uname_syscall.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CHECK_UNAME_SYSCALL
  8. #
  9. # DESCRIPTION
  10. #
  11. # Check that the POSIX compliant uname(2) call works properly.
  12. #
  13. # LICENSE
  14. #
  15. # Copyright (c) 2008 Bruce Korb <bkorb@gnu.org>
  16. #
  17. # Copying and distribution of this file, with or without modification, are
  18. # permitted in any medium without royalty provided the copyright notice
  19. # and this notice are preserved. This file is offered as-is, without any
  20. # warranty.
  21. #serial 6
  22. AU_ALIAS([AG_CHECK_UNAME_SYSCALL], [AX_CHECK_UNAME_SYSCALL])
  23. AC_DEFUN([AX_CHECK_UNAME_SYSCALL],[
  24. AC_MSG_CHECKING([whether uname(2) is POSIX])
  25. AC_CACHE_VAL([ax_cv_uname_syscall],[
  26. AC_TRY_RUN([#include <sys/utsname.h>
  27. int main() { struct utsname unm;
  28. return uname( &unm ); }],[ax_cv_uname_syscall=yes],[ax_cv_uname_syscall=no],[ax_cv_uname_syscall=no]
  29. ) # end of TRY_RUN]) # end of CACHE_VAL
  30. AC_MSG_RESULT([$ax_cv_uname_syscall])
  31. if test x$ax_cv_uname_syscall = xyes
  32. then
  33. AC_DEFINE(HAVE_UNAME_SYSCALL, 1,
  34. [Define this if uname(2) is POSIX])
  35. fi
  36. ]) # end of AC_DEFUN of AX_CHECK_UNAME_SYSCALL