3
# Figure out whether the compiler needs a special flag to generate 64bit code.
4
# We verify by testing the size of void*. We can't use AC_CHECK_SIZEOF
5
# directly since it uses the cache. Instead we copied code from autoconf...
11
# +DA2.0W HPUX (obsolete form of +DD64)
12
# -64 SGI TFP, not sure, others might be -mips64, -align64?
14
AC_DEFUN([GA_64BIT_FLAG],
15
[AC_CACHE_CHECK([for flag to indicate 64-bits], [ga_cv_64bit_flag],
17
for flag in none -m64 -q64 +DD64 +DA2.0W -64 ; do
18
ga_save_CFLAGS=$CFLAGS
19
AS_IF([test "x$flag" != xnone], [CFLAGS="$CFLAGS $flag"])
21
AC_COMPUTE_INT([ga_sizeof_voidp],
22
[(long int) (sizeof (void*))],
23
[AC_INCLUDES_DEFAULT()],
25
CFLAGS=$ga_save_CFLAGS
26
AS_IF([test x$ga_sizeof_voidp = x8],
27
[ga_cv_64bit_flag=$flag; break])
30
AS_IF([test x$ga_cv_64bit_flag != xnone],
31
[CFLAGS="$CFLAGS $ga_cv_64bit_flag"
32
FFLAGS="$FFLAGS $ga_cv_64bit_flag"])