CONFIGURE_LINE="$0 $*"
CODENAME="Janus"
-AC_PREREQ(2.50)
+AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_SYSTEM
dnl
dnl Check for tools
dnl
-AC_PROG_CC
+AC_PROG_CC_C99
AM_PROG_CC_C_O
-AC_PROG_CPP
AC_PROG_CXX
eval "${CXX} --version" >/dev/null 2>&1 || CXX=""
if test "${CXX}" != ""; then
dnl Check for compiler properties
AC_C_CONST
AC_C_INLINE
+AC_C_RESTRICT
dnl
dnl Check for the contrib directory
])
])
AC_SUBST(INCLUDED_LIBINTL)
-XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
+XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
dnl
dnl Iconv stuff
AC_HEADER_TIME
+AC_SEARCH_LIBS(poll, [poll], [AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS is usabl... err, has poll().])])
+
dnl Check for dirent
need_dirent=false
AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
+
if test "${SYS}" != "mingwce"; then
dnl VLC_ADD_PLUGINS([externrun])
VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record])
VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}])
VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
- ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+ if test "${ac_cv_altivec_inline}" = "no"; then
+ ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+ fi
fi
AC_CACHE_CHECK([if linker needs -framework vecLib],
AC_DEFINE(ENABLE_SOUT, 1, Define if you want the stream output support)
fi
+AC_ARG_ENABLE(switcher,
+ [ --enable-switcher Stream-out switcher plugin (default disabled)])
+
dnl Check for libshout
AC_ARG_ENABLE(shout,
[ --enable-shout libshout output plugin (default disabled)])
fi
fi
+
+dnl
+dnl OpenCV wrapper and example filters
+dnl
+AC_ARG_ENABLE(opencv,
+ [ --enable-opencv OpenCV (computer vision) filter (default disabled)])
+if test "${enable_opencv}" = "yes" -a "${CXX}" != "";
+then
+ AC_ARG_WITH(opencv-tree,
+ [ --with-opencv-tree=PATH opencv tree for linking])
+ if test -n "${with_opencv_tree}"
+ then
+ if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+ then
+ AC_MSG_CHECKING(for opencv in ${with_opencv_tree})
+ if test -f ${with_opencv_tree}/cv/include/cv.h -a -f ${with_opencv_tree}/cxcore/include/cxcore.h \
+ -a -f ${with_opencv_tree}/cvaux/include/cvaux.h -a -f ${with_opencv_tree}/otherlibs/highgui/highgui.h
+ then
+ AC_MSG_RESULT(yes)
+ VLC_ADD_PLUGINS([opencv_wrapper])
+ VLC_ADD_LDFLAGS([opencv_wrapper],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+ VLC_ADD_CFLAGS([opencv_wrapper],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+ AC_LANG_PUSH(C++)
+ VLC_ADD_PLUGINS([opencv_example])
+ VLC_ADD_LDFLAGS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
+ VLC_ADD_CXXFLAGS([opencv_example],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
+ AC_LANG_POP(C++)
+ else
+ dnl No opencv could be found, sorry
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot find opencv in ${with_opencv_tree}])
+ fi
+ else
+ AC_MSG_WARN([--enable-opencv currently only works on windows])
+ fi
+ fi
+fi
+
+
dnl
dnl libsmbclient plugin
dnl
fi
VLC_ADD_BUILTINS([ffmpeg])
- if test "${enable_sout}" != "no"; then
+ if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then
VLC_ADD_BUILTINS([stream_out_switcher])
fi
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h)
VLC_ADD_PLUGINS([ffmpeg])
- if test "${enable_sout}" != "no"; then
+ if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
VLC_ADD_PLUGINS([stream_out_switcher])
fi
VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --cflags`])
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h)
- VLC_ADD_BUILTINS([ffmpeg])
- if test "${enable_sout}" != "no"; then
- VLC_ADD_BUILTINS([stream_out_switcher])
+ if test "${SYS}" = "darwin"; then
+ VLC_ADD_BUILTINS([ffmpeg])
+ else
+ VLC_ADD_PLUGINS([ffmpeg])
+ fi
+ if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
+ if test "${SYS}" = "darwin"; then
+ VLC_ADD_BUILTINS([stream_out_switcher])
+ else
+ VLC_ADD_PLUGINS([stream_out_switcher])
+ fi
fi
VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
- VLC_ADD_LDFLAGS([ffmpeg],[${FFMPEG_LIBS}])
+ VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
dnl newer ffmpeg have a separate libpostproc
PKG_CHECK_MODULES(POSTPROC, libpostproc,[
VLC_ADD_LDFLAGS([ffmpeg],[${POSTPROC_LIBS}])
AC_CHECK_LIB(avcodec, avcodec_init, [
VLC_ADD_BUILTINS([ffmpeg])
VLC_ADD_LDFLAGS([ffmpeg],[-lavcodec])
- if test "${enable_sout}" != "no"; then
+ if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
VLC_ADD_BUILTINS([stream_out_switcher])
fi],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
[ --enable-gnutls gnutls TLS/SSL support (default enabled)])
AS_IF([test "${enable_gnutls}" != "no"], [
- PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.0.17], [have_gnutls="yes"], [have_gnutls="no"])
+ PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2.9], [have_gnutls="yes"], [have_gnutls="no"])
AS_IF([test "${have_gnutls}" = "yes"], [
VLC_ADD_PLUGINS([gnutls])
VLC_ADD_LDFLAGS([gnutls], [$GNUTLS_LIBS])
], [
AS_IF([test "${enable_gnutls}" = "yes"], [
- AC_MSG_ERROR([gnutls not present or too old (version 1.0.17 required)])
+ AC_MSG_ERROR([gnutls not present or too old (version 1.2.9 required)])
])
])
])
activex=false
AC_ARG_ENABLE(activex,
[ --enable-activex build a vlc-based ActiveX control (default enabled on Win32)])
+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 widl], no)
+ 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])
+ else
+ AC_CHECK_PROGS(WIDL, [widl], no)
+ if test "${WIDL}" != "no"
+ then
+ WINE_SDK_PATH="`dirname ${WIDL}`"/..
+ fi
+ fi
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ole2.h olectl.h,
[ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
fi
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
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
then
- AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
- if test "${XULRUNNER_CONFIG}" = "no"
+ AC_PATH_PROG(SEAMONKEY_CONFIG, seamonkey-config, no)
+ if test "${SEAMONKEY_CONFIG}" = "no"
then
- AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+ AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
+ if test "${XULRUNNER_CONFIG}" = "no"
+ then
+ AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+ else
+ have_xul=true
+ MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ fi
else
- have_xul=true
- MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
fi
fi
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"],
FILE_LIBVLC_DLL="" )
-dnl
-dnl we need pic on amd64 fo the mozilla plugin
-
-case "${target_cpu}" in
- x86_64)
- pic=pic
- ;;
- *)
- pic=""
- ;;
-esac
-AC_SUBST(pic)
-
dnl Import conditional variables generated by bootstrap
VLC_CONDITIONALS
AC_SUBST(UIC)
AC_SUBST(WINDRES)
AC_SUBST(MOZILLA_SDK_PATH)
+AC_SUBST(WINE_SDK_PATH)
AC_SUBST(XPIDL)
AC_SUBST(XPIDL_INCL)
AC_SUBST(LIBEXT)