Check pkg-config result before compiling.