Set default optimization to -xO5 when using Sun Studio


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3988 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/configure.ac b/common/jpeg/configure.ac
index 364c579..2574319 100644
--- a/common/jpeg/configure.ac
+++ b/common/jpeg/configure.ac
@@ -30,6 +30,16 @@
   fi
 fi
 
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+if test "x${SUNCC}" = "xyes"; then
+  if test "x${SAVED_CFLAGS}" = "x"; then
+    CFLAGS=-xO5
+  fi
+  if test "x${SAVED_CXXFLAGS}" = "x"; then
+    CXXFLAGS=-xO5
+  fi
+fi
+
 # Checks for libraries.
 
 # Checks for header files.