Check CXX before CC in order to have the compiler validation checks in
_AC_COMPILER_EXEEXT apply to CXX instead of CC.  This will address the
concerns expressed in
https://github.com/adaptivecomputing/torque/pull/112

Also fixed --disable-gcc-warnings which didn't work at all.
Make AM_PROG_AR conditional on its existance.
Merge pull request #114 from kainx/4.2-dev

Check CXX before CC in order to have the compiler validation checks in