The trick in ff07762 that changing the automake default extension to
cpp, thus forcing C++ linking even with C sources, while it worked, had
the side-effect of breaking make-dist because it made automake look for
*.cpp to put in the tarball and there weren't any such files.
Instead, make the files which use test-engine-stuff.cpp also C++.
This had some extraordinary knock-on effects because C++11 treats enums
very differently from C, so any C code that directly accessed the enum
had to be converted to C++.
That included test-engine-stuff, and because it quite sensibly builds as
a ranlib archive instead of a shared library everything that uses it must
at least link as C++. Fortunately automake takes care of doing this when
the default extension for check_PROGRAMS is cpp, even if the source file
is C.