Because the build decends into the ext/compressors/snappy directory the

relative paths won't find system/include, so use the absolute paths instead.
This commit is contained in:
Gregory Burd 2013-08-21 12:17:18 -04:00
parent 33c8e53ccf
commit 2043e8ccc6

View file

@ -3,21 +3,21 @@ index 6d78823..2122cf8 100644
--- a/ext/compressors/snappy/Makefile.am --- a/ext/compressors/snappy/Makefile.am
+++ b/ext/compressors/snappy/Makefile.am +++ b/ext/compressors/snappy/Makefile.am
@@ -2,5 +2,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include @@ -2,5 +2,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include
lib_LTLIBRARIES = libwiredtiger_snappy.la lib_LTLIBRARIES = libwiredtiger_snappy.la
libwiredtiger_snappy_la_SOURCES = snappy_compress.c libwiredtiger_snappy_la_SOURCES = snappy_compress.c
-libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module
+libwiredtiger_snappy_la_CFLAGS = -I$(src_builddir)/../../system/include +libwiredtiger_snappy_la_CFLAGS = -I$(abs_top_builddir)/../../system/include
+libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -L$(src_builddir)/../../system/lib -Wl,-rpath,lib/wterl-0.9.0/priv:lib/wterl/priv:priv +libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -L$(abs_top_builddir)/../../system/lib -Wl,-rpath,lib/wterl-0.9.0/priv:lib/wterl/priv:priv
libwiredtiger_snappy_la_LIBADD = -lsnappy libwiredtiger_snappy_la_LIBADD = -lsnappy
diff --git a/src/support/cksum.c b/src/support/cksum.c diff --git a/src/support/cksum.c b/src/support/cksum.c
index 7e9befe..b924db7 100644 index 7e9befe..b924db7 100644
--- a/src/support/cksum.c --- a/src/support/cksum.c
+++ b/src/support/cksum.c +++ b/src/support/cksum.c
@@ -27,6 +27,13 @@ @@ -27,6 +27,13 @@
#include "wt_internal.h" #include "wt_internal.h"
+#if defined(__amd64) || defined(__x86_64) +#if defined(__amd64) || defined(__x86_64)
+#define USE_HARDWARE_CRC32 1 +#define USE_HARDWARE_CRC32 1
+#else +#else
@ -33,7 +33,7 @@ index 7e9befe..b924db7 100644
#endif #endif
}; };
+#endif /* USE_HARDWARE_CRC32 */ +#endif /* USE_HARDWARE_CRC32 */
/* /*
* __wt_cksum -- * __wt_cksum --
@@ -1106,15 +1114,29 @@ __wt_cksum(const void *chunk, size_t len) @@ -1106,15 +1114,29 @@ __wt_cksum(const void *chunk, size_t len)
@ -55,7 +55,7 @@ index 7e9befe..b924db7 100644
#endif #endif
+#endif +#endif
+ } + }
/* Checksum in 8B chunks. */ /* Checksum in 8B chunks. */
for (nqwords = len / sizeof(uint64_t); nqwords; nqwords--) { for (nqwords = len / sizeof(uint64_t); nqwords; nqwords--) {
+#ifdef USE_HARDWARE_CRC32 +#ifdef USE_HARDWARE_CRC32
@ -73,7 +73,7 @@ index 7e9befe..b924db7 100644
#endif #endif
+#endif +#endif
} }
/* Checksum trailing bytes one byte at a time. */ /* Checksum trailing bytes one byte at a time. */
+ for (len &= 0x7; len > 0; ++p, len--) { + for (len &= 0x7; len > 0; ++p, len--) {
+#ifdef USE_HARDWARE_CRC32 +#ifdef USE_HARDWARE_CRC32
@ -90,7 +90,7 @@ index 7e9befe..b924db7 100644
+#endif +#endif
+#endif +#endif
+ } + }
+#ifdef WORDS_BIGENDIAN +#ifdef WORDS_BIGENDIAN
/* Do final byte swap to produce a result identical to little endian */ /* Do final byte swap to produce a result identical to little endian */
crc = crc =