Sync with libjpeg-turbo 1.0.1


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4148 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/configure.ac b/common/jpeg/configure.ac
index 2e40148..9384d39 100644
--- a/common/jpeg/configure.ac
+++ b/common/jpeg/configure.ac
@@ -8,8 +8,6 @@
 
 # Always build with prototypes
 AC_DEFINE([HAVE_PROTOTYPES], 1, [Define if your compiler supports prototypes])
-# Don't use undefined types
-AC_DEFINE([INCOMPLETE_TYPES_BROKEN], 1, [Define if you want use complete types])
 
 # Checks for programs.
 SAVED_CFLAGS=${CFLAGS}
@@ -21,6 +19,13 @@
 AC_PROG_LIBTOOL
 AC_PROG_LN_S
 
+# Check whether compiler supports pointers to undefined structures
+AC_MSG_CHECKING(whether compiler supports pointers to undefined structures)
+AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
+AC_MSG_RESULT(yes),
+[AC_MSG_RESULT(no)
+AC_DEFINE([INCOMPLETE_TYPES_BROKEN],[1],[Compiler does not support pointers to undefined structures.])])
+
 if test "x${GCC}" = "xyes"; then
   if test "x${SAVED_CFLAGS}" = "x"; then
     CFLAGS=-O3
diff --git a/common/jpeg/simd/jsimd_x86_64.c b/common/jpeg/simd/jsimd_x86_64.c
index 9261007..4bff6c2 100644
--- a/common/jpeg/simd/jsimd_x86_64.c
+++ b/common/jpeg/simd/jsimd_x86_64.c
@@ -18,7 +18,7 @@
 #include "../jsimd.h"
 #include "../jdct.h"
 #include "../jsimddct.h"
-#include "simd/jsimd.h"
+#include "jsimd.h"
 
 /*
  * In the PIC cases, we have no guarantee that constants will keep