checks strndup result & enhance configure.ac