Full conversion from C++ to C
Ha! Now there's something you don't see everyday!
Not a huge fan of autoconf myself for this reason:
(and nowadays, there isn't *quite* the ridiculous proliferation of wildly different unices that there were in the '80s that made autoconf so necessary, though I suppose there are still enough.)
- {l Code}: {l Select All Code}
scameron@wombat ~/github/pr-starfighter/starfighter $ autoconf
configure.ac:11: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:68: error: possibly undefined macro: AM_CONDITIONAL
scameron@wombat ~/github/pr-starfighter/starfighter $ ls
autom4te.cache configure.ac data LICENSES mac misc README.txt src win32build.sh
configure COPYING gfx locale Makefile.am music sound starfighter.sh
scameron@wombat ~/github/pr-starfighter/starfighter $ ./configure
./configure: line 2115: syntax error near unexpected token `foreign'
./configure: line 2115: `AM_INIT_AUTOMAKE(foreign -Wall -Werror)'
scameron@wombat ~/github/pr-starfighter/starfighter $
Hmm, usually, "autoconfiscated" programs have a source distribution (output of "make dist") which includes a pre-built configure script to avoid the above nonsense... and poking around a bit more, I see *there is* such a source distribution:
https://github.com/pr-starfighter/starf ... src.tar.gz Nice.
However, it fails to build for me:
- {l Code}: {l Select All Code}
/usr/bin/ld: starfighter-game.o: undefined reference to symbol 'sincosf@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:423: recipe for target 'starfighter' failed
make[2]: *** [starfighter] Error 1
make[2]: Leaving directory '/home/scameron/starfighter-2.0-src/src'
Makefile:445: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/scameron/starfighter-2.0-src'
Makefile:341: recipe for target 'all' failed
make: *** [all] Error 2
sincosf, eh? (I also tried "make CFLAGS='-O2 -D_GNU_SOURCE'" and that didn't help).
- {l Code}: {l Select All Code}
scameron@wombat ~/starfighter-2.0-src $ find . -type f -print | xargs grep sincosf
Binary file ./src/starfighter-intermission.o matches
Binary file ./src/starfighter-game.o matches
Well that's odd. sincosf() only shows up in object files? Is there a macro that builds up sincosf() somehow? Pulled in from some object code built into those object files somehow?
FWIW, some info about my OS:
- {l Code}: {l Select All Code}
scameron@wombat ~/starfighter-2.0-src $ uname -a
Linux wombat 4.4.180 #1 SMP PREEMPT Mon May 27 10:18:52 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
scameron@wombat ~/starfighter-2.0-src $ cat /etc/os-release
NAME="Linux Mint"
VERSION="18.1 (Serena)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.1"
VERSION_ID="18.1"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=serena
UBUNTU_CODENAME=xenial
Maybe missing a "-lm" somewhere that needs it? Hmm, out of ideas of things to try for now.