title: Building/Installing XDebug on Mac OSX with MAMP
body: <p>I'm having a problem building / installing XDebug on Mac OSX with MAMP.</p>
  
  <p>I searched online extensively so far and at the moment I am stuck on the part of XDebug "Installation Wizard" that tells me to "Run: phpize" on the source code I downloaded. </p>
  
  <p>When i run <code>phpize</code> I get the following message:</p>
  
  <pre><code>new-host-2:xdebug-2.2.0 Dima$ phpize
  grep: /usr/include/php/main/php.h: No such file or directory
  grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
  grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
  Configuring for:
  PHP Api Version:        
  Zend Module Api No:     
  Zend Extension Api No:  
  Cannot find autoconf. Please check your autoconf installation and the
  $PHP_AUTOCONF environment variable. Then, rerun this script.
  </code></pre>
  
  <p>If i do a <code>which phpize</code> i get:</p>
  
  <pre><code>new-host-2:xdebug-2.2.0 Dima$ which phpize
  /usr/bin/phpize
  </code></pre>
  
  <p>This is not the version I want to use, I want to use the MAMP installed version of <code>phpize</code> I assume since i want to install XDebug on the MAMP version of PHP. This is puzzling because i added the MAMP specific PHP bin path to my .bash_profile already into the <code>$PATH</code> variable.</p>
  
  <p>If i run <code>echo $PATH</code> i get:</p>
  
  <pre><code>new-host-2:xdebug-2.2.0 Dima$ echo $PATH
  /opt/local/bin:/opt/local/sbin:/Applications/MAMP/bin/php/php5.4.3/bin:/Users/Dima/.rvm/gems/ruby-1.9.2-p290/bin:/Users/Dima/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/Dima/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/Dima/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
  </code></pre>
  
  <p>The MAMP specific PHP path shows up ahead of '/usr/bin'. Next thing i tried is running the MAMP specific <code>phpize</code> providing it the entire path manually like so:</p>
  
  <pre><code>new-host-2:xdebug-2.2.0 Dima$ /Applications/MAMP/bin/php/php5.4.3/bin/phpize 
  -bash: /Applications/MAMP/bin/php/php5.4.3/bin/phpize: Permission denied
  </code></pre>
  
  <p>Now i checked for permissions on these files in Finder and it shows that I have full permission to read and write the files this folder. I am a little lost. Any help would be appreciated greatly. I can post any additionally information if it would be helpful to diagnose this problem.</p>