Created attachment 35421 [details]
libtool 2.2 does not create ./libtool by default until AC_OUTPUT, instead of 1.5 when it is created immediately as part of AC_PROG_LIBTOOL. If ./libtool is needed during configure, LT_OUTPUT must be called to generate it earlier.
The attached patch fixes this while maintaining compatibility with libtool 1.x. This is the technique used by GTK+ and PyGTK as well.
Fix applied to git repo, thanks.