gl-spectrum plugin support for Win32
I have fixed gl-spectrum plugin and now it is able to run on other platforms besides X11.
The plugin could not be compiled only with the changes to the source code, because the configure script still checks for glXChooseVisual() into GL library, that it could not be found.
Also, the Makefile has an hardcoded -lGL but again it won't work because the library to use may be different, for example in Windows it is -lopengl32.
So, what it must be still done is to detect the GL library to use (GL, opengl32 or MesaGL are some examples) at configure time.
A script could be written from scratch, or perhaps something already existing could be used, like autoconf OpenGL macros.
They are available here:
and at least these files (that are enough for our purposes):
must be copied into the m4 directory of source tree of audacious-plugins.
By calling function AX_CHECK_GL, two macro will be created with proper value: GL_CFLAGS and GL_LIBS.
I added these macro into extra.mk.in and into src/gl-spectrum/Makefile and so it has been solved.
The tests seem to be already checking for GLX if X11 was found and the platform needs it, so in my solution I removed the code around the tests with glXChooseVisual() into configure.ac
Attached screenshot shows the plugin in action on Microsoft Windows.
Attached patch fixes the source code of the plugin and the stuff around it.
#1 Updated by John Lindgren over 4 years ago
- Subject changed from gl-spectrum plugin fixed to gl-spectrum plugin support for Win32
- Category set to plugins/gl-spectrum
- Status changed from New to Closed
- Target version set to 3.5
- % Done changed from 0 to 100
- Affects version deleted (
Done, thank you for the patch.
#2 Updated by Carlo Bramini over 4 years ago
Sorry... unfortunately, I did a little mistake, because it is missing this line somewhere in configure.ac:
otherwise the plugin won't be build, as I discovered after a clean checkout and compilation of the sources.