diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-09 13:35:19 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-09 13:35:19 -0400 |
commit | 93195afdbb3667f1e9d28a00fa2e03e0ae40c13b (patch) | |
tree | d55e367ff709feee03b47c778dacf4700942fc5b /m4 | |
parent | b6fcbcf5e60a24b5d0f6cbfa81bf99dbbe308a53 (diff) | |
download | xine-lib-93195afdbb3667f1e9d28a00fa2e03e0ae40c13b.tar.gz xine-lib-93195afdbb3667f1e9d28a00fa2e03e0ae40c13b.tar.bz2 |
Clean up video output plugin configure checks
Diffstat (limited to 'm4')
-rw-r--r-- | m4/_xine.m4 | 44 | ||||
-rw-r--r-- | m4/audio_out.m4 | 10 | ||||
-rw-r--r-- | m4/macosx.m4 | 7 | ||||
-rw-r--r-- | m4/video_out.m4 | 570 |
4 files changed, 270 insertions, 361 deletions
diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 005ae3138..7868c0591 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -44,50 +44,6 @@ AC_DEFUN([AC_C_ALWAYS_INLINE], fi ]) -dnl AC_LINUX_PATH(DEFAULT PATH) -AC_DEFUN([AC_LINUX_PATH], - [AC_ARG_WITH(linux-path, - AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located]), - linux_path="$withval", linux_path="$1") - LINUX_INCLUDE="-I$linux_path/include" -]) - -dnl AC_CHECK_DXR3() -AC_DEFUN([AC_CHECK_DXR3], -[ - AC_ARG_ENABLE(dxr3, - AS_HELP_STRING([--disable-dxr3], [do not build the DXR3/HW+ plugins]), - enable_dxr3=$enableval, enable_dxr3=yes) - if test x"$enable_dxr3" = xyes; then - have_dxr3=yes - AC_MSG_RESULT([*** checking for a supported mpeg encoder]) - have_encoder=no - have_libfame=yes - AC_CHECK_LIB(fame, fame_open, - [AC_CHECK_HEADER(fame.h, true, have_libfame=no)], have_libfame=no) - if test "$have_libfame" = "yes"; then - AC_DEFINE(HAVE_LIBFAME) - have_encoder=yes - fi - have_librte=yes - AC_CHECK_LIB(rte, rte_init, - [AC_CHECK_HEADER(rte.h, true, have_librte=no)], have_librte=no) - if test "$have_librte" = "yes"; then - AC_DEFINE(HAVE_LIBRTE) - AC_MSG_WARN([this will probably only work with rte version 0.4!]) - have_encoder=yes - fi - if test "$have_encoder" = "yes"; then - AC_MSG_RESULT([*** found one or more external mpeg encoders]); - else - AC_MSG_RESULT([*** no external mpeg encoder found]); - fi - else - AC_MSG_RESULT([DXR3 plugins will not be built.]) - have_dxr3=no - fi -]) - dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY) dnl generate a default inttypes.h if the header file does not exist already AC_DEFUN([AC_CHECK_GENERATE_INTTYPES], diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index e14e21c79..e802c66a9 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -70,8 +70,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [], [test $default_with_alsa = without && with_alsa="no"]) if test x"$with_alsa" != x"no"; then PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no]) - AC_SUBST([ALSA_LIBS]) - AC_SUBST([ALSA_CFLAGS]) if test x"$have_alsa" = x"yes"; then AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) elif test x"$with_alsa" = x"yes"; then @@ -99,8 +97,8 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_ARG_ENABLE([coreaudio], [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], [have_coreaudio="$enableval"], - [test $default_enable_coreaudio = enable && have_coreaudio="yes"]) - AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" = x"yes"]) + [test $default_enable_coreaudio = disable && have_coreaudio="no"]) + AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) dnl EsounD support @@ -114,8 +112,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ elif test x"$have_esound" = x"yes"; then AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) fi - AC_SUBST([ESD_CFLAGS]) - AC_SUBST([ESD_LIBS]) fi AM_CONDITIONAL([HAVE_ESD], [test x"$have_esound" = x"yes"]) @@ -127,8 +123,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ if test x"$with_fusionsound" != x"no"; then PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], [AC_DEFINE([HAVE_FUSIONSOUND], 1, [Define to 1 if you have FusionSound.])], []) - AC_SUBST(FUSIONSOUND_CFLAGS) - AC_SUBST(FUSIONSOUND_LIBS) else no_fusionsound=yes fi diff --git a/m4/macosx.m4 b/m4/macosx.m4 index 8fb72da8f..2fafa695c 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -42,10 +42,3 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ AC_SUBST(UNIVERSAL_CFLAGS) AC_SUBST(UNIVERSAL_LDFLAGS) ])dnl MACOSX_UNIVERSAL_BINARIES - -AC_DEFUN([MACOSX_VIDEO_SUPPORT], [ - AC_ARG_ENABLE([macosx-video], - AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]), - [have_macosx_video="$enableval"], [have_macosx_video="no"]) - AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" = x"yes"]) -])dnl MACOSX_VIDEO_SUPPORT diff --git a/m4/video_out.m4 b/m4/video_out.m4 index 61364ca52..ea9933eb7 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -2,317 +2,283 @@ dnl ----------------- dnl Video out plugins dnl ----------------- AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ + dnl Setup defaults for the target operating system. For example, syncfb is + dnl only ever available on Linux, so don't bother checking for it unless + dnl explicitly requested to do so on other operating systems. + dnl Notes: + dnl - dha_kmod is Linux only, but disabled by default + dnl - directx is Windows only + dnl - dxr3 is Linux only + dnl - Mac OS X video is Mac OS X only + dnl - SyncFB is Linux only, but disabled by default + dnl - Vidix is FreeBSD and Linux only + + default_enable_aalib=enable + default_enable_dha_kmod=disable + default_enable_directfb=disable + default_enable_directx=disable + default_enable_dxr3=disable + default_enable_linuxfb=disable + default_enable_macosx_video=disable + default_enable_syncfb=disable + default_enable_xinerama=enable + default_enable_vidix=disable + + default_with_caca=with + default_with_libstk=without + default_with_sdl=with + default_with_xcb=with + + case "$host_os" in + cygwin* | mingw*) + default_enable_directx=enable + ;; + + darwin*) + default_enable_macosx_video=enable + ;; + + freebsd*) + default_enable_vidix=enable + ;; + + linux*) + default_enable_dxr3=enable + default_enable_linuxfb=enable + default_enable_vidix=enable + enable_linux=yes + ;; + esac -dnl --------------------------------------------- -dnl Check for OpenGL & [GLut | GLU] -dnl --------------------------------------------- - -AM_PATH_OPENGL() - - -dnl --------------------------------------------- -dnl Check for platform which supports syncfb -dnl --------------------------------------------- - -AC_ARG_ENABLE([syncfb], - AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin])) -case "$host_os" in - *linux*) ;; - *) - if test "x$enable_syncfb" = "xyes"; then - AC_MSG_ERROR([You cannot build SyncFB support on non-Linux systems.]) + dnl Video output plugins that depend on X11 support + if test x$"no_x" != x"yes"; then + dnl Xinerama + AC_ARG_ENABLE([xinerama], + [AS_HELP_STRING([--enable-xinerama], [enable support for Xinerama])], + [], [test $default_enable_xinerama = disable && enable_xinerama=no]) + if test "x$enable_xinerama" != "xno"; then + PKG_CHECK_MODULES([XINERAMA], [xinerama], [ac_have_xinerama=yes], + [AC_CHECK_LIB([Xinerama], [XineramaQueryExtension], + [XINERAMA_LIBS="-lXinerama" ac_have_xinerama="yes"], [], + [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])]) + if test "x$ac_have_xinerama" = "xyes"; then + AC_DEFINE([HAVE_XINERAMA], 1, [Define this if you have libXinerama installed]) + X_LIBS="${X_LIBS} ${XINERAMA_LIBS}" + fi + else + ac_have_xinerama=no + fi + AM_CONDITIONAL([HAVE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) + + dnl OpenGL, including GLut and/or GLU + AM_PATH_OPENGL + + dnl xv + XINE_XV_SUPPORT fi - enable_syncfb=no ;; -esac - -AM_CONDITIONAL(HAVE_SYNCFB, test "x$enable_syncfb" != "xno") - - -XINE_XV_SUPPORT - -dnl --------------------------------------------- -dnl Check for xcb -dnl --------------------------------------------- -AC_ARG_WITH([xcb], AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins])) - -if test "x$with_xcb" != "xno"; then - PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb="yes"], [have_xcb="no"]) -fi - -AC_SUBST(XCB_CFLAGS) -AC_SUBST(XCB_LIBS) -AM_CONDITIONAL(HAVE_XCB, test "x$have_xcb" = "xyes" ) - - -dnl --------------------------------------------- -dnl Check for xcb-shm -dnl --------------------------------------------- - -if test "x$have_xcb" = "xyes"; then - PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm="yes"], [have_xcbshm="no"]) -fi - -AC_SUBST(XCBSHM_CFLAGS) -AC_SUBST(XCBSHM_LIBS) -AM_CONDITIONAL(HAVE_XCBSHM, test "x$have_xcbshm" = "xyes" ) - - -dnl --------------------------------------------- -dnl Check for xcb-xv -dnl --------------------------------------------- - -if test "x$have_xcb" = "xyes"; then - PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"]) -fi - -AC_SUBST(XCBXV_CFLAGS) -AC_SUBST(XCBXV_LIBS) -AM_CONDITIONAL(HAVE_XCBXV, test "x$have_xcbxv" = "xyes" ) - - -dnl --------------------------------------------- -dnl Checks for Xinerama extension -dnl --------------------------------------------- - -AC_ARG_ENABLE([xinerama], - AS_HELP_STRING([--disable-xinerama], [do not build Xinerama support])) - -if test "x$enable_xinerama" != "xno"; then - PKG_CHECK_MODULES([XINERAMA], [xinerama], [ac_have_xinerama=yes], [ - AC_CHECK_LIB(Xinerama, XineramaQueryExtension, - [XINERAMA_LIBS="-lXinerama" - ac_have_xinerama="yes"],, - [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS]) - ]) - if test "x$ac_have_xinerama" = "xyes"; then - AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed]) - X_LIBS="${X_LIBS} ${XINERAMA_LIBS}" - fi -else - ac_have_xinerama=no -fi -dnl AM_CONDITIONAL(HAVE_XINERAMA, test "x$ac_have_xinerama" = "xyes") - - -dnl --------------------------------------------- -dnl Checks for Ascii-Art library -dnl --------------------------------------------- - -AC_ARG_ENABLE([aalib], - AS_HELP_STRING([--disable-aalib], [do not build AALIB support]), - [with_aalib=$enableval], [with_aalib=yes]) - -if test "x$with_aalib" = "xyes"; then - AM_PATH_AALIB(1.4,, AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***])) -else - no_aalib=yes -fi - -AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes") - -dnl --------------------------------------------- -dnl Checks for Color AsCii Art library -dnl --------------------------------------------- - -AC_ARG_WITH([caca], - AS_HELP_STRING([--without-caca], [Do not build CACA support])) - -if test "x$with_caca" != "xno"; then - PKG_CHECK_MODULES([CACA], [caca cucul], [have_caca="yes"], [have_caca="no"]) - if test "x$with_caca" = "xyes" && test "x$have_caca" = "xno"; then - AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found]) - fi -fi - -AM_CONDITIONAL([HAVE_CACA], [test "x$have_caca" = "xyes"]) -dnl --------------------------------------------- -dnl Check solaris framebuffer device support -dnl --------------------------------------------- -AC_CHECK_HEADER(sys/fbio.h, ac_have_sunfb=yes,) -AM_CONDITIONAL(HAVE_SUNFB, [test "x$ac_have_sunfb" = "xyes"]) - - -dnl --------------------------------------------- -dnl Check for Sun DGA -dnl --------------------------------------------- - -saved_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -L/usr/openwin/lib" -saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I/usr/openwin/include" -AC_CHECK_LIB(dga, XDgaGrabDrawable, [ - AC_CHECK_HEADER(dga/dga.h, [ - SUNDGA_CFLAGS="-I/usr/openwin/include" - SUNDGA_LIBS="-L/usr/openwin/lib -R/usr/openwin/lib -ldga" - ac_have_sundga=yes - ]) -]) -LDFLAGS="$saved_LDFLAGS" -CPPFLAGS="$saved_CPPFLAGS" -AM_CONDITIONAL(HAVE_SUNDGA, [test "x$ac_have_sundga" = "xyes"]) -AC_SUBST(SUNDGA_CFLAGS) -AC_SUBST(SUNDGA_LIBS) - - -dnl --------------------------------------------- -dnl Check linux framebuffer device support -dnl --------------------------------------------- - -AC_CHECK_HEADER(linux/fb.h, - [AC_DEFINE(HAVE_FB,1,[Define this if you have linux framebuffer support]) - have_fb=yes],) -AC_ARG_ENABLE(fb, AS_HELP_STRING([--disable-fb], [do not build linux framebuffer support]), - have_fb=$enableval) -AM_CONDITIONAL(HAVE_FB, [test "x$have_fb" = "xyes"]) - - -dnl --------------------------------------------- -dnl Check whether to build Mac OS X video output driver -dnl --------------------------------------------- - -MACOSX_VIDEO_SUPPORT - - - - -dnl --------------------------------------------- -dnl Check for DirectFB -dnl --------------------------------------------- -AC_ARG_ENABLE(directfb, - AS_HELP_STRING([--enable-directfb], [enable use of DirectFB]), - enable_directfb=$enableval, - enable_directfb=no) - -if test "x$enable_directfb" = "xyes"; then - PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"]) -fi - -AC_SUBST(DIRECTFB_CFLAGS) -AC_SUBST(DIRECTFB_LIBS) -AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" ) - - -dnl --------------------------------------------- -dnl check for SDL -dnl --------------------------------------------- - -AC_ARG_WITH([sdl], - AS_HELP_STRING([--without-sdl], [Build without SDL video output])) - -if test "x$with_sdl" != "xno"; then - PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no]) - if test "x$with_sdl" = "xyes" && test "x$have_sdl" = "xno"; then - AC_MSG_ERROR([SDL support requested, but SDL not found]) - elif test "x$have_sdl" = "xyes"; then - AC_DEFINE([HAVE_SDL], [1], [Define this if you have SDL installed]) - fi -fi - -AM_CONDITIONAL([HAVE_SDL], [test "x$have_sdl" = "xyes"]) - -AC_SUBST([SDL_CFLAGS]) -AC_SUBST([SDL_LIBS]) - -dnl --------------------------------------------- -dnl check for Libstk -dnl --------------------------------------------- - -AC_ARG_WITH([libstk], - AS_HELP_STRING([--with-libstk], [Build with STK surface video driver])) - -if test "x$with_libstk" = "xyes"; then - PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no]) - if test "x$with_libstk" = "xyes" && test "x$have_libstk" = "xno"; then - AC_MSG_ERROR([libstk support requested, but libstk not found]) - fi -fi - -AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"]) - -dnl --------------------------------------------- -dnl check for DirectX -dnl --------------------------------------------- + dnl Ascii-Art + AC_ARG_ENABLE([aalib], + [AS_HELP_STRING([--enable-aalib], [enable support for AALIB])], + [], [test $default_enable_aalib = disable && enable_aalib=no]) + if test x"$enable_aalib" != x"no"; then + AM_PATH_AALIB([1.4], [], [AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***])]) + else + no_aalib=yes + fi + AM_CONDITIONAL([HAVE_AA], [test x"$no_aalib" != x"yes"]) + + + dnl Color AsCii Art + AC_ARG_WITH([caca], + [AS_HELP_STRING([--without-caca], [Do not build CACA support])], + [], [test $default_with_caca = without && with_caca=no]) + if test x"$with_caca" != x"no"; then + PKG_CHECK_MODULES([CACA], [caca cucul], [have_caca="yes"], [have_caca="no"]) + if test x"$with_caca" = x"yes" && test x"$have_caca" = x"no"; then + AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found]) + fi + fi + AM_CONDITIONAL([HAVE_CACA], [test x"$have_caca" = x"yes"]) + + + dnl dha (Linux only) + AC_ARG_ENABLE([dha-kmod], + [AS_HELP_STRING([--enable-dha-kmod], [build Linux DHA kernel module])], + [], [test $default_enable_dha_kmod = disable && enable_dha_kmod=no]) + if test x"$enable_dha_kmod" != x"no"; then + AC_ARG_WITH([linux-path], + [AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located])], + [linux_path="$withval"], [linux_path="/usr/src/linux"]) + LINUX_INCLUDE="-I$linux_path/include" + AC_SUBST(LINUX_INCLUDE) + AC_CHECK_PROG([MKNOD], [mknod], [mknod], [no]) + AC_CHECK_PROG([DEPMOD], [depmod], [depmod], [no], ["$PATH:/sbin"]) + fi + AM_CONDITIONAL([HAVE_LINUX], [test x"$enable_linux" = x"yes"]) + AM_CONDITIONAL([BUILD_DHA_KMOD], [test x"$enable_dha_kmod" != x"no"]) -AM_PATH_DIRECTX() + dnl DirectFB + AC_ARG_ENABLE([directfb], + [AS_HELP_STRING([--enable-directfb], [enable use of DirectFB])], + [], [test $default_enable_directfb = disable && enable_directfb=no]) + if test "x$enable_directfb" = "xyes"; then + PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"]) + fi + AM_CONDITIONAL([HAVE_DIRECTFB], [test x"$have_directfb" = x"yes"]) + + + dnl DirectX + AM_PATH_DIRECTX + + + dnl dxr3 / hollywood plus card + AC_ARG_ENABLE([dxr3], + [AS_HELP_STRING([--enable-dxr3], [enable support for DXR3/HW+])], + [], [test $default_enable_dxr3 = disable && enable_dxr3=no]) + if test x"$enable_dxr3" != x"no"; then + have_dxr3=yes + AC_MSG_RESULT([*** checking for a supported mpeg encoder]) + AC_CHECK_LIB([fame], [fame_open], + [AC_CHECK_HEADERS([fame.h], [have_libfame=yes], [have_libfame=no])], [have_libfame=no]) + if test x"$have_libfame" = x"yes"; then + have_encoder=yes + AC_DEFINE([HAVE_LIBFAME], 1, [Define this if you have libfame mpeg encoder installed (fame.sf.net)]) + AM_PATH_LIBFAME([0.8.10], + [AC_DEFINE([HAVE_NEW_LIBFAME], 1, [Define this if you have libfame 0.8.10 or above])]) + fi + AC_CHECK_LIB([rte], [rte_init], + [AC_CHECK_HEADERS([rte.h], [have_librte=yes], [have_librte=no])], [have_librte=no]) + if test x"$have_librte" = x"yes"; then + have_encoder=yes + AC_MSG_WARN([this will probably only work with rte version 0.4!]) + AC_DEFINE([HAVE_LIBRTE], 1, [Define this if you have librte mpeg encoder installed (zapping.sf.net)]) + fi + if test "$have_encoder" = "yes"; then + AC_MSG_RESULT([*** found one or more external mpeg encoders]) + else + AC_MSG_RESULT([*** no external mpeg encoder found]) + fi + else + have_dxr3=no have_libfame=no have_librte=no have_encoder=no + fi + AM_CONDITIONAL([HAVE_DXR3], [test x"$have_dxr3" = x"yes"]) + AM_CONDITIONAL([HAVE_LIBFAME], [test x"$have_libfame" = x"yes"]) + AM_CONDITIONAL([HAVE_LIBRTE], [test x"$have_librte" = x"yes"]) + + + dnl LibSTK - http://www.libstk.net (project appears to be dead) + AC_ARG_WITH([libstk], + [AS_HELP_STRING([--with-libstk], [Build with STK surface video driver])], + [], [test $default_with_libstk = without && with_libstk=no]) + if test x"$with_libstk" != x"no"; then + PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no]) + if test x"$with_libstk" = x"yes" && test x"$have_libstk" = x"no"; then + AC_MSG_ERROR([libstk support requested, but libstk not found]) + fi + fi + AM_CONDITIONAL([HAVE_STK], [test x"$have_libstk" = x"yes"]) -dnl --------------------------------------------- -dnl dxr3 / hollywood plus card -dnl --------------------------------------------- -case "$host_or_hostalias" in - *-linux*) - AC_CHECK_DXR3() - if test "x$have_libfame" = "xyes" ; then - AC_DEFINE_UNQUOTED(HAVE_LIBFAME,1,[Define this if you have libfame mpeg encoder installed (fame.sf.net)]) - AM_PATH_LIBFAME(0.8.10, - AC_DEFINE(HAVE_NEW_LIBFAME,1,[Define this if you have libfame 0.8.10 or above])) + dnl Linux framebuffer device + AC_ARG_ENABLE([fb], + [AS_HELP_STRING([--enable-fb], [enable Linux framebuffer support])], + [], [test $default_enable_linuxfb = disable && enable_linuxfb=no]) + if test x"$enable_linuxfb" != x"no"; then + AC_CHECK_HEADERS([linux/fb.h], + [AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support]) + have_fb=yes]) fi - if test "x$have_librte" = "xyes" ; then - AC_DEFINE_UNQUOTED(HAVE_LIBRTE,1,[Define this if you have librte mpeg encoder installed (zapping.sf.net)]) + AM_CONDITIONAL([HAVE_FB], [test x"$have_fb" = x"yes"]) + + + dnl Mac OS X OpenGL video output + dnl TODO: test could be much better, but there's not really much need + AC_ARG_ENABLE([macosx-video], + [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])], + [have_macosx_video="$enableval"], + [test $default_enable_macosx_video = disable && have_macosx_video=no]) + AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) + + + dnl SDL + AC_ARG_WITH([sdl], + [AS_HELP_STRING([--without-sdl], [Build without SDL video output])], + [], [test $default_with_sdl = without && with_sdl=no]) + if test "x$with_sdl" != "xno"; then + PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no]) + if test x"$with_sdl" = x"yes" && test x"$have_sdl" = x"no"; then + AC_MSG_ERROR([SDL support requested, but SDL not found]) + elif test x"$have_sdl" = x"yes"; then + AC_DEFINE([HAVE_SDL], 1, [Define this if you have SDL installed]) + fi fi - ;; - *) - have_dxr3="no" - have_libfame="no" - have_librte="no" - have_encoder="no" - ;; -esac -AM_CONDITIONAL(HAVE_DXR3, test "x$have_dxr3" = "xyes") -AM_CONDITIONAL(HAVE_LIBFAME, test "x$have_libfame" = "xyes") -AM_CONDITIONAL(HAVE_LIBRTE, test "x$have_librte" = "xyes") - - -dnl --------------------------------------------- -dnl Vidix/libdha -dnl --------------------------------------------- - -AC_LINUX_PATH(/usr/src/linux) -AC_SUBST([LINUX_INCLUDE]) - -AC_ARG_ENABLE(vidix, AS_HELP_STRING([--disable-vidix], [do not build vidix support]), - check_vidix=$enableval, check_vidix=yes) -AC_ARG_ENABLE(dha-kmod, AS_HELP_STRING([--enable-dha-kmod], [build DHA kernel module]), - enable_dha_kmod=$enableval,enable_dha_kmod=no) - -enable_vidix="no" - -AC_MSG_CHECKING(for vidix support) -if test "x$check_vidix" = "xyes" -a "x$ac_cv_prog_AWK" != "xno"; then - if test "x$no_x" != "xyes" -o "x$have_fb" = "xyes"; then - case "$host_or_hostalias" in - i?86-*-linux* | k?-*-linux* | athlon-*-linux*) - enable_vidix="yes" - enable_linux="yes" - ;; - i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*) - enable_vidix="yes" - enable_dha_kmod="no" - ;; - *) - enable_dha_kmod="no" - enable_vidix="no" - ;; - esac - fi -fi -AC_MSG_RESULT($enable_vidix) - -AC_MSG_CHECKING(for DHA linux kernel module build) -if test "x$enable_dha_kmod" = "xyes"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AM_CONDITIONAL(HAVE_VIDIX, test "x$enable_vidix" = "xyes") -AM_CONDITIONAL(HAVE_LINUX, test "x$enable_linux" = "xyes") -AM_CONDITIONAL(BUILD_DHA_KMOD, test "x$enable_dha_kmod" = "xyes") -AC_CHECK_PROG(MKNOD, mknod, mknod, no) -AC_CHECK_PROG(DEPMOD, depmod, depmod, no, "$PATH:/sbin") - + AM_CONDITIONAL([HAVE_SDL], [test x"$have_sdl" = x"yes"]) + + + dnl Solaris framebuffer device support (exists for more than just Solaris) + AC_CHECK_HEADERS([sys/fbio.h], [ac_have_sunfb=yes], [ac_have_sunfb=no]) + if test x"$ac_have_sunfb" = x"yes"; then + saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/openwin/include" + saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L/usr/openwin/lib" + AC_CHECK_LIB([dga], [XDgaGrabDrawable], + [AC_CHECK_HEADER([dga/dga.h], + [SUNDGA_CFLAGS="-I/usr/openwin/include" + SUNDGA_LIBS="-L/usr/openwin/lib -R/usr/openwin/lib -ldga" + ac_have_sundga=yes])]) + CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" + AC_SUBST(SUNDGA_CPPFLAGS) + AC_SUBST(SUNDGA_LIBS) + fi + AM_CONDITIONAL([HAVE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) + AM_CONDITIONAL([HAVE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) + + + dnl syncfb (Linux only) + AC_ARG_ENABLE([syncfb], + [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])], + [], [test $default_enable_syncfb = disable && enable_syncfb=no]) + AM_CONDITIONAL([HAVE_SYNCFB], [test x"$enable_syncfb" != x"no"]) + + + dnl xcb + AC_ARG_WITH([xcb], + [AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins])], + [], [test $default_with_xcb = without && with_xcb=no]) + if test x"$with_xcb" != x"no"; then + PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb="yes"], [have_xcb="no"]) + if test x$"have_xcb" = x"yes"; then + PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm="yes"], [have_xcbshm="no"]) + PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"]) + fi + fi + AM_CONDITIONAL([HAVE_XCB], [test x"$have_xcb" = x"yes"]) + AM_CONDITIONAL([HAVE_XCBSHM], [test x"$have_xcbshm" = x"yes"]) + AM_CONDITIONAL([HAVE_XCBXV], [test x"$have_xcbxv" = x"yes"]) + + + dnl vidix/libdha + dnl Requires X11 or Linux framebuffer + AC_ARG_ENABLE([vidix], + [AS_HELP_STRING([--enable-vidix], [enable support for Vidix])], + [], [test $default_enable_vidix = disable && enable_vidix=no]) + if test x"$enable_vidix" != x"no"; then + if test x"$ac_cv_prog_AWK" = x"no"; then + enable_vidix=no + else + if test x"$no_x" = x"yes" -o x"$have_fb" != x"yes"; then + enable_vidix=no + else + case "$host_or_hostalias" in + i?86-*-linux* | k?-*-linux* | athlon-*-linux*) ;; + i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*) ;; + *) enable_vidix="no" ;; + esac + fi + fi + fi + AM_CONDITIONAL([HAVE_VIDIX], test x"$enable_vidix" != x"no") ])dnl XINE_VIDEO_OUT_PLUGINS |