title: Install imagick extension in Mac OS Catalina : php_imagick.h:42:10: fatal error: 'php.h' file not found
body: <p>I've followed <a href="https://ma.ttias.be/install-phps-imagick-extension-on-mac-with-brew/" rel="noreferrer">these steps</a> to install <code>imagemagick</code> and php extension <code>imagick</code> in my computer with Mac OS Catalina and I can't seem to find a way. </p>
  
  <p>I always get the following error when trying to install <code>imagick</code> with <code>$ sudo pecl install imagick</code>:</p>
  
  <pre><code>php_imagick.h:42:10: fatal error: 'php.h' file not found
  #include "php.h"
           ^~~~~~~
  1 error generated.
  make: *** [imagick_file.lo] Error 1
  ERROR: `make' failed
  </code></pre>
  
  <p>I'm using <code>php.7.3.11</code>.</p>
  
  <p>Apparently Mac OS X Catalina decided to move the headers to another folder and now it doesn't seem to find them.</p>
  
  <p>I've been reading <a href="https://stackoverflow.com/a/58384397/1081396">this answer</a> but seems like the solution is too long to be true. Isn't there any other more simple and straight forward method? </p>
  
  <p>It seems others <a href="https://affinitybridge.com/blog/adding-php-extensions-system-php-under-os-x-1015-catalina" rel="noreferrer">manage to fix it for other extensions</a> with much less trouble. 
  However, I'm not quite sure the steps for Imagick are exactly the same...</p>