[Spice-devel] [spice-streaming-agent 2/6] build: Use pkgconfig to detect libjpeg

Christophe de Dinechin cdupontd at redhat.com
Thu Mar 1 15:44:37 UTC 2018



> On 1 Mar 2018, at 16:27, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 
> Upstream provides a .pc file, we can use it rather than doing the
> detection manually.

Acked-by: Christophe de Dinechin <dinechin at redhat.com>

Will test on macOS too, there are some specific aspects of libjpeg .pc files there.


> 
> Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
> ---
> configure.ac | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5aab662..e5decb3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -36,19 +36,7 @@ AC_SUBST([SPICE_PROTOCOL_MIN_VER])
> PKG_CHECK_MODULES(X11, x11)
> PKG_CHECK_MODULES(XFIXES, xfixes)
> 
> -AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
> -    AC_MSG_CHECKING([for jpeglib.h])
> -    AC_TRY_CPP(
> -[#include <stdio.h>
> -#undef PACKAGE
> -#undef VERSION
> -#undef HAVE_STDLIB_H
> -#include <jpeglib.h>],
> -        JPEG_LIBS='-ljpeg'
> -        AC_MSG_RESULT($jpeg_ok),
> -    AC_MSG_ERROR([jpeglib.h not found])),
> -    AC_MSG_ERROR([libjpeg not found]))
> -AC_SUBST(JPEG_LIBS)
> +PKG_CHECK_MODULES(JPEG, libjpeg)
> 
> AC_CHECK_HEADER([catch/catch.hpp],,[AC_MSG_ERROR([Could not find Catch dependency header (catch/catch.hpp)])])
> 
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list