I want to install php-5.3 from source.

Source compilation of php5.3.29 on a server that already has php7 installed
I am trying to use it, but the following error occurs in make.

If i have any questions, thank you.

OS: Amazon Linux 2
DB: mariadb-10.2 postgresql-9.6.8
WEB: nginx-1.12.2 httpd-2.4.34

Configure options
./ configure --prefix =/usr/local/lib/php-5.3
--with-config-file-path =/usr/local/lib/php-5.3
 --libdir =/usr/lib64 --with-openssl --with-bz2
 --with-curl --enable-exif --enable-ftp --with-zlib
 --with-zlib-dir =/usr/include/--enable-cgi
 --enable-mbstring --with-mcrypt --enable-mbregex
 --enable-pcntl --enable-shmop --with-snmp --enable-soap
 --enable-sockets --enable-sysvmsg --enable-sysvsem
 --enable-sysvshm --enable-wddx --enable-sockets --with-gd
 --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext
 --with-gmp --with-jpeg-dir =/usr --with-png-dir =/usr
 --program-suffix = 53 --with-pgsql --with-pdo-pgsql
 --with-libdir = lib64 --with-mysql
Error message

The following are errors when executing make.

/usr/local/src/php-5.3.29/ext/mysql/php_mysql.c: In function ‘php_mysql_do_connect’:
/usr/local/src/php-5.3.29/ext/mysql/php_mysql.c:695:36: error: ‘MYSQL_PORT’ undeclared (first use in this function);did you mean ‘MYSQL_STMT’?
  int hashed_details_length, port = MYSQL_PORT;
                                    ^ ~~~~~~~~~
/usr/local/src/php-5.3.29/ext/mysql/php_mysql.c:695:36: note: each undeclared identifier is reported only once for each function it appears in
make: *** [ext/mysql/php_mysql.lo] Error 1