Snap for 6533464 from 6f27487b628532d946046fceaaeaf946a036f9f7 to sdk-release

Change-Id: I5f593c5dcba898402a72bf6e52c2097a30a1b922
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 12c5c7b..9c5b94d 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,2 +1,2 @@
-github: dlemstra
-custom: https://imagemagick.org/script/support.php
\ No newline at end of file
+github: ImageMagick
+custom: https://imagemagick.org/script/support.php
diff --git a/ChangeLog b/ChangeLog
index 24ebf9a1..4287639 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,53 @@
-2020-04-07  7.0.10-7 Cristy  <quetzlzacatenango@image...>
-  * Release ImageMagick version 7.0.10-7, GIT revision 17...
+2020-05-12  7.0.10-12 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-12, GIT revision 17...
+
+2020-05-12  7.0.10-12 Cristy  <quetzlzacatenango@image...>
+  * Black artefacts during quantization (reference
+    https://github.com/ImageMagick/ImageMagick/discussions/2007#discussioncomment-13546).
+
+2020-05-08  7.0.10-11 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-11, GIT revision 17230:088df0e:20200508.
+
+2020-04-28  7.0.10-11 Cristy  <quetzlzacatenango@image...>
+  * Disable "random" OpenCL kernel.  Previously the work load was distributed
+    but each started with the same random seed.
+  * Finished implementation of -distort rigid-affine.
+  * Enable threaded PNG coder.
+
+2020-04-27  7.0.10-10 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-10, GIT revision 17205:9b0340e:20200427
+
+2020-04-27  7.0.10-10 Cristy  <quetzlzacatenango@image...>
+  * Correction to allocate a colormap of the maximum colors when color
+    reducing an image sequence.
+  * Write to stdout for mp4:-.
+
+2020-04-25  7.0.10-9 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-9, GIT revision 17190:13fdcd1:20200426.
+
+2020-04-25  7.0.10-9 Cristy  <quetzlzacatenango@image...>
+  * Allocate a colormap of the maximum colors when color reducing an image
+    sequence.
+  * Label was not centered properly (reference
+    https://github.com/ImageMagick/ImageMagick/issues/1879).
+
+2020-04-24  7.0.10-8 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-8, GIT revision 17175:481b85f:20200424.
+
+2020-04-23  7.0.10-8 Cristy  <quetzlzacatenango@image...>
+  * Some configure --with-method-prefix methods were missing (reference
+    https://github.com/ImageMagick/ImageMagick/issues/1912).
+
+2020-04-19  7.0.10-7 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.10-7, GIT revision 17170:c635e88:20200419.
 
 2020-04-07  7.0.10-7 Cristy  <quetzlzacatenango@image...>
- * Fix erroneous "insufficient image data" exception (reference
-   https://github.com/ImageMagick/ImageMagick/issues/1883).
+  * Fix erroneous "insufficient image data" exception (reference
+    https://github.com/ImageMagick/ImageMagick/issues/1883).
+  * Fix an unconditional jump for the XPM coder (reference
+    https://github.com/ImageMagick/ImageMagick/issues/1895).
+  * Improve unrotate value returned by the minimum bounding box (thanks
+    to Fred Weinhaus).
 
     https://github.com/ImageMagick/ImageMagick/discussions/1880).
 2020-04-06  7.0.10-6 Cristy  <quetzlzacatenango@image...>
diff --git a/METADATA b/METADATA
index d634e57..69d038e 100644
--- a/METADATA
+++ b/METADATA
@@ -9,11 +9,11 @@
     type: GIT
     value: "https://github.com/ImageMagick/ImageMagick.git"
   }
-  version: "f88232217ed62050573e689c5eb69d2ea1a32ec2"
+  version: "a38915edd4351c968a09cdf2dabe3144f480d915"
   license_type: NOTICE
   last_upgrade_date {
     year: 2020
-    month: 4
+    month: 5
     day: 13
   }
 }
diff --git a/Magick++/lib/Magick++/Include.h b/Magick++/lib/Magick++/Include.h
index a7fe523..9f71b4f 100644
--- a/Magick++/lib/Magick++/Include.h
+++ b/Magick++/lib/Magick++/Include.h
@@ -113,6 +113,9 @@
 #        if defined(MAGICKCORE_FLIF_DELEGATE)
 #          pragma comment(lib, "CORE_DB_flif_.lib")
 #        endif
+#        if defined(MAGICKCORE_FREETYPE_DELEGATE)
+#          pragma comment(lib, "CORE_DB_freetype_.lib")
+#        endif
 #        if defined(MAGICKCORE_JBIG_DELEGATE)
 #          pragma comment(lib, "CORE_DB_jbig_.lib")
 #        endif
@@ -133,7 +136,7 @@
 #          pragma comment(lib, "CORE_DB_libheif_.lib")
 #        endif
 #        if defined(MAGICKCORE_LZMA_DELEGATE)
-#          pragma comment(lib, "CORE_DB_lzma_.lib")
+#          pragma comment(lib, "CORE_DB_liblzma_.lib")
 #        endif
 #        if defined(MAGICKCORE_RAW_R_DELEGATE)
 #          pragma comment(lib, "CORE_DB_libraw_.lib")
@@ -163,9 +166,6 @@
 #        if defined(MAGICKCORE_TIFF_DELEGATE)
 #          pragma comment(lib, "CORE_DB_tiff_.lib")
 #        endif
-#        if defined(MAGICKCORE_FREETYPE_DELEGATE)
-#          pragma comment(lib, "CORE_DB_ttf_.lib")
-#        endif
 #        if defined(MAGICKCORE_WEBP_DELEGATE)
 #          pragma comment(lib, "CORE_DB_webp_.lib")
 #        endif
@@ -190,6 +190,9 @@
 #        if defined(MAGICKCORE_FLIF_DELEGATE)
 #          pragma comment(lib, "CORE_RL_flif_.lib")
 #        endif
+#        if defined(MAGICKCORE_FREETYPE_DELEGATE)
+#          pragma comment(lib, "CORE_RL_freetype_.lib")
+#        endif
 #        if defined(MAGICKCORE_JBIG_DELEGATE)
 #          pragma comment(lib, "CORE_RL_jbig_.lib")
 #        endif
@@ -210,7 +213,7 @@
 #          pragma comment(lib, "CORE_RL_libheif_.lib")
 #        endif
 #        if defined(MAGICKCORE_LZMA_DELEGATE)
-#          pragma comment(lib, "CORE_RL_lzma_.lib")
+#          pragma comment(lib, "CORE_RL_liblzma_.lib")
 #        endif
 #        if defined(MAGICKCORE_RAW_R_DELEGATE)
 #          pragma comment(lib, "CORE_RL_libraw_.lib")
@@ -240,9 +243,6 @@
 #        if defined(MAGICKCORE_TIFF_DELEGATE)
 #          pragma comment(lib, "CORE_RL_tiff_.lib")
 #        endif
-#        if defined(MAGICKCORE_FREETYPE_DELEGATE)
-#          pragma comment(lib, "CORE_RL_ttf_.lib")
-#        endif
 #        if defined(MAGICKCORE_WEBP_DELEGATE)
 #          pragma comment(lib, "CORE_RL_webp_.lib")
 #        endif
diff --git a/MagickCore/MagickCore-config b/MagickCore/MagickCore-config
index d665eca..b3d71c4 100755
--- a/MagickCore/MagickCore-config
+++ b/MagickCore/MagickCore-config
@@ -38,19 +38,19 @@
       echo '7.0.10 Q16 HDRI'
       ;;
     --cflags)
-      /usr/bin/pkg-config --cflags MagickCore
+      /usr/bin/pkg-config --cflags MagickCore-7.Q16HDRI
       ;;
     --cxxflags)
-      /usr/bin/pkg-config --cflags MagickCore
+      /usr/bin/pkg-config --cflags MagickCore-7.Q16HDRI
       ;;
     --cppflags)
-      /usr/bin/pkg-config --cflags MagickCore
+      /usr/bin/pkg-config --cflags MagickCore-7.Q16HDRI
       ;;
     --ldflags)
-      /usr/bin/pkg-config --libs MagickCore
+      /usr/bin/pkg-config --libs MagickCore-7.Q16HDRI
       ;;
     --libs)
-      /usr/bin/pkg-config --libs MagickCore
+      /usr/bin/pkg-config --libs MagickCore-7.Q16HDRI
       ;;
     --coder-path)
       echo "/usr/local/lib/ImageMagick-7.0.10/modules-Q16HDRI/coders"
diff --git a/MagickCore/accelerate.c b/MagickCore/accelerate.c
index 7faa7c7..334e3ff 100644
--- a/MagickCore/accelerate.c
+++ b/MagickCore/accelerate.c
@@ -567,6 +567,8 @@
 MagickPrivate Image *AccelerateAddNoiseImage(const Image *image,
   const NoiseType noise_type,const double attenuate,ExceptionInfo *exception)
 {
+  /* Temporary disabled because of repetition.
+
   Image
     *filteredImage;
 
@@ -586,6 +588,12 @@
   filteredImage=ComputeAddNoiseImage(image,clEnv,noise_type,attenuate,
     exception);
   return(filteredImage);
+  */
+  magick_unreferenced(image);
+  magick_unreferenced(noise_type);
+  magick_unreferenced(attenuate);
+  magick_unreferenced(exception);
+  return((Image *)NULL);
 }
 
 /*
diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c
index 80cdd59..a59b8e5 100644
--- a/MagickCore/annotate.c
+++ b/MagickCore/annotate.c
@@ -1643,7 +1643,7 @@
     bitmap=(FT_BitmapGlyph) glyph.image;
     point.x=offset->x+bitmap->left;
     if (bitmap->bitmap.pixel_mode == ft_pixel_mode_mono)
-      point.x=offset->x+(origin.x >> 6);
+      point.x=origin.x >> 6;
     point.y=offset->y-bitmap->top;
     if (draw_info->render != MagickFalse)
       {
@@ -1781,15 +1781,11 @@
         (IsUTFSpace(GetUTFCode(p+grapheme[i].cluster)) != MagickFalse) &&
         (IsUTFSpace(code) == MagickFalse))
       origin.x+=(FT_Pos) (64.0*draw_info->interword_spacing);
-    else if (i == last_character)
-      {
-        if (bounds.xMax == 0)
-          origin.x+=(FT_Pos) grapheme[i].x_advance;
-        else
-          origin.x+=(FT_Pos) bounds.xMax;
-      }
     else
-      origin.x+=(FT_Pos) grapheme[i].x_advance;
+      if (i == last_character)
+        origin.x+=MagickMax((FT_Pos) grapheme[i].x_advance,bounds.xMax);
+      else
+        origin.x+=(FT_Pos) grapheme[i].x_advance;
     metrics->origin.x=(double) origin.x;
     metrics->origin.y=(double) origin.y;
     if (metrics->origin.x > metrics->width)
diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c
index f2fc523..0f081ae 100644
--- a/MagickCore/attribute.c
+++ b/MagickCore/attribute.c
@@ -198,6 +198,9 @@
     }
   }
   GetPixelInfoPixel(image,p,&background);
+  artifact=GetImageArtifact(image,"background");
+  if (artifact != (const char *) NULL)
+    (void) QueryColorCompliance(artifact,AllCompliance,&background,exception);
   artifact=GetImageArtifact(image,"trim:background-color");
   if (artifact != (const char *) NULL)
     (void) QueryColorCompliance(artifact,AllCompliance,&background,exception);
@@ -571,6 +574,8 @@
     Most dominant color of edges/corners is the background color of the image.
   */
   artifact=GetImageArtifact(image,"convex-hull:background-color");
+  if (artifact == (const char *) NULL)
+    artifact=GetImageArtifact(image,"background");
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
   #pragma omp parallel for schedule(static)
 #endif
@@ -1099,31 +1104,15 @@
     v;
 } CaliperInfo;
 
-static double getAngle(PointInfo *p,PointInfo *q)
+static inline double getAngle(PointInfo *p,PointInfo *q)
 {
-  double
-    angle;
-
   /*
     Get the angle between line (p,q) and horizontal axis, in degrees.
   */
-  if (fabs(q->x-p->x) < MagickEpsilon)
-    {
-      if (q->y > p->y)
-        return(90.0);
-      return(270.0);
-    }
-  angle=RadiansToDegrees(atan2(fabs(q->y-p->y),fabs(q->x-p->x)));
-  if ((p->x < q->x) && (p->y <= q->y))
-    return(angle);
-  if ((p->x > q->x) && (p->y < q->y))
-    return(angle+90.0);
-  if ((p->x > q->x) && (p->y >= q->y))
-    return(angle+180.0);
-  return(360.0-angle);
+  return(RadiansToDegrees(atan2(q->y-p->y,q->x-p->x)));
 }
 
-static double getDistance(PointInfo *p,PointInfo *q)
+static inline double getDistance(PointInfo *p,PointInfo *q)
 {
   double
     distance;
@@ -1132,7 +1121,7 @@
   return(distance*distance);
 }
 
-static double getProjection(PointInfo *p,PointInfo *q,PointInfo *v)
+static inline double getProjection(PointInfo *p,PointInfo *q,PointInfo *v)
 {
   double
     distance;
@@ -1146,7 +1135,7 @@
   return((q->x-p->x)*(v->x-p->x)+(v->y-p->y)*(q->y-p->y))/sqrt(distance);
 }
 
-static double getFeretDiameter(PointInfo *p,PointInfo *q,PointInfo *v)
+static inline double getFeretDiameter(PointInfo *p,PointInfo *q,PointInfo *v)
 {
   double
     distance;
@@ -1166,9 +1155,13 @@
   CaliperInfo
     caliper_info;
 
+  const char
+    *artifact;
+
   double
     angle,
-    diameter;
+    diameter,
+    distance;
 
   PointInfo
     *bounding_box,
@@ -1273,12 +1266,18 @@
     caliper_info.projection;
   bounding_box[0].y=vertices[caliper_info.p].y+sin(angle)*
     caliper_info.projection;
-  bounding_box[1].x=bounding_box[0].x+cos(angle+MagickPI/2.0)*diameter;
-  bounding_box[1].y=bounding_box[0].y+sin(angle+MagickPI/2.0)*diameter;
-  bounding_box[2].x=bounding_box[1].x+cos(angle)*(-caliper_info.height);
-  bounding_box[2].y=bounding_box[1].y+sin(angle)*(-caliper_info.height);
-  bounding_box[3].x=bounding_box[2].x+cos(angle+MagickPI/2.0)*(-diameter);
-  bounding_box[3].y=bounding_box[2].y+sin(angle+MagickPI/2.0)*(-diameter);
+  bounding_box[1].x=floor(bounding_box[0].x+cos(angle+MagickPI/2.0)*diameter+
+    0.5);
+  bounding_box[1].y=floor(bounding_box[0].y+sin(angle+MagickPI/2.0)*diameter+
+    0.5);
+  bounding_box[2].x=floor(bounding_box[1].x+cos(angle)*(-caliper_info.height)+
+    0.5);
+  bounding_box[2].y=floor(bounding_box[1].y+sin(angle)*(-caliper_info.height)+
+    0.5);
+  bounding_box[3].x=floor(bounding_box[2].x+cos(angle+MagickPI/2.0)*(-diameter)+
+    0.5);
+  bounding_box[3].y=floor(bounding_box[2].y+sin(angle+MagickPI/2.0)*(-diameter)+
+    0.5);
   /*
     Export minimum bounding box properties.
   */
@@ -1288,11 +1287,6 @@
     GetMagickPrecision(),caliper_info.width);
   (void) FormatImageProperty(image,"minimum-bounding-box:height","%.*g",
     GetMagickPrecision(),caliper_info.height);
-  (void) FormatImageProperty(image,"minimum-bounding-box:angle","%.*g",
-    GetMagickPrecision(),RadiansToDegrees(angle));
-  (void) FormatImageProperty(image,"minimum-bounding-box:unrotate","%.*g",
-    GetMagickPrecision(),getAngle(&vertices[caliper_info.p],
-    &vertices[caliper_info.q]));
   (void) FormatImageProperty(image,"minimum-bounding-box:_p","%.*g,%.*g",
     GetMagickPrecision(),vertices[caliper_info.p].x,
     GetMagickPrecision(),vertices[caliper_info.p].y);
@@ -1302,6 +1296,89 @@
   (void) FormatImageProperty(image,"minimum-bounding-box:_v","%.*g,%.*g",
     GetMagickPrecision(),vertices[caliper_info.v].x,
     GetMagickPrecision(),vertices[caliper_info.v].y);
+  /*
+    Find smallest angle to origin.
+  */
+  distance=hypot(bounding_box[0].x,bounding_box[0].y);
+  angle=getAngle(&bounding_box[0],&bounding_box[1]);
+  for (i=1; i < 4; i++)
+  {
+    double d = hypot(bounding_box[i].x,bounding_box[i].y);
+    if (d < distance)
+      {
+        distance=d;
+        angle=getAngle(&bounding_box[i],&bounding_box[(i+1) % 4]);
+      }
+  }
+  artifact=GetImageArtifact(image,"minimum-bounding-box:orientation");
+  if (artifact != (const char *) NULL)
+    {
+      double
+        length,
+        q_length,
+        p_length;
+
+      PointInfo
+        delta,
+        point;
+
+      /*
+        Find smallest perpendicular distance from edge to origin.
+      */
+      point=bounding_box[0];
+      for (i=1; i < 4; i++)
+      {
+        if (bounding_box[i].x < point.x)
+          point.x=bounding_box[i].x;
+        if (bounding_box[i].y < point.y)
+          point.y=bounding_box[i].y;
+      }
+      for (i=0; i < 4; i++)
+      {
+        bounding_box[i].x-=point.x;
+        bounding_box[i].y-=point.y;
+      }
+      for (i=0; i < 4; i++)
+      {
+        double
+          d,
+          intercept,
+          slope;
+
+        delta.x=bounding_box[(i+1) % 4].x-bounding_box[i].x;
+        delta.y=bounding_box[(i+1) % 4].y-bounding_box[i].y;
+        slope=delta.y*PerceptibleReciprocal(delta.x);
+        intercept=bounding_box[(i+1) % 4].y-slope*bounding_box[i].x;
+        d=fabs((slope*bounding_box[i].x-bounding_box[i].y+intercept)*
+          PerceptibleReciprocal(sqrt(slope*slope+1.0)));
+        if ((i == 0) || (d < distance))
+          {
+            distance=d;
+            point=delta;
+          }
+      }
+      angle=RadiansToDegrees(atan(point.y*PerceptibleReciprocal(point.x)));
+      length=hypot(point.x,point.y);
+      p_length=fabs((double) MagickMax(caliper_info.width,caliper_info.height)-
+        length);
+      q_length=fabs(length-(double) MagickMin(caliper_info.width,
+        caliper_info.height));
+      if (LocaleCompare(artifact,"landscape") == 0)
+        {
+          if (p_length > q_length)
+            angle+=(angle < 0.0) ? 90.0 : -90.0;
+        }
+      else
+        if (LocaleCompare(artifact,"portrait") == 0)
+          {
+            if (p_length < q_length)
+              angle+=(angle >= 0.0) ? 90.0 : -90.0;
+          }
+    }
+  (void) FormatImageProperty(image,"minimum-bounding-box:angle","%.*g",
+    GetMagickPrecision(),angle);
+  (void) FormatImageProperty(image,"minimum-bounding-box:unrotate","%.*g",
+    GetMagickPrecision(),-angle);
   vertices=(PointInfo *) RelinquishMagickMemory(vertices);
   return(bounding_box);
 }
diff --git a/MagickCore/distort.c b/MagickCore/distort.c
index 6920041..a737f6e 100644
--- a/MagickCore/distort.c
+++ b/MagickCore/distort.c
@@ -418,6 +418,7 @@
   number_coeff=0;
   switch (*method) {
     case AffineDistortion:
+    case RigidAffineDistortion:
     /* also BarycentricColorInterpolate: */
       number_coeff=3*number_values;
       break;
@@ -606,6 +607,86 @@
       }
       return(coeff);
     }
