Makefile.prog.in file have following part.
-------------------------------------------------
Makefile.lt:
echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt
-------------------------------------------------
It replace all '.a' in the ALL_LIBS, If '.a' is included in some PATH. it make PATH broken by this substitution
I got always build fail, since I was using username which include '.a'.
I think it should be changed like below
echo 'LT_LIBS='`echo $(ALL_LIBS)|sed -e 's/\.a\s/.la /g' -e 's/\.a$$/.la/g'` >Makefile.lt