rrthomas/luaposix — pull request #40 by gvvaughan (2012-05-29 10:38:16+00:00)
Title: crypt: this function is available on darwin, but no crypt.h header is

One of the main principles of Autoconf is that you should test for
features, not for versions - exactly because of compilation problems
like this, where Apple sets _POSIX_VERSION to make us think that
crypt.h is available, but there is no crypt.h header.
* configure.ac (crypt.h): Test for presence of this header.
(crypt): If the crypt function is available, whether or not the
additional -lcrypt library is required, define HAVE_CRYPT.
* lposix.c (crypt.h): Include it if configure found it.
(Pcrypt): Define it if configure detected a system crypt API.
(R): List Pcrypt, if we defined it earlier.