I just had exactly the same issues, but I worked around them as follows.
A caveat - this is a Debian 8 x64 box, but it ought to work for Ubuntu as well:
Firstly - install prerequisite tools + libs
--------------------------------------
sudo apt-get install build-essential cdparanoia vorbis-tools automake
This is a 32-bit install on x64, so you'll need a ton of 32-bit libs. Thankfully, this is quite painless:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get
install libpng12-0:i386 libsdl2-dev:i386 zlib1g-dev:i386
libfreetype6-dev:i386 libglib2.0-dev:i386 libavahi-client-dev:i386
libdirectfb-dev:i386 libpulse-dev:i386 libsdl1.2-dev:i386
libopenal-dev:i386 libvorbis-dev:i386
=======
If at any point you get stuck missing a prerequisite file, my solution is:
sudo apt-get install apt-file
sudo apt-file update
apt-file search <thefile>
Then apt-get install the lib it indicates with :i386 on the end.
======
Download, extract, patch
-----------------------------------
wget
http://swars.vexillium.org/files/swars-0.3.tar.bz2tar -xf swars-0.3.tar.bz2
cd swars-0.3
----------------------
For some reason automake complains about missing the file ./compile . automake --add-missing fixes this.
----------------------
aclocal
automake --add-missing
automake
autoconf
--------------------
Now you need to go patch the configure and resultant makefiles. I don't know automake so well, so I don't know how to patch this properly, but you can fix the resulting Makefiles OK.
Firstly, open the file configure and comment out (prepend with #) the line that begins:
-------------------
as_fn_error $? "Sorry, this Syndicate Wars port will only run on i386 processors
------------------
Then run ./configure, indicating your install directory (default is /usr/share):
------------------
./configure --enable-debug --prefix=$TARGET_DIR
------------------
This spits out all the requisite Makefiles. The key one is in src/, so go edit that one.
The key variables here are CFLAGS and CCASFLAGS, the two flag sets used to pass to gcc for C and ASM code.
You'll also need to alter the LIBS as configure fails to pick up on the i386 libs properly (at least for me)
---------------
Edit src/Makefile and:
prepend '-m32' to CCASFLAGS and CFLAGS (e.g. the line should read CCASFLAGS='-m32 -g')
add '-L/usr/lib32 -L /lib32' to LIBS
--------------
Now that's done, you can make properly. Warnings are OK, but watch out for errors. It ought to compile correctly, so you can go ahead and install afterwards:
--------------
make
make install
-------------
All that's left is getting the data into the right place. The trick there is to install relative to your TARGET_DIR (if you're using a non-standard location) like so:
$TARGET_DIR/share/swars
on the util/install script.