Installing Wine 1.5: configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries
I guess you use Ubuntu 12.04 x64 which now supports multi-architecture. In other words, on a 64-bit system you can build only Wine-x64 version. Building 32-bit Wine on Ubuntu 12.04 x64 seems too buggy as for now.
So just run this command:
./configure --enable-win64
As per: https://stackoverflow.com/a/17748092/108802
You need to install the gcc-multilibs.
sudo apt-get install gcc-multilib g++-multilib
Then [...] specifyiong a 32-bit host and passing 32-bit compilation flags:
./configure --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
try installing the 32 bits dependencies
sudo apt-get install ia32-libs
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install xserver-xorg-dev:i386 libfreetype6-dev:i386