improve alignment autoconf test (#1129)

Replace the deprecated AC_TRY_RUN with AC_RUN_IFELSE. Also, standardize the
variable name and allow for caching of the result.
3 files changed