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.

37 lines
1.3KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_c_arithmetic_rshift.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_C_ARITHMETIC_RSHIFT
  8. #
  9. # DESCRIPTION
  10. #
  11. # Checks if the right shift operation is arithmetic.
  12. #
  13. # This macro uses compile-time detection and so is cross-compile ready.
  14. #
  15. # LICENSE
  16. #
  17. # Copyright (c) 2008 YAMAMOTO Kengo <yamaken@bp.iij4u.or.jp>
  18. #
  19. # Copying and distribution of this file, with or without modification, are
  20. # permitted in any medium without royalty provided the copyright notice
  21. # and this notice are preserved. This file is offered as-is, without any
  22. # warranty.
  23. #serial 9
  24. AC_DEFUN([AX_C_ARITHMETIC_RSHIFT], [
  25. AC_CACHE_CHECK([whether right shift operation is arithmetic],
  26. [ax_cv_c_arithmetic_rshift],
  27. [AC_COMPILE_IFELSE([[int dummy[((-1 >> 1) < 0) ? 1 : -1];]],
  28. [ax_cv_c_arithmetic_rshift=yes],
  29. [ax_cv_c_arithmetic_rshift=no])])
  30. if test "x$ax_cv_c_arithmetic_rshift" = xyes; then
  31. AC_DEFINE([HAVE_ARITHMETIC_RSHIFT], [1],
  32. [Define to 1 if the right shift operation is arithmetic.])
  33. fi
  34. ])