my_save_cflags = "$ CFLAGS"
CFLAGS = -m64
AC_MSG_CHECKING ([whether CC supports -m64])
AC_COMPILE_IFELSE ([AC_LANG_PROGRAM ([])],
[AC_MSG_RESULT ([yes])]
[AM_CFLAGS = -m64],
[AC_MSG_RESULT ([no])]
)
CFLAGS = "$ my_save_cflags"
AC_SUBST ([AM_CFLAGS])
Using AM_CFLAGS to add -m64 to the assembly implies automake (or using AM_CFLAGS in your own non-automatic makefiles.)
source share