+    case RigidAffineDistortion:
+    {
+      double
+        inverse[6],
+        **matrix,
+        terms[5],
+        *vectors[1];
+
+      MagickBooleanType
+        status;
+
+      /*
+        Rigid affine (also known as a Euclidean transform), restricts affine
+        coefficients to 4 (S, R, Tx, Ty) with Sy=Sx and Ry = -Rx so that one has
+        only scale, rotation and translation. No skew.
+      */
+      if (((number_arguments % cp_size) != 0) || (number_arguments < cp_size))
+        {
+          (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
+            "InvalidArgument", "%s : 'require at least %.20g CPs'",
+            CommandOptionToMnemonic(MagickDistortOptions,*method),2.0);
+          coeff=(double *) RelinquishMagickMemory(coeff);
+          return((double *) NULL);
+        }
+      /*
+        Rigid affine requires a 4x4 least-squares matrix (zeroed).
+      */
+      matrix=AcquireMagickMatrix(4UL,4UL);
+      if (matrix == (double **) NULL)
+        {
+          coeff=(double *) RelinquishMagickMemory(coeff);
+          (void) ThrowMagickException(exception,GetMagickModule(),
+            ResourceLimitError,"MemoryAllocationFailed","%s",
+            CommandOptionToMnemonic(MagickDistortOptions,*method));
+          return((double *) NULL);
+        }
+      /*
+        Add control points for least squares solving.
+      */
+      vectors[0]=(&(coeff[0]));
+      for (i=0; i < number_arguments; i+=4)
+      {
+        terms[0]=arguments[i+0];
+        terms[1]=(-arguments[i+1]);
+        terms[2]=1.0;
+        terms[3]=0.0;
+        LeastSquaresAddTerms(matrix,vectors,terms,&(arguments[i+2]),4UL,1UL);
+        terms[0]=arguments[i+1];
+        terms[1]=arguments[i+0];
+        terms[2]=0.0;
+        terms[3]=1.0;
+        LeastSquaresAddTerms(matrix,vectors,terms,&(arguments[i+3]),4UL,1UL);
+      }
+      /*
+        Solve for least-squares coefficients.
+      */
+      status=GaussJordanElimination(matrix,vectors,4UL,1UL);
+      matrix=RelinquishMagickMatrix(matrix,4UL);
+      if (status == MagickFalse)
+        {
+          coeff=(double *) RelinquishMagickMemory(coeff);
+          (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
+            "InvalidArgument","%s : 'Unsolvable Matrix'",
+            CommandOptionToMnemonic(MagickDistortOptions,*method));
+          return((double *) NULL);
+        }
+      /*
+        Convert (S, R, Tx, Ty) to an affine projection.
+      */
+      inverse[0]=coeff[0];
+      inverse[1]=coeff[1];
+      inverse[2]=(-coeff[1]);
+      inverse[3]=coeff[0];
+      inverse[4]=coeff[2];
+      inverse[5]=coeff[3];
+      AffineArgsToCoefficients(inverse);
+      InvertAffineCoefficients(inverse,coeff);
+      *method=AffineDistortion;
+      return(coeff);
+    }
     case AffineProjectionDistortion:
     {
       /*
@@ -1774,6 +1855,7 @@
     switch (method)
     {
       case AffineDistortion:
+      case RigidAffineDistortion:
       { double inverse[6];
         InvertAffineCoefficients(coeff, inverse);
         s.x = (double) image->page.x;
@@ -1986,6 +2068,7 @@
     switch (method)
     {
       case AffineDistortion:
+      case RigidAffineDistortion:
       {
         double
           *inverse;
@@ -2417,6 +2500,7 @@
       switch (method)
       {
         case AffineDistortion:
+        case RigidAffineDistortion:
           ScaleFilter( resample_filter[id],
             coeff[0], coeff[1],
             coeff[3], coeff[4] );
@@ -2441,6 +2525,7 @@
         switch (method)
         {
           case AffineDistortion:
+          case RigidAffineDistortion:
           {
             s.x=coeff[0]*d.x+coeff[1]*d.y+coeff[2];
             s.y=coeff[3]*d.x+coeff[4]*d.y+coeff[5];
diff --git a/MagickCore/distort.h b/MagickCore/distort.h
index 733936b..c168635 100644
--- a/MagickCore/distort.h
+++ b/MagickCore/distort.h
@@ -52,7 +52,8 @@
   BarrelInverseDistortion,
   ShepardsDistortion,
   ResizeDistortion,
-  SentinelDistortion
+  SentinelDistortion,
+  RigidAffineDistortion
 } DistortMethod;
 
 typedef enum
diff --git a/MagickCore/draw.c b/MagickCore/draw.c
index f8b0847..5d9915d 100644
--- a/MagickCore/draw.c
+++ b/MagickCore/draw.c
@@ -4996,8 +4996,8 @@
         x,y,&stroke_alpha);
       if (draw_info->stroke_antialias == MagickFalse)
         {
-          fill_alpha=fill_alpha > 0.25 ? 1.0 : 0.0;
-          stroke_alpha=stroke_alpha > 0.25 ? 1.0 : 0.0;
+          fill_alpha=fill_alpha > 0.5 ? 1.0 : 0.0;
+          stroke_alpha=stroke_alpha > 0.5 ? 1.0 : 0.0;
         }
       GetFillColor(draw_info,x-start_x,y-start_y,&fill_color,exception);
       CompositePixelOver(image,&fill_color,fill_alpha*fill_color.alpha,q,
diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c
index a4c8369..f72720e 100644
--- a/MagickCore/histogram.c
+++ b/MagickCore/histogram.c
@@ -1006,6 +1006,7 @@
 
   char
     color[MagickPathExtent],
+    count[MagickPathExtent],
     hex[MagickPathExtent],
     tuple[MagickPathExtent];
 
@@ -1071,9 +1072,8 @@
     (void) ConcatenateMagickString(tuple,")",MagickPathExtent);
     (void) QueryColorname(image,&pixel,SVGCompliance,color,exception);
     GetColorTuple(&pixel,MagickTrue,hex);
-    (void) FormatLocaleFile(file,"%10.20g",(double) ((MagickOffsetType)
-      p->count));
-    (void) FormatLocaleFile(file,": %s %s %s\n",tuple,hex,color);
+    (void) sprintf(count,"%g:",(double) ((MagickOffsetType) p->count));
+    (void) FormatLocaleFile(file,"    %s %s %s %s\n",count,tuple,hex,color);
     if (image->progress_monitor != (MagickProgressMonitor) NULL)
       {
         MagickBooleanType
diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index 103ca88..18a1dbb 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -683,7 +683,7 @@
   p=GetVirtualPixels(image,0,0,1,1,exception);
   ping=p == (const Quantum *) NULL ? MagickTrue : MagickFalse;
   (void) SignatureImage(image,exception);
-  (void) FormatLocaleFile(file,"Image: %s\n",image->filename);
+  (void) FormatLocaleFile(file,"Image:\n  Filename: %s\n",image->filename);
   if (*image->magick_filename != '\0')
     if (LocaleCompare(image->magick_filename,image->filename) != 0)
       {
@@ -732,7 +732,7 @@
   if (image->type != type)
     (void) FormatLocaleFile(file,"  Base type: %s\n",CommandOptionToMnemonic(
       MagickTypeOptions,(ssize_t) image->type));
-  (void) FormatLocaleFile(file,"  Endianess: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Endianness: %s\n",CommandOptionToMnemonic(
     MagickEndianOptions,(ssize_t) image->endian));
   /*
     Detail channel depth and extrema.
@@ -1077,6 +1077,7 @@
         {
           char
             hex[MagickPathExtent],
+            index[MagickPathExtent],
             tuple[MagickPathExtent];
 
           PixelInfo
@@ -1115,8 +1116,9 @@
             (void) QueryColorname(image,&pixel,SVGCompliance,color,
               exception);
             GetColorTuple(&pixel,MagickTrue,hex);
-            (void) FormatLocaleFile(file,"  %8ld: %s %s %s\n",(long) i,tuple,
-              hex,color);
+            (void) sprintf(index,"%g:",(double) i);
+            (void) FormatLocaleFile(file,"    %s %s %s %s\n",index,tuple,hex,
+              color);
             c++;
           }
         }
diff --git a/MagickCore/matrix.c b/MagickCore/matrix.c
index 7d94fc7..977081e 100644
--- a/MagickCore/matrix.c
+++ b/MagickCore/matrix.c
@@ -821,7 +821,7 @@
 %       c5 = vectors[1][2];
 %     }
 %     else
-%       printf("Matrix unsolvable\n);
+%       printf("Matrix unsolvable\n");
 %     RelinquishMagickMatrix(matrix,3UL);
 %     RelinquishMagickMatrix(vectors,2UL);
 %
diff --git a/MagickCore/methods.h b/MagickCore/methods.h
index 61a20da..3cf274f 100644
--- a/MagickCore/methods.h
+++ b/MagickCore/methods.h
@@ -15,7 +15,7 @@
 
   MagickCore API methods prefix.
 
-  nm -p MagickCore/.libs/libMagickCore-7.Q16HDRI.a | grep ' T ' | egrep -vi '(Magick)|(lt_)' | \
+  nm -p MagickCore/.libs/libMagickCore-7.Q16HDRI.a | grep ' T ' | \
      egrep -v '(MagickError)|(MagickFatalError)|(MagickWarning)|(ThrowException)' | \
     awk '{ printf("#define %s  PrependMagickMethod(%s)\n", $3, $3); }' | sort
 */
@@ -39,6 +39,7 @@
 
 #define AcquireAlignedMemory  PrependMagickMethod(AcquireAlignedMemory)
 #define AcquireAuthenticCacheView  PrependMagickMethod(AcquireAuthenticCacheView)
+#define AcquireCriticalMemory  PrependMagickMethod(AcquireCriticalMemory)
 #define AcquireCustomStreamInfo  PrependMagickMethod(AcquireCustomStreamInfo)
 #define AcquireDistributeCacheInfo  PrependMagickMethod(AcquireDistributeCacheInfo)
 #define AcquireDrawInfo  PrependMagickMethod(AcquireDrawInfo)
@@ -49,8 +50,13 @@
 #define AcquireImage  PrependMagickMethod(AcquireImage)
 #define AcquireKernelBuiltIn  PrependMagickMethod(AcquireKernelBuiltIn)
 #define AcquireKernelInfo  PrependMagickMethod(AcquireKernelInfo)
+#define AcquireMagickInfo  PrependMagickMethod(AcquireMagickInfo)
+#define AcquireMagickMatrix  PrependMagickMethod(AcquireMagickMatrix)
+#define AcquireMagickMemory  PrependMagickMethod(AcquireMagickMemory)
+#define AcquireMagickResource  PrependMagickMethod(AcquireMagickResource)
 #define AcquireMatrixInfo  PrependMagickMethod(AcquireMatrixInfo)
 #define AcquireMimeCache  PrependMagickMethod(AcquireMimeCache)
+#define AcquireModuleInfo  PrependMagickMethod(AcquireModuleInfo)
 #define AcquireNextImage  PrependMagickMethod(AcquireNextImage)
 #define AcquirePixelCacheNexus  PrependMagickMethod(AcquirePixelCacheNexus)
 #define AcquirePixelCachePixels  PrependMagickMethod(AcquirePixelCachePixels)
@@ -84,7 +90,6 @@
 #define AddPathToXMLTree  PrependMagickMethod(AddPathToXMLTree)
 #define AddValueToSplayTree  PrependMagickMethod(AddValueToSplayTree)
 #define AffineTransformImage  PrependMagickMethod(AffineTransformImage)
-#define analyzeImage  PrependMagickMethod(analyzeImage)
 #define AnimateImages  PrependMagickMethod(AnimateImages)
 #define AnnotateComponentGenesis  PrependMagickMethod(AnnotateComponentGenesis)
 #define AnnotateComponentTerminus  PrependMagickMethod(AnnotateComponentTerminus)
@@ -127,6 +132,7 @@
 #define CLAHEImage  PrependMagickMethod(CLAHEImage)
 #define ClampImage  PrependMagickMethod(ClampImage)
 #define ClearLinkedList  PrependMagickMethod(ClearLinkedList)
+#define ClearMagickException  PrependMagickMethod(ClearMagickException)
 #define ClipImagePath  PrependMagickMethod(ClipImagePath)
 #define ClipImage  PrependMagickMethod(ClipImage)
 #define CloneBlobInfo  PrependMagickMethod(CloneBlobInfo)
@@ -153,6 +159,7 @@
 #define CloneStringInfo  PrependMagickMethod(CloneStringInfo)
 #define CloneString  PrependMagickMethod(CloneString)
 #define CloseBlob  PrependMagickMethod(CloseBlob)
+#define CloseMagickLog  PrependMagickMethod(CloseMagickLog)
 #define ClutImage  PrependMagickMethod(ClutImage)
 #define CoalesceImages  PrependMagickMethod(CoalesceImages)
 #define CoderComponentGenesis  PrependMagickMethod(CoderComponentGenesis)
@@ -162,6 +169,7 @@
 #define ColorDecisionListImage  PrependMagickMethod(ColorDecisionListImage)
 #define ColorizeImage  PrependMagickMethod(ColorizeImage)
 #define ColorMatrixImage  PrependMagickMethod(ColorMatrixImage)
+#define ColorThresholdImage  PrependMagickMethod(ColorThresholdImage)
 #define CombineImages  PrependMagickMethod(CombineImages)
 #define CommandOptionToMnemonic  PrependMagickMethod(CommandOptionToMnemonic)
 #define CompareImagesLayers  PrependMagickMethod(CompareImagesLayers)
@@ -174,6 +182,7 @@
 #define CompositeLayers  PrependMagickMethod(CompositeLayers)
 #define CompressImageColormap  PrependMagickMethod(CompressImageColormap)
 #define ConcatenateColorComponent  PrependMagickMethod(ConcatenateColorComponent)
+#define ConcatenateMagickString  PrependMagickMethod(ConcatenateMagickString)
 #define ConcatenateStringInfo  PrependMagickMethod(ConcatenateStringInfo)
 #define ConcatenateString  PrependMagickMethod(ConcatenateString)
 #define ConfigureComponentGenesis  PrependMagickMethod(ConfigureComponentGenesis)
@@ -203,10 +212,14 @@
 #define ConvertRGBToHSL  PrependMagickMethod(ConvertRGBToHSL)
 #define ConvertRGBToHSV  PrependMagickMethod(ConvertRGBToHSV)
 #define ConvertRGBToHWB  PrependMagickMethod(ConvertRGBToHWB)
+#define ConvertRGBToLab  PrependMagickMethod(ConvertRGBToLab)
 #define ConvertRGBToLCHab  PrependMagickMethod(ConvertRGBToLCHab)
 #define ConvertRGBToLCHuv  PrependMagickMethod(ConvertRGBToLCHuv)
 #define ConvolveImage  PrependMagickMethod(ConvolveImage)
 #define CopyImagePixels  PrependMagickMethod(CopyImagePixels)
+#define CopyMagickMemory  PrependMagickMethod(CopyMagickMemory)
+#define CopyMagickString  PrependMagickMethod(CopyMagickString)
+#define CreateMagickThreadKey  PrependMagickMethod(CreateMagickThreadKey)
 #define CropImage  PrependMagickMethod(CropImage)
 #define CropImageToTiles  PrependMagickMethod(CropImageToTiles)
 #define CustomStreamToImage  PrependMagickMethod(CustomStreamToImage)
@@ -226,6 +239,7 @@
 #define DeleteImageProperty  PrependMagickMethod(DeleteImageProperty)
 #define DeleteImageRegistry  PrependMagickMethod(DeleteImageRegistry)
 #define DeleteImages  PrependMagickMethod(DeleteImages)
+#define DeleteMagickThreadKey  PrependMagickMethod(DeleteMagickThreadKey)
 #define DeleteNodeByValueFromSplayTree  PrependMagickMethod(DeleteNodeByValueFromSplayTree)
 #define DeleteNodeFromSplayTree  PrependMagickMethod(DeleteNodeFromSplayTree)
 #define DeskewImage  PrependMagickMethod(DeskewImage)
@@ -250,7 +264,9 @@
 #define DestroyKernelInfo  PrependMagickMethod(DestroyKernelInfo)
 #define DestroyLinkedList  PrependMagickMethod(DestroyLinkedList)
 #define DestroyLocaleOptions  PrependMagickMethod(DestroyLocaleOptions)
+#define DestroyMagickMemory  PrependMagickMethod(DestroyMagickMemory)
 #define DestroyMatrixInfo  PrependMagickMethod(DestroyMatrixInfo)
+#define DestroyModuleList  PrependMagickMethod(DestroyModuleList)
 #define DestroyMontageInfo  PrependMagickMethod(DestroyMontageInfo)
 #define DestroyPixelCacheNexus  PrependMagickMethod(DestroyPixelCacheNexus)
 #define DestroyPixelCache  PrependMagickMethod(DestroyPixelCache)
@@ -325,6 +341,9 @@
 #define FormatLocaleFile  PrependMagickMethod(FormatLocaleFile)
 #define FormatLocaleStringList  PrependMagickMethod(FormatLocaleStringList)
 #define FormatLocaleString  PrependMagickMethod(FormatLocaleString)
+#define FormatMagickCaption  PrependMagickMethod(FormatMagickCaption)
+#define FormatMagickSize  PrependMagickMethod(FormatMagickSize)
+#define FormatMagickTime  PrependMagickMethod(FormatMagickTime)
 #define ForwardFourierTransformImage  PrependMagickMethod(ForwardFourierTransformImage)
 #define FrameImage  PrependMagickMethod(FrameImage)
 #define FunctionImage  PrependMagickMethod(FunctionImage)
@@ -399,6 +418,7 @@
 #define GetImageArtifact  PrependMagickMethod(GetImageArtifact)
 #define GetImageBoundingBox  PrependMagickMethod(GetImageBoundingBox)
 #define GetImageColorspaceType  PrependMagickMethod(GetImageColorspaceType)
+#define GetImageConvexHull  PrependMagickMethod(GetImageConvexHull)
 #define GetImageDecoder  PrependMagickMethod(GetImageDecoder)
 #define GetImageDepth  PrependMagickMethod(GetImageDepth)
 #define GetImageDistortion  PrependMagickMethod(GetImageDistortion)
@@ -416,8 +436,10 @@
 #define GetImageInfo  PrependMagickMethod(GetImageInfo)
 #define GetImageKurtosis  PrependMagickMethod(GetImageKurtosis)
 #define GetImageListLength  PrependMagickMethod(GetImageListLength)
+#define GetImageMagick  PrependMagickMethod(GetImageMagick)
 #define GetImageMask  PrependMagickMethod(GetImageMask)
 #define GetImageMean  PrependMagickMethod(GetImageMean)
+#define GetImageMinimumBoundingBox  PrependMagickMethod(GetImageMinimumBoundingBox)
 #define GetImageMoments  PrependMagickMethod(GetImageMoments)
 #define GetImageOption  PrependMagickMethod(GetImageOption)
 #define GetImagePerceptualHash  PrependMagickMethod(GetImagePerceptualHash)
@@ -455,6 +477,43 @@
 #define GetLogName  PrependMagickMethod(GetLogName)
 #define GetMagicInfoList  PrependMagickMethod(GetMagicInfoList)
 #define GetMagicInfo  PrependMagickMethod(GetMagicInfo)
+#define GetMagickAdjoin  PrependMagickMethod(GetMagickAdjoin)
+#define GetMagickBlobSupport  PrependMagickMethod(GetMagickBlobSupport)
+#define GetMagickCopyright  PrependMagickMethod(GetMagickCopyright)
+#define GetMagickDecoderSeekableStream  PrependMagickMethod(GetMagickDecoderSeekableStream)
+#define GetMagickDecoderThreadSupport  PrependMagickMethod(GetMagickDecoderThreadSupport)
+#define GetMagickDelegates  PrependMagickMethod(GetMagickDelegates)
+#define GetMagickDescription  PrependMagickMethod(GetMagickDescription)
+#define GetMagickEncoderSeekableStream  PrependMagickMethod(GetMagickEncoderSeekableStream)
+#define GetMagickEncoderThreadSupport  PrependMagickMethod(GetMagickEncoderThreadSupport)
+#define GetMagickEndianSupport  PrependMagickMethod(GetMagickEndianSupport)
+#define GetMagickFeatures  PrependMagickMethod(GetMagickFeatures)
+#define GetMagickHomeURL  PrependMagickMethod(GetMagickHomeURL)
+#define GetMagickInfoList  PrependMagickMethod(GetMagickInfoList)
+#define GetMagickInfo  PrependMagickMethod(GetMagickInfo)
+#define GetMagickLicense  PrependMagickMethod(GetMagickLicense)
+#define GetMagickList  PrependMagickMethod(GetMagickList)
+#define GetMagickMemoryMethods  PrependMagickMethod(GetMagickMemoryMethods)
+#define GetMagickMimeType  PrependMagickMethod(GetMagickMimeType)
+#define GetMagickModuleName  PrependMagickMethod(GetMagickModuleName)
+#define GetMagickName  PrependMagickMethod(GetMagickName)
+#define GetMagickPackageName  PrependMagickMethod(GetMagickPackageName)
+#define GetMagickPageSize  PrependMagickMethod(GetMagickPageSize)
+#define GetMagickPrecision  PrependMagickMethod(GetMagickPrecision)
+#define GetMagickProperty  PrependMagickMethod(GetMagickProperty)
+#define GetMagickQuantumDepth  PrependMagickMethod(GetMagickQuantumDepth)
+#define GetMagickQuantumRange  PrependMagickMethod(GetMagickQuantumRange)
+#define GetMagickRawSupport  PrependMagickMethod(GetMagickRawSupport)
+#define GetMagickReleaseDate  PrependMagickMethod(GetMagickReleaseDate)
+#define GetMagickResourceLimit  PrependMagickMethod(GetMagickResourceLimit)
+#define GetMagickResource  PrependMagickMethod(GetMagickResource)
+#define GetMagickSeekableStream  PrependMagickMethod(GetMagickSeekableStream)
+#define GetMagickSignature  PrependMagickMethod(GetMagickSignature)
+#define GetMagickStealth  PrependMagickMethod(GetMagickStealth)
+#define GetMagickThreadValue  PrependMagickMethod(GetMagickThreadValue)
+#define GetMagickTime  PrependMagickMethod(GetMagickTime)
+#define GetMagickUseExtension  PrependMagickMethod(GetMagickUseExtension)
+#define GetMagickVersion  PrependMagickMethod(GetMagickVersion)
 #define GetMagicList  PrependMagickMethod(GetMagicList)
 #define GetMagicName  PrependMagickMethod(GetMagicName)
 #define GetMagicPatternExtent  PrependMagickMethod(GetMagicPatternExtent)
@@ -467,6 +526,9 @@
 #define GetMimeInfo  PrependMagickMethod(GetMimeInfo)
 #define GetMimeList  PrependMagickMethod(GetMimeList)
 #define GetMimeType  PrependMagickMethod(GetMimeType)
+#define GetModuleInfoList  PrependMagickMethod(GetModuleInfoList)
+#define GetModuleInfo  PrependMagickMethod(GetModuleInfo)
+#define GetModuleList  PrependMagickMethod(GetModuleList)
 #define GetMontageInfo  PrependMagickMethod(GetMontageInfo)
 #define GetMultilineTypeMetrics  PrependMagickMethod(GetMultilineTypeMetrics)
 #define GetNextImageArtifact  PrependMagickMethod(GetNextImageArtifact)
@@ -582,7 +644,6 @@
 #define GravityAdjustGeometry  PrependMagickMethod(GravityAdjustGeometry)
 #define GrayscaleImage  PrependMagickMethod(GrayscaleImage)
 #define HaldClutImage  PrependMagickMethod(HaldClutImage)
-#define HeapOverflowSanityCheck  PrependMagickMethod(HeapOverflowSanityCheck)
 #define HoughLineImage  PrependMagickMethod(HoughLineImage)
 #define HuffmanDecodeImage  PrependMagickMethod(HuffmanDecodeImage)
 #define HuffmanEncodeImage  PrependMagickMethod(HuffmanEncodeImage)
@@ -621,6 +682,7 @@
 #define InverseFourierTransformImage  PrependMagickMethod(InverseFourierTransformImage)
 #define InvokeDelegate  PrependMagickMethod(InvokeDelegate)
 #define InvokeDynamicImageFilter  PrependMagickMethod(InvokeDynamicImageFilter)
+#define InvokeStaticImageFilter  PrependMagickMethod(InvokeStaticImageFilter)
 #define IsBlobExempt  PrependMagickMethod(IsBlobExempt)
 #define IsBlobSeekable  PrependMagickMethod(IsBlobSeekable)
 #define IsBlobTemporary  PrependMagickMethod(IsBlobTemporary)
@@ -642,6 +704,8 @@
 #define IsImagesEqual  PrependMagickMethod(IsImagesEqual)
 #define IsImageView  PrependMagickMethod(IsImageView)
 #define IsLinkedListEmpty  PrependMagickMethod(IsLinkedListEmpty)
+#define IsMagickConflict  PrependMagickMethod(IsMagickConflict)
+#define IsMagickCoreInstantiated  PrependMagickMethod(IsMagickCoreInstantiated)
 #define IsOptionMember  PrependMagickMethod(IsOptionMember)
 #define IsPaletteImage  PrependMagickMethod(IsPaletteImage)
 #define IsPathAccessible  PrependMagickMethod(IsPathAccessible)
@@ -650,6 +714,7 @@
 #define IsStringFalse  PrependMagickMethod(IsStringFalse)
 #define IsStringTrue  PrependMagickMethod(IsStringTrue)
 #define IsTaintImage  PrependMagickMethod(IsTaintImage)
+#define KmeansImage  PrependMagickMethod(KmeansImage)
 #define KuwaharaImage  PrependMagickMethod(KuwaharaImage)
 #define LeastSquaresAddTerms  PrependMagickMethod(LeastSquaresAddTerms)
 #define LevelImageColors  PrependMagickMethod(LevelImageColors)
@@ -667,6 +732,9 @@
 #define ListLocaleInfo  PrependMagickMethod(ListLocaleInfo)
 #define ListLogInfo  PrependMagickMethod(ListLogInfo)
 #define ListMagicInfo  PrependMagickMethod(ListMagicInfo)
+#define ListMagickInfo  PrependMagickMethod(ListMagickInfo)
+#define ListMagickResourceInfo  PrependMagickMethod(ListMagickResourceInfo)
+#define ListMagickVersion  PrependMagickMethod(ListMagickVersion)
 #define ListMimeInfo  PrependMagickMethod(ListMimeInfo)
 #define ListModuleInfo  PrependMagickMethod(ListModuleInfo)
 #define ListPolicyInfo  PrependMagickMethod(ListPolicyInfo)
@@ -686,9 +754,17 @@
 #define LockSemaphoreInfo  PrependMagickMethod(LockSemaphoreInfo)
 #define LogComponentGenesis  PrependMagickMethod(LogComponentGenesis)
 #define LogComponentTerminus  PrependMagickMethod(LogComponentTerminus)
+#define LogMagickEventList  PrependMagickMethod(LogMagickEventList)
+#define LogMagickEvent  PrependMagickMethod(LogMagickEvent)
 #define LZWEncodeImage  PrependMagickMethod(LZWEncodeImage)
 #define MagicComponentGenesis  PrependMagickMethod(MagicComponentGenesis)
 #define MagicComponentTerminus  PrependMagickMethod(MagicComponentTerminus)
+#define MagickComponentGenesis  PrependMagickMethod(MagickComponentGenesis)
+#define MagickComponentTerminus  PrependMagickMethod(MagickComponentTerminus)
+#define MagickCoreGenesis  PrependMagickMethod(MagickCoreGenesis)
+#define MagickCoreTerminus  PrependMagickMethod(MagickCoreTerminus)
+#define MagickDelay  PrependMagickMethod(MagickDelay)
+#define MagickToMime  PrependMagickMethod(MagickToMime)
 #define MagnifyImage  PrependMagickMethod(MagnifyImage)
 #define MapBlob  PrependMagickMethod(MapBlob)
 #define MatrixToImage  PrependMagickMethod(MatrixToImage)
@@ -700,6 +776,8 @@
 #define MinMaxStretchImage  PrependMagickMethod(MinMaxStretchImage)
 #define ModifyImage  PrependMagickMethod(ModifyImage)
 #define ModulateImage  PrependMagickMethod(ModulateImage)
+#define ModuleComponentGenesis  PrependMagickMethod(ModuleComponentGenesis)
+#define ModuleComponentTerminus  PrependMagickMethod(ModuleComponentTerminus)
 #define MonitorComponentGenesis  PrependMagickMethod(MonitorComponentGenesis)
 #define MonitorComponentTerminus  PrependMagickMethod(MonitorComponentTerminus)
 #define MontageImageList  PrependMagickMethod(MontageImageList)
@@ -717,6 +795,7 @@
 #define NewImageView  PrependMagickMethod(NewImageView)
 #define NewImageViewRegion  PrependMagickMethod(NewImageViewRegion)
 #define NewLinkedList  PrependMagickMethod(NewLinkedList)
+#define NewMagickImage  PrependMagickMethod(NewMagickImage)
 #define NewSplayTree  PrependMagickMethod(NewSplayTree)
 #define NewXMLTree  PrependMagickMethod(NewXMLTree)
 #define NewXMLTreeTag  PrependMagickMethod(NewXMLTreeTag)
@@ -726,6 +805,8 @@
 #define OpaquePaintImage  PrependMagickMethod(OpaquePaintImage)
 #define OpenBlob  PrependMagickMethod(OpenBlob)
 #define OpenDistributePixelCache  PrependMagickMethod(OpenDistributePixelCache)
+#define OpenModule  PrependMagickMethod(OpenModule)
+#define OpenModules  PrependMagickMethod(OpenModules)
 #define OpenStream  PrependMagickMethod(OpenStream)
 #define OptimizeImageLayers  PrependMagickMethod(OptimizeImageLayers)
 #define OptimizeImageTransparency  PrependMagickMethod(OptimizeImageTransparency)
@@ -758,7 +839,6 @@
 #define PrependImageToList  PrependMagickMethod(PrependImageToList)
 #define PreviewImage  PrependMagickMethod(PreviewImage)
 #define PrintStringInfo  PrependMagickMethod(PrintStringInfo)
-#define process_message  PrependMagickMethod(process_message)
 #define ProfileImage  PrependMagickMethod(ProfileImage)
 #define PruneTagFromXMLTree  PrependMagickMethod(PruneTagFromXMLTree)
 #define QuantizeImage  PrependMagickMethod(QuantizeImage)
@@ -798,141 +878,21 @@
 #define ReadImage  PrependMagickMethod(ReadImage)
 #define ReadImages  PrependMagickMethod(ReadImages)
 #define ReadInlineImage  PrependMagickMethod(ReadInlineImage)
-#define ReadPSDLayers  PrependMagickMethod(ReadPSDLayers)
 #define ReadStream  PrependMagickMethod(ReadStream)
 #define ReferenceBlob  PrependMagickMethod(ReferenceBlob)
 #define ReferenceImage  PrependMagickMethod(ReferenceImage)
 #define ReferencePixelCache  PrependMagickMethod(ReferencePixelCache)
-#define RegisterAAIImage  PrependMagickMethod(RegisterAAIImage)
-#define RegisterARTImage  PrependMagickMethod(RegisterARTImage)
-#define RegisterAVSImage  PrependMagickMethod(RegisterAVSImage)
-#define RegisterBGRImage  PrependMagickMethod(RegisterBGRImage)
-#define RegisterBMPImage  PrependMagickMethod(RegisterBMPImage)
-#define RegisterBRAILLEImage  PrependMagickMethod(RegisterBRAILLEImage)
-#define RegisterCALSImage  PrependMagickMethod(RegisterCALSImage)
-#define RegisterCAPTIONImage  PrependMagickMethod(RegisterCAPTIONImage)
-#define RegisterCINImage  PrependMagickMethod(RegisterCINImage)
-#define RegisterCIPImage  PrependMagickMethod(RegisterCIPImage)
-#define RegisterCLIPImage  PrependMagickMethod(RegisterCLIPImage)
-#define RegisterCMYKImage  PrependMagickMethod(RegisterCMYKImage)
-#define RegisterCUBEImage  PrependMagickMethod(RegisterCUBEImage)
-#define RegisterCUTImage  PrependMagickMethod(RegisterCUTImage)
-#define RegisterDCMImage  PrependMagickMethod(RegisterDCMImage)
-#define RegisterDDSImage  PrependMagickMethod(RegisterDDSImage)
-#define RegisterDEBUGImage  PrependMagickMethod(RegisterDEBUGImage)
-#define RegisterDIBImage  PrependMagickMethod(RegisterDIBImage)
-#define RegisterDJVUImage  PrependMagickMethod(RegisterDJVUImage)
-#define RegisterDNGImage  PrependMagickMethod(RegisterDNGImage)
-#define RegisterDOTImage  PrependMagickMethod(RegisterDOTImage)
-#define RegisterDPXImage  PrependMagickMethod(RegisterDPXImage)
-#define RegisterEPTImage  PrependMagickMethod(RegisterEPTImage)
-#define RegisterEXRImage  PrependMagickMethod(RegisterEXRImage)
-#define RegisterFAXImage  PrependMagickMethod(RegisterFAXImage)
-#define RegisterFITSImage  PrependMagickMethod(RegisterFITSImage)
-#define RegisterGIFImage  PrependMagickMethod(RegisterGIFImage)
-#define RegisterGRADIENTImage  PrependMagickMethod(RegisterGRADIENTImage)
-#define RegisterGRAYImage  PrependMagickMethod(RegisterGRAYImage)
-#define RegisterHALDImage  PrependMagickMethod(RegisterHALDImage)
-#define RegisterHDRImage  PrependMagickMethod(RegisterHDRImage)
-#define RegisterHEICImage  PrependMagickMethod(RegisterHEICImage)
-#define RegisterHISTOGRAMImage  PrependMagickMethod(RegisterHISTOGRAMImage)
-#define RegisterHRZImage  PrependMagickMethod(RegisterHRZImage)
-#define RegisterHTMLImage  PrependMagickMethod(RegisterHTMLImage)
-#define RegisterICONImage  PrependMagickMethod(RegisterICONImage)
-#define RegisterINFOImage  PrependMagickMethod(RegisterINFOImage)
-#define RegisterINLINEImage  PrependMagickMethod(RegisterINLINEImage)
-#define RegisterIPLImage  PrependMagickMethod(RegisterIPLImage)
-#define RegisterJBIGImage  PrependMagickMethod(RegisterJBIGImage)
-#define RegisterJNXImage  PrependMagickMethod(RegisterJNXImage)
-#define RegisterJP2Image  PrependMagickMethod(RegisterJP2Image)
-#define RegisterJPEGImage  PrependMagickMethod(RegisterJPEGImage)
-#define RegisterJSONImage  PrependMagickMethod(RegisterJSONImage)
-#define RegisterLABELImage  PrependMagickMethod(RegisterLABELImage)
-#define RegisterMACImage  PrependMagickMethod(RegisterMACImage)
-#define RegisterMAPImage  PrependMagickMethod(RegisterMAPImage)
-#define RegisterMASKImage  PrependMagickMethod(RegisterMASKImage)
-#define RegisterMATImage  PrependMagickMethod(RegisterMATImage)
-#define RegisterMATTEImage  PrependMagickMethod(RegisterMATTEImage)
-#define RegisterMETAImage  PrependMagickMethod(RegisterMETAImage)
-#define RegisterMIFFImage  PrependMagickMethod(RegisterMIFFImage)
-#define RegisterMONOImage  PrependMagickMethod(RegisterMONOImage)
-#define RegisterMPCImage  PrependMagickMethod(RegisterMPCImage)
-#define RegisterMPEGImage  PrependMagickMethod(RegisterMPEGImage)
-#define RegisterMPRImage  PrependMagickMethod(RegisterMPRImage)
-#define RegisterMSLImage  PrependMagickMethod(RegisterMSLImage)
-#define RegisterMTVImage  PrependMagickMethod(RegisterMTVImage)
-#define RegisterMVGImage  PrependMagickMethod(RegisterMVGImage)
-#define RegisterNULLImage  PrependMagickMethod(RegisterNULLImage)
-#define RegisterOTBImage  PrependMagickMethod(RegisterOTBImage)
-#define RegisterPALMImage  PrependMagickMethod(RegisterPALMImage)
-#define RegisterPANGOImage  PrependMagickMethod(RegisterPANGOImage)
-#define RegisterPATTERNImage  PrependMagickMethod(RegisterPATTERNImage)
-#define RegisterPCDImage  PrependMagickMethod(RegisterPCDImage)
-#define RegisterPCLImage  PrependMagickMethod(RegisterPCLImage)
-#define RegisterPCXImage  PrependMagickMethod(RegisterPCXImage)
-#define RegisterPDBImage  PrependMagickMethod(RegisterPDBImage)
-#define RegisterPDFImage  PrependMagickMethod(RegisterPDFImage)
-#define RegisterPESImage  PrependMagickMethod(RegisterPESImage)
-#define RegisterPGXImage  PrependMagickMethod(RegisterPGXImage)
-#define RegisterPICTImage  PrependMagickMethod(RegisterPICTImage)
-#define RegisterPIXImage  PrependMagickMethod(RegisterPIXImage)
-#define RegisterPLASMAImage  PrependMagickMethod(RegisterPLASMAImage)
-#define RegisterPNGImage  PrependMagickMethod(RegisterPNGImage)
-#define RegisterPNMImage  PrependMagickMethod(RegisterPNMImage)
-#define RegisterPS2Image  PrependMagickMethod(RegisterPS2Image)
-#define RegisterPS3Image  PrependMagickMethod(RegisterPS3Image)
-#define RegisterPSDImage  PrependMagickMethod(RegisterPSDImage)
-#define RegisterPSImage  PrependMagickMethod(RegisterPSImage)
-#define RegisterPWPImage  PrependMagickMethod(RegisterPWPImage)
-#define RegisterRAWImage  PrependMagickMethod(RegisterRAWImage)
-#define RegisterRGBImage  PrependMagickMethod(RegisterRGBImage)
-#define RegisterRGFImage  PrependMagickMethod(RegisterRGFImage)
-#define RegisterRLAImage  PrependMagickMethod(RegisterRLAImage)
-#define RegisterRLEImage  PrependMagickMethod(RegisterRLEImage)
-#define RegisterSCREENSHOTImage  PrependMagickMethod(RegisterSCREENSHOTImage)
-#define RegisterSCRImage  PrependMagickMethod(RegisterSCRImage)
-#define RegisterSCTImage  PrependMagickMethod(RegisterSCTImage)
-#define RegisterSFWImage  PrependMagickMethod(RegisterSFWImage)
-#define RegisterSGIImage  PrependMagickMethod(RegisterSGIImage)
-#define RegisterSIXELImage  PrependMagickMethod(RegisterSIXELImage)
+#define RegisterMagickInfo  PrependMagickMethod(RegisterMagickInfo)
 #define RegisterStaticModule  PrependMagickMethod(RegisterStaticModule)
 #define RegisterStaticModules  PrependMagickMethod(RegisterStaticModules)
-#define RegisterSTEGANOImage  PrependMagickMethod(RegisterSTEGANOImage)
-#define RegisterSUNImage  PrependMagickMethod(RegisterSUNImage)
-#define RegisterSVGImage  PrependMagickMethod(RegisterSVGImage)
-#define RegisterTGAImage  PrependMagickMethod(RegisterTGAImage)
-#define RegisterTHUMBNAILImage  PrependMagickMethod(RegisterTHUMBNAILImage)
-#define RegisterTIFFImage  PrependMagickMethod(RegisterTIFFImage)
-#define RegisterTILEImage  PrependMagickMethod(RegisterTILEImage)
-#define RegisterTIMImage  PrependMagickMethod(RegisterTIMImage)
-#define RegisterTTFImage  PrependMagickMethod(RegisterTTFImage)
-#define RegisterTXTImage  PrependMagickMethod(RegisterTXTImage)
-#define RegisterUILImage  PrependMagickMethod(RegisterUILImage)
 #define RegisterUndefinedImage  PrependMagickMethod(RegisterUndefinedImage)
-#define RegisterURLImage  PrependMagickMethod(RegisterURLImage)
-#define RegisterUYVYImage  PrependMagickMethod(RegisterUYVYImage)
-#define RegisterVICARImage  PrependMagickMethod(RegisterVICARImage)
-#define RegisterVIDImage  PrependMagickMethod(RegisterVIDImage)
-#define RegisterVIFFImage  PrependMagickMethod(RegisterVIFFImage)
-#define RegisterVIPSImage  PrependMagickMethod(RegisterVIPSImage)
-#define RegisterWBMPImage  PrependMagickMethod(RegisterWBMPImage)
-#define RegisterWEBPImage  PrependMagickMethod(RegisterWEBPImage)
-#define RegisterWMFImage  PrependMagickMethod(RegisterWMFImage)
-#define RegisterWPGImage  PrependMagickMethod(RegisterWPGImage)
-#define RegisterXBMImage  PrependMagickMethod(RegisterXBMImage)
-#define RegisterXCFImage  PrependMagickMethod(RegisterXCFImage)
-#define RegisterXCImage  PrependMagickMethod(RegisterXCImage)
-#define RegisterXImage  PrependMagickMethod(RegisterXImage)
-#define RegisterXPMImage  PrependMagickMethod(RegisterXPMImage)
-#define RegisterXPSImage  PrependMagickMethod(RegisterXPSImage)
-#define RegisterXTRNImage  PrependMagickMethod(RegisterXTRNImage)
-#define RegisterXWDImage  PrependMagickMethod(RegisterXWDImage)
-#define RegisterYCBCRImage  PrependMagickMethod(RegisterYCBCRImage)
-#define RegisterYUVImage  PrependMagickMethod(RegisterYUVImage)
 #define RegistryComponentGenesis  PrependMagickMethod(RegistryComponentGenesis)
 #define RegistryComponentTerminus  PrependMagickMethod(RegistryComponentTerminus)
 #define RelinquishAlignedMemory  PrependMagickMethod(RelinquishAlignedMemory)
 #define RelinquishDistributePixelCache  PrependMagickMethod(RelinquishDistributePixelCache)
+#define RelinquishMagickMatrix  PrependMagickMethod(RelinquishMagickMatrix)
+#define RelinquishMagickMemory  PrependMagickMethod(RelinquishMagickMemory)
+#define RelinquishMagickResource  PrependMagickMethod(RelinquishMagickResource)
 #define RelinquishSemaphoreInfo  PrependMagickMethod(RelinquishSemaphoreInfo)
 #define RelinquishUniqueFileResource  PrependMagickMethod(RelinquishUniqueFileResource)
 #define RelinquishVirtualMemory  PrependMagickMethod(RelinquishVirtualMemory)
@@ -968,6 +928,8 @@
 #define ResetImagePropertyIterator  PrependMagickMethod(ResetImagePropertyIterator)
 #define ResetImageRegistryIterator  PrependMagickMethod(ResetImageRegistryIterator)
 #define ResetLinkedListIterator  PrependMagickMethod(ResetLinkedListIterator)
+#define ResetMagickMemory  PrependMagickMethod(ResetMagickMemory)
+#define ResetMagickPrecision  PrependMagickMethod(ResetMagickPrecision)
 #define ResetMaxMemoryRequest  PrependMagickMethod(ResetMaxMemoryRequest)
 #define ResetPixelCacheChannels  PrependMagickMethod(ResetPixelCacheChannels)
 #define ResetPixelCacheEpoch  PrependMagickMethod(ResetPixelCacheEpoch)
@@ -979,6 +941,7 @@
 #define ResetTimer  PrependMagickMethod(ResetTimer)
 #define ResetVirtualAnonymousMemory  PrependMagickMethod(ResetVirtualAnonymousMemory)
 #define ResizeImage  PrependMagickMethod(ResizeImage)
+#define ResizeMagickMemory  PrependMagickMethod(ResizeMagickMemory)
 #define ResizeQuantumMemory  PrependMagickMethod(ResizeQuantumMemory)
 #define ResourceComponentGenesis  PrependMagickMethod(ResourceComponentGenesis)
 #define ResourceComponentTerminus  PrependMagickMethod(ResourceComponentTerminus)
@@ -1049,6 +1012,13 @@
 #define SetLogFormat  PrependMagickMethod(SetLogFormat)
 #define SetLogMethod  PrependMagickMethod(SetLogMethod)
 #define SetLogName  PrependMagickMethod(SetLogName)
+#define SetMagickAlignedMemoryMethods  PrependMagickMethod(SetMagickAlignedMemoryMethods)
+#define SetMagickMemoryMethods  PrependMagickMethod(SetMagickMemoryMethods)
+#define SetMagickPrecision  PrependMagickMethod(SetMagickPrecision)
+#define SetMagickResourceLimit  PrependMagickMethod(SetMagickResourceLimit)
+#define SetMagickSecurityPolicy  PrependMagickMethod(SetMagickSecurityPolicy)
+#define SetMagickSecurityPolicyValue  PrependMagickMethod(SetMagickSecurityPolicyValue)
+#define SetMagickThreadValue  PrependMagickMethod(SetMagickThreadValue)
 #define SetMatrixElement  PrependMagickMethod(SetMatrixElement)
 #define SetOpenCLDeviceEnabled  PrependMagickMethod(SetOpenCLDeviceEnabled)
 #define SetOpenCLEnabled  PrependMagickMethod(SetOpenCLEnabled)
@@ -1096,8 +1066,6 @@
 #define SigmoidalContrastImage  PrependMagickMethod(SigmoidalContrastImage)
 #define SignatureImage  PrependMagickMethod(SignatureImage)
 #define SimilarityImage  PrependMagickMethod(SimilarityImage)
-#define sixel_decode  PrependMagickMethod(sixel_decode)
-#define sixel_output_create  PrependMagickMethod(sixel_output_create)
 #define SketchImage  PrependMagickMethod(SketchImage)
 #define SmushImages  PrependMagickMethod(SmushImages)
 #define SolarizeImage  PrependMagickMethod(SolarizeImage)
@@ -1139,9 +1107,12 @@
 #define SyncNextImageInList  PrependMagickMethod(SyncNextImageInList)
 #define TellBlob  PrependMagickMethod(TellBlob)
 #define TextureImage  PrependMagickMethod(TextureImage)
+#define ThrowMagickExceptionList  PrependMagickMethod(ThrowMagickExceptionList)
+#define ThrowMagickException  PrependMagickMethod(ThrowMagickException)
 #define ThumbnailImage  PrependMagickMethod(ThumbnailImage)
 #define TintImage  PrependMagickMethod(TintImage)
 #define Tokenizer  PrependMagickMethod(Tokenizer)
+#define TraceConvexHull  PrependMagickMethod(TraceConvexHull)
 #define TransferImageViewIterator  PrependMagickMethod(TransferImageViewIterator)
 #define TransformImageColorspace  PrependMagickMethod(TransformImageColorspace)
 #define TransformImage  PrependMagickMethod(TransformImage)
@@ -1156,132 +1127,10 @@
 #define UnityAddKernelInfo  PrependMagickMethod(UnityAddKernelInfo)
 #define UnlockSemaphoreInfo  PrependMagickMethod(UnlockSemaphoreInfo)
 #define UnmapBlob  PrependMagickMethod(UnmapBlob)
-#define UnregisterAAIImage  PrependMagickMethod(UnregisterAAIImage)
-#define UnregisterARTImage  PrependMagickMethod(UnregisterARTImage)
-#define UnregisterAVSImage  PrependMagickMethod(UnregisterAVSImage)
-#define UnregisterBGRImage  PrependMagickMethod(UnregisterBGRImage)
-#define UnregisterBMPImage  PrependMagickMethod(UnregisterBMPImage)
-#define UnregisterBRAILLEImage  PrependMagickMethod(UnregisterBRAILLEImage)
-#define UnregisterCALSImage  PrependMagickMethod(UnregisterCALSImage)
-#define UnregisterCAPTIONImage  PrependMagickMethod(UnregisterCAPTIONImage)
-#define UnregisterCINImage  PrependMagickMethod(UnregisterCINImage)
-#define UnregisterCIPImage  PrependMagickMethod(UnregisterCIPImage)
-#define UnregisterCLIPImage  PrependMagickMethod(UnregisterCLIPImage)
-#define UnregisterCMYKImage  PrependMagickMethod(UnregisterCMYKImage)
-#define UnregisterCUBEImage  PrependMagickMethod(UnregisterCUBEImage)
-#define UnregisterCUTImage  PrependMagickMethod(UnregisterCUTImage)
-#define UnregisterDCMImage  PrependMagickMethod(UnregisterDCMImage)
-#define UnregisterDDSImage  PrependMagickMethod(UnregisterDDSImage)
-#define UnregisterDEBUGImage  PrependMagickMethod(UnregisterDEBUGImage)
-#define UnregisterDIBImage  PrependMagickMethod(UnregisterDIBImage)
-#define UnregisterDJVUImage  PrependMagickMethod(UnregisterDJVUImage)
-#define UnregisterDNGImage  PrependMagickMethod(UnregisterDNGImage)
-#define UnregisterDOTImage  PrependMagickMethod(UnregisterDOTImage)
-#define UnregisterDPXImage  PrependMagickMethod(UnregisterDPXImage)
-#define UnregisterEPTImage  PrependMagickMethod(UnregisterEPTImage)
-#define UnregisterEXRImage  PrependMagickMethod(UnregisterEXRImage)
-#define UnregisterFAXImage  PrependMagickMethod(UnregisterFAXImage)
-#define UnregisterFITSImage  PrependMagickMethod(UnregisterFITSImage)
-#define UnregisterGIFImage  PrependMagickMethod(UnregisterGIFImage)
-#define UnregisterGRADIENTImage  PrependMagickMethod(UnregisterGRADIENTImage)
-#define UnregisterGRAYImage  PrependMagickMethod(UnregisterGRAYImage)
-#define UnregisterHALDImage  PrependMagickMethod(UnregisterHALDImage)
-#define UnregisterHDRImage  PrependMagickMethod(UnregisterHDRImage)
-#define UnregisterHEICImage  PrependMagickMethod(UnregisterHEICImage)
-#define UnregisterHISTOGRAMImage  PrependMagickMethod(UnregisterHISTOGRAMImage)
-#define UnregisterHRZImage  PrependMagickMethod(UnregisterHRZImage)
-#define UnregisterHTMLImage  PrependMagickMethod(UnregisterHTMLImage)
-#define UnregisterICONImage  PrependMagickMethod(UnregisterICONImage)
-#define UnregisterINFOImage  PrependMagickMethod(UnregisterINFOImage)
-#define UnregisterINLINEImage  PrependMagickMethod(UnregisterINLINEImage)
-#define UnregisterIPLImage  PrependMagickMethod(UnregisterIPLImage)
-#define UnregisterJBIGImage  PrependMagickMethod(UnregisterJBIGImage)
-#define UnregisterJNXImage  PrependMagickMethod(UnregisterJNXImage)
-#define UnregisterJP2Image  PrependMagickMethod(UnregisterJP2Image)
-#define UnregisterJPEGImage  PrependMagickMethod(UnregisterJPEGImage)
-#define UnregisterJSONImage  PrependMagickMethod(UnregisterJSONImage)
-#define UnregisterLABELImage  PrependMagickMethod(UnregisterLABELImage)
-#define UnregisterMACImage  PrependMagickMethod(UnregisterMACImage)
-#define UnregisterMAPImage  PrependMagickMethod(UnregisterMAPImage)
-#define UnregisterMASKImage  PrependMagickMethod(UnregisterMASKImage)
-#define UnregisterMATImage  PrependMagickMethod(UnregisterMATImage)
-#define UnregisterMATTEImage  PrependMagickMethod(UnregisterMATTEImage)
-#define UnregisterMETAImage  PrependMagickMethod(UnregisterMETAImage)
-#define UnregisterMIFFImage  PrependMagickMethod(UnregisterMIFFImage)
-#define UnregisterMONOImage  PrependMagickMethod(UnregisterMONOImage)
-#define UnregisterMPCImage  PrependMagickMethod(UnregisterMPCImage)
-#define UnregisterMPEGImage  PrependMagickMethod(UnregisterMPEGImage)
-#define UnregisterMPRImage  PrependMagickMethod(UnregisterMPRImage)
-#define UnregisterMSLImage  PrependMagickMethod(UnregisterMSLImage)
-#define UnregisterMTVImage  PrependMagickMethod(UnregisterMTVImage)
-#define UnregisterMVGImage  PrependMagickMethod(UnregisterMVGImage)
-#define UnregisterNULLImage  PrependMagickMethod(UnregisterNULLImage)
-#define UnregisterOTBImage  PrependMagickMethod(UnregisterOTBImage)
-#define UnregisterPALMImage  PrependMagickMethod(UnregisterPALMImage)
-#define UnregisterPANGOImage  PrependMagickMethod(UnregisterPANGOImage)
-#define UnregisterPATTERNImage  PrependMagickMethod(UnregisterPATTERNImage)
-#define UnregisterPCDImage  PrependMagickMethod(UnregisterPCDImage)
-#define UnregisterPCLImage  PrependMagickMethod(UnregisterPCLImage)
-#define UnregisterPCXImage  PrependMagickMethod(UnregisterPCXImage)
-#define UnregisterPDBImage  PrependMagickMethod(UnregisterPDBImage)
-#define UnregisterPDFImage  PrependMagickMethod(UnregisterPDFImage)
-#define UnregisterPESImage  PrependMagickMethod(UnregisterPESImage)
-#define UnregisterPGXImage  PrependMagickMethod(UnregisterPGXImage)
-#define UnregisterPICTImage  PrependMagickMethod(UnregisterPICTImage)
-#define UnregisterPIXImage  PrependMagickMethod(UnregisterPIXImage)
-#define UnregisterPLASMAImage  PrependMagickMethod(UnregisterPLASMAImage)
-#define UnregisterPNGImage  PrependMagickMethod(UnregisterPNGImage)
-#define UnregisterPNMImage  PrependMagickMethod(UnregisterPNMImage)
-#define UnregisterPS2Image  PrependMagickMethod(UnregisterPS2Image)
-#define UnregisterPS3Image  PrependMagickMethod(UnregisterPS3Image)
-#define UnregisterPSDImage  PrependMagickMethod(UnregisterPSDImage)
-#define UnregisterPSImage  PrependMagickMethod(UnregisterPSImage)
-#define UnregisterPWPImage  PrependMagickMethod(UnregisterPWPImage)
-#define UnregisterRAWImage  PrependMagickMethod(UnregisterRAWImage)
-#define UnregisterRGBImage  PrependMagickMethod(UnregisterRGBImage)
-#define UnregisterRGFImage  PrependMagickMethod(UnregisterRGFImage)
-#define UnregisterRLAImage  PrependMagickMethod(UnregisterRLAImage)
-#define UnregisterRLEImage  PrependMagickMethod(UnregisterRLEImage)
-#define UnregisterSCREENSHOTImage  PrependMagickMethod(UnregisterSCREENSHOTImage)
-#define UnregisterSCRImage  PrependMagickMethod(UnregisterSCRImage)
-#define UnregisterSCTImage  PrependMagickMethod(UnregisterSCTImage)
-#define UnregisterSFWImage  PrependMagickMethod(UnregisterSFWImage)
-#define UnregisterSGIImage  PrependMagickMethod(UnregisterSGIImage)
-#define UnregisterSIXELImage  PrependMagickMethod(UnregisterSIXELImage)
+#define UnregisterMagickInfo  PrependMagickMethod(UnregisterMagickInfo)
 #define UnregisterStaticModule  PrependMagickMethod(UnregisterStaticModule)
 #define UnregisterStaticModules  PrependMagickMethod(UnregisterStaticModules)
-#define UnregisterSTEGANOImage  PrependMagickMethod(UnregisterSTEGANOImage)
-#define UnregisterSUNImage  PrependMagickMethod(UnregisterSUNImage)
-#define UnregisterSVGImage  PrependMagickMethod(UnregisterSVGImage)
-#define UnregisterTGAImage  PrependMagickMethod(UnregisterTGAImage)
-#define UnregisterTHUMBNAILImage  PrependMagickMethod(UnregisterTHUMBNAILImage)
-#define UnregisterTIFFImage  PrependMagickMethod(UnregisterTIFFImage)
-#define UnregisterTILEImage  PrependMagickMethod(UnregisterTILEImage)
-#define UnregisterTIMImage  PrependMagickMethod(UnregisterTIMImage)
-#define UnregisterTTFImage  PrependMagickMethod(UnregisterTTFImage)
-#define UnregisterTXTImage  PrependMagickMethod(UnregisterTXTImage)
-#define UnregisterUILImage  PrependMagickMethod(UnregisterUILImage)
 #define UnregisterUndefinedImage  PrependMagickMethod(UnregisterUndefinedImage)
-#define UnregisterURLImage  PrependMagickMethod(UnregisterURLImage)
-#define UnregisterUYVYImage  PrependMagickMethod(UnregisterUYVYImage)
-#define UnregisterVICARImage  PrependMagickMethod(UnregisterVICARImage)
-#define UnregisterVIDImage  PrependMagickMethod(UnregisterVIDImage)
-#define UnregisterVIFFImage  PrependMagickMethod(UnregisterVIFFImage)
-#define UnregisterVIPSImage  PrependMagickMethod(UnregisterVIPSImage)
-#define UnregisterWBMPImage  PrependMagickMethod(UnregisterWBMPImage)
-#define UnregisterWEBPImage  PrependMagickMethod(UnregisterWEBPImage)
-#define UnregisterWMFImage  PrependMagickMethod(UnregisterWMFImage)
-#define UnregisterWPGImage  PrependMagickMethod(UnregisterWPGImage)
-#define UnregisterXBMImage  PrependMagickMethod(UnregisterXBMImage)
-#define UnregisterXCFImage  PrependMagickMethod(UnregisterXCFImage)
-#define UnregisterXCImage  PrependMagickMethod(UnregisterXCImage)
-#define UnregisterXImage  PrependMagickMethod(UnregisterXImage)
-#define UnregisterXPMImage  PrependMagickMethod(UnregisterXPMImage)
-#define UnregisterXPSImage  PrependMagickMethod(UnregisterXPSImage)
-#define UnregisterXTRNImage  PrependMagickMethod(UnregisterXTRNImage)
-#define UnregisterXWDImage  PrependMagickMethod(UnregisterXWDImage)
-#define UnregisterYCBCRImage  PrependMagickMethod(UnregisterYCBCRImage)
-#define UnregisterYUVImage  PrependMagickMethod(UnregisterYUVImage)
 #define UnsharpMaskImage  PrependMagickMethod(UnsharpMaskImage)
 #define UpdateImageViewIterator  PrependMagickMethod(UpdateImageViewIterator)
 #define UpdateSignature  PrependMagickMethod(UpdateSignature)
@@ -1308,7 +1157,6 @@
 #define WriteDistributePixelCachePixels  PrependMagickMethod(WriteDistributePixelCachePixels)
 #define WriteImage  PrependMagickMethod(WriteImage)
 #define WriteImages  PrependMagickMethod(WriteImages)
-#define WritePSDLayers  PrependMagickMethod(WritePSDLayers)
 #define WriteStream  PrependMagickMethod(WriteStream)
 #define XAnimateBackgroundImage  PrependMagickMethod(XAnimateBackgroundImage)
 #define XAnimateImages  PrependMagickMethod(XAnimateImages)
@@ -1358,6 +1206,7 @@
 #define XInfoWidget  PrependMagickMethod(XInfoWidget)
 #define XInitializeWindows  PrependMagickMethod(XInitializeWindows)
 #define XListBrowserWidget  PrependMagickMethod(XListBrowserWidget)
+#define XMagickProgressMonitor  PrependMagickMethod(XMagickProgressMonitor)
 #define XMakeCursor  PrependMagickMethod(XMakeCursor)
 #define XMakeImage  PrependMagickMethod(XMakeImage)
 #define XMakeMagnifyImage  PrependMagickMethod(XMakeMagnifyImage)
diff --git a/MagickCore/option.c b/MagickCore/option.c
index 621ee6c..be4f83f 100644
--- a/MagickCore/option.c
+++ b/MagickCore/option.c
@@ -1304,6 +1304,7 @@
   DistortOptions[] =
   {
     { "Affine", AffineDistortion, UndefinedOptionFlag, MagickFalse },
+    { "RigidAffine", RigidAffineDistortion, UndefinedOptionFlag, MagickFalse },
     { "AffineProjection", AffineProjectionDistortion, UndefinedOptionFlag, MagickFalse },
     { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
     { "SRT", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
diff --git a/MagickCore/profile.c b/MagickCore/profile.c
index 2be4cce..bf5f26f 100644
--- a/MagickCore/profile.c
+++ b/MagickCore/profile.c
@@ -536,7 +536,7 @@
   register ssize_t
     x;
 
-  p=source_info->pixels[id];
+  p=(double *) source_info->pixels[id];
   for (x=0; x < (ssize_t) image->columns; x++)
   {
     *p++=GetLCMSPixel(source_info,GetPixelRed(image,q));
@@ -551,7 +551,7 @@
   }
   cmsDoTransform(transform[id],source_info->pixels[id],
     target_info->pixels[id],(unsigned int) image->columns);
-  p=target_info->pixels[id];
+  p=(double *) target_info->pixels[id];
   q-=GetPixelChannels(image)*image->columns;
   for (x=0; x < (ssize_t) image->columns; x++)
   {
@@ -586,7 +586,7 @@
   register ssize_t
     x;
 
-  p=source_info->pixels[id];
+  p=(Quantum *) source_info->pixels[id];
   for (x=0; x < (ssize_t) image->columns; x++)
   {
     *p++=GetPixelRed(image,q);
@@ -601,7 +601,7 @@
   }
   cmsDoTransform(transform[id],source_info->pixels[id],
     target_info->pixels[id],(unsigned int) image->columns);
-  p=target_info->pixels[id];
+  p=(Quantum *) target_info->pixels[id];
   q-=GetPixelChannels(image)*image->columns;
   for (x=0; x < (ssize_t) image->columns; x++)
   {
@@ -1081,11 +1081,8 @@
             if (IsStringFalse(artifact) != MagickFalse)
               highres=MagickFalse;
 #endif
-            if (highres != MagickFalse)
-              {
-                source_info.scale=1.0;
-                source_info.translate=0.0;
-              }
+            source_info.scale=1.0;
+            source_info.translate=0.0;
             source_info.colorspace=sRGBColorspace;
             source_info.channels=3;
             switch (cmsGetColorSpace(source_info.profile))
@@ -1181,11 +1178,8 @@
             signature=cmsGetPCS(source_info.profile);
             if (target_info.profile != (cmsHPROFILE) NULL)
               signature=cmsGetColorSpace(target_info.profile);
-            if (highres != MagickFalse)
-              {
-                target_info.scale=1.0;
-                target_info.translate=0.0;
-              }
+            target_info.scale=1.0;
+            target_info.translate=0.0;
             target_info.channels=3;
             switch (signature)
             {
diff --git a/MagickCore/quantize.c b/MagickCore/quantize.c
index 28422fe..2311c29 100644
--- a/MagickCore/quantize.c
+++ b/MagickCore/quantize.c
@@ -340,13 +340,12 @@
   AssignImageColors(Image *,CubeInfo *,ExceptionInfo *),
   ClassifyImageColors(CubeInfo *,const Image *,ExceptionInfo *),
   DitherImage(Image *,CubeInfo *,ExceptionInfo *),
-  SetGrayscaleImage(Image *,ExceptionInfo *);
-
-static size_t
-  DefineImageColormap(Image *,CubeInfo *,NodeInfo *);
+  SetGrayscaleImage(Image *,ExceptionInfo *),
+  SetImageColormap(Image *,CubeInfo *,ExceptionInfo *);
 
 static void
   ClosestColor(const Image *,CubeInfo *,const NodeInfo *),
+  DefineImageColormap(Image *,CubeInfo *,NodeInfo *),
   DestroyCubeInfo(CubeInfo *),
   PruneLevel(CubeInfo *,const NodeInfo *),
   PruneToCubeDepth(CubeInfo *,const NodeInfo *),
@@ -513,13 +512,10 @@
   if (cube_info->quantize_info->colorspace != UndefinedColorspace)
     (void) TransformImageColorspace(image,cube_info->quantize_info->colorspace,
       exception);
-  if (AcquireImageColormap(image,cube_info->colors,exception) == MagickFalse)
-    ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
-      image->filename);
-  image->colors=0;
   cube_info->transparent_pixels=0;
   cube_info->transparent_index=(-1);
-  (void) DefineImageColormap(image,cube_info,cube_info->root);
+  if (SetImageColormap(image,cube_info,exception) == MagickFalse)
+    return(MagickFalse);
   /*
     Create a reduced color image.
   */
@@ -1225,12 +1221,11 @@
 %
 %  DefineImageColormap() traverses the color cube tree and notes each colormap
 %  entry.  A colormap entry is any node in the color cube tree where the
-%  of unique colors is not zero.  DefineImageColormap() returns the number of
-%  colors in the image colormap.
+%  of unique colors is not zero.
 %
 %  The format of the DefineImageColormap method is:
 %
-%      size_t DefineImageColormap(Image *image,CubeInfo *cube_info,
+%      void DefineImageColormap(Image *image,CubeInfo *cube_info,
 %        NodeInfo *node_info)
 %
 %  A description of each parameter follows.
@@ -1243,7 +1238,7 @@
 %      node in the color cube tree that is to be pruned.
 %
 */
-static size_t DefineImageColormap(Image *image,CubeInfo *cube_info,
+static void DefineImageColormap(Image *image,CubeInfo *cube_info,
   NodeInfo *node_info)
 {
   register ssize_t
@@ -1258,7 +1253,7 @@
   number_children=cube_info->associate_alpha == MagickFalse ? 8UL : 16UL;
   for (i=0; i < (ssize_t) number_children; i++)
     if (node_info->child[i] != (NodeInfo *) NULL)
-      (void) DefineImageColormap(image,cube_info,node_info->child[i]);
+      DefineImageColormap(image,cube_info,node_info->child[i]);
   if (node_info->number_unique != 0)
     {
       register double
@@ -1321,7 +1316,6 @@
         }
       node_info->color_number=image->colors++;
     }
-  return(image->colors);
 }
 
 /*
@@ -2511,12 +2505,7 @@
         {
           if (cube_info->colors > cube_info->maximum_colors)
             ReduceImageColors(image,cube_info);
-          status=AcquireImageColormap(image,number_colors,exception);
-          if (status != MagickFalse)
-            {
-              image->colors=0;
-              (void) DefineImageColormap(image,cube_info,cube_info->root);
-            }
+          status=SetImageColormap(image,cube_info,exception);
         }
       DestroyCubeInfo(cube_info);
       quantize_info=DestroyQuantizeInfo(quantize_info);
@@ -3897,3 +3886,56 @@
     image->type=BilevelType;
   return(status);
 }
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
++   S e t I m a g e C o l o r m a p                                           %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  SetImageColormap() traverses the color cube tree and sets the colormap of
+%  the image.  A colormap entry is any node in the color cube tree where the
+%  of unique colors is not zero.
+%
+%  The format of the SetImageColormap method is:
+%
+%      MagickBooleanType SetImageColormap(Image *image,CubeInfo *cube_info,
+%        ExceptionInfo *node_info)
+%
+%  A description of each parameter follows.
+%
+%    o image: the image.
+%
+%    o cube_info: A pointer to the Cube structure.
+%
+%    o exception: return any errors or warnings in this structure.
+%
+*/
+
+MagickBooleanType SetImageColormap(Image *image,CubeInfo *cube_info,
+  ExceptionInfo *exception)
+{
+  size_t
+    number_colors;
+
+  number_colors=MagickMax(cube_info->maximum_colors,cube_info->colors);
+  if (AcquireImageColormap(image,number_colors,exception) == MagickFalse)
+    ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
+      image->filename);
+  image->colors=0;
+  DefineImageColormap(image,cube_info,cube_info->root);
+  if (image->colors != number_colors)
+    {
+      image->colormap=(PixelInfo *) ResizeQuantumMemory(image->colormap,
+        image->colors+1,sizeof(*image->colormap));
+      if (image->colormap == (PixelInfo *) NULL)
+        ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
+          image->filename);
+    }
+  return(MagickTrue);
+}
diff --git a/MagickCore/type.c b/MagickCore/type.c
index 367a45e..52c2470 100644
--- a/MagickCore/type.c
+++ b/MagickCore/type.c
@@ -491,7 +491,7 @@
   }
   if (type_info != (const TypeInfo *) NULL)
     {
-      (void) ThrowMagickException(exception,GetMagickModule(),TypeError,
+      (void) ThrowMagickException(exception,GetMagickModule(),TypeWarning,
         "FontSubstitutionRequired","`%s'",type_info->family);
       return(type_info);
     }
diff --git a/MagickCore/version.c b/MagickCore/version.c
index 1635588..4891797 100644
--- a/MagickCore/version.c
+++ b/MagickCore/version.c
@@ -561,7 +561,7 @@
   signature=MagickLibInterface;
   (void) memcpy(p,&signature,sizeof(signature));
   p+=sizeof(signature);
-  signature=1;  /* endianess */
+  signature=1;  /* endianness */
   (void) memcpy(p,&signature,sizeof(signature));
   p+=sizeof(signature);
   SetStringInfoLength(version,p-GetStringInfoDatum(version));
diff --git a/MagickCore/visual-effects.c b/MagickCore/visual-effects.c
index 43ca863..e8b13aa 100644
--- a/MagickCore/visual-effects.c
+++ b/MagickCore/visual-effects.c
@@ -3,11 +3,17 @@
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%                                 FFFFF  X   X                                %
-%                                 F       X X                                 %
-%                                 FFF      X                                  %
-%                                 F       X X                                 %
-%                                 F      X   X                                %
+%                   V   V  IIIII  SSSSS  U   U   AAA   L                      %
+%                   V   V    I    SS     U   U  A   A  L                      %
+%                   V   V    I     SSS   U   U  AAAAA  L                      %
+%                    V V     I       SS  U   U  A   A  L                      %
+%                     V    IIIII  SSSSS   UUU   A   A  LLLLL                  %
+%                                                                             %
+%                EEEEE  FFFFF  FFFFF  EEEEE  CCCC  TTTTT  SSSSS               %
+%                E      F      F      E     C        T    SS                  %
+%                EEE    FFF    FFF    EEE   C        T     SSS                %
+%                E      F      F      E     C        T       SS               %
+%                EEEEE  F      F      EEEEE  CCCC    T    SSSSS               %
 %                                                                             %
 %                                                                             %
 %                   MagickCore Image Special Effects Methods                  %
diff --git a/MagickWand/MagickWand-config b/MagickWand/MagickWand-config
index a38ebfd..dcf2edb 100755
--- a/MagickWand/MagickWand-config
+++ b/MagickWand/MagickWand-config
@@ -38,19 +38,19 @@
       echo '7.0.10 Q16 HDRI'
       ;;
     --cflags)
-      /usr/bin/pkg-config --cflags MagickWand
+      /usr/bin/pkg-config --cflags MagickWand-7.Q16HDRI
       ;;
     --cxxflags)
-      /usr/bin/pkg-config --cflags MagickWand
+      /usr/bin/pkg-config --cflags MagickWand-7.Q16HDRI
       ;;
     --cppflags)
-      /usr/bin/pkg-config --cflags MagickWand
+      /usr/bin/pkg-config --cflags MagickWand-7.Q16HDRI
       ;;
     --ldflags)
-      /usr/bin/pkg-config --libs MagickWand
+      /usr/bin/pkg-config --libs MagickWand-7.Q16HDRI
       ;;
     --libs)
