Configure python 3.12.0, getting error with zlib module

Trying to build a Python for the virtual environemnt.
Trying to build python 3.12.0
Using this command:

./configure --enable-optimizations --with-lto=full && make

have checeked there it zlib module
the version is 1.2.11

The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_tkinter _uuid readline
zlib
To find the necessary bits, look in configure.ac and config.log.

How to get the zlib?

This check does not mean that the zlib system package is available. It only means that someone was able to compile the copy of Python 2.7.16 that’s on your system, using such a package.

You should start by following this advice, and then by reading the section on installation dependencies in the guide for Python developers. (Unfortunately, the main user documentation about building Python on Unix does not explain very much about this.)

How do I follow the advice?
What steps do I do

I open the configure.ac file, is there any line i need to add any command to run?

As the linked documentation says: you need to install the dependencies. This is not something that the Python config does for you, it is something you do beforehand. Consider it as similar to installing the compiler, or make.

If you’re on a Debian-family Linux (including Ubuntu), you should be able to sudo apt build-dep python3 to get the necessary packages for compiling Python from source.

running this command is taking very long, more than 15 minutes, and it is still running ,is this normal?

going for an hour is this normal?