andikleen / spooky-c

A C version of Bob Jenkins' spooky hash
38 stars 7 forks source link

Build warning fix and autotools conversion #4

Closed jtlayton closed 9 years ago

jtlayton commented 9 years ago

Ok, respun pull request...

This adds a minor patch to fix a build warning that pops up on recent gcc, and adds some autoconf magic to convert spooky-c.c into shared and static libs, suitable for packaging on distros.

I imagine that the first patch is almost certainly OK. Let me know about the second one though. If you have a strong objection to use autotools here, we can drop it and I'll just maintain it for the Fedora package.

Thanks!

andikleen commented 9 years ago

I'm not a big fan of autoconf, but if it makes a packager's life easier that's ok.

But please remove the -Werror. Nothing ever should ship with -Werror.

jtlayton commented 9 years ago

Done. I've also added an autoconf test to check for unaligned access requirements, instead of relying on the arch macros provided by the compiler.

andikleen commented 9 years ago

-#if defined(i386) || defined(x86_64) // add more architectures here +#ifndef HAVE_ALIGNED_ACCESS_REQUIRED

Could you keep the existing architectures in the ifdef, so that it still works fast on x86 without a config.h?

jtlayton commented 9 years ago

Sure. How's this?

This also sets the -version-info to 1.0.0. for the library.

andikleen commented 9 years ago

Merged thanks.