diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-02-16 01:57:52 +0000 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-03-07 12:05:52 -0800 |
commit | 66e1614122c22d455cc3a28db08b3afac2b7be29 (patch) | |
tree | c49551cf367bd3d13dd70fedfe140755cf29fb95 /configure.ac | |
parent | b00c79b587a4903df576008a64a49f851fed234c (diff) | |
download | weston-66e1614122c22d455cc3a28db08b3afac2b7be29.tar.gz |
configure: Make jpeglib an optional dependency.
It doesn’t make sense to fail the entire build when jpeglib isn’t
present, so this commit makes it optional just like libwebp in the
previous one, disabled with --without-jpeg and forced with --with-jpeg.
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index ed59d54e..9e8115a7 100644 --- a/configure.ac +++ b/configure.ac @@ -294,6 +294,19 @@ fi PKG_CHECK_MODULES(PIXMAN, [pixman-1]) PKG_CHECK_MODULES(PNG, [libpng]) +AC_ARG_WITH([jpeg], + AS_HELP_STRING([--without-jpeg], + [Use jpeglib for JPEG decoding support [default=auto]])) +AS_IF([test "x$with_jpeg" != "xno"], + [AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], [have_jpeglib=yes], [have_jpeglib=no])], + [have_jpeglib=no]) +AS_IF([test "x$have_jpeglib" = "xyes"], + [JPEG_LIBS="-ljpeg" + AC_SUBST([JPEG_LIBS]) + AC_DEFINE([HAVE_JPEG], [1], [Have jpeglib])], + [AS_IF([test "x$with_jpeg" = "xyes"], + [AC_MSG_ERROR([JPEG support explicitly requested, but jpeglib couldn't be found])])]) + AC_ARG_WITH([webp], AS_HELP_STRING([--without-webp], [Use libwebp for WebP decoding support [default=auto]])) @@ -318,15 +331,6 @@ if test x$enable_vaapi_recorder != xno; then fi AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes) - -AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes) -if test x$have_jpeglib = xyes; then - JPEG_LIBS="-ljpeg" -else - AC_ERROR([libjpeg not found]) -fi -AC_SUBST(JPEG_LIBS) - PKG_CHECK_MODULES(CAIRO, [cairo]) PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.10.0]) @@ -686,6 +690,7 @@ AC_MSG_RESULT([ Colord Support ${have_colord} LCMS2 Support ${have_lcms} + libjpeg Support ${have_jpeglib} libwebp Support ${have_webp} libunwind Support ${have_libunwind} VA H.264 encoding Support ${have_libva} |