This method is suitable for compiling PHP from the source code not only for LMDB, but also through it you can perform any kind of configuration before installation.
Unfortunately, it is currently not possible to change the database size and it is fixed at a size of 1MB (this restriction is defined in the library itself). To get around this, you need to patch the library itself before installation. Look here as: https://gist.github.com/saippuakauppias/95b6f7b139b3d117b7dac4aeead9f5b4