Import `shobj-conf` script from bash

Given the `-o <HOST-OS>` parameter, the script generates environment
variables with information how to compile dynamically loadable libraries
for that system.

Imported from bash-3.2.48
Fix `shobj-conf` on Darwin

The `shobj-conf` script imported from bash seems to not support the
latest OS X. This makes sure that `SHOBJ_LDFLAG=-dynamiclib` is output
for Darwin10+ (latest version is Darwin 13.0).
Create `configure` script to generate a cross-platform Makefile

The previous Makefile only worked on OS X. The dynamically generated
Makefile (from `Makefile.in`) should now work on multiple platforms
(tested on OS X and Ubuntu).
Fall back to `cc` as default compiler when `gcc` is not available