jtoy / cld

compact language detection in ruby
BSD 3-Clause "New" or "Revised" License
210 stars 67 forks source link

Add an autoconf based configure script. #6

Closed toru closed 11 years ago

toru commented 11 years ago

Hi!

The existing Makefile looks clean, minimal and sufficient for production but it would be better to get rid of the gcc dependency for local application development purposes. For example, there is no guarantee that this gem will keep building in the future versions of OS X.

This pull request basically adds a very simple configure script generated by autoconf for Makefile generation. configure.ac and Makefile.in are also included. You might notice that the generated Makefile looks almost identical to the existing one.

Thanks! -Toru

toru commented 11 years ago

Actually, what I've done here isn't entirely correct. For example, explicitly adding the PIC option to the linker doesn't make much sense for OS X (while it does in Linux). I tried avoiding libtool for a simple situation like this but I think it needs to be done to achieve what I'm trying to do in this pull request (proper cross platform compilation).

I'll send another pull request that uses the entire autotools stack.