janstary / sox

resurrect SoX
Other
5 stars 1 forks source link

replace the build system with something sane #1

Closed janstary closed 4 months ago

janstary commented 4 months ago

Currently, SoX uses the GNU autotools as its build system. That's a massively overengineered monstrosity that eventualy checks whether the underlying OS has stdint.h or strlen(). That might have been relevant in the past (indeed, SoX is a child of the early nineties), but modern systems are all reasonably close to POSIX.

Have a simple, hand-written ./configure script and a straightforward Makefile instead; something like https://cvsweb.bsd.lv/mandoc/configure

As a start, do checks for all the HAVE_ conditions SoX is riddled with, including the absurd ones such as HAVE_STRCMP et all; then get rid of them one by one, after checking that "all" systems have them. Provide compatibility implementations if needed, such as https://cvsweb.bsd.lv/mandoc/compat_mkstemps.c (but that should rarely be necessary).

Try to keep all functionality. In particular, gsm and lpc will be an obstacle, as the SoX code base carries a copy of those codebases. Either make them an 'internal' format suh as wav or au (which SoX implements itself), or make them an optional external dependency (such as ogg or mp3).

janstary commented 4 months ago

Basic steps done in https://github.com/janstary/sox/tree/build

janstary commented 4 months ago

This issue can be probably closed now, the new build system works. Its individual shortcomings have they own issues opened.