Before installing Wine from source, make sure you uninstall any Wine
binary packages you may have on your system. Installing from source
requires use of the terminal window as well as a full copy of the
Wine source code. Once having downloaded the source from Git or
extracted it from an archive, navigate to it using the terminal and
then follow the remaining steps.

Wine makes use of many open source libraries during its operation.
While Wine is not strictly dependent on these libraries and will
compile without most of them, much of Wine functionality is
improved by having them available at compile time. In the past,
many user problems were caused by people not having the necessary
development libraries when they built Wine from source; because of
this reason and others, we highly recommend installing via binary
packages or by building source packages which can automatically
satisfy their build dependencies.

If you wish to install build dependencies by hand, there are several
ways to see if you're missing some useful development libraries.
The most straightforward approach is to watch the output of
configure before you compile Wine and see if anything
important is missing; if it is, simply install what's missing and rerun
configure before compiling. You can also check the file
configure generates (include/config.h) and see what files
configure is looking for but not finding.

To uninstall Wine from source, once again navigate to the same
source folder that you used to install Wine using the terminal.
Then, run the following command:

# make uninstall

This command will require root privileges, and should remove all of
the Wine files from your system. It will not, however,
remove your Wine configuration and applications located in your
user home directory, so you are free to install another version of
Wine or delete that configuration by hand.