comparison configure @ 23930:282a634da284

Extend OpenGL configure test to also check for glx/wgl and proper linking.
author reimar
date Mon, 30 Jul 2007 19:02:45 +0000
parents 639ab7e1f093
children 41a77c42416b
comparison
equal deleted inserted replaced
23929:73ff1aa448de 23930:282a634da284
4023 echocheck "OpenGL" 4023 echocheck "OpenGL"
4024 #Note: this test is run even with --enable-gl since we autodetect linker flags 4024 #Note: this test is run even with --enable-gl since we autodetect linker flags
4025 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then 4025 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then
4026 cat > $TMPC << EOF 4026 cat > $TMPC << EOF
4027 #include <GL/gl.h> 4027 #include <GL/gl.h>
4028 int main(void) { return 0; } 4028 #ifdef GL_WIN32
4029 #include <windows.h>
4030 #include <GL/glext.h>
4031 #else
4032 #include <X11/Xlib.h>
4033 #include <GL/glx.h>
4034 #endif
4035 int main(void) {
4036 #ifdef GL_WIN32
4037 HDC dc;
4038 wglCreateContext(dc);
4039 #else
4040 glXCreateContext(NULL, NULL, NULL, True);
4041 #endif
4042 glFinish();
4043 return 0;
4044 }
4029 EOF 4045 EOF
4030 _gl=no 4046 _gl=no
4031 if cc_check -lGL $_ld_lm ; then 4047 if cc_check -lGL $_ld_lm ; then
4032 _gl=yes 4048 _gl=yes
4033 _libs_mplayer="$_libs_mplayer -lGL $_ld_dl" 4049 _libs_mplayer="$_libs_mplayer -lGL $_ld_dl"