Memorandum: How to install ImageMagick® from source on OS X 10.11, 10.12 and 10.13 High Sierra

How to install ImageMagick® from source on OS X 10.11, 10.12 and 10.13 High Sierra

With trial and error, I have managed to compile and install the latest ImageMagick supporting PNG file format from source.
This is the memorandum how to compile and install ImageMagick from source on OS X 10.11, mac OS 10.12 Sierra andmac OS 10.13 High Sierra without MacPorts nor Homebrew.

Modern releases of ImageMagick 6.9.3.x use libpng.pc to find and configure the PNG reference library.
Compiling ImageMagick 7.0.1.x with the PNG delegate library, pkg-config is required.
For compiling ImageMagick 7.0.6.x with the latest PNG library (libpng ≧1.6.31), zlib library is required.