Thanks to peter and Eric. Yes, the problem is the square backect. It should be \([[^ ]]*\). After I put it in set -vx/set +vx block, I notice the command exactly executed was: php-config --configure-options | sed -n 's|.*--with-config-file-scan-dir=\(^ *\).*|\1|p' both backet were missing. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf