8
8
dnl ---------------------------------------------------------------------------
9
9
AC_DEFUN([PANDORA_64BIT],[
11
AC_ARG_ENABLE([64bit],[
12
AS_HELP_STRING([--disable-64bit],
13
[Build 64 bit binary @<:@default=on@:>@])],
14
[ac_enable_64bit="$enableval"],
15
[ac_enable_64bit="yes"])
11
17
AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
12
18
AS_IF([test "x$ISAINFO" != "xno"],
13
19
[isainfo_b=`${ISAINFO} -b`],
16
AS_IF([test "$isainfo_b" != "x"],
17
[AC_ARG_ENABLE([64bit],
18
[AS_HELP_STRING([--disable-64bit],
19
[Build 64 bit binary @<:@default=on@:>@])],
20
[ac_enable_64bit="$enableval"],
21
[ac_enable_64bit="yes"])])
23
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
24
if test "x$libdir" = "x\${exec_prefix}/lib" ; then
25
# The user hasn't overridden the default libdir, so we'll
26
# the dir suffix to match solaris 32/64-bit policy
27
isainfo_k=`${ISAINFO} -k`
28
libdir="${libdir}/${isainfo_k}"
30
CPPFLAGS="-m64 ${CPPFLAGS}"
31
LDFLAGS="-m64 ${LDFLAGS}"
32
DTRACEFLAGS="${DTRACEFLAGS} -64"
33
if test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"
35
AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
36
AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
38
],[DTRACEFLAGS="${DTRACEFLAGS} -32"])
22
AS_IF([test "$isainfo_b" != "x"],[
24
isainfo_k=`${ISAINFO} -k`
25
DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}"
27
AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
28
CPPFLAGS="-I/usr/local ${CPPFLAGS}"
31
AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
32
LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
35
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
36
AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
37
dnl The user hasn't overridden the default libdir, so we'll
38
dnl the dir suffix to match solaris 32/64-bit policy
39
libdir="${libdir}/${isainfo_k}"
42
CPPFLAGS="-m64 ${CPPFLAGS}"
43
LDFLAGS="-m64 ${LDFLAGS}"
44
AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[
45
AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
46
AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
40
51
dnl ---------------------------------------------------------------------------
41
52
dnl End Macro: PANDORA_64BIT