When building a program foo in-tree, libtool 2.4.6 generates an
executable called lt-foo with a wrapper script called foo. This
means that argv[0] inside the program is lt-foo rather than foo.
This is a problem for dtcodegen, which uses the program name for various
purposes including the "generated by" banner and the logfile name.
Remove the lt- prefix if present to avoid this.
This patch fixes many warnings from the beginning of the build up to
and including the depend stage. Nearly all warnings should be gone
even with -Wall.