Hmm. from a clone of ffmpeg, I checked out n4.2.2 and tried your configure arguments. Configure choked on not finding Zomf (your --libs=-Zomf) so I simplified your configure arguments as some of it makes no sense and some is redundant.
sh ../src/configure --prefix='/@unixroot/usr/local' --enable-bzlib --disable-crystalhd --enable-libfreetype --enable-fontconfig --enable-libvpx --enable-avfilter --enable-avresample --enable-postproc --enable-gpl --enable-libopus --enable-gnutls --enable-libvorbis --disable-decoder=opus --disable-encoder=opus --disable-avx512 --disable-avx2
I'm doing an out of tree build.
Removed the --disable-debug and --disable-strip as we end up with ffmpeg_g.exe with debug data and ffmpeg.exe which is lxlited, same with the other exe's. If you want DLL's unstripped and no debug data, these can be added back.
Removed the --extra-libs=-Zomf as the build adds -Zomf to LDFLAGS.
Removed the --disable-static --enable-shared as both static and DLL's build fine.
Removed the --target=os/2 as configure should figure that out.
Removed the extra-opt-flags as not sure if needed.
Built fine after a change to usr/include/sys/params.h so ntohl() is found.
Trying your whole configure line, I get,
Unknown option "-g".
Remove that, I get,
Unknown option "-march=i686'".
Remove that, I get,
Unknown option ""
This is a weird one. I removed all the single quotes as they aren't needed now, and success.
Built fine.
Include isn't used by GCC, used by OW and the IBM compilers. I have,
SET INCLUDE=W:\usr\include\os2tk45\inc;W:\usr\include\os2tk45\gl;W:\usr\include\os2tk45;
Where did you get your source? Perhaps do,
git clone git://source.ffmpeg.org/ffmpeg
git checkout n4.2.2
and use that.
I changed line 194 of usr/include/sys/param.h from #if 0 to #if 1. It's not correct but works.
Have to compare your config.log to mine later.
Still like to try with the source you're using.