+#### Use built-in $((...)) in test suite if shell supports it.
+#### Borrowed from configure's as_fn_arith. The result is placed
+#### in global arith_val.
+#### Detected at run-time instead of by configure to allow testing
+#### with different shells.
+if (eval "test \$(( 1 + 1 )) = 2" 2>/dev/null); then
+ eval 'arith_eval () { arith_val=$(( $* )); }'
+else
+ arith_eval () { arith_val=`expr "$@" || test $? -eq 1`; }
+fi
+