Mercurial > mplayer.hg
comparison configure @ 31066:0d51c0dcd832
Add configure detection for SDL backend for -vo gl.
author | reimar |
---|---|
date | Fri, 30 Apr 2010 19:04:13 +0000 |
parents | 55cd4161425a |
children | a4658190b9de |
comparison
equal
deleted
inserted
replaced
31065:7fb89ca1891c | 31066:0d51c0dcd832 |
---|---|
2494 elif test "$cc_vendor" = "sun" ; then | 2494 elif test "$cc_vendor" = "sun" ; then |
2495 CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr" | 2495 CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr" |
2496 elif test "$cc_vendor" != "gnu" ; then | 2496 elif test "$cc_vendor" != "gnu" ; then |
2497 CFLAGS="-O2 $_march $_mcpu $_pipe" | 2497 CFLAGS="-O2 $_march $_mcpu $_pipe" |
2498 else | 2498 else |
2499 CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" | 2499 CFLAGS="-g3 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" |
2500 extra_ldflags="$extra_ldflags -ffast-math" | 2500 extra_ldflags="$extra_ldflags -ffast-math" |
2501 fi | 2501 fi |
2502 else | 2502 else |
2503 _warn_CFLAGS=yes | 2503 _warn_CFLAGS=yes |
2504 fi | 2504 fi |
5051 echores "$_corevideo" | 5051 echores "$_corevideo" |
5052 | 5052 |
5053 fi #if darwin | 5053 fi #if darwin |
5054 | 5054 |
5055 | 5055 |
5056 # make sure this stays below CoreVideo to avoid issues due to namespace | |
5057 # conflicts between -lGL and -framework OpenGL | |
5058 echocheck "OpenGL" | |
5059 #Note: this test is run even with --enable-gl since we autodetect linker flags | |
5060 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then | |
5061 cat > $TMPC << EOF | |
5062 #ifdef GL_WIN32 | |
5063 #include <windows.h> | |
5064 #include <GL/gl.h> | |
5065 #else | |
5066 #include <GL/gl.h> | |
5067 #include <X11/Xlib.h> | |
5068 #include <GL/glx.h> | |
5069 #endif | |
5070 int main(void) { | |
5071 #ifdef GL_WIN32 | |
5072 HDC dc; | |
5073 wglCreateContext(dc); | |
5074 #else | |
5075 glXCreateContext(NULL, NULL, NULL, True); | |
5076 #endif | |
5077 glFinish(); | |
5078 return 0; | |
5079 } | |
5080 EOF | |
5081 _gl=no | |
5082 for _ld_tmp in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do | |
5083 if cc_check $_ld_tmp $_ld_lm ; then | |
5084 _gl=yes | |
5085 _gl_x11=yes | |
5086 libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" | |
5087 break | |
5088 fi | |
5089 done | |
5090 if cc_check -DGL_WIN32 -lopengl32 ; then | |
5091 _gl=yes | |
5092 _gl_win32=yes | |
5093 libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" | |
5094 fi | |
5095 else | |
5096 _gl=no | |
5097 fi | |
5098 if test "$_gl" = yes ; then | |
5099 def_gl='#define CONFIG_GL 1' | |
5100 _res_comment="backends:" | |
5101 if test "$_gl_win32" = yes ; then | |
5102 def_gl_win32='#define CONFIG_GL_WIN32 1' | |
5103 _res_comment="$_res_comment win32" | |
5104 fi | |
5105 if test "$_gl_x11" = yes ; then | |
5106 def_gl_x11='#define CONFIG_GL_X11 1' | |
5107 _res_comment="$_res_comment x11" | |
5108 fi | |
5109 _vomodules="opengl $_vomodules" | |
5110 else | |
5111 def_gl='#undef CONFIG_GL' | |
5112 def_gl_win32='#undef CONFIG_GL_WIN32' | |
5113 def_gl_x11='#undef CONFIG_GL_X11' | |
5114 _novomodules="opengl $_novomodules" | |
5115 fi | |
5116 echores "$_gl" | |
5117 | |
5118 | |
5119 echocheck "MatrixView" | |
5120 if test "$_gl" = no ; then | |
5121 matrixview=no | |
5122 fi | |
5123 if test "$matrixview" = yes ; then | |
5124 _vomodules="matrixview $_vomodules" | |
5125 def_matrixview='#define CONFIG_MATRIXVIEW 1' | |
5126 else | |
5127 _novomodules="matrixview $_novomodules" | |
5128 def_matrixview='#undef CONFIG_MATRIXVIEW' | |
5129 fi | |
5130 echores "$matrixview" | |
5131 | |
5132 | |
5133 echocheck "PNG support" | 5056 echocheck "PNG support" |
5134 if test "$_png" = auto ; then | 5057 if test "$_png" = auto ; then |
5135 _png=no | 5058 _png=no |
5136 if irix ; then | 5059 if irix ; then |
5137 # Don't check for -lpng on irix since it has its own libpng | 5060 # Don't check for -lpng on irix since it has its own libpng |
5416 def_sdl='#undef CONFIG_SDL' | 5339 def_sdl='#undef CONFIG_SDL' |
5417 _novomodules="sdl $_novomodules" | 5340 _novomodules="sdl $_novomodules" |
5418 _noaomodules="sdl $_noaomodules" | 5341 _noaomodules="sdl $_noaomodules" |
5419 fi | 5342 fi |
5420 echores "$_sdl" | 5343 echores "$_sdl" |
5344 | |
5345 | |
5346 # make sure this stays below CoreVideo to avoid issues due to namespace | |
5347 # conflicts between -lGL and -framework OpenGL | |
5348 echocheck "OpenGL" | |
5349 #Note: this test is run even with --enable-gl since we autodetect linker flags | |
5350 if (test "$_x11" = yes || test "$_sdl" = yes || win32) && test "$_gl" != no ; then | |
5351 cat > $TMPC << EOF | |
5352 #ifdef GL_WIN32 | |
5353 #include <windows.h> | |
5354 #include <GL/gl.h> | |
5355 #elif defined(GL_SDL) | |
5356 #include <GL/gl.h> | |
5357 #ifdef CONFIG_SDL_SDL_H | |
5358 #include <SDL/SDL.h> | |
5359 #else | |
5360 #include <SDL.h> | |
5361 #endif | |
5362 #ifndef __APPLE__ | |
5363 // we allow SDL hacking our main() only on OSX | |
5364 #undef main | |
5365 #endif | |
5366 #else | |
5367 #include <GL/gl.h> | |
5368 #include <X11/Xlib.h> | |
5369 #include <GL/glx.h> | |
5370 #endif | |
5371 int main(void) { | |
5372 #ifdef GL_WIN32 | |
5373 HDC dc; | |
5374 wglCreateContext(dc); | |
5375 #elif defined(GL_SDL) | |
5376 SDL_GL_SwapBuffers(); | |
5377 #else | |
5378 glXCreateContext(NULL, NULL, NULL, True); | |
5379 #endif | |
5380 glFinish(); | |
5381 return 0; | |
5382 } | |
5383 EOF | |
5384 _gl=no | |
5385 for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do | |
5386 if cc_check $_ld_tmp $_ld_lm ; then | |
5387 _gl=yes | |
5388 _gl_x11=yes | |
5389 libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" | |
5390 break | |
5391 fi | |
5392 done | |
5393 if cc_check -DGL_WIN32 -lopengl32 ; then | |
5394 _gl=yes | |
5395 _gl_win32=yes | |
5396 libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" | |
5397 fi | |
5398 # last so it can reuse any linker etc. flags detected before | |
5399 if test "$_sdl" = yes ; then | |
5400 if cc_check -DGL_SDL || | |
5401 cc_check -DCONFIG_SDL_SDL_H -DGL_SDL ; then | |
5402 _gl=yes | |
5403 _gl_sdl=yes | |
5404 elif cc_check -DGL_SDL -lGL || | |
5405 cc_check -DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then | |
5406 _gl=yes | |
5407 _gl_sdl=yes | |
5408 libs_mplayer="$libs_mplayer -lGL" | |
5409 fi | |
5410 fi | |
5411 else | |
5412 _gl=no | |
5413 fi | |
5414 if test "$_gl" = yes ; then | |
5415 def_gl='#define CONFIG_GL 1' | |
5416 _res_comment="backends:" | |
5417 if test "$_gl_win32" = yes ; then | |
5418 def_gl_win32='#define CONFIG_GL_WIN32 1' | |
5419 _res_comment="$_res_comment win32" | |
5420 fi | |
5421 if test "$_gl_x11" = yes ; then | |
5422 def_gl_x11='#define CONFIG_GL_X11 1' | |
5423 _res_comment="$_res_comment x11" | |
5424 fi | |
5425 if test "$_gl_sdl" = yes ; then | |
5426 def_gl_sdl='#define CONFIG_GL_SDL 1' | |
5427 _res_comment="$_res_comment sdl" | |
5428 fi | |
5429 _vomodules="opengl $_vomodules" | |
5430 else | |
5431 def_gl='#undef CONFIG_GL' | |
5432 def_gl_win32='#undef CONFIG_GL_WIN32' | |
5433 def_gl_x11='#undef CONFIG_GL_X11' | |
5434 def_gl_sdl='#undef CONFIG_GL_SDL' | |
5435 _novomodules="opengl $_novomodules" | |
5436 fi | |
5437 echores "$_gl" | |
5438 | |
5439 | |
5440 echocheck "MatrixView" | |
5441 if test "$_gl" = no ; then | |
5442 matrixview=no | |
5443 fi | |
5444 if test "$matrixview" = yes ; then | |
5445 _vomodules="matrixview $_vomodules" | |
5446 def_matrixview='#define CONFIG_MATRIXVIEW 1' | |
5447 else | |
5448 _novomodules="matrixview $_novomodules" | |
5449 def_matrixview='#undef CONFIG_MATRIXVIEW' | |
5450 fi | |
5451 echores "$matrixview" | |
5421 | 5452 |
5422 | 5453 |
5423 if os2 ; then | 5454 if os2 ; then |
5424 echocheck "KVA (SNAP/WarpOverlay!/DIVE)" | 5455 echocheck "KVA (SNAP/WarpOverlay!/DIVE)" |
5425 if test "$_kva" = auto; then | 5456 if test "$_kva" = auto; then |
8534 GIF = $_gif | 8565 GIF = $_gif |
8535 GGI = $_ggi | 8566 GGI = $_ggi |
8536 GL = $_gl | 8567 GL = $_gl |
8537 GL_WIN32 = $_gl_win32 | 8568 GL_WIN32 = $_gl_win32 |
8538 GL_X11 = $_gl_x11 | 8569 GL_X11 = $_gl_x11 |
8570 GL_SDL = $_gl_sdl | |
8539 MATRIXVIEW = $matrixview | 8571 MATRIXVIEW = $matrixview |
8540 GUI = $_gui | 8572 GUI = $_gui |
8541 GUI_GTK = $_gui_gtk | 8573 GUI_GTK = $_gui_gtk |
8542 GUI_WIN32 = $_gui_win32 | 8574 GUI_WIN32 = $_gui_win32 |
8543 HAVE_POSIX_SELECT = $_posix_select | 8575 HAVE_POSIX_SELECT = $_posix_select |
9079 $def_gif_4 | 9111 $def_gif_4 |
9080 $def_gif_tvt_hack | 9112 $def_gif_tvt_hack |
9081 $def_gl | 9113 $def_gl |
9082 $def_gl_win32 | 9114 $def_gl_win32 |
9083 $def_gl_x11 | 9115 $def_gl_x11 |
9116 $def_gl_sdl | |
9084 $def_matrixview | 9117 $def_matrixview |
9085 $def_ivtv | 9118 $def_ivtv |
9086 $def_jpeg | 9119 $def_jpeg |
9087 $def_kva | 9120 $def_kva |
9088 $def_md5sum | 9121 $def_md5sum |