OLD | NEW |
1 dnl Check for the presence of the Sun Studio compiler. | 1 dnl Check for the presence of the Sun Studio compiler. |
2 dnl If Sun Studio compiler is found, set appropriate flags. | 2 dnl If Sun Studio compiler is found, set appropriate flags. |
3 dnl Additionally, Sun Studio doesn't default to 64-bit by itself, | 3 dnl Additionally, Sun Studio doesn't default to 64-bit by itself, |
4 dnl nor does it automatically look in standard Solaris places for | 4 dnl nor does it automatically look in standard Solaris places for |
5 dnl 64-bit libs, so we must add those options and paths to the search | 5 dnl 64-bit libs, so we must add those options and paths to the search |
6 dnl paths. | 6 dnl paths. |
7 | 7 |
8 dnl TODO(kenton): This is pretty hacky. It sets CXXFLAGS, which the autoconf | 8 dnl TODO(kenton): This is pretty hacky. It sets CXXFLAGS, which the autoconf |
9 dnl docs say should never be overridden except by the user. It also isn't | 9 dnl docs say should never be overridden except by the user. It also isn't |
10 dnl cross-compile safe. We should fix these problems, but since I don't have | 10 dnl cross-compile safe. We should fix these problems, but since I don't have |
(...skipping 24 matching lines...) Expand all Loading... |
35 AS_IF([test "x$ISAINFO" != "xno"], | 35 AS_IF([test "x$ISAINFO" != "xno"], |
36 [isainfo_b=`${ISAINFO} -b`], | 36 [isainfo_b=`${ISAINFO} -b`], |
37 [isainfo_b="x"]) | 37 [isainfo_b="x"]) |
38 | 38 |
39 AS_IF([test "$isainfo_b" != "x"],[ | 39 AS_IF([test "$isainfo_b" != "x"],[ |
40 | 40 |
41 isainfo_k=`${ISAINFO} -k` | 41 isainfo_k=`${ISAINFO} -k` |
42 | 42 |
43 AS_IF([test "x$ac_enable_64bit" = "xyes"],[ | 43 AS_IF([test "x$ac_enable_64bit" = "xyes"],[ |
44 | 44 |
45 AC_DEFINE([SOLARIS_64BIT_ENABLED], [1], [64bit enabled]) | |
46 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ | 45 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ |
47 dnl The user hasn't overridden the default libdir, so we'll | 46 dnl The user hasn't overridden the default libdir, so we'll |
48 dnl the dir suffix to match solaris 32/64-bit policy | 47 dnl the dir suffix to match solaris 32/64-bit policy |
49 libdir="${libdir}/${isainfo_k}" | 48 libdir="${libdir}/${isainfo_k}" |
50 ]) | 49 ]) |
51 | 50 |
52 dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool | 51 dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool |
53 dnl does the wrong thing if you don't put it into CXXFLAGS. sigh. | 52 dnl does the wrong thing if you don't put it into CXXFLAGS. sigh. |
54 dnl (It also needs it in CFLAGS, or it does a different wrong thing!) | 53 dnl (It also needs it in CFLAGS, or it does a different wrong thing!) |
55 AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ | 54 CXXFLAGS="${CXXFLAGS} -m64" |
56 CXXFLAGS="${CXXFLAGS} -m64" | 55 ac_cv_env_CXXFLAGS_set=set |
57 ac_cv_env_CXXFLAGS_set=set | 56 ac_cv_env_CXXFLAGS_value='-m64' |
58 ac_cv_env_CXXFLAGS_value='-m64' | |
59 ]) | |
60 | 57 |
61 AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[ | 58 CFLAGS="${CFLAGS} -m64" |
62 CFLAGS="${CFLAGS} -m64" | 59 ac_cv_env_CFLAGS_set=set |
63 ac_cv_env_CFLAGS_set=set | 60 ac_cv_env_CFLAGS_value='-m64' |
64 ac_cv_env_CFLAGS_value='-m64' | |
65 ]) | |
66 | 61 |
67 AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[ | 62 AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[ |
68 CXXFLAGS="-xmemalign=8s ${CXXFLAGS}" | 63 CXXFLAGS="-xmemalign=8s ${CXXFLAGS}" |
69 ]) | 64 ]) |
70 ]) | 65 ]) |
71 ]) | 66 ]) |
72 ;; | 67 ;; |
73 esac | 68 esac |
74 | 69 |
75 ]) | 70 ]) |
OLD | NEW |