remove unused variables : index
fixed configure error message more kindly.