1 ##### http://autoconf-archive.cryp.to/ax_c_arithmetic_rshift.html
5 # AX_C_ARITHMETIC_RSHIFT
9 # Checks if the right shift operation is arithmetic.
11 # This macro uses compile-time detection and so is cross-compile
20 # Copyright (c) 2006 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
22 # Copying and distribution of this file, with or without
23 # modification, are permitted in any medium without royalty provided
24 # the copyright notice and this notice are preserved.
26 AC_DEFUN([AX_C_ARITHMETIC_RSHIFT], [
27 AC_CACHE_CHECK([whether right shift operation is arithmetic],
28 [ax_cv_c_arithmetic_rshift],
29 [AC_COMPILE_IFELSE([[int dummy[((-1 >> 1) < 0) ? 1 : -1];]],
30 [ax_cv_c_arithmetic_rshift=yes],
31 [ax_cv_c_arithmetic_rshift=no])])
32 if test "x$ax_cv_c_arithmetic_rshift" = xyes; then
33 AC_DEFINE([HAVE_ARITHMETIC_RSHIFT], [1],
34 [Define to 1 if the right shift operation is arithmetic.])