This is an old revision of the document!
This guide is aimed at Raspbian Linux (Stretch) on Raspberry PI, but should work on any Linux/UNIX like system DosBox supports.
To compile DosBox, you will need SDL 1.2 and SDL-net in addition to the usual development toolchain. You will also need Subversion to get dosbox and patch to patch it.
sudo apt-get install build-essential libsdl1.2-dev libsdl-net1.2-dev subversion automake
The most recent DosBox release has some issues with DOS doors, and the most recent Subversion code also has issues, so you will need a specific revision from the subversion repository. In my tests I have found r3933 to work well. Other revisions may work, but have not been tested.
svn checkout -r3933 svn://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk dosbox-code-0
Now we have the DosBox code, you will probably want to patch it to fix a specific bug that happens with some doors which will appear as though when you press enter, it receives the enter command twice.
wget https://gist.githubusercontent.com/apamment/bb438d9be6dc8e67c36239fd64047ece/raw/3e942c68d7a970f3404bffc2408165d810c4bef7/dosbox-nullmodem.diff cd dosbox-code-0 patch -p1 < ../dosbox-nullmodem.diff
Compiling DosBox takes a long time on the Raspberry PI and will appear to have frozen a few times - particularly when compiling the render-scalers file - don't worry, just leave it it will eventually move on.
./autogen.sh ./configure make sudo make install
These commands will compile and install DosBox into /usr/local/bin.