Set default optimization flags to -xO5 if using Sun Studio


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@114 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/configure.ac b/configure.ac
index a315e07..7bf1ee6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,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.