use cc from configure, fix warnings with gcc, and update CFLAGS