+# _AC_DO_ECHO(COMMAND)
+# --------------------
+# Echo COMMAND. This is designed to be used just before evaluating COMMAND.
+AC_DEFUN([_AC_DO_ECHO],
+[m4_if([$1], [$ac_try], [], [ac_try="$1"
+])dnl
+dnl If the string contains '"', '`', or '\', then just echo it rather
+dnl than expanding it. This is a hack, but it is safer, while also
+dnl typically expanding simple substrings like '$CC', which is what we want.
+dnl
+dnl The rest of this macro body is quoted, to work around misuses like
+dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
+dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
+dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
+dnl underquoting misuses, such as
+dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
+dnl We normally wouldn't bother with this kind of workaround for invalid code
+dnl but this change was put in just before Autoconf 2.60 and we wanted to
+dnl minimize the integration hassle.
+[case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\""]])
+
+# _AC_DO(COMMAND)
+# ---------------
+# Eval COMMAND, save the exit status in ac_status, and log it.
+# For internal use only.
+AC_DEFUN([_AC_DO],
+[_AC_RUN_LOG([eval "$1"],
+ [_AC_DO_ECHO([$1])])])
+
+
+# _AC_DO_STDERR(COMMAND)
+# ----------------------
+# Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
+AC_DEFUN([_AC_DO_STDERR],
+[_AC_RUN_LOG_STDERR([eval "$1"],
+ [_AC_DO_ECHO([$1])])])
+
+
+# _AC_DO_VAR(VARIABLE)
+# --------------------
+# Evaluate "$VARIABLE", which should be a valid shell command.
+# The purpose of this macro is to write "configure:123: command line"
+# into config.log for every test run.
+AC_DEFUN([_AC_DO_VAR],
+[_AC_DO([$$1])])
+
+
+# _AC_DO_TOKENS(COMMAND)
+# ----------------------
+# Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
+# tokens of the shell command language.
+AC_DEFUN([_AC_DO_TOKENS],
+[{ ac_try='$1'
+ _AC_DO([$ac_try]); }])
+