about summary refs log tree commit diff
path: root/pm_config.in.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-04-09 01:38:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-04-09 01:38:43 +0000
commit946e0515bbae993f3ee091c848fdae2bda51e97a (patch)
treedf6c7303fa91df474857633e083b5fa0bf5db8a1 /pm_config.in.h
parentd4fe9378cb8b94e847f7295d4b984b5135692b18 (diff)
downloadnetpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.tar.gz
netpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.tar.xz
netpbm-mirror-946e0515bbae993f3ee091c848fdae2bda51e97a.zip
Work around GCC < 4.2 bug that causes compile failure
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2455 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pm_config.in.h')
-rw-r--r--pm_config.in.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/pm_config.in.h b/pm_config.in.h
index c64fc093..9d0dc303 100644
--- a/pm_config.in.h
+++ b/pm_config.in.h
@@ -240,6 +240,20 @@
 #endif
 #endif
 
+#ifndef HAVE_WORKING_SSE2
+#if defined(__SSE2__) && ( GCCVERSION >=402 || defined(__clang__) )
+  #define HAVE_WORKING_SSE2 1
+  /* We can use SSE2 builtin functions to exploit SSE2 instructions.  GCC
+     version 4.2 or newer is required; older GCC ostensibly has these SSE2
+     builtins, but the compiler aborts with an error.  Note that __SSE2__
+     means not only that the compiler has the capability, but that the user
+     has not disabled it via compiler options.
+  */
+#else
+  #define HAVE_WORKING_SSE2 0
+#endif
+#endif
+
 /* UNALIGNED_OK means it's OK to do unaligned memory access, e.g.
    loading an 8-byte word from an address that is not a multiple of 8.
    On some systems, such an access causes a trap and a signal.