-      /usr/bin/pkg-config --libs MagickWand
+      /usr/bin/pkg-config --libs MagickWand-7.Q16HDRI
       ;;
     *)
       echo "${usage}" 1>&2
diff --git a/Makefile.in b/Makefile.in
index d665609..14d1e3a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -261,7 +261,6 @@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_func_fseeko.m4 \
-	$(top_srcdir)/m4/ax_append_flag.m4 \
 	$(top_srcdir)/m4/ax_c___attribute__.m4 \
 	$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
@@ -275,6 +274,7 @@
 	$(top_srcdir)/m4/ax_lang_compiler_ms.m4 \
 	$(top_srcdir)/m4/ax_opencl.m4 \
 	$(top_srcdir)/m4/ax_prefix_config_h.m4 \
+	$(top_srcdir)/m4/ax_prepend_flag.m4 \
 	$(top_srcdir)/m4/ax_prog_perl_version.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 \
 	$(top_srcdir)/m4/ax_require_defined.m4 \
diff --git a/aclocal.m4 b/aclocal.m4
index 07f4071..dd4347f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1253,7 +1253,6 @@
 ]) # _AM_PROG_TAR
 
 m4_include([m4/ac_func_fseeko.m4])
-m4_include([m4/ax_append_flag.m4])
 m4_include([m4/ax_c___attribute__.m4])
 m4_include([m4/ax_cflags_warn_all.m4])
 m4_include([m4/ax_check_compile_flag.m4])
