If you are using GNU autoconf, you do not need to call pkg-config directly. Use the following macro to determine if libshcodecs is available:
PKG_CHECK_MODULES(SHCODECS, shcodecs >= 0.5.0, HAVE_SHCODECS="yes", HAVE_SHCODECS="no") if test "x$HAVE_SHCODECS" = "xyes" ; then AC_SUBST(SHCODECS_CFLAGS) AC_SUBST(SHCODECS_LIBS) fi
If libshcodecs is found, HAVE_SHCODECS will be set to "yes", and the autoconf variables SHCODECS_CFLAGS and SHCODECS_LIBS will be set appropriately.
If you are not using GNU autoconf in your project, you can use the pkg-config tool directly to determine the correct compiler options.
SHCODECS_CFLAGS=`pkg-config --cflags shcodecs`
SHCODECS_LIBS=`pkg-config --libs shcodecs`