Improvements in library checking during configure