@@ -1267,6 +1266,7 @@
 m4_include([m4/ax_lang_compiler_ms.m4])
 m4_include([m4/ax_opencl.m4])
 m4_include([m4/ax_prefix_config_h.m4])
+m4_include([m4/ax_prepend_flag.m4])
 m4_include([m4/ax_prog_perl_version.m4])
 m4_include([m4/ax_pthread.m4])
 m4_include([m4/ax_require_defined.m4])
diff --git a/coders/caption.c b/coders/caption.c
index 75d3586..30c128c 100644
--- a/coders/caption.c
+++ b/coders/caption.c
@@ -250,7 +250,8 @@
             if (status == MagickFalse)
               break;
             width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
-            height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
+            height=(size_t) floor(metrics.height+draw_info->interline_spacing+
+              draw_info->stroke_width+0.5);
             if ((image->columns != 0) && (image->rows != 0))
               {
                 if ((width >= image->columns) && (height >= image->rows))
@@ -279,7 +280,8 @@
         if (status == MagickFalse)
           break;
         width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
-        height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
+        height=(size_t) floor(metrics.height+draw_info->interline_spacing+
+          draw_info->stroke_width+0.5);
         if ((image->columns != 0) && (image->rows != 0))
           {
             if ((width < image->columns) && (height < image->rows))
diff --git a/coders/dng.c b/coders/dng.c
index 03736c1..2a1f998 100644
--- a/coders/dng.c
+++ b/coders/dng.c
@@ -64,6 +64,7 @@
 #include "MagickCore/resource_.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
+#include "MagickCore/string-private.h"
 #include "MagickCore/module.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/utility.h"
@@ -310,6 +311,41 @@
   return(image);
 }
 
+#if defined(MAGICKCORE_RAW_R_DELEGATE)
+static void SetLibRawParams(const ImageInfo *image_info,Image *image,
+  libraw_data_t *raw_info)
+{
+  const char
+    *option;
+
+  raw_info->params.output_bps=16;
+  option=GetImageOption(image_info,"dng:use-camera-wb");
+  if (option == (const char *) NULL)
+    option=GetImageOption(image_info,"dng:use_camera_wb");
+  if (option != (const char *) NULL)
+    raw_info->params.use_camera_wb=IsStringTrue(option);
+  option=GetImageOption(image_info,"dng:use-auto-wb");
+  if (option == (const char *) NULL)
+    option=GetImageOption(image_info,"dng:use_auto_wb");
+  if (option != (const char *) NULL)
+    raw_info->params.use_auto_wb=IsStringTrue(option);
+  option=GetImageOption(image_info,"dng:no-auto-bright");
+  if (option == (const char *) NULL)
+    option=GetImageOption(image_info,"dng:no_auto_bright");
+  if (option != (const char *) NULL)
+    raw_info->params.no_auto_bright=IsStringTrue(option);
+  option=GetImageOption(image_info,"dng:output-color");
+  if (option == (const char *) NULL)
+    option=GetImageOption(image_info,"dng:output_color");
+  if (option != (const char *) NULL)
+    {
+      raw_info->params.output_color=StringToInteger(option);
+      if (raw_info->params.output_color == 5)
+        image->colorspace=XYZColorspace;
+    }
+}
+#endif
+
 static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
 {
   Image
@@ -367,8 +403,6 @@
         libraw_close(raw_info);
         return(DestroyImageList(image));
       }
-    raw_info->params.use_camera_wb=IsStringTrue(GetImageOption(image_info,
-      "dng:use_camera_wb"));
 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_MSC_VER) && (_MSC_VER > 1310)
     {
       wchar_t
@@ -413,7 +447,7 @@
         libraw_close(raw_info);
         return(DestroyImageList(image));
       }
