Follow up the awk compatibility fix in r834729 by selecting the most suitable awk, following the AC_PROG_AWK order (gawk, mawk, nawk, awk). As with AC_PROG_AWK, AWK=foo overrides.
After r834729 a working conf was generated on Solaris when using /usr/bin/awk, but only by some fluke of command-line processing (-v was sort-of ignored; see PR for discussion). Also, the LoadModule wasn't added in the right spot due to awk engine differences.
PR: 48067 Helped by: rjung, Hans Werner Strube <strube physik3.gwdg.de>
/usr/xpg4/bin/awk is a better choice than nawk on Solaris (one issue: nawk on some Solaris levels is missing toupper/tolower, breaking addloadmodule.awk)
Submitted by: Hans Werner Strube <strube physik3.gwdg.de>