The attached patch adds mingw to systems not needing libm in LT_LIB_M. -- O.S.