One way to check whether a library is installed is to use ld, e.g. check that zlib is installed:
ld -lzlib |
If library is installed you'll get something like this:
ld: warning: -arch not specified ld: could not find entry point "start" (perhaps missing crt1.o) for inferred architecture x86_64 |
If library is not installed you'll get something like this:
ld: library not found for -lzlib |