summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/jpeg/configure.ac9
-rw-r--r--common/jpeg/simd/jsimd_x86_64.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/common/jpeg/configure.ac b/common/jpeg/configure.ac
index 2e401489..9384d395 100644
--- a/common/jpeg/configure.ac
+++ b/common/jpeg/configure.ac
@@ -8,8 +8,6 @@ AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
# 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_INSTALL
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 92610074..4bff6c2a 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