How to compile PostgreSQL with OpenSSL support?


I need to compile libpq (PostgreSQL client library) and pgsql-cli (Command Line Interface for PostgreSQL databases) with OpenSSL support.
OpenWRT 19.07.5
OpenSSL 1.1.1h compiled OK
libcrypto presents.

I changed Makefile(feeds/packeges/libs/postgresql/Makefile) :

HOST_CONFIGURE_ARGS += \ ... --with-openssl="yes" \ ...
CONFIGURE_ARGS += \ ... --with-openssl="yes" \ ...

but got error:

checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL

What I need to do for build PostgreSQL with OpenSSL support?

I saw this topic Need help compiling PostgreSQL with OpenSSL support - #2 by micmac1 but really i didn't understand how obtain that makefile.