Newer
Older
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)])
[ --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
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`"
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_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
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)])
AC_CHECK_HEADER([ggi/ggi.h],[
VLC_ADD_PLUGIN([ggi])
VLC_ADD_LIBS([ggi],[-lggi])
AC_ARG_WITH(ggi,
[ --with-ggi=PATH path to libggi],
[ if test "${with_ggi}" != "no" -a -n "${with_ggi}"
then
VLC_ADD_CPPFLAGS([ggi],[-I${with_ggi}/include])
VLC_ADD_LIBS([ggi],[-L${with_ggi}/lib])
fi ])
],[
AC_MSG_ERROR([LibGGI development files can't be found])
])
dnl
dnl AA plugin
dnl
AC_ARG_ENABLE(aa,
[ --enable-aa aalib output (default disabled)])
VLC_ADD_LIBS([aa],[-laa])
PKG_ENABLE_MODULES_VLC([caca], [], [caca >= 0.99.beta1], [libcaca output],[auto])
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_PLUGIN([wingdi])
VLC_ADD_PLUGIN([wingapi])
VLC_ADD_LIBS([wingdi],[-laygshell])
VLC_ADD_LIBS([wingapi],[-laygshell])
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")
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
AC_CHECK_LIB(ossaudio,main,[VLC_ADD_LIBS([oss],[-lossaudio])])
dnl
dnl Pulseaudio module
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([PULSE], [], [libpulse >= 0.9.11], [Pulseaudio support], [auto])
dnl
dnl Portaudio module
dnl
PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
[ --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_LIBS([alsa],[-lasound -lm -ldl])
VLC_ADD_PLUGIN([access_alsa])
VLC_ADD_LIBS([access_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])
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")
AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
[ VLC_ADD_PLUGIN([auhal])
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
PKG_ENABLE_MODULES_VLC([JACK], [jack], [jack], [JACK audio I/O modules],[auto])
PKG_ENABLE_MODULES_VLC([JACK], [access_jack], [jack], [JACK audio I/O modules],[auto])
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}])
],[
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)
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
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,
AS_HELP_STRING([--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"
])
])
dnl
dnl Interface plugins
dnl
AC_ARG_WITH(,[Interface plugins:])
Samuel Hocevar
committed
dnl special case for BeOS
Samuel Hocevar
committed
then
Samuel Hocevar
committed
fi
dnl
dnl Skins2 module
dnl
AC_ARG_ENABLE(skins2,
[AS_HELP_STRING([--enable-skins2],[Skins2 interface module (default
enabled except on MacOSX, BeOS and WinCE)])])
if test "${enable_skins2}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); then
Christophe Mutricy
committed
if test "${have_freetype}" != "yes"; then
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
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
AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no")])

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_LIBS([gtk2],[${GTK2_LIBS}])
VLC_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
VLC_ADD_LIBS([pda],[${LDFLAGS_pda}])
VLC_ADD_LIBS([pda],[${GTK2_LIBS}])

Jean-Paul Saman
committed
if test "${SYS}" != "mingw32"; then
NEED_GTK2_MAIN=yes
VLC_ADD_CFLAGS([gtk2_main],[$GTK2_CFLAGS])
VLC_ADD_LIBS([gtk2_main],[$GTK2_LIBS])

Jean-Paul Saman
committed
fi
fi

Jean-Paul Saman
committed
AM_CONDITIONAL(BUILD_PDA, [test "${enable_pda}" = "yes"])

Jean-Paul Saman
committed
dnl
dnl Maemo
dnl
AC_ARG_ENABLE(maemo,
[ --enable-maemo Internet tablets based on Maemo SDK (default disabled)])
if test "${enable_maemo}" = "yes"
then
PKG_CHECK_MODULES(HILDON, [hildon-1 hildon-fm-2], [
VLC_ADD_CFLAGS([maemo],[${HILDON_CFLAGS}])
VLC_ADD_LIBS([maemo],[${HILDON_LIBS}])
VLC_ADD_PLUGIN([maemo])
VLC_ADD_PLUGIN([swscale_maemo])
AC_DEFINE([BUILD_MAEMO], 1, [Define if you are using Maemo interfaces])
ALIASES="${ALIASES} mvlc"
], [
AS_IF([test "${enable_maemo}" = "yes"],[
AC_MSG_ERROR([Hildon libraries not found])
])
enable_maemo="no"
])
fi
AM_CONDITIONAL(BUILD_MAEMO, [test "${enable_maemo}" = "yes"])
[ --enable-qt4 QT 4 support (default enabled) ],, [
AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
])
AS_IF([test "${enable_qt4}" != "no"], [

Jean-Baptiste Kempf
committed
PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [
VLC_ADD_PLUGIN([qt4])
AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
ALIASES="${ALIASES} qvlc"
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "cygwin" -a "${SYS}" != "darwin"], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS -lole32])
QT4LOCALEDIR="$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/"
AC_SUBST(QT4LOCALEDIR)
VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS -DQT4LOCALEDIR=\\\\\\\"${QT4LOCALEDIR}\\\\\\\"])
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROG(RCC, rcc, rcc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
], [
AS_IF([test "${enable_qt4}" = "yes"],[
AC_MSG_ERROR([Qt 4 library not found])
],[
AC_MSG_WARN([Qt 4 library not found])
])
enable_qt4="no"
])
AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])
dnl
dnl WinCE GUI module
dnl
AC_ARG_ENABLE(wince,
[ --enable-wince Windows CE interface (default enabled with MinGW)])
if test "${enable_wince}" != "no"; then
if test "${SYS}" = "mingwce"; then
VLC_ADD_CXXFLAGS([wince],[])
VLC_ADD_LIBS([wince],[-lcommctrl -lcommdlg -laygshell])
dnl Gross hack
VLC_ADD_LIBS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
elif test "${SYS}" = "mingw32"; then
VLC_ADD_CXXFLAGS([wince],[])
VLC_ADD_LIBS([wince],[-lcomctl32 -lcomdlg32 -lgdi32 -lole32])
dnl Gross hack
VLC_ADD_LIBS([wince],[\\\${top_builddir}modules/gui/wince/wince_rc.o])
fi
fi

Jean-Paul Saman
committed
dnl
dnl Simple test for skins2 dependency
dnl
AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. Without it you won't be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
])

Jean-Paul Saman
committed

Jean-Paul Saman
committed
dnl Opie QT embedded module

Jean-Paul Saman
committed
AC_ARG_ENABLE(opie,
[ --enable-opie Qt embedded interface support (default disabled)],

Jean-Paul Saman
committed
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,'`])
VLC_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`])
CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
] )
CPPFLAGS="${CPPFLAGS_save}"

Jean-Paul Saman
committed

Jean-Paul Saman
committed
NEED_QTE_MAIN=yes
VLC_ADD_LIBS([opie],[-lqpe ${LDFLAGS_qte}])

Jean-Paul Saman
committed
MOC=${with_qte}/bin/moc

Jean-Paul Saman
committed
MOC=${QTDIR}/bin/moc
AC_ARG_ENABLE(macosx,
[ --enable-macosx MacOS X support (default enabled on MacOS X)])
VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,Foundation])
Pierre d'Herbemont
committed
VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa])
VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,OpenGL])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,Carbon])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,AGL])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,IOKit])
VLC_ADD_LDFLAGS([macosx], [-F\\\${top_srcdir}/extras/contrib/Sparkle -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F\\\${top_srcdir}/extras/contrib/Sparkle])
Pierre d'Herbemont
committed
dnl For bug report
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,AddressBook])
Pierre d'Herbemont
committed
VLC_ADD_LDFLAGS([macosx qtcapture], [-Wl,-framework,QTKit])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreAudio])
Pierre d'Herbemont
committed
VLC_ADD_LDFLAGS([opengllayer qtcapture], [-Wl,-framework,QuartzCore])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreVideo])
VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl opengllayer], [-fobjc-exceptions] )
VLC_ADD_PLUGIN([access_eyetv])
Pierre d'Herbemont
committed
VLC_ADD_PLUGIN([qtcapture])
VLC_ADD_PLUGIN([macosx])
VLC_ADD_PLUGIN([minimal_macosx])
dnl
dnl QNX RTOS module
dnl
AC_ARG_ENABLE(qnx,
[ --enable-qnx QNX RTOS support (default enabled on QNX RTOS)])
VLC_ADD_LIBS([qnx],[-lasound -lph])
])
fi
dnl
dnl ncurses module
dnl
AC_ARG_ENABLE(ncurses,
[ --disable-ncurses ncurses interface support (default enabled)],
[if test "${enable_ncurses}" != "no"; then
AC_CHECK_HEADER(ncurses.h,
[AC_CHECK_LIB(ncursesw, mvprintw,
VLC_ADD_LIBS([ncurses],[-lncursesw])
AC_DEFINE([HAVE_NCURSESW], 1, [Define to 1 if you have libncursesw.])
AC_CHECK_LIB(ncursesw, tgetent, [],
AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
[AS_IF([test "x${enable_ncurses}" != "x"],
[AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
)])])
]
)
)
],
[AC_CHECK_LIB( ncurses, mvprintw,
ALIASES="${ALIASES} nvlc"
VLC_ADD_LIBS([ncurses],[-lncurses])
AC_CHECK_LIB(ncurses, tgetent, [],
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
[AS_IF([test "x${enable_ncurses}" != "x"],
[AC_MSG_ERROR([tgetent not found in ncurses tinfo])])]
)]
)],
[AS_IF([test "x${enable_ncurses}" != "x"], [
AC_MSG_ERROR([libncurses not found])])]
)]
)]
)
fi]
)
dnl
dnl XOSD plugin
dnl
AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)])
AC_CHECK_HEADERS(xosd.h,
AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
VLC_ADD_PLUGIN([xosd])
VLC_ADD_LIBS([xosd],[-lxosd])
])
)
dnl
dnl Framebuffer (overlay) plugin
dnl
AC_ARG_ENABLE(fbosd,
if test "${enable_fbosd}" = "yes"
then
AC_CHECK_HEADERS(linux/fb.h, [
])
fi
dnl
dnl Visualisation plugin
dnl
AC_ARG_ENABLE(visual,
[ --enable-visual visualisation plugin (default enabled)])
if test "${enable_visual}" != "no"
then
dnl
dnl goom visualization plugin
dnl
AC_ARG_ENABLE(goom,
[ --enable-goom goom visualisation plugin (default disabled)])
if test "${enable_goom}" = "yes"
then
AC_ARG_WITH(goom-tree,
[ --with-goom-tree=PATH goom tree for static linking (required)])
dnl
dnl test for --with-goom-tree
dnl
if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then
AC_MSG_CHECKING(for libgoom2.a in ${with_goom_tree})
real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
if test -z "${real_goom_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_goom_tree}])
fi
if test -f "${real_goom_tree}/src/.libs/libgoom2.a"; then
AC_MSG_RESULT(${real_goom_tree}/src/.libs/libgoom2.a)
VLC_ADD_PLUGIN([goom])
VLC_ADD_LIBS([goom],[-L${real_goom_tree}/src/.libs -lgoom2])
VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree}/src -DUSE_GOOM_TREE])
else
dnl The given libgoom2 wasn't built, try to look for the old goom
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
if test -f "${real_goom_tree}/libgoom.a"; then
AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
VLC_ADD_PLUGIN([goom])
VLC_ADD_LIBS([goom],[-L${real_goom_tree} -lgoom])
VLC_ADD_CPPFLAGS([goom],[-I${real_goom_tree} -DUSE_GOOM_TREE -DOLD_GOOM])
else
dnl The given libgoom wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_goom_tree}/src/.libs/libgoom2.a, make sure you compiled goom in ${with_goom_tree}])
fi
fi
else
AC_CHECK_HEADERS(goom/goom.h, [
LDFLAGS="${LDFLAGS_save} ${LIBS_goom}"
AC_CHECK_LIB(goom2, goom_init, [
VLC_ADD_LIBS([goom],[-lgoom2])
],[
AC_MSG_ERROR([Could not find goom on your system: you may get it from http://www.ios-software.com/.])
])
])
fi
fi
dnl
dnl libprojectM visualization plugin
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([projectm], [], [libprojectM], [projectM visualization plugin], [auto])
dionoea
committed
dnl
dnl AtmoLight (homebrew AmbiLight)
dnl
if test "${SYS}" = "mingw32" -o "${SYS}" = "linux"; then
AC_ARG_ENABLE(atmo,
AS_HELP_STRING([--disable-atmo],[AtmoLight (homebrew philips ambilight)
(default enabled)]))
dionoea
committed
if test "${enable_atmo}" != "no"; then
AC_LANG_PUSH(C++)
dionoea
committed
AC_LANG_POP(C++)
fi
fi
dnl
dnl Bonjour services discovery
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
dnl
dnl Lirc plugin
dnl
AC_ARG_ENABLE(lirc,
[ --enable-lirc lirc support (default disabled)])
then
AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
then
VLC_ADD_LIBS([lirc],[-llirc_client])
fi
fi
dnl
dnl libgcrypt
dnl
AC_ARG_ENABLE(libgcrypt,
[ --disable-libgcrypt libgcrypts support (default enabled)])
AS_IF([test "${enable_libgcrypt}" != "no"], [
AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"])
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_LIBS([rtp stream_out_rtp], [${LIBGCRYPT_LIBS}])
])
fi
AM_CONDITIONAL([HAVE_LIBGCRYPT], [test "${have_libgcrypt}" = "yes"])

Rémi Denis-Courmont
committed
dnl
dnl TLS/SSL
dnl
AC_ARG_ENABLE(gnutls,
[ --enable-gnutls gnutls TLS/SSL support (default enabled)])
AS_IF([test "${enable_gnutls}" != "no"], [
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.4], [
Christophe Mutricy
committed
VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
AS_IF([test "${SYS}" = "mingw32"], [
dnl pkg-config --libs gnutls omits these
VLC_ADD_LIBS([gnutls], [-lz])
VLC_ADD_LIBS([gnutls], [${LTLIBINTL}])
dnl The GnuTLS plugin invokes gcry_control directly.
AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_LIBS([gnutls], [${LIBGCRYPT_LIBS}])
VLC_ADD_CFLAGS([gnutls], [${LIBGCRYPT_CFLAGS}])
VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])

Rémi Denis-Courmont
committed
], [
AS_IF([test "${enable_gnutls}" = "yes"], [
AC_MSG_ERROR([gnutls not present or too old (version 1.2.9 required)])

Rémi Denis-Courmont
committed
])
])
])
dnl
dnl RemoteOSD plugin (VNC client as video filter)
dnl
AC_ARG_ENABLE(remoteosd,
[ --disable-remoteosd RemoteOSD plugin (default enabled)])
AS_IF([test "${enable_remoteosd}" != "no"], [
AS_IF([test "${have_libgcrypt}" = "yes"],[
VLC_ADD_PLUGIN([remoteosd])
VLC_ADD_LIBS([remoteosd], ${LIBGCRYPT_LIBS})
VLC_ADD_CFLAGS([remoteosd], ${LIBGCRYPT_CFLAGS})
], [
AC_MSG_ERROR([libgcrypt support required for RemoteOSD plugin])
])
])
dnl
dnl RAOP plugin
dnl
AC_MSG_CHECKING([whether to enable RAOP plugin])
AS_IF([test "${have_libgcrypt}" = "yes"], [
AC_MSG_RESULT(yes)
VLC_ADD_PLUGIN([stream_out_raop])
VLC_ADD_LIBS([stream_out_raop], [${LIBGCRYPT_LIBS} -lgpg-error])
VLC_ADD_CFLAGS([stream_out_raop], [${LIBGCRYPT_CFLAGS}])
], [
AC_MSG_RESULT(no)
AC_MSG_WARN([libgcrypt support required for RAOP plugin])
])
dnl
dnl update checking system
dnl
AC_ARG_ENABLE(update-check,
[ --enable-update-check update checking system (default disabled)])
if test "${enable_update_check}" = "yes"
then
if test "${have_libgcrypt}" != "yes"
then
AC_MSG_ERROR([libgcrypt is required for update checking system])
fi

Rémi Denis-Courmont
committed
VLC_ADD_LIBS([libvlccore], [${LIBGCRYPT_LIBS}])
VLC_ADD_CFLAGS([libvlccore], [${LIBGCRYPT_CFLAGS}])
AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
fi

Rémi Denis-Courmont
committed
AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
], [
DEFS_BIGENDIAN=""
])
AC_SUBST(DEFS_BIGENDIAN)
dnl
dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?)
dnl
loader=false
AC_ARG_ENABLE(loader,
AS_HELP_STRING([--enable-loader],[build DLL loader for ELF i386 platforms
AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
AS_IF([test "${enable_loader}" = "yes"],
VLC_ADD_CPPFLAGS([dmo],[-I\\\${top_srcdir}/libs/loader])
VLC_ADD_LIBS([dmo],[\\\${top_builddir}/libs/loader/libloader.la -lpthread])
VLC_ADD_CPPFLAGS([quicktime],[-I\\\${top_srcdir}/libs/loader])
VLC_ADD_LIBS([quicktime],[\\\${top_builddir}/libs/loader/libloader.la -lpthread])
VLC_ADD_CPPFLAGS([realaudio],[-I\\\${top_srcdir}/libs/loader -DLOADER])
VLC_ADD_LIBS([realaudio],[\\\${top_builddir}/libs/loader/libloader.la])
VLC_ADD_CPPFLAGS([realvideo],[-I\\\${top_srcdir}/libs/loader -DLOADER])
VLC_ADD_LIBS([realvideo],[\\\${top_builddir}/libs/loader/libloader.la])
AC_ARG_WITH(,[Components:])
dnl
dnl the VLC binary
dnl
AC_ARG_ENABLE(vlc,
[ --enable-vlc build the VLC media player (default enabled)])
AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
dnl
dnl Microsoft ActiveX support
dnl
AS_HELP_STRING([--enable-activex],[build a vlc-based ActiveX control
AC_ARG_WITH(wine-sdk-path,
[ --with-wine-sdk-path=PATH path to wine sdk])
if test "${enable_activex}" != "no"
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_PROGS(MIDL, [midl], no)
if test "${with_wine_sdk_path}" != ""
then
WINE_SDK_PATH=${with_wine_sdk_path}
AC_PATH_PROG(WIDL, widl, no, [$WINE_SDK_PATH/bin:$WINE_SDK_PATH/tools/widl])
damienf
committed
AC_LANG_PUSH(C++)
[AC_CHECK_HEADERS(olectl.h,
damienf
committed
[ VLC_ADD_CPPFLAGS([activex],[-DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_])
VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
VLC_ADD_LIBS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
AC_CHECK_HEADERS(objsafe.h,
VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
[
# include <ole2.h>
#endif
],
[ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
)],
[ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
)
damienf
committed
AC_LANG_POP(C++)
AC_ARG_VAR(MIDL, [Microsoft IDL compiler (Win32 platform only)])
AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
AC_ARG_VAR(WIDL, [Wine IDL compiler (requires Wine SDK)])
AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
AM_CONDITIONAL(BUILD_ACTIVEX,${activex})
dnl
dnl Mozilla plugin
dnl
Samuel Hocevar
committed
mozilla=false
AC_ARG_ENABLE(mozilla,
AS_HELP_STRING([--enable-mozilla],[build a vlc-based Firefox/Mozilla plugin
(default disabled)]))
AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk])
AC_ARG_WITH(mozilla-pkg,
[ --with-mozilla-pkg=PKG look for PKG.pc to build the mozilla plugin.])
if test "${enable_mozilla}" = "yes"
then
AS_IF([test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"],
[
dnl pkg-config
dnl As we want to do a loop due to the number of name possible for the .pc
dnl we can't use the pkg-config macros.
AC_ARG_VAR([MOZILLA_CFLAGS], [C compiler flags for Mozilla, overriding pkg-config])
AC_ARG_VAR([MOZILLA_LIBS], [linker flags for Mozilla, overriding pkg-config])
AC_MSG_NOTICE([Checking for Mozilla])
found=0
if test -n "$MOZILLA_CFLAGS" -a -n "$MOZILLA_LIBS"
then
found=1
else
if test -n "$PKG_CONFIG"; then
for i in "${with_mozilla_pkg}" libxul {seamonkey,iceape,xulrunner,firefox,iceweasel,mozilla}-plugin; do
echo "Trying to find $i.pc files" >&5
if $PKG_CONFIG --exists --print-errors "$i" 2>&5
then
echo "Using $i.pc files." >&5
echo "Using $i.pc files." >&6
found=1
MOZILLA_CFLAGS=$( $PKG_CONFIG --cflags "$i" )
MOZILLA_LIBS=$( $PKG_CONFIG --libs "$i" )
break
fi
done
fi
AS_IF( [test $found = 1],[
CPPFLAGS="${CPPFLAGS_save} ${MOZILLA_CFLAGS}"

Jean-Paul Saman
committed
MOZILLA_REQUIRED_HEADERS=1
AC_CHECK_HEADERS([npfunctions.h])
AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
[#if HAVE_NPAPI_H
# include <npapi.h>