Only show hook filename when debugging

This uses a bit of a hack: if `$DEBUG` is set to `:`, then we are not in
debug mode.
Discover a POSIX shell for Solaris

Taken from https://github.com/freedreno/mesa/blob/master/configure.ac

TODO: Use `$(SHELL)` as the shebang for the binaries.
Generate the shebang line

This uses `$SHELL` as a POSIX shell, coupled with a `configure` check
that sets it correctly.

Note that the POSIX shell might end up being bash, so this actually
introduces more fragmentation than it reduces.