Use pkg-config to verify that codec2 >= 1.1.1 is available before
searching for the headers and library.
If CODEC2_DIR is specified, treat it as an explicit user override and
search that installation directly. Otherwise, use pkg-config to validate
the minimum supported version. If pkg-config is unavailable or an older
codec2 version is installed, disable codec2 support while allowing the
rest of the project to configure normally.
Also update the pkg-config search hints to use the documented
PC_CODEC2_INCLUDE_DIRS and PC_CODEC2_LIBRARY_DIRS variables.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
codec2 install pkgconfig without lib prefix as stated by source code
on debian /usr/lib/x86_64-linux-gnu/pkgconfig/codec2.pc
on macports /opt/local/lib/pkgconfig/codec2.pc