Browse code

Detect Sun Studio compiler and set appropriate variables. Add dependency generation commands compatible with Sun Studio. patch by Michael Kostylev, michael.kostylev gmail com

Originally committed as revision 20397 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Kostylev authored on 2009/10/28 23:24:04
Showing 1 changed files
... ...
@@ -1594,6 +1594,11 @@ elif $cc -v 2>&1 | grep -q clang; then
1594 1594
     cc_version=__VERSION__
1595 1595
     CC_DEPFLAGS='-MMD'
1596 1596
     AS_DEPFLAGS='-MMD'
1597
+elif $cc -V 2>&1 | grep -q Sun; then
1598
+    cc_type=suncc
1599
+    cc_version="AV_STRINGIFY(__SUNPRO_C)"
1600
+    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
1601
+    DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
1597 1602
 fi
1598 1603
 
1599 1604
 test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"