The point of MSYS(2) is that the most effective cross-platform build
tool ever written for gcc-alike compilers is still autoconf,
automake, libtool, and pkg-config. Like it or not, they āworkā (as
well as they ever work) everywhere, EXCEPT WINDOWS. And like it or
not, nobody has really produced a good and functional alternative
that can really claim to do the same thing.
CMake promised that, and it might have delivered if it hadnāt tried
to basically be XSLT for build systems, with lots of obsolete docs on
their own web pages for supported but niche features, oh, and that
they didnāt grab onto the idea of pkg-config and get with that toolās
devs to turn their config file format into a toolchain-agnostic
resource so that complex build scripts werenāt needed.
I realize Iām going off on a bit of a rant here, but think about it?
SDLās build system is too complex for automake because it handles
some unusual stuff when youāre not doing Linux builds. Plus, I think
Sam despises automake with a burning passion hotter than an emacs vs.
vi flamewar. But thatās likely only because of all the ridiculous
things automake has to do in order to work everywhere.
Still, letās look at SDLās configure.in, shall we?
- A hack to try and preserve user requests for build options
- Setting build version
- Configuring libtool
- Figuring out host/target for cross-compiling
- Figuring out what the installed build system is
- A hack for a UNIX tool too dumb to handle Windows paths on Windows
- Check for Mercurial so you donāt destroy the official autoconf setup.
- A hack because autoconf might be running under cygwin to bypass using it
- A CFLAG override mechanism
- Hack to find system files like X11 because thereās no standard here
- Setting toolchain environment based on what we know so far
- Hack for x64 Linux dists that use lib and lib64 rather than lib and lib32
- A function to find a library (because this isnāt automake)
- Checks for compiler options (canāt divine them anywhere)
- Option for debug/assertion level
- Check for toolchain dependency tracking for make
- Check for linker flag support
- A test for libc
- A test for a gcc feature
- Definition of what files to build (rare for a configure, but okay?)
- Optional features with their default settings
- Override for OSS on OpenBSD, how to do PulseAudio on Solaris properly, etc?
- Check for Wayland
- Check for Mir
- A comment questioning how to link Mir on BSD and OS X
- Check for NaCl
- Complex check for X11 because autoconfās own still canāt always find it, let alone its various libs
- Hacks for two OSesā locations for X11 libs by hand
- A custom check for the Raspberry Piās(? I think anyway) EGL video driver
- Checks for other video driver support (OS X, Haiku, etc)
- Checks for OpenGL, OpenGL ES, a random sound driver which seems to be in an odd spot in the config, etc
- Checks for dbus, Linux events, udev, etc
- A long list of OS-specific options for how to do pthreads (how p are they again?)
- Test for Windows and specific checks for its build system and libs
- Test for dlfcn and how to use it
- Test for BSD USB driver
- Test for how to do precise timing
- Test for Linux version availability
- Option to disable RPATH on systems that use it
- A whole bunch of system-specific configuration options
- A whole bunch of SDL buildsystem-internal regex line noise
- Writing files
- Telling the user what we did
More or less.
If you had something like CMakeās compiler definition files included
with gcc, clang, llvm, and their like in a common format, along with
the rest of the toolchain, thatād be a lot. Get support for that
into autoconf alone and rest assured that people WOULD start using
them in other build systems because theyād support just about
everything but the odd Microsoft compiler or the occasional non-gcc
UNIX compiler from Oracle, Intel, or HP that donāt see much use
anymore. And anyone who DID use them would quickly produce shims for
them because itād make them instantly work with all of those build
systems!
Develop a standardized pkgconf format that is platform-agnostic and a
means to know how to register it with the system, with the existing
pkgconf as a reference implementation and watch it become even more
widely used than it already is. In fact, if you extend the idea to
support registering more than just how to compile and link a library
and youāve got gold.
A way to find X11 (provided by whatever installed it for you), its
headers and libs in general, and also the specific header or lib for
a given X extension? Or OpenGL with a vendor string (Mesa, NVidia,
Apple, etc), where the libraries and headers are, specifics for
things like cg or cuda as well as glX, wgl, and other system glue.
Oh, and a thing to query for the kinds of glue available in
preference order. (The Mac has a few options, for example?) Another
nice subsystem to standardize would be audio since there are many
options and they now emulate one another pretty frequently.
Iām oversimplifying it a little I know, but not as much as Iāll be
said to be doing.
JosephOn Thu, Dec 25, 2014 at 03:20:14AM +0400, Alexander Sabourenkov wrote:
MSYS? Is it still alive?
Five years ago I remembered what niche MSYS filled. Ten years ago I even
used it.
Today - what is the point? All that time wasted on setting it up is worth
tens of Linux VMs, maybe thousands.
Also - always build out-of-tree - makes cleanup entirely free of side
effects.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org