diff --git a/ChangeLog b/ChangeLog index e6dae0a4..500cbb77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ - better fitting of fonts with overhanging edges [AdriĆ ] - revise C++ example [fangqiao] - strict round down on jpeg shrink on load [davidwood] +- configure test for g++ 7.2 and composite.cpp 12/2/18 started 8.6.3 - use pkg-config to find libjpeg, if we can diff --git a/configure.ac b/configure.ac index 057c39d8..67507c02 100644 --- a/configure.ac +++ b/configure.ac @@ -416,6 +416,30 @@ if test x$have_vector_shuffle = x"yes"; then have_vector_arith=no ]) AC_LANG_POP([C++]) +fi + +# gcc 7.2 seems to work, but then gets confused by signed constants in +# templates +if test x$have_vector_arith = x"yes"; then + AC_MSG_CHECKING([for C++ signed constants in vector templates]) + AC_LANG_PUSH([C++]) + AC_TRY_COMPILE([ + typedef float v4f __attribute__((vector_size(4 * sizeof(float)))); + template + static void + h( v4f B ) + { + v4f f; + f = -1 * B; + } + ],[ + ],[ + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + have_vector_arith=no + ]) + AC_LANG_POP([C++]) if test x$have_vector_arith = x"yes"; then AC_DEFINE_UNQUOTED(HAVE_VECTOR_ARITH, 1, diff --git a/libvips/colour/icc_transform.c b/libvips/colour/icc_transform.c index 152c2470..ba8439e8 100644 --- a/libvips/colour/icc_transform.c +++ b/libvips/colour/icc_transform.c @@ -546,6 +546,7 @@ vips_image_expected_sig( VipsImage *image ) */ switch( image->Bands ) { case 1: + case 2: expected_sig = cmsSigGrayData; break; @@ -554,6 +555,7 @@ vips_image_expected_sig( VipsImage *image ) break; case 4: + case 5: expected_sig = cmsSigCmykData; break;