Bug #350
gl-spectrum plugin support for Win32
100%
Description
Hello,
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:
http://code.google.com/p/autoconf-gl-macros/
and at least these files (that are enough for our purposes):
ax_check_gl.m4
ax_lang_compiler_ms.m4
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.
History
#1 Updated by John Lindgren about 11 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 (
3.5)
Done, thank you for the patch.
https://github.com/audacious-media-player/audacious-plugins/commit/fb14f17ce1410d9586e5f7a13ee5112d9ac01386
#2 Updated by Carlo Bramini about 11 years ago
Sorry... unfortunately, I did a little mistake, because it is missing this line somewhere in configure.ac:
VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS gl-spectrum"
otherwise the plugin won't be build, as I discovered after a clean checkout and compilation of the sources.