Newer
Older

Rémi Denis-Courmont
committed
])
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
fi
])
else
dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
VLC_ADD_PLUGINS([opengl])
Samuel Hocevar
committed
VLC_ADD_LDFLAGS([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_LDFLAGS([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_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
AC_CHECK_LIB(jpeg, jpeg_start_decompress,
[VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
AC_CHECK_LIB(tiff, TIFFClientOpen,
[VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
[ 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_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LDFLAGS([freetype],[-lxml2])]
fi
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
VLC_ADD_LDFLAGS([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_LDFLAGS([freetype], [`${FRIBIDI_CONFIG} --libs`])
VLC_ADD_LDFLAGS([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_LDFLAGS([xml],[`${XML2_CONFIG} --libs`])
dnl depends on the xmlTextReader extension
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xml}"
AC_CHECK_LIB(xml2,xmlTextReaderConstName,[
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_LDFLAGS([svg],[$SVG_LIBS])
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_LDFLAGS([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_LDFLAGS([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_PLUGINS([qt_video])
dnl VLC_ADD_LDFLAGS([qt_video],[-L${QTDIR}/lib])

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

Jean-Paul Saman
committed
dnl ],[
dnl AC_CHECK_LIB(qt,main,[

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_PLUGINS([hd1000v])
VLC_ADD_LDFLAGS([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_LDFLAGS([vout_directx],[-lgdi32])
])
AC_CHECK_HEADERS(GL/gl.h,
[ VLC_ADD_PLUGINS([glwin32])
VLC_ADD_LDFLAGS([glwin32],[-lopengl32 -lgdi32])
])
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGINS([direct3d])
VLC_ADD_LDFLAGS([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_LDFLAGS([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_PLUGINS([svgalib])
VLC_ADD_LDFLAGS([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)])
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
AC_ARG_WITH(directfb,
[ --with-directfb=PATH path to DirectFB headers and libraries])
if test "${enable_directfb}" = "yes"; then
have_directfb="false"
CPPFLAGS_mydirectfb=
LDFLAGS_mydirectfb=
if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
dnl Trying the given location
CPPFLAGS_save=${CPPFLAGS}
LDFLAGS_save=${LDFLAGS}
CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
LDFLAGS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/"
LDFLAGS_new="${LDFLAGS_new} -L${with_directfb}/src/.libs/"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
LDFLAGS="${LD_FLAGS} ${LDFLAGS_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}"
LDFLAGS="${LDFLAGS_save}"
if test "${have_directfb}" = "true"; then
LDFLAGS_mydirectfb="${LDFLAGS_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`"
LDFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
have_directfb="true"
else
dnl Trying with pkg-config
PKG_CHECK_MODULES(DIRECTFB, directfb, [
CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
LDFLAGS_mydirectfb="${DIRECTFB_LIBS}"
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_LDFLAGS([directfb],[${LDFLAGS_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_PLUGINS([ggi])
VLC_ADD_LDFLAGS([ggi],[-lggi])
VLC_ADD_CPPFLAGS([ggi],[-I${with_ggi}/include])
VLC_ADD_LDFLAGS([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_LDFLAGS([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_LDFLAGS([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_PLUGINS([aa])
VLC_ADD_LDFLAGS([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_LDFLAGS([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_PLUGINS([wingdi])
VLC_ADD_LDFLAGS([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, [
VLC_ADD_PLUGINS([oss])
AC_CHECK_LIB(ossaudio,main,VLC_ADD_LDFLAGS([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_LDFLAGS([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_LDFLAGS([portaudio],[-lportaudio -lwinmm -lole32])
else
VLC_ADD_LDFLAGS([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_LDFLAGS([arts],[`${ARTS_CONFIG} --libs `])
fi
fi])
[ --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_LDFLAGS([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_PLUGINS([waveout])
VLC_ADD_LDFLAGS([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, [
VLC_ADD_PLUGINS([hd1000a])
AC_CHECK_LIB(HDMachineX225,main,VLC_ADD_LDFLAGS([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_LDFLAGS([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)
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
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_LDFLAGS([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 auto)])
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_LDFLAGS([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_LDFLAGS([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_LDFLAGS([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_LDFLAGS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
fi fi fi
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
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_LDFLAGS([gtk],[`${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`])
dnl VLC_ADD_CFLAGS([gtk],[`${GTK_CONFIG} --cflags gtk`])
dnl VLC_ADD_LDFLAGS([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_CFLAGS([gtk2],[${GTK2_CFLAGS}])
dnl VLC_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
dnl VLC_ADD_PLUGINS([gtk2])
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])
VLC_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
VLC_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
VLC_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
VLC_ADD_LDFLAGS([pda],[${GTK2_LIBS} ${LDFLAGS_pda}])
VLC_ADD_PLUGINS([pda])

Jean-Paul Saman
committed
if test "${SYS}" != "mingw32"; then
NEED_GTK2_MAIN=yes
fi
fi

Jean-Paul Saman
committed
dnl dnl
dnl dnl Gnome module
dnl dnl
dnl AC_ARG_ENABLE(gnome,
dnl [ --enable-gnome Gnome interface support (default disabled)],
dnl [if test "${enable_gnome}" = "yes"; then
dnl # look for gnome-config
dnl AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
dnl if test -x ${GNOME_CONFIG}
dnl then
dnl VLC_ADD_CFLAGS([gnome],[`${GNOME_CONFIG} --cflags gtk gnomeui`])
dnl VLC_ADD_LDFLAGS([gnome],[`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`])
dnl fi
dnl # now look for the gnome.h header
dnl CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
dnl AC_CHECK_HEADERS(gnome.h, [
dnl NEED_GTK_MAIN=yes
dnl NEED_GNOME_MAIN=yes
dnl ALIASES="${ALIASES} gnome-vlc"
dnl dnl We need this because of some moronic gnomesupport.h flavours
dnl AC_MSG_CHECKING(for strndup in gnome.h)
dnl AC_EGREP_HEADER(strndup,gnome.h,[
dnl AC_MSG_RESULT(yes)
dnl AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
dnl Define if <gnome.h> defines strndup.)],[
dnl AC_MSG_RESULT(no)])
dnl ],[
dnl AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
dnl developement tools or remove the --enable-gnome option])
dnl ])