+AC_ARG_ENABLE(xvideo,
+ [ --enable-xvideo XVideo support (default enabled)])
+if test x$enable_xvideo != xno &&
+ (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
+ if test x$x_includes = xNONE; then
+ x_includes=/usr/X11R6/include
+ fi
+ if test x$x_libraries = xNONE; then
+ x_libraries=/usr/X11R6/lib
+ fi
+ save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$save_CPPFLAGS -I$x_includes"
+ AC_CHECK_HEADERS(X11/extensions/Xv.h, [
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
+ AC_CHECK_LIB(Xv_pic,XvSetPortAttribute,
+ # We have Xv_pic, that's good, we can build an xvideo.so plugin !
+ PLUGINS="${PLUGINS} xvideo"
+ xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv_pic"
+ xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes",
+ # We don't have Xv_pic, let's make xvideo.a as builtin
+ BUILTINS="${BUILTINS} xvideo"
+ xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv"
+ xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes")
+ CFLAGS="$save_CFLAGS"
+ ]
+ CPPFLAGS="$save_CPPFLAGS")
+fi
+
+dnl
+dnl SDL module
+dnl
+AC_ARG_ENABLE(sdl,
+ [ --enable-sdl SDL support (default enabled)])
+if test "x$enable_sdl" != "xno"
+then
+ SDL_PATH=$PATH
+ AC_ARG_WITH(sdl-config-path,
+ [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
+ [ if test "x$with_sdl_config_path" != "xno"
+ then
+ SDL_PATH="$with_sdl_config_path:$PATH"
+ fi ])
+ AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, $SDL_PATH)
+ SDL_CONFIG=${SDL12_CONFIG}
+ SDL_HEADER="SDL12/SDL.h"
+ if test x${SDL_CONFIG} = xno
+ then
+ AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, $SDL_PATH)
+ SDL_CONFIG=${SDL11_CONFIG}
+ SDL_HEADER="SDL11/SDL.h"
+ fi
+ if test x${SDL_CONFIG} = xno
+ then
+ AC_PATH_PROG(SDL_CONFIG, sdl-config, no, $SDL_PATH)
+ SDL_HEADER="SDL/SDL.h"
+ fi
+ if test x${SDL_CONFIG} != xno
+ then
+ PLUGINS="${PLUGINS} sdl"
+ sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
+ sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
+ CPPFLAGS="$save_CPPFLAGS $sdl_CFLAGS"
+ AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
+ <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
+ [ AC_MSG_ERROR([The development package for SDL is not installed.
+Please install it and try again. Alternatively you can also configure with
+--disable-sdl.])
+ ])
+ CPPFLAGS="$save_CPPFLAGS"
+ if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
+ then
+ AC_MSG_ERROR([The development package for SDL is not installed.
+Please install it and try again. Alternatively you can also configure with
+--disable-sdl.])
+ fi
+ elif test "x$enable_sdl" = "xyes"
+ then
+ AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
+from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
+ ])
+ fi
+fi
+
+dnl
+dnl Qt Embedded module
+dnl (disabled by default)
+dnl
+AC_ARG_ENABLE(qte,
+ [ --enable-qte QT Embedded support (default disabled)])
+if test "x${enable_qte}" != "xno"
+then
+ AC_ARG_WITH(qte,
+ [ --with-qte=PATH Qt Embedded headers and libraries])
+ if test "x${with_qte}" = "x"
+ then
+ test_LDFLAGS="-L${QTDIR}/lib"
+ test_CFLAGS="-I${QTDIR}/include"
+ else
+ test_LDFLAGS="-L${with_qte}/lib"
+ test_CFLAGS="-I${with_qte}/include"
+ fi
+
+ CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+ AC_CHECK_HEADERS(qt.h, [
+ qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
+ qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqpe -lqte"
+ if test "x${with_qte}" = "x"
+ then
+ PLUGINS="${PLUGINS} qte"
+ else
+ BUILTINS="${BUILTINS} qte"
+ fi
+ ])
+ CPPFLAGS="${save_CPPFLAGS}"
+fi
+
+dnl
+dnl Windows DirectX module
+dnl
+AC_ARG_ENABLE(directx,
+ [ --enable-directx Win32 DirectX support (default enabled on Win32)])
+if test "x$enable_directx" != "xno"
+then
+ if test x$SYS = xmingw32
+ then
+ AC_ARG_WITH(directx,
+ [ --with-directx=PATH Win32 DirectX headers and libraries])
+ if test "x$with_directx" = "x"
+ then
+ AC_CHECK_HEADERS(ddraw.h,
+ [ PLUGINS="${PLUGINS} directx"
+ directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" ])
+ else
+ AC_MSG_CHECKING(for directX headers in ${with_directx})
+ if test -f ${with_directx}/ddraw.h
+ then
+ PLUGINS="${PLUGINS} directx"
+ directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
+ directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
+ fi
+ fi
+ fi
+fi
+
+dnl
+dnl Linux framebuffer module
+dnl
+AC_ARG_ENABLE(fb,
+ [ --enable-fb Linux framebuffer support (default enabled on Linux)])
+ if test x$enable_fb != xno
+ then
+ AC_CHECK_HEADERS(linux/fb.h, [
+ PLUGINS="${PLUGINS} fb"
+ ])
+ fi
+
+dnl
+dnl Linux MGA module
+dnl
+AC_ARG_ENABLE(mga,
+ [ --enable-mga Linux kernel Matrox support (default disabled)],
+ [ if test x$enable_mga = xyes
+ then
+ PLUGINS="${PLUGINS} mga xmga"
+ fi ])
+
+dnl
+dnl GGI module
+dnl
+AC_ARG_ENABLE(ggi,
+ [ --enable-ggi GGI support (default disabled)])
+if test x$enable_ggi = xyes
+then
+ PLUGINS="${PLUGINS} ggi"
+ ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
+ AC_ARG_WITH(ggi,
+ [ --with-ggi=PATH path to libggi],
+ [ if test "x$with_ggi" != "xno" -a "x$with_ggi" != "x"
+ then
+ CFLAGS_GGI="${CFLAGS_GGI} -I$with_ggi/include"
+ ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_ggi/lib"
+ fi ])
+fi
+
+dnl
+dnl Glide module
+dnl
+AC_ARG_ENABLE(glide,
+ [ --enable-glide Glide (3dfx) support (default disabled)])
+if test x$enable_glide = xyes
+then
+ PLUGINS="${PLUGINS} glide"
+ glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
+ glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
+ AC_ARG_WITH(glide,
+ [ --with-glide=PATH path to libglide],
+ [ if test "x$with_glide" != "xno" -a "x$with_glide" != "x"
+ then
+ glide_CFLAGS="${glide_CFLAGS} -I$with_glide/include"
+ glide_LDFLAGS="${glide_LDFLAGS} -L$with_glide/lib"
+ fi ])
+fi
+
+dnl
+dnl AA plugin
+dnl
+AC_ARG_ENABLE(aa,
+ [ --enable-aa aalib output (default disabled)])
+if test x$enable_aa = xyes
+then
+ AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
+ if test x$have_aa = xtrue
+ then
+ PLUGINS="${PLUGINS} aa"
+ aa_LDFLAGS="${aa_LDFLAGS} -laa"
+ fi
+fi
+
+dnl
+dnl Audio plugins
+dnl
+
+AC_ARG_WITH(,[Audio plugins:])
+
+dnl
+dnl OSS /dev/dsp module (enabled by default except on win32)
+dnl