54 lines
2.2 KiB
Diff
54 lines
2.2 KiB
Diff
diff -Naur libpng-1.2.16.orig/configure libpng-1.2.16/configure
|
|
--- libpng-1.2.16.orig/configure 2007-01-31 08:22:51.000000000 -0500
|
|
+++ libpng-1.2.16/configure 2007-02-12 10:29:04.000000000 -0500
|
|
@@ -20558,6 +20558,7 @@
|
|
cat confdefs.h >>conftest.$ac_ext
|
|
cat >>conftest.$ac_ext <<_ACEOF
|
|
/* end confdefs.h. */
|
|
+#define PNG_CONFIGURE_LIBPNG
|
|
#include "pnggccrd.c"
|
|
int
|
|
main ()
|
|
diff -Naur libpng-1.2.16.orig/configure.ac libpng-1.2.16/configure.ac
|
|
--- libpng-1.2.16.orig/configure.ac 2007-01-31 08:22:41.000000000 -0500
|
|
+++ libpng-1.2.16/configure.ac 2007-02-12 10:29:04.000000000 -0500
|
|
@@ -62,7 +62,8 @@
|
|
AC_MSG_CHECKING(
|
|
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
|
|
AC_TRY_COMPILE(
|
|
- [#include "pnggccrd.c"],
|
|
+ [#define PNG_CONFIGURE_LIBPNG
|
|
+ #include "pnggccrd.c"],
|
|
[return 0;],
|
|
AC_MSG_RESULT(yes)
|
|
LIBPNG_NO_MMX="",
|
|
diff -Naur libpng-1.2.16.orig/pngconf.h libpng-1.2.16/pngconf.h
|
|
--- libpng-1.2.16.orig/pngconf.h 2007-01-31 08:22:33.000000000 -0500
|
|
+++ libpng-1.2.16/pngconf.h 2007-02-12 10:31:39.000000000 -0500
|
|
@@ -35,6 +35,25 @@
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
+#else
|
|
+/* pngconf.h is part of the exported API. When a libpng-using application
|
|
+ includes us, PNG_CONFIGURE_LIBPNG is of course not defined as we do not have
|
|
+ libpng's config.h available in this case. This means that we do not have the
|
|
+ defines added to config.h and the commandline by libpng's ./configure .
|
|
+
|
|
+ For all defines from config.h not having them set is not a problem, however
|
|
+ ./configure also adds -DPNG_NO_ASSEMBLER_CODE to the CFLAGS when compiling
|
|
+ on a platform on which the MMX and SSE asm code in libpng is not supported.
|
|
+
|
|
+ We do need this define as this define is used to determine whether or not
|
|
+ to define PNG_ASSEMBLER_CODE_SUPPORTED and other assembler related defines
|
|
+ and prototypes. PNG_ASSEMBLER_CODE_SUPPORTED in turn is used by applications
|
|
+ (ImageMagick for example) to determine whether or not they can use the asm
|
|
+ functions. Thus we need to define PNG_NO_ASSEMBLER_CODE here on platforms
|
|
+ on which the MMX and SSE asm code in libpng is not supported: */
|
|
+#ifndef __i386__ /* change this if MMX/SSE become supported on x86_64! */
|
|
+#define PNG_NO_ASSEMBLER_CODE
|
|
+#endif
|
|
#endif
|
|
|
|
/*
|