Fixed some issues in configure and Makefile