MacでM1を使っている際に、Xdebugをインストールする場合、以下のコマンドで実行するといいです。LAMP環境は、XAMMPをつかって構築しています。
phpizeする際に以下のエラーがでた。
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
brewをつかってautoconfをインストールしてみたら、エラーがでなくなりました。