summaryrefslogtreecommitdiffstats
path: root/m4/acx_check_suncc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/acx_check_suncc.m4')
-rw-r--r--m4/acx_check_suncc.m413
1 files changed, 8 insertions, 5 deletions
diff --git a/m4/acx_check_suncc.m4 b/m4/acx_check_suncc.m4
index 3464a84..4e8f961 100644
--- a/m4/acx_check_suncc.m4
+++ b/m4/acx_check_suncc.m4
@@ -26,7 +26,7 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
AS_IF([test "$SUNCC" = "yes" -a "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
dnl Sun Studio has a crashing bug with -xO4 in some cases. Keep this
dnl at -xO3 until a proper test to detect those crashes can be done.
- CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -template=no%extdef ${CXXFLAGS}"
+ CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${CXXFLAGS}"
])
case $host_os in
@@ -42,10 +42,6 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
- AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
- LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
- ])
-
AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
dnl The user hasn't overridden the default libdir, so we'll
dnl the dir suffix to match solaris 32/64-bit policy
@@ -54,12 +50,19 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool
dnl does the wrong thing if you don't put it into CXXFLAGS. sigh.
+ dnl (It also needs it in CFLAGS, or it does a different wrong thing!)
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
CXXFLAGS="${CXXFLAGS} -m64"
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-m64'
])
+ AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
+ CFLAGS="${CFLAGS} -m64"
+ ac_cv_env_CFLAGS_set=set
+ ac_cv_env_CFLAGS_value='-m64'
+ ])
+
AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[
CXXFLAGS="-xmemalign=8s ${CXXFLAGS}"
])