Newer
Older
VLC_ADD_LIBS([xvideo],[-lXinerama])
VLC_ADD_LIBS([x11],[-lXinerama])
VLC_ADD_LIBS([glx],[-lXinerama])
ac_cv_have_xinerama="yes"
])
])
])
if test "${ac_cv_have_xinerama}" = "yes"; then
AC_DEFINE(HAVE_XINERAMA, 1, [Define this if you have libXinerama installed])
fi
CFLAGS="${CFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"

Rémi Denis-Courmont
committed
dnl
dnl Check for XF86VidMode extension
dnl
ac_cv_have_xf86vidmode="no"
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,[
AC_CHECK_LIB(Xxf86vm_pic, XF86VidModeGetViewPort,[
VLC_ADD_LIBS([xvideo],[-lXxf86vm_pic])
VLC_ADD_LIBS([x11],[-lXxf86vm_pic])
VLC_ADD_LIBS([glx],[-lXxf86vm_pic])

Rémi Denis-Courmont
committed
ac_cv_have_xf86vidmode="yes"
],[
AC_CHECK_LIB(Xxf86vm, XF86VidModeGetViewPort,[
VLC_ADD_LIBS([xvideo],[-lXxf86vm])
VLC_ADD_LIBS([x11],[-lXxf86vm])
VLC_ADD_LIBS([glx],[-lXxf86vm])

Rémi Denis-Courmont
committed
ac_cv_have_xf86vidmode="yes"
])
])
],[true],
[#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
#endif]
)
AS_IF([test "${ac_cv_have_xf86vidmode}" = "yes"],
[AC_DEFINE(HAVE_XF86VIDMODE, 1, [Define this if you have libXxf86vm installed])
])
CFLAGS="${CFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
dnl
dnl OpenGL module
dnl (enabled by default except on beos)
dnl
AC_ARG_ENABLE(opengl,
[ --enable-opengl OpenGL support (default enabled)])
if test "${enable_opengl}" != "no" &&
test "${SYS}" != "beos" -a "${SYS}" != "mingwce"; then
if test "${SYS}" != "darwin"; then
bigben
committed
AC_CHECK_HEADERS(GL/gl.h GL/glu.h, [
VLC_ADD_PLUGINS([opengl])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LIBS([opengl],[${X_LIBS} -lGL -lGLU])
VLC_ADD_LIBS([opengl],[-lopengl32 -lglu32])
fi
])
else
dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
VLC_ADD_PLUGINS([opengl])
VLC_ADD_LIBS([opengl],[-Wl,-framework,OpenGL])
fi
Christophe Mutricy
committed
AC_ARG_ENABLE(sdl-image,
[ --enable-sdl-image SDL image support (default enabled)])
SDL_PATH="${PATH}"
AC_ARG_WITH(sdl-config-path,
[ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
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"
Christophe Massiot
committed
SDL_IMAGE="SDL12/SDL_image.h"
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
Christophe Massiot
committed
SDL_IMAGE="SDL11/SDL_image.h"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
SDL_HEADER="SDL/SDL.h"
Christophe Massiot
committed
SDL_IMAGE="SDL/SDL_image.h"
# check for cross-compiling
SDL_PREFIX=
AC_ARG_WITH(sdl-prefix,
[ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
e.g use as:
--with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
then
SDL_PREFIX="--prefix=${with_sdl_prefix}"
fi
# SDL on Darwin is heavily patched and can only run SDL_image
Christophe Massiot
committed
if test "${SYS}" != "darwin" -a "${SYS}" != "mingw32"; then
VLC_ADD_PLUGINS([vout_sdl aout_sdl])
fi
Christophe Massiot
committed
VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`])
VLC_ADD_LIBS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
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),
gbazin
committed
[ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
As a last resort we also test for SDL.h presence),
Samuel Hocevar
committed
[ 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.])
gbazin
committed
])])
Christophe Mutricy
committed
AS_IF([ test "${enable_sdl_image}" != "no"],[
AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
<${SDL_IMAGE}>, Indicate the path of SDL_image.h)
VLC_ADD_PLUGINS([sdl_image])
AC_CHECK_LIB(png, png_set_rows,
[VLC_ADD_LIBS([sdl_image],[-lpng -lz])],[],[-lz])
Christophe Mutricy
committed
AC_CHECK_LIB(jpeg, jpeg_start_decompress,
[VLC_ADD_LIBS([sdl_image],[-ljpeg])])
Christophe Mutricy
committed
AC_CHECK_LIB(tiff, TIFFClientOpen,
[VLC_ADD_LIBS([sdl_image],[-ltiff])])
VLC_ADD_LIBS([sdl_image], [-lSDL_image])],
Christophe Mutricy
committed
[ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
As a last resort we also test for SDL_image.h presence),
[ AC_MSG_WARN([The development package for SDL_image is not installed.
You should install it alongside your SDL package.])
])])
])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
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.])
Christophe Massiot
committed
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.
])
dnl
dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
[ --enable-freetype freetype support (default enabled)])
AC_ARG_ENABLE(fribidi,
[ --enable-fribidi fribidi support (default enabled)])
then
FREETYPE_PATH="${PATH}"
AC_ARG_WITH(freetype-config-path,
[ --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
[ if test "${with_freetype_config_path}" != "no"
then
FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
VLC_ADD_LIBS([freetype],[`${FREETYPE_CONFIG} --libs`])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([freetype],[-lxml2])
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([freetype],[-lfontconfig])])
AC_CHECK_HEADERS(Carbon/Carbon.h,
Samuel Hocevar
committed
[VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
then
AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
])
fi
FRIBIDI_PATH="${PATH}"
AC_ARG_WITH(fribidi-config-path,
[ --with-fribidi-config-path=PATH fribidi-config path (default search in \$PATH)],
[ if test "${with_fribidi_config_path}" != "no"
then
FRIBIDI_PATH="${with_fribidi_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no, ${FRIBIDI_PATH})
if test "${FRIBIDI_CONFIG}" != "no"
then
VLC_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_CPPFLAGS([skins2], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_LIBS([freetype], [`${FRIBIDI_CONFIG} --libs`])
VLC_ADD_LIBS([skins2], [`${FRIBIDI_CONFIG} --libs`])
fi
dnl
dnl libxml2 module
dnl
AC_ARG_ENABLE(libxml2,
[ --enable-libxml2 libxml2 support (default enabled)])
if test "${enable_libxml2}" != "no"
then
XML2_PATH="${PATH}"
AC_ARG_WITH(xml2-config-path,
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)],
[ if test "${with_xml2_config_path}" != "no"; then
XML2_PATH="${with_xml2_config_path}:${PATH}"
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
if test "${XML2_CONFIG}" != "no"; then
VLC_ADD_CPPFLAGS([xml],[`${XML2_CONFIG} --cflags`])
VLC_ADD_LIBS([xml],[`${XML2_CONFIG} --libs`])
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}"
LDFLAGS="${LDFLAGS_save} ${LIBS_xml}"
AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[
VLC_ADD_PLUGINS([xml]) ],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
else
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2])
fi
fi
fi
dnl
dnl SVG module
dnl
AC_ARG_ENABLE(svg,
[ --enable-svg SVG support (default disabled)])
if test "${enable_svg}" = "yes"
then
PKG_CHECK_MODULES(SVG,
librsvg-2.0 >= 2.9.0,
VLC_ADD_CFLAGS([svg],[$SVG_CFLAGS])
VLC_ADD_PLUGINS([svg]) ],
[AC_MSG_WARN(SVG library not found)])
fi
Olivier Aubert
committed
dnl
dnl Snapshot vout module (with cache)
dnl
AC_ARG_ENABLE(snapshot,
[ --enable-snapshot snapshot module (default disabled)])
if test "${enable_snapshot}" = "yes"
Olivier Aubert
committed
then
VLC_ADD_PLUGINS([snapshot])
fi

Jean-Paul Saman
committed
dnl
dnl Qt Embedded module

Jean-Paul Saman
committed
dnl (disabled by default)
dnl
AC_ARG_ENABLE(qte,
[ --enable-qte QT Embedded support (default disabled)])

Jean-Paul Saman
committed
then
AC_ARG_WITH(qte,
[ --with-qte=PATH Qt Embedded headers and libraries])

Jean-Paul Saman
committed
then
VLC_ADD_LIBS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
VLC_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])

Jean-Paul Saman
committed
else
VLC_ADD_LIBS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
VLC_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])

Jean-Paul Saman
committed
NEED_QTE_MAIN=yes
CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
] )
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"

Jean-Paul Saman
committed
fi

Jean-Paul Saman
committed
dnl
dnl Qt Video output module
dnl (disabled by default)
dnl
dnl AC_ARG_ENABLE(qt_video,
dnl [ --enable-qt_video QT Video Output support (default disabled)])
dnl if test "${enable_qt_video}" = "yes"
dnl then
dnl VLC_ADD_LIBS([qt_video],[-L${QTDIR}/lib])

Jean-Paul Saman
committed
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt_video}"
dnl AC_CHECK_LIB(qt-mt,main,[
dnl VLC_ADD_LIBS([qt_video],[-lqt-mt])

Jean-Paul Saman
committed
dnl ],[
dnl AC_CHECK_LIB(qt,main,[
dnl VLC_ADD_LIBS([qt_video],[-lqt])

Jean-Paul Saman
committed
dnl ])
dnl ])
dnl NEED_QTE_MAIN=yes
dnl LDFLAGS="${LDFLAGS_save}"
dnl VLC_ADD_CXXFLAGS([qt_video],[-I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include])

Jean-Paul Saman
committed
dnl fi
dnl
dnl Roku HD1000 Video output module
dnl
AC_ARG_ENABLE(hd1000v,

Jean-Paul Saman
committed
[ --enable-hd1000v HD1000 Video Output module (default enabled on HD1000)])
if test "${enable_hd1000v}" != "no" -a "${CXX}" != "" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_hd1000v}" = "yes"); then
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([cascade/graphics/CascadeScreen.h cascade/graphics/CascadeBitmap.h],
[
can_build_roku="yes"
],
[
can_build_roku="no"
AC_MSG_WARN([Not building Roku HD1000 compatible video output])
])
if test "$can_build_roku" = "yes"
then
VLC_ADD_LIBS([hd1000v],[-lCascade -ldvbpsi -lmad])
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "cygwin"
then
VLC_ADD_PLUGINS([panoramix])
fi
AC_ARG_ENABLE(directx,
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "cygwin"
Samuel Hocevar
committed
AC_ARG_WITH(directx,
[ VLC_ADD_PLUGINS([vout_directx aout_directx])
VLC_ADD_LIBS([vout_directx],[-lgdi32])
])
AC_CHECK_HEADERS(GL/gl.h,
[ VLC_ADD_PLUGINS([glwin32])
VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
])
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGINS([direct3d])
VLC_ADD_LIBS([direct3d],[-lgdi32])
AC_MSG_CHECKING(for directX headers in ${with_directx})
if test -f ${with_directx}/ddraw.h
VLC_ADD_PLUGINS([vout_directx aout_directx])
VLC_ADD_CPPFLAGS([vout_directx aout_directx],[-I${with_directx}])
VLC_ADD_LIBS([vout_directx],[-lgdi32])
AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default enabled on Linux)])
AC_ARG_ENABLE(mga,
[ --enable-mga Linux kernel Matrox support (default disabled)],
dnl
dnl SVGAlib module
dnl
AC_ARG_ENABLE(svgalib,
[ --enable-svgalib SVGAlib support (default disabled)])
then
VLC_ADD_LIBS([svgalib],[-lvgagl -lvga])
fi

Jean-Paul Saman
committed
dnl
dnl DirectFB module
dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
dnl TODO: support for static linking

Jean-Paul Saman
committed
dnl
AC_ARG_ENABLE(directfb,
[ --enable-directfb DirectFB support (default disabled)])
AC_ARG_WITH(directfb,
[ --with-directfb=PATH path to DirectFB headers and libraries])
if test "${enable_directfb}" = "yes"; then
have_directfb="false"
CPPFLAGS_mydirectfb=
if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
dnl Trying the given location
CPPFLAGS_save="${CPPFLAGS}"
LIBS_save="${LIBS}"
CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/"
LIBS_new="${LIBS_new} -L${with_directfb}/src/.libs/"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
dnl FIXME: too obscure
AC_CHECK_HEADER([directfb.h], [
AC_CHECK_LIB([direct],[direct_initialize], [
AC_CHECK_LIB([fusion], [fusion_enter], [
AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
], have_directfb="false")
], have_directfb="false")
], have_directfb="false")
dnl Restore flags
CPPFLAGS="${CPPFLAGS_save}"
if test "${have_directfb}" = "true"; then
LIBS_mydirectfb="${LIBS_new} -lz -ldl -ldirectfb -lfusion -ldirect -lpthread"
CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
fi
else
dnl Look for directfb-config
AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
if test "${DIRECTFB_CONFIG}" != "no"; then
CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
have_directfb="true"
else
dnl Trying with pkg-config
PKG_CHECK_MODULES(DIRECTFB, directfb, [
CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
have_directfb="true"
], [have_directfb="false"])
fi
fi
if test "${have_directfb}" = "true"; then
VLC_ADD_PLUGINS([directfb])
VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
else
AC_MSG_ERROR([cannot find directfb headers and/or libraries ])

Jean-Paul Saman
committed
fi

Jean-Paul Saman
committed
dnl
dnl GGI module
dnl
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)])
VLC_ADD_LIBS([ggi],[-lggi])
VLC_ADD_CPPFLAGS([ggi],[-I${with_ggi}/include])
VLC_ADD_LIBS([ggi],[-L${with_ggi}/lib])
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)])
CFLAGS_save="${CFLAGS}"
[ if test "${with_glide}" != "no" -a -n "${with_glide}"
VLC_ADD_CPPFLAGS([glide],[-I${with_glide}/include])
VLC_ADD_LIBS([glide],[-L${with_glide}/lib])
CFLAGS="$CFLAGS -I${with_glide}/include"
fi ])
CFLAGS="$CFLAGS -I/usr/include/glide"
AC_CHECK_HEADER(glide.h,[
VLC_ADD_PLUGINS([glide])
VLC_ADD_LIBS([glide],[-lglide2x -lm])
VLC_ADD_CPPFLAGS([glide],[-I/usr/include/glide])
],[
AC_MSG_ERROR([You don't have libglide. Install it or do not use --enable-glide])
])
dnl
dnl AA plugin
dnl
AC_ARG_ENABLE(aa,
[ --enable-aa aalib output (default disabled)])
VLC_ADD_LIBS([aa],[-laa])
dnl
dnl libcaca plugin
dnl
AC_ARG_ENABLE(caca,
[ --enable-caca libcaca output (default disabled)])
if test "${enable_caca}" = "yes"
then
CACA_PATH="${PATH}"
AC_ARG_WITH(caca-config-path,
[ --with-caca-config-path=PATH caca-config path (default search in \$PATH)],
[ if test "${with_caca_config_path}" != "no"
then
CACA_PATH="${with_caca_config_path}:${PATH}"
fi ])
AC_PATH_PROG(CACA_CONFIG, caca-config, no, ${CACA_PATH})
VLC_ADD_PLUGINS([caca])
VLC_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`])
VLC_ADD_LIBS([caca],[`${CACA_CONFIG} --plugin-libs`])
dnl
dnl win32 GDI plugin
dnl
AC_ARG_ENABLE(wingdi,
[ --enable-wingdi Win32 GDI module (default enabled on Win32)])
if test "${enable_wingdi}" != "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
VLC_ADD_LIBS([wingdi],[-lgdi32])
fi
if test "${SYS}" = "mingwce"; then
VLC_ADD_PLUGINS([wingdi wingapi])
fi
fi
AC_ARG_WITH(,[Audio plugins:])
dnl
dnl OSS /dev/dsp module (enabled by default except on win32)
dnl
AC_ARG_ENABLE(oss,
[ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_oss}" = "yes")
then
AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
AC_CHECK_LIB(ossaudio,main,VLC_ADD_LIBS([oss],[-lossaudio]))
])
fi
dnl
dnl Esound module
dnl
AC_ARG_ENABLE(esd,
[ --enable-esd Esound library support (default disabled)],
VLC_ADD_PLUGINS([esd])
VLC_ADD_CFLAGS([esd],[`${ESD_CONFIG} --cflags`])
VLC_ADD_LIBS([esd],[`${ESD_CONFIG} --libs`])
dnl
dnl Portaudio module
dnl
AC_ARG_ENABLE(portaudio,
[ --enable-portaudio Portaudio library support (default disabled)],
[if test "${enable_portaudio}" = "yes"
then
VLC_ADD_PLUGINS([portaudio])
VLC_ADD_CXXFLAGS([portaudio],[])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([portaudio],[-lportaudio -lwinmm -lole32])
else
VLC_ADD_LIBS([portaudio],[-lportaudio])
fi
fi])
dnl aRts module -- broken (freeze wxWidgets)
dnl
AC_ARG_ENABLE(arts,
[ --enable-arts aRts sound server (default disabled)],
[if test "${enable_arts}" = "yes"
then
AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
if test "${ARTS_CONFIG}" != "no"
then
VLC_ADD_PLUGINS([arts])
VLC_ADD_CFLAGS([arts],[`${ARTS_CONFIG} --cflags`])
VLC_ADD_LIBS([arts],[`${ARTS_CONFIG} --libs `])
[ --enable-alsa ALSA sound support for Linux (default enabled)])
if test "${enable_alsa}" != "no"
then
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test "${have_alsa}" = "true"
then
CFLAGS="${CFLAGS_save}"
AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include <alsa/asoundlib.h>],
[snd_pcm_hw_params_get_period_time(0,0,0);],
AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
VLC_ADD_PLUGINS([alsa])
VLC_ADD_LIBS([alsa],[-lasound -lm -ldl])
else
if test "${enable_alsa}" = "yes"; then
AC_MSG_ERROR([Could not find ALSA development headers])
fi
fi
fi
AC_ARG_ENABLE(waveout,
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
if test "${enable_waveout}" != "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
VLC_ADD_LIBS([waveout],[-lwinmm])
VLC_ADD_PLUGINS([waveout])
fi
dnl
dnl CoreAudio plugin
dnl
AC_ARG_ENABLE(macosx-audio,
[ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)])
if test "${enable_macosx-audio}" != "no" &&
(test "${SYS}" = "darwin" || test "${enable_macosx-audio}" = "yes")
then
AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
VLC_ADD_LDFLAGS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
Samuel Hocevar
committed
], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
dnl
dnl Roku HD1000 audio
dnl
AC_ARG_ENABLE(hd1000a,
[ --enable-hd1000a HD1000 audio module (default enabled on HD1000)])
if test "${enable_hd1000a}" != "no" -a "${CXX}" != "" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_hd1000a}" = "yes")
then
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS(deschutes/libraries/hdmachinex225/PCMAudioPlayer.h, [
AC_CHECK_LIB(HDMachineX225,main,VLC_ADD_LIBS([hd1000a],[-lHDMachineX225])) ])
dnl JACK modules
dnl
AC_ARG_ENABLE(jack,
[ --enable-jack JACK audio I/O modules (default disabled)],,
[enable_jack="no"])
AS_IF([test "${enable_jack}" != "no"], [
AC_CHECK_HEADERS(jack/jack.h, [
VLC_ADD_PLUGINS([access_jack jack])
VLC_ADD_LIBS([access_jack jack],[-ljack])
],[AC_MSG_ERROR([cannot find JACK headers])])
])
dnl
dnl CyberLink for C++ UPnP stack
dnl
AC_ARG_ENABLE(cyberlink,
[ --enable-cyberlink CyberLink for C++ UPnP stack (default disabled)])
AS_IF([test "${enable_cyberlink}" = "yes" ], [
AC_ARG_WITH(cyberlink-tree,
[ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking])
dnl
dnl test for --with-cyberlink-tree
dnl
AS_IF([test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""], [
AC_LANG_PUSH(C++)
real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`"
AS_IF([test -z "${real_cyberlink_tree}"], [
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}])
])
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS_cyberlink="-I${real_cyberlink_tree}/include"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_cyberlink}"
AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h],
[ VLC_ADD_CXXFLAGS([upnp_cc], [${CPPFLAGS_cyberlink}])
VLC_ADD_PLUGINS([upnp_cc])
],[
AC_MSG_ERROR([cannot find CyberLink for C++ headers])
])
AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree})
AS_IF([test -f "${real_cyberlink_tree}/lib/unix/libclink.a"], [
AC_MSG_RESULT(${real_cyberlink_tree}/lib/unix/libclink.a)
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
dnl The mere fact that we have to make such an ugly check sucks
AC_MSG_CHECKING(for XML parser to link CyberLink with)
LIBS_save="$LIBS"
LIBS_cclink="no"
for l in "`xml2-config --libs`" -lexpat -lxerces-c; do
LIBS="$LIBS_save ${real_cyberlink_tree}/lib/unix/libclink.a -lpthread $l"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <cybergarage/upnp/media/player/MediaPlayer.h>
using namespace CyberLink;
class testclass : public SearchResponseListener, public MediaPlayer
{
virtual void deviceSearchResponseReceived( SSDPPacket *)
{
}
public:
testclass (void)
{
addSearchResponseListener (this);
start ();
}
};
],[testclass l;])],[LIBS_cclink="$l"])
done
LIBS="${LIBS_save}"
dnl should not happen - otherwise this needs fixing - hence FAILURE
[AC_MSG_FAILURE([cannot find XML parser for CyberLink])])
AC_MSG_RESULT([${LIBS_cclink}])
VLC_ADD_LIBS([upnp_cc], [${real_cyberlink_tree}/lib/unix/libclink.a -lpthread ${LIBS_cclink}])
AC_MSG_ERROR([cannot find ${real_cyberlink_tree}/lib/unix/libclink.a, make sure you compiled CyberLink for C++ in ${with_cyberlink_tree}])
])
CPPFLAGS="${CPPFLAGS_save}"
dnl
dnl UPnP Plugin (Intel SDK)
dnl
AC_ARG_ENABLE(upnp,
[ --enable-upnp Intel UPnP SDK (default enabled)])
VLC_ADD_CXXFLAGS([upnp_intel], [ ])
AS_IF([test "x${enable_upnp}" != "xno"], [
AC_CHECK_LIB([upnp], [UpnpInit], [has_upnp="yes"], [has_upnp="no"], [-lpthread])
AS_IF([test "x${enable_upnp}" != "x" && test "${has_upnp}" = "no"], [
AC_MSG_ERROR([cannot find Intel UPnP SDK (libupnp)])
])
VLC_ADD_LIBS([upnp_intel], [-lupnp -lixml])
])
], [
has_upnp="no"
])
VLC_ADD_PLUGINS([upnp_intel])
])
dnl
dnl Interface plugins
dnl
AC_ARG_WITH(,[Interface plugins:])
Samuel Hocevar
committed
dnl special case for BeOS
Samuel Hocevar
committed
then
VLC_ADD_BUILTINS([beos])
Samuel Hocevar
committed
fi
dnl
dnl Skins2 module
dnl
AC_ARG_ENABLE(skins2,
[ --enable-skins2 Skins2 interface module (default disabled)])
if test "${enable_skins2}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); then
VLC_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
VLC_ADD_LIBS([skins2],[`${FREETYPE_CONFIG} --libs`])
else
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find freetype (required for skins2)])
fi
fi
if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LIBS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
else if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "darwin"); then
VLC_ADD_PLUGINS([skins2])
ALIASES="${ALIASES} svlc"
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
Samuel Hocevar
committed
VLC_ADD_LDFLAGS([skins2],[-Wl,-framework,Carbon])
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
fi fi fi
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
dnl dnl
dnl dnl Gtk+ module
dnl dnl
dnl AC_ARG_ENABLE(gtk,
dnl [ --enable-gtk Gtk+ support (default enabled)])
dnl if test "${enable_gtk}" != "no"
dnl then
dnl GTK_PATH="${PATH}"
dnl AC_ARG_WITH(gtk-config-path,
dnl [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
dnl [ if test "${with_gtk_config_path}" != "no"
dnl then
dnl GTK_PATH="${with_gtk_config_path}:${PATH}"
dnl fi ])
dnl # look for gtk-config
dnl AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
dnl GTK_CONFIG=${GTK12_CONFIG}
dnl if test "${GTK_CONFIG}" = "no"
dnl then
dnl AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
dnl fi
dnl if test "${GTK_CONFIG}" != "no"
dnl then
dnl if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
dnl then
dnl AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
dnl fi
dnl if test "${SYS}" != "mingw32"; then
dnl VLC_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk gthread`])
dnl VLC_ADD_LIBS([gtk],[`${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`])
dnl VLC_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk`])
dnl VLC_ADD_LIBS([gtk],[`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`])
dnl fi
dnl # now look for the gtk.h header
dnl CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
dnl ac_cv_gtk_headers=yes
dnl AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
dnl ac_cv_gtk_headers=no
dnl echo "Cannot find gtk development headers."
dnl ])
dnl if test "${ac_cv_gtk_headers}" = "yes"
dnl then
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GTK_MAIN=yes
dnl fi
dnl ALIASES="${ALIASES} gvlc"
dnl fi
dnl CPPFLAGS="${CPPFLAGS_save}"
dnl fi
dnl fi
dnl
dnl
dnl Gtk+2 module ! Disabled for now as it is unusable and confuses users
dnl
dnl AC_ARG_ENABLE(gtk2,
dnl [ --enable-gtk2 Gtk2 support (default disabled)])
dnl if test "${enable_gtk2}" = "yes"
dnl then
dnl PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
dnl VLC_ADD_LIBS([gtk2],[${GTK2_LIBS}])
dnl if test "${SYS}" != "mingw32"; then
dnl NEED_GTK2_MAIN=yes
dnl fi
dnl fi

Jean-Paul Saman
committed
dnl
dnl PDA Gtk+2 module
dnl

Jean-Paul Saman
committed
AC_ARG_ENABLE(pda,

Jean-Paul Saman
committed
[ --enable-pda PDA interface needs Gtk2 support (default disabled)])

Jean-Paul Saman
committed
then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])