~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_64bit.m4

  • Committer: Brian Aker
  • Date: 2009-07-16 19:30:03 UTC
  • mfrom: (1093.1.17 captain)
  • Revision ID: brian@gaz-20090716193003-gwt4i1le2g02ay0j
Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
dnl ---------------------------------------------------------------------------
9
9
AC_DEFUN([PANDORA_64BIT],[
10
10
 
 
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"])
 
16
 
11
17
  AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
12
18
  AS_IF([test "x$ISAINFO" != "xno"],
13
19
        [isainfo_b=`${ISAINFO} -b`],
14
20
        [isainfo_b="x"])
15
21
 
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"])])
22
 
 
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}"
29
 
         fi
30
 
         CPPFLAGS="-m64 ${CPPFLAGS}"
31
 
         LDFLAGS="-m64 ${LDFLAGS}"
32
 
         DTRACEFLAGS="${DTRACEFLAGS} -64"
33
 
         if test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"
34
 
         then
35
 
            AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
36
 
            AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
37
 
         fi
38
 
       ],[DTRACEFLAGS="${DTRACEFLAGS} -32"])
 
22
  AS_IF([test "$isainfo_b" != "x"],[
 
23
 
 
24
    isainfo_k=`${ISAINFO} -k` 
 
25
    DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}"
 
26
 
 
27
    AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
 
28
      CPPFLAGS="-I/usr/local ${CPPFLAGS}"
 
29
    ])
 
30
 
 
31
    AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
 
32
      LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
 
33
    ])
 
34
 
 
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}"
 
40
      ])
 
41
 
 
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}"
 
47
      ])
 
48
    ])
 
49
  ])
39
50
])
40
51
dnl ---------------------------------------------------------------------------
41
52
dnl End Macro: PANDORA_64BIT