I am trying to install php from source again and I have done it several times by now. I really need freetype support, and when I try to compile php everything is alright except for the freetype.
PHP VERSION: 8.0.1
Error: configure: WARNING: unrecognized options: --with-freetype-dir
terminal command:
sudo ./configure --prefix=/usr/local/php --with-mysqli=mysqlnd --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg --with-zlib --with-kerberos --enable-gd --with-freetype-dir=/usr/local/freetype2/ --with-freetype
From the manual
To enable support for FreeType 2 add --with-freetype-dir=DIR. As of PHP 7.4.0 use --with-freetype instead, which relies on pkg-config.