Fix build on Sun Studio


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3987 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/simd/Makefile.am b/common/jpeg/simd/Makefile.am
index e57c477..a114c37 100644
--- a/common/jpeg/simd/Makefile.am
+++ b/common/jpeg/simd/Makefile.am
@@ -55,5 +55,4 @@
 	$(LIBTOOL) --mode=compile --tag NASM $(srcdir)/nasm_lt.sh $(NASM) $(NAFLAGS) -I$(srcdir) $< -o $@
 
 jsimdcfg.inc: $(srcdir)/jsimdcfg.inc.h ../jpeglib.h ../jconfig.h ../jmorecfg.h
-	$(CPP) -I$(top_builddir) -I$(top_builddir)/simd $(srcdir)/jsimdcfg.inc.h | $(EGREP) ^[\;%] | sed 's%_cpp_protection_%%' > $@
-
+	$(CPP) -I$(top_builddir) -I$(top_builddir)/simd $(srcdir)/jsimdcfg.inc.h | $(EGREP) "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's@% define@%define@g' > $@
diff --git a/common/jpeg/simd/nasm_lt.sh b/common/jpeg/simd/nasm_lt.sh
index b112862..7ba5253 100755
--- a/common/jpeg/simd/nasm_lt.sh
+++ b/common/jpeg/simd/nasm_lt.sh
@@ -5,7 +5,7 @@
 pic=no
 while [ $# -gt 0 ]; do
     case "$1" in
-        -DPIC|-fPIC|-fpic)
+        -DPIC|-fPIC|-fpic|-Kpic|-KPIC)
             if [ "$pic" != "yes" ] ; then
                 command="$command -DPIC"
                 pic=yes