What's the right way to do this? I currently have:

AC_ARG_VAR([WORD_SIZE],
  [value of WORD_SIZE register [default: sizeof(long)]])
if "$ac_cv_env_WORD_SIZE_set" != set; then
  AC_CHECK_SIZEOF([long])
  ac_cv_env_WORD_SIZE_value=SIZEOF_LONG
fi

which seems to work, but I'm conscious that I'm relying on undocumented
variable names (ac_cv_env_*). I can't seem to get the same effect with, for
example:

AC_CHECK_SIZEOF([long])
AC_SUBST([WORD_SIZE], [SIZEOF_LONG])
AC_ARG_VAR([WORD_SIZE],
  [value of WORD_SIZE register [default: sizeof(long)]])

(the AC_SUBST overrides whatever AC_ARG_VAR does, it seems).

-- 
https://rrt.sc3d.org

Reply via email to