cannot find autoconf. please check your autoconf installation Xampp in CentOS
I got here looking for an answer for docker when using Alpine linux this worked for me (I tried @Dimitros solution but did not work):
RUN apk --no-cache add pcre-dev ${PHPIZE_DEPS} \ && pecl install xdebug \ && docker-php-ext-enable xdebug \ && apk del pcre-dev ${PHPIZE_DEPS}