add check for getopt.h and improve illegal option help tips.
format code
Merge branch 'master' into private