fix some bug of automake script