Hmm using apxs -c -lpam -o mod_auth_pam.so mod_auth_pam.c failed with this error: apxs:Error: command failed with rc=65536
And anything else? I can't make it fail such that that's the only thing it prints out. You should get compiler warnings or *something*.