-    raw_info->params.output_bps=16;
+    SetLibRawParams(image_info,image,raw_info);
     errcode=libraw_dcraw_process(raw_info);
     if (errcode != LIBRAW_SUCCESS)
       {
diff --git a/coders/dpx.c b/coders/dpx.c
index cffe235..d18e8b3 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -1126,8 +1126,11 @@
     if (ReadBlobByte(image) == EOF)
       break;
   if (EOFBlob(image) != MagickFalse)
-    ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
-      image->filename);
+    {
+      ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+        image->filename);
+      return(DestroyImageList(image));
+    }
   if (image_info->ping != MagickFalse)
     {
       (void) CloseBlob(image);
diff --git a/coders/gif.c b/coders/gif.c
index d9a140b..f2aa600 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -1272,11 +1272,10 @@
     local_colors=BitSet((int) flag,0x80) == 0 ? global_colors : one <<
       ((size_t) (flag & 0x07)+1);
     image->colors=local_colors;
-    if (opacity >= (ssize_t) image->colors)
-      {
-        image->colors++;
-        opacity=(-1);
-      }
+    if (opacity == (ssize_t) image->colors)
+      image->colors++;
+    else if (opacity > (ssize_t) image->colors)
+      opacity=(-1);
     image->ticks_per_second=100;
     image->alpha_trait=opacity >= 0 ? BlendPixelTrait : UndefinedPixelTrait;
     if ((image->columns == 0) || (image->rows == 0))
diff --git a/coders/heic.c b/coders/heic.c
index 6aee9b3..3f36d5c 100644
--- a/coders/heic.c
+++ b/coders/heic.c
@@ -258,15 +258,13 @@
   Image *image,struct heif_context *heif_context,heif_item_id image_id,
   ExceptionInfo *exception)
 {
-  const char
-    *option;
-
   int
     stride_y,
     stride_cb,
     stride_cr;
 
   MagickBooleanType
+    preserve_orientation,
     status;
 
   ssize_t
@@ -308,6 +306,10 @@
   image->depth=8;
   image->columns=(size_t) heif_image_handle_get_width(image_handle);
   image->rows=(size_t) heif_image_handle_get_height(image_handle);
+  preserve_orientation=IsStringTrue(GetImageOption(image_info,
+    "heic:preserve-orientation"));
+  if (preserve_orientation == MagickFalse)
+    (void) SetImageProperty(image,"exif:Orientation","1",exception);
   if (image_info->ping != MagickFalse)
     {
       image->colorspace=YCbCrColorspace;
@@ -330,14 +332,11 @@
   */
   (void) SetImageColorspace(image,YCbCrColorspace,exception);
   decode_options=(struct heif_decoding_options *) NULL;
-  option=GetImageOption(image_info,"heic:preserve-orientation");
-  if (IsStringTrue(option) == MagickTrue)
+  if (preserve_orientation == MagickTrue)
     {
       decode_options=heif_decoding_options_alloc();
       decode_options->ignore_transformations=1;
     }
-  else
-    (void) SetImageProperty(image,"exif:Orientation","1",exception);
   error=heif_decode_image(image_handle,&heif_image,heif_colorspace_YCbCr,
     heif_chroma_420,decode_options);
   if (decode_options != (struct heif_decoding_options *) NULL)
@@ -619,6 +618,22 @@
 #endif
   entry->flags|=CoderDecoderSeekableStreamFlag;
   (void) RegisterMagickInfo(entry);
+#if LIBHEIF_NUMERIC_VERSION > 0x01060200
+  entry=AcquireMagickInfo("HEIC","AVIF","AV1 Image File Format");
+#if defined(MAGICKCORE_HEIC_DELEGATE)
+  entry->decoder=(DecodeImageHandler *) ReadHEICImage;
+#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
+  entry->encoder=(EncodeImageHandler *) WriteHEICImage;
+#endif
+#endif
+  entry->magick=(IsImageFormatHandler *) IsHEIC;
+  entry->mime_type=ConstantString("image/x-heic");
+#if defined(LIBHEIF_VERSION)
+  entry->version=ConstantString(LIBHEIF_VERSION);
+#endif
+  entry->flags|=CoderDecoderSeekableStreamFlag;
+  (void) RegisterMagickInfo(entry);
+#endif
   return(MagickImageCoderSignature);
 }
 
@@ -924,6 +939,11 @@
     */
     error=heif_context_get_encoder_for_format(heif_context,
       heif_compression_HEVC,&heif_encoder);
+#if LIBHEIF_NUMERIC_VERSION > 0x01060200
+    if (LocaleCompare(image_info->magick,"AVIF") == 0)
+      error=heif_context_get_encoder_for_format(heif_context,
+        heif_compression_AVIF,&heif_encoder);
+#endif
     status=IsHeifSuccess(&error,image,exception);
     if (status == MagickFalse)
       break;
diff --git a/coders/json.c b/coders/json.c
index 4656099..213f9be 100644
--- a/coders/json.c
+++ b/coders/json.c
@@ -1033,7 +1033,7 @@
   if (image->type != type)
     JSONFormatLocaleFile(file,"    \"baseType\": %s,\n",
       CommandOptionToMnemonic(MagickTypeOptions,(ssize_t) image->type));
-  JSONFormatLocaleFile(file,"    \"endianess\": %s,\n",
+  JSONFormatLocaleFile(file,"    \"endianness\": %s,\n",
     CommandOptionToMnemonic(MagickEndianOptions,(ssize_t) image->endian));
   locate=GetImageArtifact(image,"identify:locate");
   if (locate == (const char *) NULL)
diff --git a/coders/label.c b/coders/label.c
index 54ec237..23ffe14 100644
--- a/coders/label.c
+++ b/coders/label.c
@@ -234,8 +234,7 @@
     image->columns=(size_t) floor(draw_info->pointsize+draw_info->stroke_width+
       0.5);
   if (image->rows == 0)
-    image->rows=(size_t) floor(metrics.ascent-metrics.descent+
-      draw_info->stroke_width+0.5);
+    image->rows=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
   if (image->rows == 0)
     image->rows=(size_t) floor(draw_info->pointsize+draw_info->stroke_width+
       0.5);
diff --git a/coders/mpeg.c b/coders/mpeg.c
index 260b561..d94a2bd 100644
--- a/coders/mpeg.c
+++ b/coders/mpeg.c
@@ -425,7 +425,11 @@
   /*
     Copy source file to destination.
   */
-  destination_file=open_utf8(destination,O_WRONLY | O_BINARY | O_CREAT,S_MODE);
+  if (strcmp(destination,"-") == 0)
+    destination_file=fileno(stdout);
+  else
+    destination_file=open_utf8(destination,O_WRONLY | O_BINARY | O_CREAT,
+      S_MODE);
   if (destination_file == -1)
     return(MagickFalse);
   source_file=open_utf8(source,O_RDONLY | O_BINARY,0);
@@ -456,7 +460,8 @@
     if ((size_t) count != length)
       break;
   }
-  (void) close(destination_file);
+  if (strcmp(destination,"-") != 0)
+    (void) close(destination_file);
   (void) close(source_file);
   buffer=(unsigned char *) RelinquishMagickMemory(buffer);
   return(i != 0 ? MagickTrue : MagickFalse);
diff --git a/coders/pict.c b/coders/pict.c
index 8eec90b..29708b1 100644
--- a/coders/pict.c
+++ b/coders/pict.c
@@ -1170,6 +1170,7 @@
               (size_t) (frame.bottom-frame.top),MagickTrue,exception);
             if (tile_image == (Image *) NULL)
               ThrowPICTException(CorruptImageError,"ImproperImageHeader");
+            status=ResetImagePixels(tile_image,exception);
             if ((code == 0x9a) || (code == 0x9b) ||
                 ((bytes_per_line & 0x8000) != 0))
               {
diff --git a/coders/psd.c b/coders/psd.c
index 4a66eea..bebfeb2 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -757,7 +757,7 @@
 }
 
 static StringInfo *ParseImageResourceBlocks(PSDInfo *psd_info,Image *image,
-  const unsigned char *blocks,size_t length,ExceptionInfo *exception)
+  const unsigned char *blocks,size_t length)
 {
   const unsigned char
     *p;
@@ -1656,6 +1656,74 @@
     image->alpha_trait=BlendPixelTrait;
 }
 
+static void ParseAdditionalInfo(LayerInfo *layer_info)
+{
+  char
+    key[5];
+
+  size_t
+    remaining_length;
+
+  unsigned char
+    *p;
+
+  unsigned int
+    size;
+
+  p=GetStringInfoDatum(layer_info->info);
+  remaining_length=GetStringInfoLength(layer_info->info);
+  while (remaining_length >= 12)
+  {
+    /* skip over signature */
+    p+=4;
+    key[0]=(char) (*p++);
+    key[1]=(char) (*p++);
+    key[2]=(char) (*p++);
+    key[3]=(char) (*p++);
+    key[4]='\0';
+    size=(unsigned int) (*p++) << 24;
+    size|=(unsigned int) (*p++) << 16;
+    size|=(unsigned int) (*p++) << 8;
+    size|=(unsigned int) (*p++);
+    size=size & 0xffffffff;
+    remaining_length-=12;
+    if ((size_t) size > remaining_length)
+      break;
+    if (LocaleNCompare(key,"luni",sizeof(key)) == 0)
+      {
+        unsigned char
+          *name;
+
+        unsigned int
+          length;
+
+        length=(unsigned int) (*p++) << 24;
+        length|=(unsigned int) (*p++) << 16;
+        length|=(unsigned int) (*p++) << 8;
+        length|=(unsigned int) (*p++);
+        if (length * 2 > size - 4)
+          break;
+        if (sizeof(layer_info->name) <= length)
+          break;
+        name=layer_info->name;
+        while (length > 0)
+        {
+          /* Only ASCII strings are supported */
+          if (*p++ != '\0')
+            break;
+          *name++=*p++;
+          length--;
+        }
+        if (length == 0)
+          *name='\0';
+        break;
+      }
+    else
+      p+=size;
+    remaining_length-=(size_t) size;
+  }
+}
+
 static MagickBooleanType ReadPSDLayersInternal(Image *image,
   const ImageInfo *image_info,const PSDInfo *psd_info,
   const MagickBooleanType skip_layers,ExceptionInfo *exception)
@@ -1958,6 +2026,7 @@
             layer_info[i].info=AcquireStringInfo((const size_t) length);
             info=GetStringInfoDatum(layer_info[i].info);
             (void) ReadBlob(image,(const size_t) length,info);
+            ParseAdditionalInfo(&layer_info[i]);
           }
       }
   }
@@ -2332,8 +2401,7 @@
           blocks=(unsigned char *) RelinquishMagickMemory(blocks);
           ThrowReaderException(CorruptImageError,"ImproperImageHeader");
         }
-      profile=ParseImageResourceBlocks(&psd_info,image,blocks,(size_t) length,
-        exception);
+      profile=ParseImageResourceBlocks(&psd_info,image,blocks,(size_t) length);
       blocks=(unsigned char *) RelinquishMagickMemory(blocks);
     }
   /*
diff --git a/coders/tiff.c b/coders/tiff.c
index 042a249..26a7dd5 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -1942,7 +1942,12 @@
         /*
           Convert stripped TIFF image.
         */
-        extent=TIFFStripSize(tiff)+sizeof(uint32);
+        extent=TIFFStripSize(tiff);
+#if defined(TIFF_VERSION_BIG)
+        extent+=image->columns*sizeof(uint64);
+#else
+        extent+=image->columns*sizeof(uint32);
+#endif
         strip_pixels=(unsigned char *) AcquireQuantumMemory(extent,
           sizeof(*strip_pixels));
         if (strip_pixels == (unsigned char *) NULL)
@@ -2038,12 +2043,17 @@
         number_pixels=(MagickSizeType) columns*rows;
         if (HeapOverflowSanityCheck(rows,sizeof(*tile_pixels)) != MagickFalse)
           ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
-        extent=TIFFTileSize(tiff)+sizeof(uint32);
+        extent=TIFFTileSize(tiff);
+#if defined(TIFF_VERSION_BIG)
+        extent+=columns*sizeof(uint64);
+#else
+        extent+=columns*sizeof(uint32);
+#endif
         tile_pixels=(unsigned char *) AcquireQuantumMemory(extent,
           sizeof(*tile_pixels));
         if (tile_pixels == (unsigned char *) NULL)
           ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
-        (void) memset(tile_pixels,0,TIFFTileSize(tiff)*sizeof(*tile_pixels));
+        (void) memset(tile_pixels,0,extent*sizeof(*tile_pixels));
         for (i=0; i < (ssize_t) samples_per_pixel; i++)
         {
           switch (i)
diff --git a/coders/txt.c b/coders/txt.c
index a835784..f843b79 100644
--- a/coders/txt.c
+++ b/coders/txt.c
@@ -443,6 +443,7 @@
     ThrowReaderException(CorruptImageError,"ImproperImageHeader");
   x_offset=(-1.0);
   y_offset=(-1.0);
+  q=(Quantum *) NULL;
   do
   {
     width=0;
@@ -576,7 +577,10 @@
         q=GetAuthenticPixels(image,(ssize_t) x_offset,(ssize_t) y_offset,1,1,
           exception);
         if (q == (Quantum *) NULL)
-          continue;
+          {
+            status=MagickFalse;
+            break;
+          }
         SetPixelViaPixelInfo(image,&pixel,q);
         if (SyncAuthenticPixels(image,exception) == MagickFalse)
           {
@@ -608,9 +612,8 @@
       }
   } while (LocaleNCompare((char *) text,MagickTXTID,strlen(MagickTXTID)) == 0);
   (void) CloseBlob(image);
-  if (status == MagickFalse)
-    (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageWarning,
-      "InsufficientImageDataInFile","`%s'",image->filename);
+  if (q == (Quantum *) NULL)
+    return(DestroyImage(image));
   return(GetFirstImageInList(image));
 }
 
diff --git a/coders/xcf.c b/coders/xcf.c
index 5e33ca9..6437211 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -1042,6 +1042,7 @@
     {
       outLayer->image->background_color.alpha_trait=BlendPixelTrait;
       outLayer->image->alpha_trait=BlendPixelTrait;
+      (void) SetImageBackgroundColor(outLayer->image,exception);
     }
 
   InitXCFImage(outLayer,exception);
diff --git a/coders/xpm.c b/coders/xpm.c
index f393ead..da6f6a0 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -409,10 +409,12 @@
     /*
       Parse color.
     */
+    (void) memset(target,0,sizeof(target));
     (void) CopyMagickString(target,"gray",MagickPathExtent);
     q=(char *) NULL;
     if (strlen(p) > width)
       q=ParseXPMColor(p+width,MagickTrue);
