Removed pkg-config dependency and added manual checking