add lib type debug output, update #2305
move the stderr to stdout, update #2305
fix checking compiler, require installing apple-gcc42 when using macports only for ruby-1*, fix #2305
improve checking if compiler is clang, update #2305
fix detecting shell sourcing source when in Zsh, fix #2306