+    (void) memset(symbolic,0,sizeof(symbolic));
     *symbolic='\0';
     if (q != (char *) NULL)
       {
diff --git a/config/configure.xml b/config/configure.xml
index 8b38bd7..2aaa5cf 100644
--- a/config/configure.xml
+++ b/config/configure.xml
@@ -11,7 +11,7 @@
 -->
 <configuremap>
   <configure name="CC" value="/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang"/>
-  <configure name="CFLAGS" value=" -fopenmp -fPIE -fPIC -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"/>
+  <configure name="CFLAGS" value="-I/usr/include/libpng16   -fopenmp -Wall -fPIE -fPIC -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"/>
   <configure name="CODER_PATH" value="/usr/local/lib/ImageMagick-7.0.10/modules-Q16HDRI/coders"/>
   <configure name="CONFIGURE_PATH" value="/usr/local/etc/ImageMagick-7/"/>
   <configure name="CONFIGURE" value="./configure  '--host=x86_64-linux-android' '--without-zlib' 'host_alias=x86_64-linux-android' 'CC=/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang' 'CFLAGS=-fPIE -fPIC' 'LDFLAGS=-pie' 'CXX=/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang++'"/>
@@ -20,26 +20,26 @@
   <configure name="CXXFLAGS" value="-g -O2 -pthread"/>
   <configure name="CXX" value="/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang++"/>
   <configure name="DEFS" value="-DHAVE_CONFIG_H"/>
-  <configure name="DELEGATES" value="mpeg ps"/>
+  <configure name="DELEGATES" value="mpeg lzma png ps"/>
   <configure name="DISTCHECK_CONFIG_FLAGS" value="'CC=/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang' 'CFLAGS=-fPIE -fPIC' 'CXX=/src/ndk/out/android-ndk-r22-canary/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang++' 'LDFLAGS=-pie'  --disable-deprecated  --with-quantum-depth=16  --with-jemalloc=no  --with-umem=no  --with-zlib=no  --with-autotrace=no  --with-gslib=no  --with-fontpath=  --with-rsvg=no  --with-perl=no "/>
   <configure name="DOCUMENTATION_PATH" value="/usr/local/share/doc/ImageMagick-7"/>
   <configure name="EXEC-PREFIX" value="/usr/local"/>
   <configure name="EXECUTABLE_PATH" value="/usr/local/bin"/>
   <configure name="FEATURES" value="DPC HDRI Cipher OpenMP"/>
   <configure name="FILTER_PATH" value="/usr/local/lib/ImageMagick-7.0.10/modules-Q16HDRI/filters"/>
-  <configure name="GIT_REVISION" value="17025:00c3687cc:20200307" />
+  <configure name="GIT_REVISION" value="17231:5f07d65dd:20200509" />
   <configure name="HOST" value="x86_64-pc-linux-android"/>
   <configure name="INCLUDE_PATH" value="/usr/local/include/ImageMagick-7"/>
   <configure name="LDFLAGS" value="-L/usr/local/lib -pie"/>
   <configure name="LIBRARY_PATH" value="/usr/local/lib/ImageMagick-7.0.10"/>
-  <configure name="LIBS" value="                                        -lm      "/>
-  <configure name="LIB_VERSION_NUMBER" value="7,0,10,1"/>
+  <configure name="LIBS" value="          -lpng16 -lz                -llzma              -lm      "/>
+  <configure name="LIB_VERSION_NUMBER" value="7,0,10,12"/>
   <configure name="LIB_VERSION" value="0x70A"/>
   <configure name="NAME" value="ImageMagick"/>
   <configure name="PCFLAGS" value="-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16"/>
   <configure name="PREFIX" value="/usr/local"/>
   <configure name="QuantumDepth" value="16"/>
-  <configure name="RELEASE_DATE" value="2020-03-09"/>
+  <configure name="RELEASE_DATE" value="2020-05-15"/>
   <configure name="SHAREARCH_PATH" value="/usr/local/lib/ImageMagick-7.0.10/config-Q16HDRI"/>
   <configure name="SHARE_PATH" value="/usr/local/share/ImageMagick-7"/>
   <configure name="TARGET_CPU" value="x86_64"/>
diff --git a/config/delegates.xml.in b/config/delegates.xml.in
index 6be563e..442fa1a 100644
--- a/config/delegates.xml.in
+++ b/config/delegates.xml.in
@@ -110,8 +110,8 @@
   <delegate decode="shtml" command="&quot;@HTMLDecodeDelegate@&quot; -U -o &quot;%o&quot; &quot;%i&quot;"/>
   <delegate decode="sid" command="&quot;@MrSIDDecodeDelegate@&quot; -if sid -i &quot;%i&quot; -of tif -o &quot;%o&quot; &gt; &quot;%u&quot;"/>
   <delegate decode="svg" command="&quot;@RSVGDecodeDelegate@&quot; -o &quot;%o&quot; &quot;%i&quot;"/>
-  <!-- Change export-png to export-file for inkscape >= 1.0 -->
-  <delegate decode="svg:decode" stealth="True" command="&quot;@SVGDecodeDelegate@&quot; &quot;%s&quot; --export-png=&quot;%s&quot; --export-dpi=&quot;%s&quot; --export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1"/>
+  <!-- Change export-file to export-png for inkscape < 1.0 -->
+  <delegate decode="svg:decode" stealth="True" command="&quot;@SVGDecodeDelegate@&quot; &quot;%s&quot; --export-file=&quot;%s&quot; --export-dpi=&quot;%s&quot; --export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1"/>
   <delegate decode="tiff" encode="launch" mode="encode" command="&quot;@LaunchDelegate@&quot; &quot;%i&quot;"/>
   <delegate decode="wdp" command="@MVDelegate@ &quot;%i&quot; &quot;%i.jxr&quot;; &quot;@JXRDecodeDelegate@&quot; -i &quot;%i.jxr&quot; -o &quot;%o.bmp&quot;; @MVDelegate@ &quot;%i.jxr&quot; &quot;%i&quot;; @MVDelegate@ &quot;%o.bmp&quot; &quot;%o&quot;"/>
   <delegate decode="webp" command="&quot;@WebPDecodeDelegate@&quot; -pam &quot;%i&quot; -o &quot;%o&quot;"/>
diff --git a/configs/arm/MagickCore/magick-baseconfig.h b/configs/arm/MagickCore/magick-baseconfig.h
index c6c11ff..6c9d56f 100644
--- a/configs/arm/MagickCore/magick-baseconfig.h
+++ b/configs/arm/MagickCore/magick-baseconfig.h
@@ -1121,7 +1121,9 @@
 #endif
 
 /* Define if you have LZMA library */
-/* #undef LZMA_DELEGATE */
+#ifndef MAGICKCORE_LZMA_DELEGATE
+#define MAGICKCORE_LZMA_DELEGATE 1
+#endif
 
 /* Define to prepend to default font search path. */
 /* #undef MAGICK_FONT_PATH */
@@ -1178,7 +1180,7 @@
 
 /* Define to the full name and version of this package. */
 #ifndef MAGICKCORE_PACKAGE_STRING
-#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-1"
+#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-12"
 #endif
 
 /* Define to the one symbol short name of this package. */
@@ -1193,7 +1195,7 @@
 
 /* Define to the version of this package. */
 #ifndef MAGICKCORE_PACKAGE_VERSION
-#define MAGICKCORE_PACKAGE_VERSION "7.0.10-1"
+#define MAGICKCORE_PACKAGE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have PANGOCAIRO library */
@@ -1206,7 +1208,9 @@
 /* #undef PIPES_SUPPORT */
 
 /* Define if you have PNG library */
-/* #undef PNG_DELEGATE */
+#ifndef MAGICKCORE_PNG_DELEGATE
+#define MAGICKCORE_PNG_DELEGATE 1
+#endif
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1351,7 +1355,7 @@
 
 /* Version number of package */
 #ifndef MAGICKCORE_VERSION
-#define MAGICKCORE_VERSION "7.0.10-1"
+#define MAGICKCORE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have WEBPMUX library */
diff --git a/configs/arm/MagickCore/version.h b/configs/arm/MagickCore/version.h
index 4eb45fd..ed972f5 100644
--- a/configs/arm/MagickCore/version.h
+++ b/configs/arm/MagickCore/version.h
@@ -30,7 +30,7 @@
 #define MagickLibVersion  0x70A
 #define MagickLibVersionText  "7.0.10"
 #define MagickLibVersionNumber  7,0,0
-#define MagickLibAddendum  "-1"
+#define MagickLibAddendum  "-12"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
 #if defined(_WINDOWS)
@@ -44,10 +44,10 @@
 #endif
 #define MagickppLibVersionText  "7.0.10"
 #define MagickppLibVersionNumber  4:0:0
-#define MagickppLibAddendum  "-1"
+#define MagickppLibAddendum  "-12"
 #define MagickppLibInterface  4
 #define MagickppLibMinInterface  4
-#define MagickReleaseDate  "2020-03-09"
+#define MagickReleaseDate  "2020-05-15"
 #define MagickAuthoritativeLicense  \
   "https://imagemagick.org/script/license.php"
 #define MagickAuthoritativeURL  "https://imagemagick.org"
diff --git a/configs/arm64/MagickCore/magick-baseconfig.h b/configs/arm64/MagickCore/magick-baseconfig.h
index dfba173..63b8b34 100644
--- a/configs/arm64/MagickCore/magick-baseconfig.h
+++ b/configs/arm64/MagickCore/magick-baseconfig.h
@@ -1121,7 +1121,9 @@
 #endif
 
 /* Define if you have LZMA library */
-/* #undef LZMA_DELEGATE */
+#ifndef MAGICKCORE_LZMA_DELEGATE
+#define MAGICKCORE_LZMA_DELEGATE 1
+#endif
 
 /* Define to prepend to default font search path. */
 /* #undef MAGICK_FONT_PATH */
@@ -1178,7 +1180,7 @@
 
 /* Define to the full name and version of this package. */
 #ifndef MAGICKCORE_PACKAGE_STRING
-#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-1"
+#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-12"
 #endif
 
 /* Define to the one symbol short name of this package. */
@@ -1193,7 +1195,7 @@
 
 /* Define to the version of this package. */
 #ifndef MAGICKCORE_PACKAGE_VERSION
-#define MAGICKCORE_PACKAGE_VERSION "7.0.10-1"
+#define MAGICKCORE_PACKAGE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have PANGOCAIRO library */
@@ -1206,7 +1208,9 @@
 /* #undef PIPES_SUPPORT */
 
 /* Define if you have PNG library */
-/* #undef PNG_DELEGATE */
+#ifndef MAGICKCORE_PNG_DELEGATE
+#define MAGICKCORE_PNG_DELEGATE 1
+#endif
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1351,7 +1355,7 @@
 
 /* Version number of package */
 #ifndef MAGICKCORE_VERSION
-#define MAGICKCORE_VERSION "7.0.10-1"
+#define MAGICKCORE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have WEBPMUX library */
diff --git a/configs/arm64/MagickCore/version.h b/configs/arm64/MagickCore/version.h
index a9991a9..6cf8fe3 100644
--- a/configs/arm64/MagickCore/version.h
+++ b/configs/arm64/MagickCore/version.h
@@ -30,7 +30,7 @@
 #define MagickLibVersion  0x70A
 #define MagickLibVersionText  "7.0.10"
 #define MagickLibVersionNumber  7,0,0
-#define MagickLibAddendum  "-1"
+#define MagickLibAddendum  "-12"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
 #if defined(_WINDOWS)
@@ -44,10 +44,10 @@
 #endif
 #define MagickppLibVersionText  "7.0.10"
 #define MagickppLibVersionNumber  4:0:0
-#define MagickppLibAddendum  "-1"
+#define MagickppLibAddendum  "-12"
 #define MagickppLibInterface  4
 #define MagickppLibMinInterface  4
-#define MagickReleaseDate  "2020-03-09"
+#define MagickReleaseDate  "2020-05-15"
 #define MagickAuthoritativeLicense  \
   "https://imagemagick.org/script/license.php"
 #define MagickAuthoritativeURL  "https://imagemagick.org"
diff --git a/configs/x86-64/MagickCore/magick-baseconfig.h b/configs/x86-64/MagickCore/magick-baseconfig.h
index 283addc..8ea196d 100644
--- a/configs/x86-64/MagickCore/magick-baseconfig.h
+++ b/configs/x86-64/MagickCore/magick-baseconfig.h
@@ -1121,7 +1121,9 @@
 #endif
 
 /* Define if you have LZMA library */
-/* #undef LZMA_DELEGATE */
+#ifndef MAGICKCORE_LZMA_DELEGATE
+#define MAGICKCORE_LZMA_DELEGATE 1
+#endif
 
 /* Define to prepend to default font search path. */
 /* #undef MAGICK_FONT_PATH */
@@ -1178,7 +1180,7 @@
 
 /* Define to the full name and version of this package. */
 #ifndef MAGICKCORE_PACKAGE_STRING
-#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-1"
+#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-12"
 #endif
 
 /* Define to the one symbol short name of this package. */
@@ -1193,7 +1195,7 @@
 
 /* Define to the version of this package. */
 #ifndef MAGICKCORE_PACKAGE_VERSION
-#define MAGICKCORE_PACKAGE_VERSION "7.0.10-1"
+#define MAGICKCORE_PACKAGE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have PANGOCAIRO library */
@@ -1206,7 +1208,9 @@
 /* #undef PIPES_SUPPORT */
 
 /* Define if you have PNG library */
-/* #undef PNG_DELEGATE */
+#ifndef MAGICKCORE_PNG_DELEGATE
+#define MAGICKCORE_PNG_DELEGATE 1
+#endif
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1351,7 +1355,7 @@
 
 /* Version number of package */
 #ifndef MAGICKCORE_VERSION
-#define MAGICKCORE_VERSION "7.0.10-1"
+#define MAGICKCORE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have WEBPMUX library */
diff --git a/configs/x86-64/MagickCore/version.h b/configs/x86-64/MagickCore/version.h
index bdf7ade..ce19f8e 100644
--- a/configs/x86-64/MagickCore/version.h
+++ b/configs/x86-64/MagickCore/version.h
@@ -30,7 +30,7 @@
 #define MagickLibVersion  0x70A
 #define MagickLibVersionText  "7.0.10"
 #define MagickLibVersionNumber  7,0,0
-#define MagickLibAddendum  "-1"
+#define MagickLibAddendum  "-12"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
 #if defined(_WINDOWS)
@@ -44,10 +44,10 @@
 #endif
 #define MagickppLibVersionText  "7.0.10"
 #define MagickppLibVersionNumber  4:0:0
-#define MagickppLibAddendum  "-1"
+#define MagickppLibAddendum  "-12"
 #define MagickppLibInterface  4
 #define MagickppLibMinInterface  4
-#define MagickReleaseDate  "2020-03-09"
+#define MagickReleaseDate  "2020-05-15"
 #define MagickAuthoritativeLicense  \
   "https://imagemagick.org/script/license.php"
 #define MagickAuthoritativeURL  "https://imagemagick.org"
diff --git a/configs/x86/MagickCore/magick-baseconfig.h b/configs/x86/MagickCore/magick-baseconfig.h
index f5f76b7..13e58d3 100644
--- a/configs/x86/MagickCore/magick-baseconfig.h
+++ b/configs/x86/MagickCore/magick-baseconfig.h
@@ -1121,7 +1121,9 @@
 #endif
 
 /* Define if you have LZMA library */
-/* #undef LZMA_DELEGATE */
+#ifndef MAGICKCORE_LZMA_DELEGATE
+#define MAGICKCORE_LZMA_DELEGATE 1
+#endif
 
 /* Define to prepend to default font search path. */
 /* #undef MAGICK_FONT_PATH */
@@ -1178,7 +1180,7 @@
 
 /* Define to the full name and version of this package. */
 #ifndef MAGICKCORE_PACKAGE_STRING
-#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-1"
+#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.0.10-12"
 #endif
 
 /* Define to the one symbol short name of this package. */
@@ -1193,7 +1195,7 @@
 
 /* Define to the version of this package. */
 #ifndef MAGICKCORE_PACKAGE_VERSION
-#define MAGICKCORE_PACKAGE_VERSION "7.0.10-1"
+#define MAGICKCORE_PACKAGE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have PANGOCAIRO library */
@@ -1206,7 +1208,9 @@
 /* #undef PIPES_SUPPORT */
 
 /* Define if you have PNG library */
-/* #undef PNG_DELEGATE */
+#ifndef MAGICKCORE_PNG_DELEGATE
+#define MAGICKCORE_PNG_DELEGATE 1
+#endif
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1351,7 +1355,7 @@
 
 /* Version number of package */
 #ifndef MAGICKCORE_VERSION
-#define MAGICKCORE_VERSION "7.0.10-1"
+#define MAGICKCORE_VERSION "7.0.10-12"
 #endif
 
 /* Define if you have WEBPMUX library */
diff --git a/configs/x86/MagickCore/version.h b/configs/x86/MagickCore/version.h
index 4ae65ab..37db42e 100644
--- a/configs/x86/MagickCore/version.h
+++ b/configs/x86/MagickCore/version.h
@@ -30,7 +30,7 @@
 #define MagickLibVersion  0x70A
 #define MagickLibVersionText  "7.0.10"
 #define MagickLibVersionNumber  7,0,0
-#define MagickLibAddendum  "-1"
+#define MagickLibAddendum  "-12"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
 #if defined(_WINDOWS)
@@ -44,10 +44,10 @@
 #endif
 #define MagickppLibVersionText  "7.0.10"
 #define MagickppLibVersionNumber  4:0:0
-#define MagickppLibAddendum  "-1"
+#define MagickppLibAddendum  "-12"
 #define MagickppLibInterface  4
 #define MagickppLibMinInterface  4
-#define MagickReleaseDate  "2020-03-09"
+#define MagickReleaseDate  "2020-05-15"
 #define MagickAuthoritativeLicense  \
   "https://imagemagick.org/script/license.php"
 #define MagickAuthoritativeURL  "https://imagemagick.org"
diff --git a/configure b/configure
index 9836746..569e768 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.10-7.
+# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.10-12.
 #
 # Report bugs to <https://github.com/ImageMagick/ImageMagick/issues>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='ImageMagick'
 PACKAGE_TARNAME='ImageMagick'
-PACKAGE_VERSION='7.0.10-7'
-PACKAGE_STRING='ImageMagick 7.0.10-7'
+PACKAGE_VERSION='7.0.10-12'
+PACKAGE_STRING='ImageMagick 7.0.10-12'
 PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
 PACKAGE_URL='https://imagemagick.org'
 
@@ -1846,7 +1846,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ImageMagick 7.0.10-7 to adapt to many kinds of systems.
+\`configure' configures ImageMagick 7.0.10-12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1921,7 +1921,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ImageMagick 7.0.10-7:";;
+     short | recursive ) echo "Configuration of ImageMagick 7.0.10-12:";;
    esac
   cat <<\_ACEOF
 
@@ -2215,7 +2215,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ImageMagick configure 7.0.10-7
+ImageMagick configure 7.0.10-12
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3266,7 +3266,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ImageMagick $as_me 7.0.10-7, which was
+It was created by ImageMagick $as_me 7.0.10-12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4252,7 +4252,7 @@
 
 # Define the identity of the package.
  PACKAGE='ImageMagick'
- VERSION='7.0.10-7'
+ VERSION='7.0.10-12'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4562,11 +4562,11 @@
 
 MAGICK_MICRO_VERSION=10
 
-MAGICK_PATCHLEVEL_VERSION=7
+MAGICK_PATCHLEVEL_VERSION=12
 
-MAGICK_VERSION=7.0.10-7
+MAGICK_VERSION=7.0.10-12
 
-MAGICK_GIT_REVISION=17155:0bcca21ae:20200412
+MAGICK_GIT_REVISION=17231:5f07d65dd:20200509
 
 
 # Substitute library versioning
@@ -8521,48 +8521,156 @@
 
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for maximum warnings" >&5
-$as_echo_n "checking CFLAGS for maximum warnings... " >&6; }
-if ${ac_cv_cflags_warn_all+:} false; then :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
+$as_echo_n "checking for C compiler vendor... " >&6; }
+if ${ax_cv_c_compiler_vendor+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_cflags_warn_all="no, unknown"
-ac_save_CFLAGS="$CFLAGS"
-for ac_arg in "-warn all  % -warn all"      "-pedantic  % -Wall"          "-xstrconst % -v"             "-std1      % -verbose -w0 -warnprotos"    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    "-ansi -ansiE % -fullwarn"    "+ESlit     % +w1"            "-Xc        % -pvctl,fullmsg"    "-h conform % -h msglevel 2"    #
-do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+	vendors="
+		intel:		__ICC,__ECC,__INTEL_COMPILER
+		ibm:		__xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__
+		pathscale:	__PATHCC__,__PATHSCALE__
+		clang:		__clang__
+		cray:		_CRAYC
+		fujitsu:	__FUJITSU
+		sdcc:		SDCC,__SDCC
+		sx:		_SX
+		portland:	__PGI
+		gnu:		__GNUC__
+		sun:		__SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+		hp:		__HP_cc,__HP_aCC
+		dec:		__DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+		borland:	__BORLANDC__,__CODEGEARC__,__TURBOC__
+		comeau:		__COMO__
+		kai:		__KCC
+		lcc:		__LCC__
+		sgi:		__sgi,sgi
+		microsoft:	_MSC_VER
+		metrowerks:	__MWERKS__
+		watcom:		__WATCOMC__
+		tcc:		__TINYC__
+		unknown:	UNKNOWN
+	"
+	for ventest in $vendors; do
+	    case $ventest in
+		*:)
+		    vendor=$ventest
+		    continue
+		    ;;
+		*)
+		    vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+		    ;;
+	    esac
+
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
 
+#if !($vencpp)
+      thisisanerror;
+#endif
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
+  break
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-CFLAGS="$ac_save_CFLAGS"
+	done
+
+	ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
-$as_echo "$ac_cv_cflags_warn_all" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
+$as_echo "$ax_cv_c_compiler_vendor" >&6; }
+
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-case ".$ac_cv_cflags_warn_all" in
-     .ok|.ok,*)  ;;
-   .|.no|.no,*)  ;;
-   *)
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for most reasonable warnings" >&5
+$as_echo_n "checking CFLAGS for most reasonable warnings... " >&6; }
+if ${ac_cv_cflags_warn_all+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+	ac_cv_cflags_warn_all=""
+	ac_save_cflags_warn_all_found="yes"
+		case "$ax_cv_c_compiler_vendor" in #(
+  intel) :
+    ac_cv_cflags_warn_all="-w2" ;; #(
+  ibm) :
+    ac_cv_cflags_warn_all="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" ;; #(
+  pathscale) :
+     ;; #(
+  clang) :
+    ac_cv_cflags_warn_all="-Wall" ;; #(
+  cray) :
+    ac_cv_cflags_warn_all="-h msglevel 2" ;; #(
+  fujitsu) :
+     ;; #(
+  sdcc) :
+     ;; #(
+  sx) :
+    ac_cv_cflags_warn_all="-pvctl,fullmsg" ;; #(
+  portland) :
+     ;; #(
+  gnu) :
+    ac_cv_cflags_warn_all="-Wall" ;; #(
+  sun) :
+    ac_cv_cflags_warn_all="-v" ;; #(
+  hp) :
+    ac_cv_cflags_warn_all="+w1" ;; #(
+  dec) :
+    ac_cv_cflags_warn_all="-verbose -w0 -warnprotos" ;; #(
+  borland) :
+     ;; #(
+  comeau) :
+     ;; #(
+  kai) :
+     ;; #(
+  lcc) :
+     ;; #(
+  sgi) :
+    ac_cv_cflags_warn_all="-fullwarn" ;; #(
+  microsoft) :
+     ;; #(
+  metrowerks) :
+     ;; #(
+  watcom) :
+     ;; #(
+  tcc) :
+     ;; #(
+  unknown) :
+
+				    ac_cv_cflags_warn_all=""
+				    ac_save_cflags_warn_all_found="no"
+				 ;; #(
+  *) :
+
+				    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown compiler vendor returned by AX_COMPILER_VENDOR" >&5
+$as_echo "$as_me: WARNING: Unknown compiler vendor returned by AX_COMPILER_VENDOR" >&2;}
+				    ac_cv_cflags_warn_all=""
+				    ac_save_cflags_warn_all_found="no"
+
+	 ;;
+esac
+
+	if test "x$ac_save_cflags_warn_all_found" = "xyes"; then :
+  	    if test "x$ac_cv_cflags_warn_all" != "x"; then :
+
 if ${CFLAGS+:} false; then :
 
   case " $CFLAGS " in #(
@@ -8574,7 +8682,7 @@
   test $ac_status = 0; } ;; #(
   *) :
 
-     as_fn_append CFLAGS " $ac_cv_cflags_warn_all"
+     CFLAGS="$ac_cv_cflags_warn_all $CFLAGS"
      { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
   (: CFLAGS="$CFLAGS") 2>&5
   ac_status=$?
@@ -8593,10 +8701,18 @@
   test $ac_status = 0; }
 
 fi
- ;;
-esac
 
-ac_ext=c
+fi
+
+else
+  	    true
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
+$as_echo "$ac_cv_cflags_warn_all" >&6; }
+
+    ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -8821,65 +8937,6 @@
 
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
-$as_echo_n "checking for C compiler vendor... " >&6; }
-if ${ax_cv_c_compiler_vendor+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-    # note: don't check for gcc first since some other compilers define __GNUC__
-  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
-           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
-           pathscale: __PATHCC__,__PATHSCALE__
-           clang:     __clang__
-           cray:      _CRAYC
-           fujitsu:   __FUJITSU
-           sdcc:      SDCC, __SDCC
-           gnu:       __GNUC__
-           sun:       __SUNPRO_C,__SUNPRO_CC
-           hp:        __HP_cc,__HP_aCC
-           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
-           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
-           comeau:    __COMO__
-           kai:       __KCC
-           lcc:       __LCC__
-           sgi:       __sgi,sgi
-           microsoft: _MSC_VER
-           metrowerks: __MWERKS__
-           watcom:    __WATCOMC__
-           portland:  __PGI
-	   tcc:       __TINYC__
-           unknown:   UNKNOWN"
-  for ventest in $vendors; do
-    case $ventest in
-      *:) vendor=$ventest; continue ;;
-      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
-    esac
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-      #if !($vencpp)
-        thisisanerror;
-      #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-  ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
-$as_echo "$ax_cv_c_compiler_vendor" >&6; }
-
 
 
 
@@ -9407,49 +9464,58 @@
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
 $as_echo_n "checking for C compiler vendor... " >&6; }
 if ${ax_cv_c_compiler_vendor+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-    # note: don't check for gcc first since some other compilers define __GNUC__
-  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
-           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
-           pathscale: __PATHCC__,__PATHSCALE__
-           clang:     __clang__
-           cray:      _CRAYC
-           fujitsu:   __FUJITSU
-           sdcc:      SDCC, __SDCC
-           gnu:       __GNUC__
-           sun:       __SUNPRO_C,__SUNPRO_CC
-           hp:        __HP_cc,__HP_aCC
-           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
-           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
-           comeau:    __COMO__
-           kai:       __KCC
-           lcc:       __LCC__
-           sgi:       __sgi,sgi
-           microsoft: _MSC_VER
-           metrowerks: __MWERKS__
-           watcom:    __WATCOMC__
-           portland:  __PGI
-	   tcc:       __TINYC__
-           unknown:   UNKNOWN"
-  for ventest in $vendors; do
-    case $ventest in
-      *:) vendor=$ventest; continue ;;
-      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
-    esac
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+	vendors="
+		intel:		__ICC,__ECC,__INTEL_COMPILER
+		ibm:		__xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__
+		pathscale:	__PATHCC__,__PATHSCALE__
+		clang:		__clang__
+		cray:		_CRAYC
+		fujitsu:	__FUJITSU
+		sdcc:		SDCC,__SDCC
+		sx:		_SX
+		portland:	__PGI
+		gnu:		__GNUC__
+		sun:		__SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+		hp:		__HP_cc,__HP_aCC
+		dec:		__DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+		borland:	__BORLANDC__,__CODEGEARC__,__TURBOC__
+		comeau:		__COMO__
+		kai:		__KCC
+		lcc:		__LCC__
+		sgi:		__sgi,sgi
+		microsoft:	_MSC_VER
+		metrowerks:	__MWERKS__
+		watcom:		__WATCOMC__
+		tcc:		__TINYC__
+		unknown:	UNKNOWN
+	"
+	for ventest in $vendors; do
+	    case $ventest in
+		*:)
+		    vendor=$ventest
+		    continue
+		    ;;
+		*)
+		    vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+		    ;;
+	    esac
+
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
 
-      #if !($vencpp)
-        thisisanerror;
-      #endif
+#if !($vencpp)
+      thisisanerror;
+#endif
 
   ;
   return 0;
@@ -9459,8 +9525,9 @@
   break
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-  ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
+	done
+
+	ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
@@ -9835,10 +9902,12 @@
 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
 # libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
 
 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
@@ -9914,39 +9983,10 @@
         # that too in a future libc.)  So we'll check first for the
         # standard Solaris way of linking pthreads (-mt -lpthread).
 
-        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
+        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
         ;;
 esac
 
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-if test "x$GCC" = "xyes"; then :
-  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
-fi
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
-        darwin* | hpux* | linux* | osf* | solaris*)
-        ax_pthread_check_macro="_REENTRANT"
-        ;;
-
-        aix*)
-        ax_pthread_check_macro="_THREAD_SAFE"
-        ;;
-
-        *)
-        ax_pthread_check_macro="--"
-        ;;
-esac
-if test "x$ax_pthread_check_macro" = "x--"; then :
-  ax_pthread_check_cond=0
-else
-  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
-fi
-
 # Are we compiling with Clang?
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
@@ -9978,107 +10018,51 @@
 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
 
-ax_pthread_clang_warning=no
 
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
 
-if test "x$ax_pthread_clang" = "xyes"; then
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
 
-        # Clang takes -pthread; it has never supported any other flag
+if test "x$GCC" = "xyes"; then :
+  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
 
-        # (Note 1: This will need to be revisited if a system that Clang
-        # supports has POSIX threads in a separate library.  This tends not
-        # to be the way of modern systems, but it's conceivable.)
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
 
-        # (Note 2: On some systems, notably Darwin, -pthread is not needed
-        # to get POSIX threads support; the API is always present and
-        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
-        # -pthread does define _REENTRANT, and while the Darwin headers
-        # ignore this macro, third-party headers might not.)
+if test "x$ax_pthread_clang" = "xyes"; then :
+  ax_pthread_flags="-pthread,-lpthread -pthread"
+fi
 
-        PTHREAD_CFLAGS="-pthread"
-        PTHREAD_LIBS=
 
-        ax_pthread_ok=yes
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
 
-        # However, older versions of Clang make a point of warning the user
-        # that, in an invocation where only linking and no compilation is
-        # taking place, the -pthread option has no effect ("argument unused
-        # during compilation").  They expect -pthread to be passed in only
-        # when source code is being compiled.
-        #
-        # Problem is, this is at odds with the way Automake and most other
-        # C build frameworks function, which is that the same flags used in
-        # compilation (CFLAGS) are also used in linking.  Many systems
-        # supported by AX_PTHREAD require exactly this for POSIX threads
-        # support, and in fact it is often not straightforward to specify a
-        # flag that is used only in the compilation phase and not in
-        # linking.  Such a scenario is extremely rare in practice.
-        #
-        # Even though use of the -pthread flag in linking would only print
-        # a warning, this can be a nuisance for well-run software projects
-        # that build with -Werror.  So if the active version of Clang has
-        # this misfeature, we search for an option to squash it.
+case $host_os in
+        darwin* | hpux* | linux* | osf* | solaris*)
+        ax_pthread_check_macro="_REENTRANT"
+        ;;
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
-$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
-if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
-  $as_echo_n "(cached) " >&6
+        aix*)
+        ax_pthread_check_macro="_THREAD_SAFE"
+        ;;
+
+        *)
+        ax_pthread_check_macro="--"
+        ;;
+esac
+if test "x$ax_pthread_check_macro" = "x--"; then :
+  ax_pthread_check_cond=0
 else
-  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
-             # Create an alternate version of $ac_link that compiles and
-             # links in two steps (.c -> .o, .o -> exe) instead of one
-             # (.c -> exe), because the warning occurs only in the second
-             # step
-             ax_pthread_save_ac_link="$ac_link"
-             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
-             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
-             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
-             ax_pthread_save_CFLAGS="$CFLAGS"
-             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
-                if test "x$ax_pthread_try" = "xunknown"; then :
-  break
+  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
 fi
-                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
-                ac_link="$ax_pthread_save_ac_link"
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_link="$ax_pthread_2step_ac_link"
-                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-             done
-             ac_link="$ax_pthread_save_ac_link"
-             CFLAGS="$ax_pthread_save_CFLAGS"
-             if test "x$ax_pthread_try" = "x"; then :
-  ax_pthread_try=no
-fi
-             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
-
-        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
-                no | unknown) ;;
-                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
-        esac
-
-fi # $ax_pthread_clang = yes
 
 if test "x$ax_pthread_ok" = "xno"; then
 for ax_pthread_try_flag in $ax_pthread_flags; do
@@ -10089,11 +10073,11 @@
 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
                 ;;
 
-                -mt,pthread)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
-$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
-                PTHREAD_CFLAGS="-mt"
-                PTHREAD_LIBS="-lpthread"
+                *,*)
+                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+$as_echo_n "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
                 ;;
 
                 -*)
@@ -10176,7 +10160,13 @@
 #                       if $ax_pthread_check_cond
 #                        error "$ax_pthread_check_macro must be defined"
 #                       endif
-                        static void routine(void *a) { a = 0; }
+                        static void *some_global = NULL;
+                        static void routine(void *a)
+                          {
+                             /* To avoid any unused-parameter or
+                                unused-but-set-parameter warning.  */
+                             some_global = a;
+                          }
                         static void *start_routine(void *a) { return a; }
 int
 main ()
@@ -10211,6 +10201,104 @@
 done
 fi
 
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+        # Clang takes -pthread; it has never supported any other flag
+
+        # (Note 1: This will need to be revisited if a system that Clang
+        # supports has POSIX threads in a separate library.  This tends not
+        # to be the way of modern systems, but it's conceivable.)
+
+        # (Note 2: On some systems, notably Darwin, -pthread is not needed
+        # to get POSIX threads support; the API is always present and
+        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
+        # -pthread does define _REENTRANT, and while the Darwin headers
+        # ignore this macro, third-party headers might not.)
+
+        # However, older versions of Clang make a point of warning the user
+        # that, in an invocation where only linking and no compilation is
+        # taking place, the -pthread option has no effect ("argument unused
+        # during compilation").  They expect -pthread to be passed in only
+        # when source code is being compiled.
+        #
+        # Problem is, this is at odds with the way Automake and most other
+        # C build frameworks function, which is that the same flags used in
+        # compilation (CFLAGS) are also used in linking.  Many systems
+        # supported by AX_PTHREAD require exactly this for POSIX threads
+        # support, and in fact it is often not straightforward to specify a
+        # flag that is used only in the compilation phase and not in
+        # linking.  Such a scenario is extremely rare in practice.
+        #
+        # Even though use of the -pthread flag in linking would only print
+        # a warning, this can be a nuisance for well-run software projects
+        # that build with -Werror.  So if the active version of Clang has
+        # this misfeature, we search for an option to squash it.
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+             # Create an alternate version of $ac_link that compiles and
+             # links in two steps (.c -> .o, .o -> exe) instead of one
+             # (.c -> exe), because the warning occurs only in the second
+             # step
+             ax_pthread_save_ac_link="$ac_link"
+             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+             ax_pthread_save_CFLAGS="$CFLAGS"
+             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+                if test "x$ax_pthread_try" = "xunknown"; then :
+  break
+fi
+                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+                ac_link="$ax_pthread_save_ac_link"
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_link="$ax_pthread_2step_ac_link"
+                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+             done
+             ac_link="$ax_pthread_save_ac_link"
+             CFLAGS="$ax_pthread_save_CFLAGS"
+             if test "x$ax_pthread_try" = "x"; then :
+  ax_pthread_try=no
+fi
+             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+                no | unknown) ;;
+                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+        esac
+
+fi # $ax_pthread_clang = yes
+
+
+
 # Various other checks:
 if test "x$ax_pthread_ok" = "xyes"; then
         ax_pthread_save_CFLAGS="$CFLAGS"
@@ -10292,6 +10380,7 @@
 main ()
 {
 int i = PTHREAD_PRIO_INHERIT;
+                                               return i;
   ;
   return 0;
 }
@@ -10576,10 +10665,12 @@
 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
 # libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
 
 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
@@ -10655,39 +10746,10 @@
         # that too in a future libc.)  So we'll check first for the
         # standard Solaris way of linking pthreads (-mt -lpthread).
 
-        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
+        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
         ;;
 esac
 
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-if test "x$GCC" = "xyes"; then :
-  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
-fi
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
-        darwin* | hpux* | linux* | osf* | solaris*)
-        ax_pthread_check_macro="_REENTRANT"
-        ;;
-
-        aix*)
-        ax_pthread_check_macro="_THREAD_SAFE"
-        ;;
-
-        *)
-        ax_pthread_check_macro="--"
-        ;;
-esac
-if test "x$ax_pthread_check_macro" = "x--"; then :
-  ax_pthread_check_cond=0
-else
-  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
-fi
-
 # Are we compiling with Clang?
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
@@ -10719,107 +10781,51 @@
 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
 
-ax_pthread_clang_warning=no
 
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
 
-if test "x$ax_pthread_clang" = "xyes"; then
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
 
-        # Clang takes -pthread; it has never supported any other flag
+if test "x$GCC" = "xyes"; then :
+  ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
 
-        # (Note 1: This will need to be revisited if a system that Clang
-        # supports has POSIX threads in a separate library.  This tends not
-        # to be the way of modern systems, but it's conceivable.)
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
 
-        # (Note 2: On some systems, notably Darwin, -pthread is not needed
-        # to get POSIX threads support; the API is always present and
-        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
-        # -pthread does define _REENTRANT, and while the Darwin headers
-        # ignore this macro, third-party headers might not.)
+if test "x$ax_pthread_clang" = "xyes"; then :
+  ax_pthread_flags="-pthread,-lpthread -pthread"
+fi
 
-        PTHREAD_CFLAGS="-pthread"
-        PTHREAD_LIBS=
 
-        ax_pthread_ok=yes
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
 
-        # However, older versions of Clang make a point of warning the user
-        # that, in an invocation where only linking and no compilation is
-        # taking place, the -pthread option has no effect ("argument unused
-        # during compilation").  They expect -pthread to be passed in only
-        # when source code is being compiled.
-        #
-        # Problem is, this is at odds with the way Automake and most other
-        # C build frameworks function, which is that the same flags used in
-        # compilation (CFLAGS) are also used in linking.  Many systems
-        # supported by AX_PTHREAD require exactly this for POSIX threads
-        # support, and in fact it is often not straightforward to specify a
-        # flag that is used only in the compilation phase and not in
-        # linking.  Such a scenario is extremely rare in practice.
-        #
-        # Even though use of the -pthread flag in linking would only print
-        # a warning, this can be a nuisance for well-run software projects
-        # that build with -Werror.  So if the active version of Clang has
-        # this misfeature, we search for an option to squash it.
+case $host_os in
+        darwin* | hpux* | linux* | osf* | solaris*)
+        ax_pthread_check_macro="_REENTRANT"
+        ;;
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
-$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
-if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
-  $as_echo_n "(cached) " >&6
+        aix*)
+        ax_pthread_check_macro="_THREAD_SAFE"
+        ;;
+
+        *)
+        ax_pthread_check_macro="--"
+        ;;
+esac
+if test "x$ax_pthread_check_macro" = "x--"; then :
+  ax_pthread_check_cond=0
 else
-  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
-             # Create an alternate version of $ac_link that compiles and
-             # links in two steps (.c -> .o, .o -> exe) instead of one
-             # (.c -> exe), because the warning occurs only in the second
-             # step
-             ax_pthread_save_ac_link="$ac_link"
-             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
-             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
-             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
-             ax_pthread_save_CFLAGS="$CFLAGS"
-             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
-                if test "x$ax_pthread_try" = "xunknown"; then :
-  break
+  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
 fi
-                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
-                ac_link="$ax_pthread_save_ac_link"
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_link="$ax_pthread_2step_ac_link"
-                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(void){return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-             done
-             ac_link="$ax_pthread_save_ac_link"
-             CFLAGS="$ax_pthread_save_CFLAGS"
-             if test "x$ax_pthread_try" = "x"; then :
-  ax_pthread_try=no
-fi
-             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
-$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
-
-        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
-                no | unknown) ;;
-                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
-        esac
-
-fi # $ax_pthread_clang = yes
 
 if test "x$ax_pthread_ok" = "xno"; then
 for ax_pthread_try_flag in $ax_pthread_flags; do
@@ -10830,11 +10836,11 @@
 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
                 ;;
 
-                -mt,pthread)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
-$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
-                PTHREAD_CFLAGS="-mt"
-                PTHREAD_LIBS="-lpthread"
+                *,*)
+                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+$as_echo_n "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
                 ;;
 
                 -*)
@@ -10917,7 +10923,13 @@
 #                       if $ax_pthread_check_cond
 #                        error "$ax_pthread_check_macro must be defined"
 #                       endif
-                        static void routine(void *a) { a = 0; }
+                        static void *some_global = NULL;
+                        static void routine(void *a)
+                          {
+                             /* To avoid any unused-parameter or
+                                unused-but-set-parameter warning.  */
+                             some_global = a;
+                          }
                         static void *start_routine(void *a) { return a; }
 int
 main ()
@@ -10952,6 +10964,104 @@
 done
 fi
 
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+        # Clang takes -pthread; it has never supported any other flag
+
+        # (Note 1: This will need to be revisited if a system that Clang
+        # supports has POSIX threads in a separate library.  This tends not
+        # to be the way of modern systems, but it's conceivable.)
+
+        # (Note 2: On some systems, notably Darwin, -pthread is not needed
+        # to get POSIX threads support; the API is always present and
+        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
+        # -pthread does define _REENTRANT, and while the Darwin headers
+        # ignore this macro, third-party headers might not.)
+
+        # However, older versions of Clang make a point of warning the user
+        # that, in an invocation where only linking and no compilation is
+        # taking place, the -pthread option has no effect ("argument unused
+        # during compilation").  They expect -pthread to be passed in only
+        # when source code is being compiled.
+        #
+        # Problem is, this is at odds with the way Automake and most other
+        # C build frameworks function, which is that the same flags used in
+        # compilation (CFLAGS) are also used in linking.  Many systems
+        # supported by AX_PTHREAD require exactly this for POSIX threads
+        # support, and in fact it is often not straightforward to specify a
+        # flag that is used only in the compilation phase and not in
+        # linking.  Such a scenario is extremely rare in practice.
+        #
+        # Even though use of the -pthread flag in linking would only print
+        # a warning, this can be a nuisance for well-run software projects
+        # that build with -Werror.  So if the active version of Clang has
+        # this misfeature, we search for an option to squash it.
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+             # Create an alternate version of $ac_link that compiles and
+             # links in two steps (.c -> .o, .o -> exe) instead of one
+             # (.c -> exe), because the warning occurs only in the second
+             # step
+             ax_pthread_save_ac_link="$ac_link"
+             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+             ax_pthread_save_CFLAGS="$CFLAGS"
+             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+                if test "x$ax_pthread_try" = "xunknown"; then :
+  break
+fi
+                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+                ac_link="$ax_pthread_save_ac_link"
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_link="$ax_pthread_2step_ac_link"
+                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+             done
+             ac_link="$ax_pthread_save_ac_link"
+             CFLAGS="$ax_pthread_save_CFLAGS"
+             if test "x$ax_pthread_try" = "x"; then :
+  ax_pthread_try=no
+fi
+             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+                no | unknown) ;;
+                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+        esac
+
+fi # $ax_pthread_clang = yes
+
+
+
 # Various other checks:
 if test "x$ax_pthread_ok" = "xyes"; then
         ax_pthread_save_CFLAGS="$CFLAGS"
@@ -11033,6 +11143,7 @@
 main ()
 {
 int i = PTHREAD_PRIO_INHERIT;
+                                               return i;
   ;
   return 0;
 }
@@ -11727,6 +11838,16 @@
 fi
 
 
+#
+# Set SETJMP_IS_THREAD_SAFE define.
+#
+case "${host_os}" in
+  solaris2* ) ;;
+  *)
+$as_echo "#define SETJMP_IS_THREAD_SAFE 1" >>confdefs.h
+ ;;
+esac
+
 # Configure libtool
 : ${AR_FLAGS=cr}
 enable_dlopen=yes
@@ -37293,7 +37414,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ImageMagick $as_me 7.0.10-7, which was
+This file was extended by ImageMagick $as_me 7.0.10-12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -37360,7 +37481,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ImageMagick config.status 7.0.10-7
+ImageMagick config.status 7.0.10-12
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 35069a9..876419b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@
 m4_define([magick_major_version], [7])
 m4_define([magick_minor_version], [0])
 m4_define([magick_micro_version], [10])
-m4_define([magick_patchlevel_version], [7])
+m4_define([magick_patchlevel_version], [12])
 m4_define([magick_version],
           [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
 m4_define([magick_git_revision],
@@ -561,6 +561,14 @@
 fi
 AC_SUBST(LFS_CPPFLAGS)
 
+#
+# Set SETJMP_IS_THREAD_SAFE define.
+#
+case "${host_os}" in
+  solaris2* ) ;;
+  *) AC_DEFINE(SETJMP_IS_THREAD_SAFE,1,[Setjmp/longjmp are thread safe]) ;;
+esac
+
 # Configure libtool
 : ${AR_FLAGS=cr}
 AC_LIBTOOL_DLOPEN
diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4
index 094577e..9235a18 100644
--- a/m4/ax_cflags_warn_all.m4
+++ b/m4/ax_cflags_warn_all.m4
@@ -4,33 +4,54 @@
 #
 # SYNOPSIS
 #
-#   AX_CFLAGS_WARN_ALL   [(shellvar [,default, [A/NA]])]
-#   AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
-#   AX_FCFLAGS_WARN_ALL  [(shellvar [,default, [A/NA]])]
+#   AX_CFLAGS_WARN_ALL   [(shellvar[, default[, action-if-found[, action-if-not-found]]])]
+#   AX_CXXFLAGS_WARN_ALL [(shellvar[, default[, action-if-found[, action-if-not-found]]])]
+#   AX_FCFLAGS_WARN_ALL  [(shellvar[, default[, action-if-found[, action-if-not-found]]])]
 #
 # DESCRIPTION
 #
-#   Try to find a compiler option that enables most reasonable warnings.
+#   Specify compiler options that enable most reasonable warnings.  For the
+#   GNU Compiler Collection (GCC), for example, it will be "-Wall".  The
+#   result is added to shellvar, one of CFLAGS, CXXFLAGS or FCFLAGS if the
+#   first parameter is not specified.
 #
-#   For the GNU compiler it will be -Wall (and -ansi -pedantic) The result
-#   is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default.
+#   Each of these macros accepts the following optional arguments:
 #
-#   Currently this macro knows about the GCC, Solaris, Digital Unix, AIX,
-#   HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and
-#   Intel compilers.  For a given compiler, the Fortran flags are much more
-#   experimental than their C equivalents.
+#     - $1 - shellvar
+#         shell variable to use (CFLAGS, CXXFLAGS or FCFLAGS if not
+#         specified, depending on macro)
 #
-#    - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS
-#    - $2 add-value-if-not-found : nothing
-#    - $3 action-if-found : add value to shellvariable
-#    - $4 action-if-not-found : nothing
+#     - $2 - default
+#         value to use for flags if compiler vendor cannot be determined (by
+#         default, "")
 #
-#   NOTE: These macros depend on AX_APPEND_FLAG.
+#     - $3 - action-if-found
+#         action to take if the compiler vendor has been successfully
+#         determined (by default, add the appropriate compiler flags to
+#         shellvar)
+#
+#     - $4 - action-if-not-found
+#         action to take if the compiler vendor has not been determined or
+#         is unknown (by default, add the default flags, or "" if not
+#         specified, to shellvar)
+#
+#   These macros use AX_COMPILER_VENDOR to determine which flags should be
+#   returned for a given compiler.  Not all compilers currently have flags
+#   defined for them; patches are welcome.  If need be, compiler flags may
+#   be made language-dependent: use a construct like the following:
+#
+#     [vendor_name], [m4_if(_AC_LANG_PREFIX,[C],   VAR="--relevant-c-flags",dnl
+#                     m4_if(_AC_LANG_PREFIX,[CXX], VAR="--relevant-c++-flags",dnl
+#                     m4_if(_AC_LANG_PREFIX,[FC],  VAR="--relevant-fortran-flags",dnl
+#                     VAR="$2"; FOUND="no")))],
+#
+#   Note: These macros also depend on AX_PREPEND_FLAG.
 #
 # LICENSE
 #
 #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 #   Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com>
+#   Copyright (c) 2018 John Zaitseff <J.Zaitseff@zap.org.au>
 #
 #   This program is free software; you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by the
@@ -58,65 +79,80 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 16
+#serial 25
 
-AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
-AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-VAR,[VAR="no, unknown"
-ac_save_[]FLAGS="$[]FLAGS"
-for ac_arg dnl
-in "-warn all  % -warn all"   dnl Intel
-   "-pedantic  % -Wall"       dnl GCC
-   "-xstrconst % -v"          dnl Solaris C
-   "-std1      % -verbose -w0 -warnprotos" dnl Digital Unix
-   "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
-   "-ansi -ansiE % -fullwarn" dnl IRIX
-   "+ESlit     % +w1"         dnl HP-UX C
-   "-Xc        % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
-   "-h conform % -h msglevel 2" dnl Cray C (Unicos)
-   #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
-                     [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
-FLAGS="$ac_save_[]FLAGS"
-])
-AS_VAR_POPDEF([FLAGS])dnl
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-case ".$VAR" in
-     .ok|.ok,*) m4_ifvaln($3,$3) ;;
-   .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
-   *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
+AC_DEFUN([AX_FLAGS_WARN_ALL], [
+    AX_REQUIRE_DEFINED([AX_PREPEND_FLAG])dnl
+    AC_REQUIRE([AX_COMPILER_VENDOR])dnl
+
+    AS_VAR_PUSHDEF([FLAGS], [m4_default($1,_AC_LANG_PREFIX[]FLAGS)])dnl
+    AS_VAR_PUSHDEF([VAR],   [ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
+    AS_VAR_PUSHDEF([FOUND], [ac_save_[]_AC_LANG_ABBREV[]flags_warn_all_found])dnl
+
+    AC_CACHE_CHECK([FLAGS for most reasonable warnings], VAR, [
+	VAR=""
+	FOUND="yes"
+	dnl  Cases are listed in the order found in ax_compiler_vendor.m4
+	AS_CASE("$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor",
+	    [intel],		[VAR="-w2"],
+	    [ibm],		[VAR="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"],
+	    [pathscale],	[],
+	    [clang],		[VAR="-Wall"],
+	    [cray],		[VAR="-h msglevel 2"],
+	    [fujitsu],		[],
+	    [sdcc],		[],
+	    [sx],		[VAR="-pvctl[,]fullmsg"],
+	    [portland],		[],
+	    [gnu],		[VAR="-Wall"],
+	    [sun],		[VAR="-v"],
+	    [hp],		[VAR="+w1"],
+	    [dec],		[VAR="-verbose -w0 -warnprotos"],
+	    [borland],		[],
+	    [comeau],		[],
+	    [kai],		[],
+	    [lcc],		[],
+	    [sgi],		[VAR="-fullwarn"],
+	    [microsoft],	[],
+	    [metrowerks],	[],
+	    [watcom],		[],
+	    [tcc],		[],
+	    [unknown],		[
+				    VAR="$2"
+				    FOUND="no"
+				],
+				[
+				    AC_MSG_WARN([Unknown compiler vendor returned by [AX_COMPILER_VENDOR]])
+				    VAR="$2"
+				    FOUND="no"
+				]
+	)
+
+	AS_IF([test "x$FOUND" = "xyes"], [dnl
+	    m4_default($3, [AS_IF([test "x$VAR" != "x"], [AX_PREPEND_FLAG([$VAR], [FLAGS])])])
+	], [dnl
+	    m4_default($4, [m4_ifval($2, [AX_PREPEND_FLAG([$VAR], [FLAGS])], [true])])
+	])dnl
+    ])dnl
+
+    AS_VAR_POPDEF([FOUND])dnl
+    AS_VAR_POPDEF([VAR])dnl
+    AS_VAR_POPDEF([FLAGS])dnl
 ])dnl AX_FLAGS_WARN_ALL
-dnl  implementation tactics:
-dnl   the for-argument contains a list of options. The first part of
-dnl   these does only exist to detect the compiler - usually it is
-dnl   a global option to enable -ansi or -extrawarnings. All other
-dnl   compilers will fail about it. That was needed since a lot of
-dnl   compilers will give false positives for some option-syntax
-dnl   like -Woption or -Xoption as they think of it is a pass-through
-dnl   to later compile stages or something. The "%" is used as a
-dnl   delimiter. A non-option comment can be given after "%%" marks
-dnl   which will be shown but not added to the respective C/CXXFLAGS.
 
-AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
-AC_LANG_PUSH([C])
-AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
-AC_LANG_POP([C])
-])
+AC_DEFUN([AX_CFLAGS_WARN_ALL], [dnl
+    AC_LANG_PUSH([C])
+    AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
+    AC_LANG_POP([C])
+])dnl
 
-AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
-AC_LANG_PUSH([C++])
-AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
-AC_LANG_POP([C++])
-])
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL], [dnl
+    AC_LANG_PUSH([C++])
+    AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
+    AC_LANG_POP([C++])
+])dnl
 
-AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
-AC_LANG_PUSH([Fortran])
-AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
-AC_LANG_POP([Fortran])
-])
+AC_DEFUN([AX_FCFLAGS_WARN_ALL], [dnl
+    AC_LANG_PUSH([Fortran])
+    AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
+    AC_LANG_POP([Fortran])
+])dnl
diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4
index 73efdb0..f06e865 100644
--- a/m4/ax_compiler_vendor.m4
+++ b/m4/ax_compiler_vendor.m4
@@ -8,15 +8,29 @@
 #
 # DESCRIPTION
 #
-#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-#   watcom, etc. The vendor is returned in the cache variable
-#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+#   Determine the vendor of the C, C++ or Fortran compiler.  The vendor is
+#   returned in the cache variable $ax_cv_c_compiler_vendor for C,
+#   $ax_cv_cxx_compiler_vendor for C++ or $ax_cv_fc_compiler_vendor for
+#   (modern) Fortran.  The value is one of "intel", "ibm", "pathscale",
+#   "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "portland" (PGI), "gnu"
+#   (GCC), "sun" (Oracle Developer Studio), "hp", "dec", "borland",
+#   "comeau", "kai", "lcc", "sgi", "microsoft", "metrowerks", "watcom",
+#   "tcc" (Tiny CC) or "unknown" (if the compiler cannot be determined).
+#
+#   To check for a Fortran compiler, you must first call AC_FC_PP_SRCEXT
+#   with an appropriate preprocessor-enabled extension.  For example:
+#
+#     AC_LANG_PUSH([Fortran])
+#     AC_PROG_FC
+#     AC_FC_PP_SRCEXT([F])
+#     AX_COMPILER_VENDOR
+#     AC_LANG_POP([Fortran])
 #
 # LICENSE
 #
 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
 #   Copyright (c) 2008 Matteo Frigo
+#   Copyright (c) 2018-19 John Zaitseff <J.Zaitseff@zap.org.au>
 #
 #   This program is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by the
@@ -44,45 +58,60 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 17
+#serial 30
 
-AC_DEFUN([AX_COMPILER_VENDOR],
-[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
-  dnl Please add if possible support to ax_compiler_version.m4
-  [# note: don't check for gcc first since some other compilers define __GNUC__
-  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
-           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
-           pathscale: __PATHCC__,__PATHSCALE__
-           clang:     __clang__
-           cray:      _CRAYC
-           fujitsu:   __FUJITSU
-           sdcc:      SDCC, __SDCC
-           gnu:       __GNUC__
-           sun:       __SUNPRO_C,__SUNPRO_CC
-           hp:        __HP_cc,__HP_aCC
-           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
-           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
-           comeau:    __COMO__
-           kai:       __KCC
-           lcc:       __LCC__
-           sgi:       __sgi,sgi
-           microsoft: _MSC_VER
-           metrowerks: __MWERKS__
-           watcom:    __WATCOMC__
-           portland:  __PGI
-	   tcc:       __TINYC__
-           unknown:   UNKNOWN"
-  for ventest in $vendors; do
-    case $ventest in
-      *:) vendor=$ventest; continue ;;
-      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
-    esac
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-      #if !($vencpp)
-        thisisanerror;
-      #endif
-    ])], [break])
-  done
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
- ])
-])
+AC_DEFUN([AX_COMPILER_VENDOR], [dnl
+    AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [dnl
+	dnl  If you modify this list of vendors, please add similar support
+	dnl  to ax_compiler_version.m4 if at all possible.
+	dnl
+	dnl  Note: Do NOT check for GCC first since some other compilers
+	dnl  define __GNUC__ to remain compatible with it.  Compilers that
+	dnl  are very slow to start (such as Intel) are listed first.
+
+	vendors="
+		intel:		__ICC,__ECC,__INTEL_COMPILER
+		ibm:		__xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__
+		pathscale:	__PATHCC__,__PATHSCALE__
+		clang:		__clang__
+		cray:		_CRAYC
+		fujitsu:	__FUJITSU
+		sdcc:		SDCC,__SDCC
+		sx:		_SX
+		portland:	__PGI
+		gnu:		__GNUC__
+		sun:		__SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
+		hp:		__HP_cc,__HP_aCC
+		dec:		__DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+		borland:	__BORLANDC__,__CODEGEARC__,__TURBOC__
+		comeau:		__COMO__
+		kai:		__KCC
+		lcc:		__LCC__
+		sgi:		__sgi,sgi
+		microsoft:	_MSC_VER
+		metrowerks:	__MWERKS__
+		watcom:		__WATCOMC__
+		tcc:		__TINYC__
+		unknown:	UNKNOWN
+	"
+	for ventest in $vendors; do
+	    case $ventest in
+		*:)
+		    vendor=$ventest
+		    continue
+		    ;;
+		*)
+		    vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
+		    ;;
+	    esac
+
+	    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#if !($vencpp)
+      thisisanerror;
+#endif
+	    ]])], [break])
+	done
+
+	ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
+    ])
+])dnl
diff --git a/m4/ax_prepend_flag.m4 b/m4/ax_prepend_flag.m4
new file mode 100644
index 0000000..adac8c5
--- /dev/null
+++ b/m4/ax_prepend_flag.m4
@@ -0,0 +1,51 @@
+# ===========================================================================
+#     https://www.gnu.org/software/autoconf-archive/ax_prepend_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PREPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+#   FLAG is added to the front of the FLAGS-VARIABLE shell variable, with a
+#   space added in between.
+#
+#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+#   CFLAGS) is used.  FLAGS-VARIABLE is not changed if it already contains
+#   FLAG.  If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+#   FLAG.
+#
+#   NOTE: Implementation based on AX_APPEND_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#   Copyright (c) 2018 John Zaitseff <J.Zaitseff@zap.org.au>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 2
+
+AC_DEFUN([AX_PREPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+  AS_CASE([" AS_VAR_GET(FLAGS) "],
+    [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+    [
+     FLAGS="$1 $FLAGS"
+     AC_RUN_LOG([: FLAGS="$FLAGS"])
+    ])
+  ],
+  [
+  AS_VAR_SET(FLAGS,[$1])
+  AC_RUN_LOG([: FLAGS="$FLAGS"])
+  ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_PREPEND_FLAG
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 5fbf9fe..1598d07 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -55,6 +55,7 @@
 #
 #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
 #   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#   Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
 #
 #   This program is free software: you can redistribute it and/or modify it
 #   under the terms of the GNU General Public License as published by the
@@ -82,7 +83,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 24
+#serial 27
 
 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
 AC_DEFUN([AX_PTHREAD], [
@@ -123,10 +124,12 @@
 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
 # libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
 
 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
@@ -194,14 +197,47 @@
         # that too in a future libc.)  So we'll check first for the
         # standard Solaris way of linking pthreads (-mt -lpthread).
 
-        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
+        ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
         ;;
 esac
 
+# Are we compiling with Clang?
+
+AC_CACHE_CHECK([whether $CC is Clang],
+    [ax_cv_PTHREAD_CLANG],
+    [ax_cv_PTHREAD_CLANG=no
+     # Note that Autoconf sets GCC=yes for Clang as well as GCC
+     if test "x$GCC" = "xyes"; then
+        AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
+            [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+#            if defined(__clang__) && defined(__llvm__)
+             AX_PTHREAD_CC_IS_CLANG
+#            endif
+            ],
+            [ax_cv_PTHREAD_CLANG=yes])
+     fi
+    ])
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
 
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
 AS_IF([test "x$GCC" = "xyes"],
-      [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
+      [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+AS_IF([test "x$ax_pthread_clang" = "xyes"],
+      [ax_pthread_flags="-pthread,-lpthread -pthread"])
+
 
 # The presence of a feature test macro requesting re-entrant function
 # definitions is, on some systems, a strong hint that pthreads support is
@@ -224,25 +260,86 @@
       [ax_pthread_check_cond=0],
       [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
 
-# Are we compiling with Clang?
 
-AC_CACHE_CHECK([whether $CC is Clang],
-    [ax_cv_PTHREAD_CLANG],
-    [ax_cv_PTHREAD_CLANG=no
-     # Note that Autoconf sets GCC=yes for Clang as well as GCC
-     if test "x$GCC" = "xyes"; then
-        AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
-            [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
-#            if defined(__clang__) && defined(__llvm__)
-             AX_PTHREAD_CC_IS_CLANG
-#            endif
-            ],
-            [ax_cv_PTHREAD_CLANG=yes])
-     fi
-    ])
-ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
 
-ax_pthread_clang_warning=no
+        case $ax_pthread_try_flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                *,*)
+                PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+                PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+                AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
+                PTHREAD_CFLAGS="$ax_pthread_try_flag"
+                ;;
+
+                pthread-config)
+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+                AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
+                PTHREAD_LIBS="-l$ax_pthread_try_flag"
+                ;;
+        esac
+
+        ax_pthread_save_CFLAGS="$CFLAGS"
+        ax_pthread_save_LIBS="$LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+#                       if $ax_pthread_check_cond
+#                        error "$ax_pthread_check_macro must be defined"
+#                       endif
+                        static void *some_global = NULL;
+                        static void routine(void *a)
+                          {
+                             /* To avoid any unused-parameter or
+                                unused-but-set-parameter warning.  */
+                             some_global = a;
+                          }
+                        static void *start_routine(void *a) { return a; }],
+                       [pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */])],
+            [ax_pthread_ok=yes],
+            [])
+
+        CFLAGS="$ax_pthread_save_CFLAGS"
+        LIBS="$ax_pthread_save_LIBS"
+
+        AC_MSG_RESULT([$ax_pthread_ok])
+        AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
 
 # Clang needs special handling, because older versions handle the -pthread
 # option in a rather... idiosyncratic way
@@ -261,11 +358,6 @@
         # -pthread does define _REENTRANT, and while the Darwin headers
         # ignore this macro, third-party headers might not.)
 
-        PTHREAD_CFLAGS="-pthread"
-        PTHREAD_LIBS=
-
-        ax_pthread_ok=yes
-
         # However, older versions of Clang make a point of warning the user
         # that, in an invocation where only linking and no compilation is
         # taking place, the -pthread option has no effect ("argument unused
@@ -320,78 +412,7 @@
 
 fi # $ax_pthread_clang = yes
 
-if test "x$ax_pthread_ok" = "xno"; then
-for ax_pthread_try_flag in $ax_pthread_flags; do
 
-        case $ax_pthread_try_flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -mt,pthread)
-                AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
-                PTHREAD_CFLAGS="-mt"
-                PTHREAD_LIBS="-lpthread"
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
-                PTHREAD_CFLAGS="$ax_pthread_try_flag"
-                ;;
-
-                pthread-config)
-                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
-                AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
-                PTHREAD_CFLAGS="`pthread-config --cflags`"
-                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-                ;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
-                PTHREAD_LIBS="-l$ax_pthread_try_flag"
-                ;;
-        esac
-
-        ax_pthread_save_CFLAGS="$CFLAGS"
-        ax_pthread_save_LIBS="$LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-
-        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
-#                       if $ax_pthread_check_cond
-#                        error "$ax_pthread_check_macro must be defined"
-#                       endif
-                        static void routine(void *a) { a = 0; }
-                        static void *start_routine(void *a) { return a; }],
-                       [pthread_t th; pthread_attr_t attr;
-                        pthread_create(&th, 0, start_routine, 0);
-                        pthread_join(th, 0);
-                        pthread_attr_init(&attr);
-                        pthread_cleanup_push(routine, 0);
-                        pthread_cleanup_pop(0) /* ; */])],
-            [ax_pthread_ok=yes],
-            [])
-
-        CFLAGS="$ax_pthread_save_CFLAGS"
-        LIBS="$ax_pthread_save_LIBS"
-
-        AC_MSG_RESULT([$ax_pthread_ok])
-        AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
 
 # Various other checks:
 if test "x$ax_pthread_ok" = "xyes"; then
@@ -438,7 +459,8 @@
         AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
             [ax_cv_PTHREAD_PRIO_INHERIT],
             [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
-                                             [[int i = PTHREAD_PRIO_INHERIT;]])],
+                                             [[int i = PTHREAD_PRIO_INHERIT;
+                                               return i;]])],
                             [ax_cv_PTHREAD_PRIO_INHERIT=yes],
                             [ax_cv_PTHREAD_PRIO_INHERIT=no])
             ])
diff --git a/utilities/ImageMagick.1 b/utilities/ImageMagick.1
index f11bbb6..e2ea6f0 100644
--- a/utilities/ImageMagick.1
+++ b/utilities/ImageMagick.1
@@ -1,106 +1,164 @@
-.TH ImageMagick 1 "Date: 2009/01/10 01:00:00" "ImageMagick"
+.TH ImageMagick 1 "2020-04-25" "ImageMagick"
+
 .SH NAME
-ImageMagick \- is a free software suite for the creation, modification and display of bitmap images.
+ImageMagick \- a free software suite for the creation, modification and
+display of bitmap images.
+
 .SH SYNOPSIS
 \fBmagick\fP [\fIoptions\fP|\fIinput-file\fP]... \fIoutput-file\fP
 \fBmagick-script\fP \fIscript-file\fP [\fIscript-arguments\fP]...
+
 .SH OVERVIEW
 
-Use ImageMagick\[rg] to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and B\\['e]zier curves.
+Use ImageMagick\[rg] to create, edit, compose, or convert bitmap images. It can
+read and write images in a variety of formats (over 200) including PNG, JPEG,
+GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to
+resize, flip, mirror, rotate, distort, shear and transform images, adjust image
+colors, apply various special effects, or draw text, lines, polygons, ellipses
+and B\['e]zier curves.
 
-The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), JuliaIO (Julia), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), magick (R), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
+The functionality of ImageMagick is typically utilized from the command-line.
+It can also be accessed from programs written in your favorite language using
+the corresponding interface: G2F (Ada), MagickCore (C), MagickWand (C),
+ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java),
+JuliaIO (Julia), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET
+(.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP),
+IMagick (PHP), PythonMagick (Python), magick (R), RMagick (Ruby), or TclMagick
+(Tcl/TK). With a language interface, use ImageMagick to modify or create images
+dynamically and automagically.
 
-ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
+ImageMagick utilizes multiple computational threads to increase performance.
+It can read, process, or write mega-, giga-, or tera-pixel image sizes.
 
-ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under a derived Apache 2.0 license.
+ImageMagick is free software delivered as a ready-to-run binary distribution,
+or as source code that you may use, copy, modify, and distribute in both open
+and proprietary applications. It is distributed under a derived Apache 2.0
+license.
 
-The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error, thread data race detection, and continuous fuzzing to help prevent security vulnerabilities.
+The ImageMagick development process ensures a stable API and ABI. Before each
+ImageMagick release, we perform a comprehensive security assessment that
+includes memory error, thread data race detection, and continuous fuzzing to
+help prevent security vulnerabilities.
 
-The current release is ImageMagick 7.0.8-11. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others.
+The current release is ImageMagick 7.0.8-11. It runs on Linux, Windows, Mac Os
+X, iOS, Android OS, and others.  We continue to maintain the legacy release of
+ImageMagick, version 6, at https://legacy.imagemagick.org.
 
-The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is https://github.com/ImageMagick. We maintain a source code mirror at https://gitlab.com/ImageMagick.
+The authoritative ImageMagick web site is https://imagemagick.org. The
+authoritative source code repository is https://github.com/ImageMagick. We
+maintain a source code mirror at https://gitlab.com/ImageMagick.
 
-We continue to maintain the legacy release of ImageMagick, version 6, at https://legacy.imagemagick.org.
+ImageMagick is a suite of command-line utilities for manipulating images.  You
+may have edited images at one time or another using programs such as GIMP or
+Photoshop, which expose their functionality mainly through a graphical user
+interface. However, a GUI program is not always the right tool. Suppose you
+want to process an image dynamically from a web script, or you want to apply
+the same operations to many images, or repeat a specific operation at different
+times to the same or different image. For these types of operations, a
+command-line utility is more suitable.
 
-The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically.
+The remaining of this manpage is a list of the available command-line utilities
+and their short descriptions.  For further documentation conserning a
+particular command and its options, consult the corresponding manpage. If you
+are just getting aquainted with ImageMagick, start at the top of that list, the
+magick(1) program, and work your way down. Also, make sure to check out Anthony
+Thyssen's tutorial on how to use ImageMagick utilities to convert, compose, or
+edit images from the command-line.
 
-ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustom to editing images one at a time with a graphical user interface (GUI) with such programs as gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific operation at different times to the same or different image. For these types of operations, the command-line image processing utility is appropriate.
-
-In the paragraphs below, find a short description for each command-line tool.Cl
-ick on the program name to get details on the program usage and a list of comman
-d-line options that alters how the program performs. If you are just getting acq
-uainted with ImageMagick, start at the top of the list, the convert program, and
- work your way down. Also be sure to peruse Anthony Thyssen's tutorial on how to
- use ImageMagick utilities to convert, compose, or edit images from the command-
-line.
 .TP
 .B magick
+Read images into memory, perform operations on those images, and write them out
+to either the same or some other image file format.  The "-script" option can
+be used to switch from processing command line options, to reading options from
+a file or pipeline.
 
-Read images into memory, and perform operations on those images, and write
-them out to either the same or some other image file format.
-
-The "-script" option can be switch from processing command line options,
-to reading options from a file or pipeline.
 .TP
 .B magick-script
-
-As "magick" command but with an implied "-script" option. Allows it to be used
-in special "#!/usr/bin/env magick-script" scripts that will search for the
-"magick-script" command anywhere along the users command path, rather than in
-a hardcorded command location.
+This command is simillar to magick(1) but with an implied "-script" option.  It
+is useful in special "#!/usr/bin/env magick-script" scripts that search for the
+magick-script(1) command anywhere along the users PATH, rather than in a
+hardcorded command location.
 
 .TP
 .B convert
+Available for Backward compatiblity with ImageMagick's version 6 convert(1).
+Essentially, it is just an alias to a restrictive form of the magick(1)
+command, which should be used instead.
 
-Backwards compatiblity for ImageMagick version 6 "convert". Essentually an
-alias to a restrictive form of the "magick" command, which should be used
-instead.
 .TP
 .B mogrify
+Resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample,
+and much more. This command overwrites the original image file, whereas
+convert(1) writes to a different image file.
 
-resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert writes to a different image file.
 .TP
 .B identify
+Describe the format and characteristics of one or more image files.
 
-describes the format and characteristics of one or more image files.
 .TP
 .B composite
+Overlap one image over another.
 
-overlaps one image over another.
 .TP
 .B montage
+Create a composite image by combining several separate ones. The images are
+tiled on the composite image, optionally adorned with a border, frame, image
+name, and more.
 
-create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.
 .TP
 .B compare
-
-mathematically and visually annotate the difference between an image and its reconstruction..
+Mathematically and visually annotate the difference between an image and its
+reconstruction.
 
 .TP
 .B stream
-
-is a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components.
+Stream one or more pixel components of the image or portion of the image to
+your choice of storage formats. It writes the pixel components as they are read
+from the input image, a row at a time, making stream(1) desirable when working
+with large images, or when you require raw pixel components.
 
 .TP
 .B display
+Display an image or image sequence on any X server.
 
-displays an image or image sequence on any X server.
 .TP
 .B animate
+Animate an image sequence on any X server.
 
-animates an image sequence on any X server.
 .TP
 .B import
+Save any visible window on any X server and output it as an image file. You can
+capture a single window, the entire screen, or any rectangular portion of the
+it.
 
-saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
 .TP
 .B conjure
+Interpret and execute scripts written in the Magick Scripting Language (MSL).
 
-interprets and executes scripts written in the Magick Scripting Language (MSL).
 .PP
-For more information about the ImageMagick, point your browser to file:///usr/local/share/doc/ImageMagick-7/index.html or http://imagemagick.org/.
+For more information about the ImageMagick, point your browser to
+file:///usr/local/share/doc/ImageMagick-7/index.html or
+https://imagemagick.org/.
+
 .SH SEE ALSO
-convert(1), compare(1), composite(1), conjure(1), identify(1), import(1), magick(1), magick-script(1), montage(1), display(1), animate(1), import(1), Magick++-config(1), MagickCore-config(1), MagickWand-config(1)
+convert(1),
+compare(1),
+composite(1),
+conjure(1),
+identify(1),
+import(1),
+magick(1),
+magick-script(1),
+montage(1),
+display(1),
+animate(1),
+import(1),
+Magick++-config(1),
+MagickCore-config(1),
+MagickWand-config(1)
 
 .SH COPYRIGHT
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/local/share/doc/ImageMagick-7/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and
+licenses apply to this software, see
+file:///usr/local/share/doc/ImageMagick-7/www/license.html or
+https://imagemagick.org/script/license.php\fP
diff --git a/utilities/ImageMagick.1.in b/utilities/ImageMagick.1.in
index 477c080..1ea015c 100644
--- a/utilities/ImageMagick.1.in
+++ b/utilities/ImageMagick.1.in
@@ -1,106 +1,164 @@
-.TH ImageMagick 1 "Date: 2009/01/10 01:00:00" "ImageMagick"
+.TH ImageMagick 1 "2020-04-25" "ImageMagick"
+
 .SH NAME
-ImageMagick \- is a free software suite for the creation, modification and display of bitmap images.
+ImageMagick \- a free software suite for the creation, modification and
+display of bitmap images.
+
 .SH SYNOPSIS
 \fBmagick\fP [\fIoptions\fP|\fIinput-file\fP]... \fIoutput-file\fP
 \fBmagick-script\fP \fIscript-file\fP [\fIscript-arguments\fP]...
+
 .SH OVERVIEW
 
-Use ImageMagick\[rg] to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and B\\['e]zier curves.
+Use ImageMagick\[rg] to create, edit, compose, or convert bitmap images. It can
+read and write images in a variety of formats (over 200) including PNG, JPEG,
+GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to
+resize, flip, mirror, rotate, distort, shear and transform images, adjust image
+colors, apply various special effects, or draw text, lines, polygons, ellipses
+and B\['e]zier curves.
 
-The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), JuliaIO (Julia), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), magick (R), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
+The functionality of ImageMagick is typically utilized from the command-line.
+It can also be accessed from programs written in your favorite language using
+the corresponding interface: G2F (Ada), MagickCore (C), MagickWand (C),
+ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java),
+JuliaIO (Julia), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET
+(.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP),
+IMagick (PHP), PythonMagick (Python), magick (R), RMagick (Ruby), or TclMagick
+(Tcl/TK). With a language interface, use ImageMagick to modify or create images
+dynamically and automagically.
 
-ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
+ImageMagick utilizes multiple computational threads to increase performance.
+It can read, process, or write mega-, giga-, or tera-pixel image sizes.
 
-ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under a derived Apache 2.0 license.
+ImageMagick is free software delivered as a ready-to-run binary distribution,
+or as source code that you may use, copy, modify, and distribute in both open
+and proprietary applications. It is distributed under a derived Apache 2.0
+license.
 
-The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error, thread data race detection, and continuous fuzzing to help prevent security vulnerabilities.
+The ImageMagick development process ensures a stable API and ABI. Before each
+ImageMagick release, we perform a comprehensive security assessment that
+includes memory error, thread data race detection, and continuous fuzzing to
+help prevent security vulnerabilities.
 
-The current release is ImageMagick 7.0.8-11. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others.
+The current release is ImageMagick 7.0.8-11. It runs on Linux, Windows, Mac Os
+X, iOS, Android OS, and others.  We continue to maintain the legacy release of
+ImageMagick, version 6, at https://legacy.imagemagick.org.
 
-The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is https://github.com/ImageMagick. We maintain a source code mirror at https://gitlab.com/ImageMagick.
+The authoritative ImageMagick web site is https://imagemagick.org. The
+authoritative source code repository is https://github.com/ImageMagick. We
+maintain a source code mirror at https://gitlab.com/ImageMagick.
 
-We continue to maintain the legacy release of ImageMagick, version 6, at https://legacy.imagemagick.org.
+ImageMagick is a suite of command-line utilities for manipulating images.  You
+may have edited images at one time or another using programs such as GIMP or
+Photoshop, which expose their functionality mainly through a graphical user
+interface. However, a GUI program is not always the right tool. Suppose you
+want to process an image dynamically from a web script, or you want to apply
+the same operations to many images, or repeat a specific operation at different
+times to the same or different image. For these types of operations, a
+command-line utility is more suitable.
 
-The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically.
+The remaining of this manpage is a list of the available command-line utilities
+and their short descriptions.  For further documentation conserning a
+particular command and its options, consult the corresponding manpage. If you
+are just getting aquainted with ImageMagick, start at the top of that list, the
+magick(1) program, and work your way down. Also, make sure to check out Anthony
+Thyssen's tutorial on how to use ImageMagick utilities to convert, compose, or
+edit images from the command-line.
 
-ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustom to editing images one at a time with a graphical user interface (GUI) with such programs as gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific operation at different times to the same or different image. For these types of operations, the command-line image processing utility is appropriate.
-
-In the paragraphs below, find a short description for each command-line tool.Cl
-ick on the program name to get details on the program usage and a list of comman
-d-line options that alters how the program performs. If you are just getting acq
-uainted with ImageMagick, start at the top of the list, the convert program, and
- work your way down. Also be sure to peruse Anthony Thyssen's tutorial on how to
- use ImageMagick utilities to convert, compose, or edit images from the command-
-line.
 .TP
 .B magick
+Read images into memory, perform operations on those images, and write them out
+to either the same or some other image file format.  The "-script" option can
+be used to switch from processing command line options, to reading options from
+a file or pipeline.
 
-Read images into memory, and perform operations on those images, and write
-them out to either the same or some other image file format.
-
-The "-script" option can be switch from processing command line options,
-to reading options from a file or pipeline.
 .TP
 .B magick-script
-
-As "magick" command but with an implied "-script" option. Allows it to be used
-in special "#!/usr/bin/env magick-script" scripts that will search for the
-"magick-script" command anywhere along the users command path, rather than in
-a hardcorded command location.
+This command is simillar to magick(1) but with an implied "-script" option.  It
+is useful in special "#!/usr/bin/env magick-script" scripts that search for the
+magick-script(1) command anywhere along the users PATH, rather than in a
+hardcorded command location.
 
 .TP
 .B convert
+Available for Backward compatiblity with ImageMagick's version 6 convert(1).
+Essentially, it is just an alias to a restrictive form of the magick(1)
+command, which should be used instead.
 
-Backwards compatiblity for ImageMagick version 6 "convert". Essentually an
-alias to a restrictive form of the "magick" command, which should be used
-instead.
 .TP
 .B mogrify
+Resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample,
+and much more. This command overwrites the original image file, whereas
+convert(1) writes to a different image file.
 
-resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert writes to a different image file.
 .TP
 .B identify
+Describe the format and characteristics of one or more image files.
 
-describes the format and characteristics of one or more image files.
 .TP
 .B composite
+Overlap one image over another.
 
-overlaps one image over another.
 .TP
 .B montage
+Create a composite image by combining several separate ones. The images are
+tiled on the composite image, optionally adorned with a border, frame, image
+name, and more.
 
-create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.
 .TP
 .B compare
-
-mathematically and visually annotate the difference between an image and its reconstruction..
+Mathematically and visually annotate the difference between an image and its
+reconstruction.
 
 .TP
 .B stream
-
-is a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components.
+Stream one or more pixel components of the image or portion of the image to
+your choice of storage formats. It writes the pixel components as they are read
+from the input image, a row at a time, making stream(1) desirable when working
+with large images, or when you require raw pixel components.
 
 .TP
 .B display
+Display an image or image sequence on any X server.
 
-displays an image or image sequence on any X server.
 .TP
 .B animate
+Animate an image sequence on any X server.
 
-animates an image sequence on any X server.
 .TP
 .B import
+Save any visible window on any X server and output it as an image file. You can
+capture a single window, the entire screen, or any rectangular portion of the
+it.
 
-saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
 .TP
 .B conjure
+Interpret and execute scripts written in the Magick Scripting Language (MSL).
 
-interprets and executes scripts written in the Magick Scripting Language (MSL).
 .PP
-For more information about the ImageMagick, point your browser to file://@DOCUMENTATION_PATH@/index.html or http://imagemagick.org/.
+For more information about the ImageMagick, point your browser to
+file://@DOCUMENTATION_PATH@/index.html or
+https://imagemagick.org/.
+
 .SH SEE ALSO
-convert(1), compare(1), composite(1), conjure(1), identify(1), import(1), magick(1), magick-script(1), montage(1), display(1), animate(1), import(1), Magick++-config(1), MagickCore-config(1), MagickWand-config(1)
+convert(1),
+compare(1),
+composite(1),
+conjure(1),
+identify(1),
+import(1),
+magick(1),
+magick-script(1),
+montage(1),
+display(1),
+animate(1),
+import(1),
+Magick++-config(1),
+MagickCore-config(1),
+MagickWand-config(1)
 
 .SH COPYRIGHT
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and
+licenses apply to this software, see
+file://@DOCUMENTATION_PATH@/www/license.html or
+https://imagemagick.org/script/license.php\fP
diff --git a/version.sh b/version.sh
index d387197..3e775ed 100644
--- a/version.sh
+++ b/version.sh
@@ -19,7 +19,7 @@
 PACKAGE_VERSION='7.0.10'
 PACKAGE_PERL_VERSION='7.0.10'
 PACKAGE_LIB_VERSION="0x70A"
-PACKAGE_RELEASE="7"
+PACKAGE_RELEASE="12"
 PACKAGE_LIB_VERSION_NUMBER="7,0,10,${PACKAGE_RELEASE}"
 PACKAGE_RELEASE_DATE_RAW=`date +%F`
 PACKAGE_RELEASE_DATE_REPRODUCIBLE="${PACKAGE_CHANGE_DATE}"
@@ -31,12 +31,13 @@
 PACKAGE_VERSION_ADDENDUM="-${PACKAGE_RELEASE}"
 
 #
-# Versions are denoted using a standard triplet of integers:
-# MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are
-# incompatible, large-scale upgrades of the API. MINOR versions retain
-# source and binary compatibility with older minor versions, and changes
-# in the PATCH level are perfectly compatible, forwards and backwards.
-# See http://apr.apache.org/versioning.html.
+# If the library source code has changed at all since the last update,
+# increment revision (‘c:r:a’ becomes ‘c:r+1:a’).  If any interfaces have been
+# added, removed, or changed since the last update, increment current, and set
+# revision to 0.  If any interfaces have been added since the last public
+# release, then increment age.  If any interfaces have been removed or changed
+# since the last public release, then set age to 0.
+#
 #
 # PLEASE NOTE that doing a SO BUMP aka raising the CURRENT REVISION
 # could be avoided using libversioning aka map files.  You MUST change .map