]> granicus.if.org Git - php/commitdiff
MFH: Add support for Sun CC
authorJani Taskinen <jani@php.net>
Sat, 9 May 2009 20:36:35 +0000 (20:36 +0000)
committerJani Taskinen <jani@php.net>
Sat, 9 May 2009 20:36:35 +0000 (20:36 +0000)
NEWS
configure.in
scripts/phpize.m4

diff --git a/NEWS b/NEWS
index 9ee859c12e55eb9749361242f5637c073b81525f..8936616fc1fea4ef61fefadf393ed91729d68cbe 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PHP                                                                        NEWS
 
 - Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
   and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
+- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)
 
 - Fixed memory corruptions while reading properties of zip files. (Ilia)
 - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
index ac6135bfc20087679f315158eb3c254d533c8d74..1117d23812b96f4a234b72ac863d99544efb4fe0 100644 (file)
@@ -140,8 +140,9 @@ esac
 dnl Checks for programs.
 dnl -------------------------------------------------------------------------
 
-AC_PROG_CC
+AC_PROG_CC([cc gcc])
 PHP_DETECT_ICC
+PHP_DETECT_SUNCC
 AC_PROG_CC_C_O
 dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
 dnl AC_PROG_CC_STDC
@@ -187,6 +188,10 @@ case $host_cpu in
       CFLAGS="$CFLAGS -ieee"
     fi
     ;;
+  sparc*)
+    if test "$SUNCC" = "yes"; then
+      CFLAGS="$CFLAGS -xmemalign=8s"
+    fi
 esac
 
 case $host_alias in
@@ -731,6 +736,15 @@ if test "$PHP_GCOV" = "yes"; then
   dnl Add the special gcc flags
   CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
   CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
+  if test "$SUNCC" = "yes"; then
+    if test -n "$auto_cflags"; then
+      CFLAGS="-g"
+      CXXFLAGS="-g"
+    else
+      CFLAGS="$CFLAGS -g"
+      CXXFLAGS="$CFLAGS -g"
+    fi
+  fi
 fi
 
 PHP_ARG_ENABLE(debug, whether to include debugging symbols,
index ba668c889348967fb4a0b9f3b472d52c3159c505..bf40948eed7d2e162442dd2dc9fae507569c1374 100644 (file)
@@ -17,11 +17,15 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[
   test "[$]$1" = "no" && $1=yes
 ])dnl
 dnl
+
+test -z "$CFLAGS" && auto_cflags=1
+
 abs_srcdir=`(cd $srcdir && pwd)`
 abs_builddir=`pwd`
 
-AC_PROG_CC
+AC_PROG_CC([cc gcc])
 PHP_DETECT_ICC
+PHP_DETECT_SUNCC
 AC_PROG_CC_C_O
 
 dnl Support systems with system libraries in e.g. /usr/lib64
@@ -116,6 +120,15 @@ if test "$PHP_DEBUG" = "yes"; then
     CFLAGS="$CFLAGS -O0"
     CXXFLAGS="$CXXFLAGS -O0"
   fi
+  if test "$SUNCC" = "yes"; then
+    if test -n "$auto_cflags"; then
+      CFLAGS="-g"
+      CXXFLAGS="-g"
+    else
+      CFLAGS="$CFLAGS -g"
+      CXXFLAGS="$CFLAGS -g"
+    fi
+  fi
 else
   PHP_DEBUG=0
   ZEND_DEBUG=no