OSDN Git Service

Detect Sun Studio compiler and set appropriate variables.
authorMichael Kostylev <michael.kostylev@gmail.com>
Wed, 28 Oct 2009 14:24:04 +0000 (14:24 +0000)
committerDiego Biurrun <diego@biurrun.de>
Wed, 28 Oct 2009 14:24:04 +0000 (14:24 +0000)
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

configure

index b3d99a1..1eb3ba9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1594,6 +1594,11 @@ elif $cc -v 2>&1 | grep -q clang; then
     cc_version=__VERSION__
     CC_DEPFLAGS='-MMD'
     AS_DEPFLAGS='-MMD'
+elif $cc -V 2>&1 | grep -q Sun; then
+    cc_type=suncc
+    cc_version="AV_STRINGIFY(__SUNPRO_C)"
+    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+    DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
 fi
 
 test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"