X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=41dc3c210ab6f438b8fb809b0185d59287e1c0c7;hb=7ba508f8ef84047d1c1ed06ac0f3596e0ea1019d;hp=eba8e6facd132d6ffd7f5775ffae36128fe44a38;hpb=807563ba09c78e31ce567daec6eceee77775cb96;p=vlc diff --git a/configure.ac b/configure.ac index eba8e6facd..41dc3c210a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ dnl Autoconf settings for vlc AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team]) -AC_INIT(vlc, 1.0.0-git) +AC_INIT(vlc, 1.1.0-git) VERSION_MAJOR="1" -VERSION_MINOR="0" +VERSION_MINOR="1" VERSION_REVISION="0" VERSION_EXTRA="-git" PKGDIR="vlc" @@ -18,6 +18,7 @@ AC_PREREQ(2.59c) AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_MACRO_DIR(m4) +AC_CONFIG_LIBOBJ_DIR(compat) AC_CANONICAL_BUILD AC_CANONICAL_HOST @@ -96,9 +97,9 @@ AC_C_CONST AC_C_INLINE AC_C_RESTRICT -dnl Allow binary package maintainer to pass a custom string to avoid +dnl Allow binary package maintainer to pass a custom string to avoid dnl cache problem -AC_ARG_WITH(binary-version, +AC_ARG_WITH(binary-version, AS_HELP_STRING([--with-binary-version=STRING], [To avoid plugins cache problem between binary version]),[],[]) AS_IF([test -n "${with_binary_version}"],[ @@ -111,15 +112,20 @@ dnl dnl Check for the contrib directory dnl AC_ARG_WITH(contrib, - [ --without-contrib do not use the libraries in extras/contrib],[],[]) + [ --without-contrib do not use the libraries in CONTRIB_DIR],[],[]) AS_IF([test "${with_contrib}" != "no"],[ - AC_MSG_CHECKING([for libs in extras/contrib]) - topdir="`dirname $0`" - if test "`echo \"$topdir\" | cut -c 1`" != "/"; then - topdir="`pwd`/$topdir" + AC_ARG_VAR([CONTRIB_DIR], [directory containing pre-built contrib, overriding extras/contrib]) + if test -z "$CONTRIB_DIR" + then + topdir="`dirname $0`" + if test "`echo \"$topdir\" | cut -c 1`" != "/"; then + topdir="`pwd`/$topdir" + fi + CONTRIB_DIR=${topdir}/extras/contrib fi - AS_IF([test -d ${topdir}/extras/contrib/lib],[ - AS_IF([test "`grep HOST ${topdir}/extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[ + AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}]) + AS_IF([test -d ${CONTRIB_DIR}/lib],[ + AS_IF([test "`grep HOST ${CONTRIB_DIR}/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[ if test "${with_contrib}" = "yes"; then AC_MSG_RESULT([no]) AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host]) @@ -129,36 +135,36 @@ AC_ARG_WITH(contrib, fi ],[ AC_MSG_RESULT([yes]) - export PATH=${topdir}/extras/contrib/bin:$PATH - CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include" - CPPFLAGS_save="${CPPFLAGS_save} -I${topdir}/extras/contrib/include" - CFLAGS="${CFLAGS} -I${topdir}/extras/contrib/include" - CFLAGS_save="${CFLAGS_save} -I${topdir}/extras/contrib/include" - CXXFLAGS="${CXXFLAGS} -I${topdir}/extras/contrib/include" - CXXFLAGS_save="${CXXFLAGS_save} -I${topdir}/extras/contrib/include" - OBJCFLAGS="${OBJCFLAGS} -I${topdir}/extras/contrib/include" - OBJCFLAGS_save="${OBJCFLAGS_save} -I${topdir}/extras/contrib/include" + export PATH=${CONTRIB_DIR}/bin:$PATH + CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include" + CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include" + CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include" + CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include" + CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include" + CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include" + OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include" + OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include" if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then - export PKG_CONFIG_PATH=${topdir}/extras/contrib/lib/pkgconfig:$PKG_CONFIG_PATH + export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH else - export PKG_CONFIG_LIBDIR=${topdir}/extras/contrib/lib/pkgconfig + export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig fi - LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib" - LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib" + LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib" + LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib" if test -z $with_mozilla_sdk_path; then - with_mozilla_sdk_path=${topdir}/extras/contrib/gecko-sdk + with_mozilla_sdk_path=${CONTRIB_DIR}/gecko-sdk fi if test -z $with_cyberlink_tree; then - with_cyberlink_tree=${topdir}/extras/contrib/src/clinkcc + with_cyberlink_tree=${CONTRIB_DIR}/src/clinkcc fi if test ".`uname -s`" = ".Darwin"; then - export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH - export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH + export LD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH + export DYLD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH elif test ".`uname -s`" = ".BeOS"; then - export LIBRARY_PATH=${topdir}/extras/contrib/lib:$LIBRARY_PATH - export BELIBRARIES=${topdir}/extras/contrib/lib:$BELIBRARIES + export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH + export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES fi ]) ],[ @@ -206,10 +212,10 @@ case "${host_os}" in VLC_ADD_LDFLAGS([mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation]) VLC_ADD_LDFLAGS([mkv mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation]) VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup]) - VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup]) - VLC_ADD_LDFLAGS([avcodec avformat swscale imgresample postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress]) + VLC_ADD_LDFLAGS([libvlc],[-Wl,-undefined,dynamic_lookup]) + VLC_ADD_LDFLAGS([avcodec avformat swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress]) VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings]) - VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,CoreFoundation]) + VLC_ADD_LDFLAGS([libvlccore],[-Wl,-framework,CoreFoundation]) VLC_ADD_LDFLAGS([motion],[-Wl,-framework,IOKit,-framework,CoreFoundation]) AC_ARG_ENABLE(macosx-defaults, AS_HELP_STRING([--enable-macosx-defaults],[Build the default configuration on Mac OS X (default enabled)])) @@ -217,8 +223,10 @@ case "${host_os}" in then echo "" echo "Building with Mac OS X defaults:" - with_macosx_version_min="10.4" - echo " Assuming --with-macosx-version-min=10.4" + with_macosx_version_min="10.5" + echo " Assuming --with-macosx-version-min=10.5" + with_macosx_sdk="/Developer/SDKs/MacOSX${with_macosx_version_min}.sdk" + echo " Assuming --with-macosx-sdk=/Developer/SDKs/MacOSX${with_macosx_version_min}.sdk" build_dir=`pwd` echo " Assuming --prefix=${build_dir}/vlc_install_dir" ac_default_prefix="${build_dir}/vlc_install_dir" @@ -262,43 +270,37 @@ case "${host_os}" in enable_xvideo="no" echo " Assuming --disable-xvideo" fi - if test ".`uname -p`" = ".i386"; then - dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code - dnl without hacking it a lot, we disable mmx and sse. - dnl (that bug is about ld being unable to handle - dnl text relocation) - save_cflags="$CFLAGS" - CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress" - AC_TRY_LINK( - [int a;], [asm("movq _a,%mm0\n");], - ac_ld_does_not_support_text_reloc=no, - ac_ld_does_not_support_text_reloc=yes) - CFLAGS="$save_cflags" - - if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then - enable_mmx="no" - echo " Assuming --disable-mmx (due to a bug in ld)" - enable_sse="no" - echo " Assuming --disable-sse (due to a bug in ld)" - fi - fi dnl dnl Check for Mac OS X SDK settings dnl AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=DIR compile using the SDK in DIR]) if test "${with_macosx_sdk}" != "" ; then - CPP="${CPP} -isysroot ${with_macosx_sdk}" - CC="${CC} -isysroot ${with_macosx_sdk}" + CPP="${CPP} -isysroot ${with_macosx_sdk}" + CC="${CC} -isysroot ${with_macosx_sdk}" CXX="${CXX} -isysroot ${with_macosx_sdk}" OBJC="${OBJC} -isysroot ${with_macosx_sdk}" LD="${LD} -syslibroot ${with_macosx_sdk}" fi + if test "${host_cpu}" = "powerpc"; then + CPP="${CPP} -arch ppc" + CC="${CC} -arch ppc" + CXX="${CXX} -arch ppc" + OBJC="${OBJC} -arch ppc" + LD="${LD} -arch ppc" + fi + if test "${host_cpu}" = "i386"; then + CPP="${CPP} -arch i386" + CC="${CC} -arch i386" + CXX="${CXX} -arch i386" + OBJC="${OBJC} -arch i386" + LD="${LD} -arch i386" + fi AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VERSION compile for MacOSX VERSION and above]) if test "${with_macosx_version_min}" != "" ; then - CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}" - CC="${CC} -mmacosx-version-min=${with_macosx_version_min}" + CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}" + CC="${CC} -mmacosx-version-min=${with_macosx_version_min}" CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}" OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}" LD="${LD} -macosx_version_min=${with_macosx_version_min}" @@ -309,8 +311,31 @@ case "${host_os}" in export MACOSX_DEPLOYMENT_TARGET fi ;; + darwin9*) + if (test ".`uname -p`" = ".i386"); then + dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code + dnl without hacking it a lot, we disable mmx and sse. + dnl (that bug is about ld being unable to handle + dnl text relocation) + save_cflags="$CFLAGS" + CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress" + AC_TRY_LINK( + [int a;], [asm("movq _a,%mm0\n");], + ac_ld_does_not_support_text_reloc=no, + ac_ld_does_not_support_text_reloc=yes) + CFLAGS="$save_cflags" + + if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then + enable_mmx="no" + echo " Assuming --disable-mmx (due to a bug in ld)" + enable_sse="no" + echo " Assuming --disable-sse (due to a bug in ld)" + fi + fi + ;; *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*) AC_CHECK_TOOL(WINDRES, windres, :) + AC_CHECK_TOOL(OBJCOPY, objcopy, :) case "${host_os}" in *wince* | *mingwce* | *mingw32ce* | *pe*) @@ -336,7 +361,7 @@ case "${host_os}" in if test "${SYS}" = "mingw32"; then # add ws2_32 for closesocket, select, recv - VLC_ADD_LIBS([libvlc],[-lws2_32 -lnetapi32 -lwinmm]) + VLC_ADD_LIBS([libvlccore],[-lws2_32 -lnetapi32 -lwinmm]) VLC_ADD_LDFLAGS([vlc],[-mwindows]) VLC_ADD_LIBS([activex mozilla],[-lgdi32]) VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm]) @@ -344,8 +369,8 @@ case "${host_os}" in fi if test "${SYS}" = "mingwce"; then # add ws2 for closesocket, select, recv - VLC_ADD_LIBS([libvlc access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd],[-lws2]) - VLC_ADD_LIBS([libvlc],[-lmmtimer]) + VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd],[-lws2]) + VLC_ADD_LIBS([libvlccore],[-lmmtimer]) fi ;; *nto*) @@ -355,7 +380,7 @@ case "${host_os}" in solaris*) SYS=solaris # _POSIX_PTHREAD_SEMANTICS is needed to get the POSIX ctime_r - # Perhaps it is useful other places as well? + # Perhaps it is useful other places as well? CFLAGS_save="${CFLAGS_save} -D_POSIX_PTHREAD_SEMANTICS"; CFLAGS="${CFLAGS_save}" ;; hpux*) @@ -366,16 +391,16 @@ case "${host_os}" in CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}" CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}" VLC_ADD_CXXFLAGS([beos],[]) - VLC_ADD_LIBS([vlc libvlc logger],[-lbe]) + VLC_ADD_LIBS([vlc libvlccore logger],[-lbe]) VLC_ADD_LIBS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame]) VLC_ADD_LIBS([dvdnav dvdread],[-ldl]) VLC_ADD_LIBS([access_file],[-lpoll]) LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}" dnl Check for BONE if test -f /boot/beos/system/lib/libbind.so; then - VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl_udp],[-lbind -lsocket]) + VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlccore growl_udp],[-lbind -lsocket]) else - VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl_udp],[-lnet]) + VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlccore growl_udp],[-lnet]) fi dnl Ugly check for Zeta @@ -394,7 +419,7 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce") dnl -dnl Sadly autoconf doesn't think about testing foo.exe when ask to test +dnl Sadly autoconf doesn't think about testing foo.exe when ask to test dnl for program foo on win32 case "${build_os}" in @@ -405,7 +430,7 @@ case "${build_os}" in ;; esac -dnl +dnl dnl Libtool dnl It's very bad, but our former custom system was worst dnl -- Courmisch @@ -436,21 +461,40 @@ dnl Gettext stuff dnl AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) -VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}]) +VLC_ADD_LIBS([libvlccore vlc], [${LTLIBINTL}]) dnl dnl Iconv stuff dnl AM_ICONV -VLC_ADD_CFLAGS([libvlc],[${INCICONV}]) -VLC_ADD_LIBS([libvlc],[${LTLIBICONV}]) +VLC_ADD_CFLAGS([libvlccore],[${INCICONV}]) +VLC_ADD_LIBS([libvlccore],[${LTLIBICONV}]) + +dnl Check for broken versions of mingw-runtime compatability library +AS_IF([test "${SYS}" = "mingw32"], [ + AC_MSG_CHECKING(for broken mingw-runtime) + AC_PREPROC_IFELSE([ +#include <_mingw.h> +#if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 15) +# error Attempting to use mingw-runtime with broken vsnprintf support +#endif +], [ + AC_MSG_RESULT([ok]) +], [ + AC_MSG_RESULT([present]) + AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher!]) +]) + dnl force use of mingw provided c99 *printf over msvcrt + CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1" + CPPFLAGS_save="${CPPFLAGS_save} -D__USE_MINGW_ANSI_STDIO=1" +]) dnl Check for the need to include the mingwex lib for mingw32 if test "${SYS}" = "mingw32" then AC_CHECK_LIB(mingwex,opendir, AC_CHECK_LIB(mingw32,opendir,, - [VLC_ADD_LIBS([libvlc gtk],[-lmingwex])]) + [VLC_ADD_LIBS([libvlccore gtk],[-lmingwex])]) ) fi @@ -495,6 +539,31 @@ AC_LANG_PUSH(C++) AC_LANG_POP(C++) fi +dnl +dnl Buggy glibc prevention. Purposedly not cached. +dnl Ubuntu alone has 20 bug numbers for this... +dnl +AC_MSG_CHECKING(for buggy GNU/libc versions) +AC_PREPROC_IFELSE([ +#include +#if defined (__GLIBC__) && (__GLIBC__ == 2) \ + && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7) +# error GNU/libc with dcgettext killer bug! +#endif +], [ + AC_MSG_RESULT([not present]) +], [ + AC_MSG_RESULT([found]) + AS_IF([test "x${enable_nls}" != "xno" || test "x${enable_mozilla}" != "xno"], [ + AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable +work-around for this. Check with your distribution vendor on how to update the +glibc run-time. Alternatively, build with --disable-nls --disable-mozilla and +be sure to not use LibVLC from other applications/wrappers.]) + ], [ + AC_DEFINE(DISABLE_BUGGY_GLIBC_CHECK, 1, [Disables runtime check for buggy glibc.]) + ]) +]) + dnl Plugin compilation stuff VLC_LIBRARY_SUFFIX @@ -506,15 +575,17 @@ dnl Check for system libs needed need_libc=false dnl Check for usual libc functions -AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale]) -AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) -AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) -AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)]) +AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r lrintf daemon fork lstat posix_fadvise posix_madvise uselocale]) AC_FUNC_ALLOCA AC_CHECK_FUNCS(fcntl) +AC_REPLACE_FUNCS([asprintf atof atoll gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab]) +AC_CHECK_FUNCS([stricmp strnicmp]) +AC_CHECK_FUNCS(fdatasync,, + [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) +]) dnl Check for Linux system calls -AC_CHECK_FUNCS([vmsplice eventfd]) +AC_CHECK_FUNCS([vmsplice]) AH_BOTTOM([#include ]) @@ -538,7 +609,7 @@ fi AC_CHECK_FUNCS(connect,,[ AC_CHECK_LIB(socket,connect,[ - VLC_ADD_LIBS([libvlc cdda cddax],-lsocket) + VLC_ADD_LIBS([libvlccore cdda cddax],-lsocket) LIBS_socket="-lsocket" ]) ]) @@ -549,9 +620,6 @@ AC_CHECK_FUNCS(send,,[ ]) ]) -AC_CHECK_HEADERS(zlib.h, [ - VLC_ADD_LIBS([access_http],[-lz]) -]) dnl Check for socklen_t AH_TEMPLATE(socklen_t, [Define to `int' if does not define.]) @@ -638,7 +706,7 @@ fi AC_CHECK_FUNCS(inet_aton,,[ AC_CHECK_LIB(resolv,inet_aton,[ - VLC_ADD_LIBS([libvlc],[-lresolv]) + VLC_ADD_LIBS([libvlccore],[-lresolv]) ]) ]) @@ -651,7 +719,7 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)], [ # FreeBSD has a gnugetopt library for this: AC_CHECK_LIB([gnugetopt],[getopt_long], [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) - VLC_ADD_LIBS([libvlc],[-lgnugetopt])], + VLC_ADD_LIBS([libvlccore],[-lgnugetopt])], [need_getopt=:])]) fi AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt}) @@ -662,13 +730,13 @@ AC_CHECK_LIB(m,cos,[ VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene],[-lm]) ]) AC_CHECK_LIB(m,pow,[ - VLC_ADD_LIBS([avcodec avformat swscale imgresample postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm]) + VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlccore vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm]) ]) AC_CHECK_LIB(m,sqrt,[ VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm]) ]) AC_CHECK_LIB(m,ceil,[ - VLC_ADD_LIBS([mosaic],[-lm]) + VLC_ADD_LIBS([hotkeys mosaic],[-lm]) ]) AC_CHECK_LIB(m,exp,[ VLC_ADD_LIBS([gaussianblur],[-lm]) @@ -698,7 +766,7 @@ if test "${ac_cv_have_plugins}" = "no"; then [ac_cv_my_have_shl_load=yes, AC_CHECK_LIB(dld, shl_load, [ac_cv_my_have_shl_load=yes - VLC_ADD_LIBS([libvlc],[-ldld])])]) + VLC_ADD_LIBS([libvlccore],[-ldld])])]) if test "${ac_cv_my_have_shl_load}" = "yes"; then AC_DEFINE(HAVE_DL_SHL_LOAD, 1, [Define if you have the shl_load API]) ac_cv_have_plugins=yes @@ -708,7 +776,7 @@ fi # Whatever style if test "${ac_cv_have_plugins}" = "no"; then AC_CHECK_LIB(dld, dld_link, - [VLC_ADD_LIBS([libvlc],[-ldld]) + [VLC_ADD_LIBS([libvlccore],[-ldld]) AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library]) ac_cv_have_plugins=yes]) fi @@ -717,7 +785,7 @@ fi if test "${ac_cv_have_plugins}" = "no"; then if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then AC_CHECK_LIB(kernel32, main, - [VLC_ADD_LIBS([libvlc],[-lkernel32]) + [VLC_ADD_LIBS([libvlccore],[-lkernel32]) AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary]) ac_cv_have_plugins=yes]) fi @@ -747,10 +815,10 @@ if test "${ac_cv_have_plugins}" = "no"; then ac_cv_my_have_dlopen=yes, AC_CHECK_LIB(dl, dlopen, ac_cv_my_have_dlopen=yes - VLC_ADD_LIBS([libvlc realaudio realvideo],[-ldl]), + VLC_ADD_LIBS([libvlccore realaudio realvideo],[-ldl]), AC_CHECK_LIB(svld, dlopen, ac_cv_my_have_dlopen=yes - VLC_ADD_LIBS([libvlc],[-lsvld])))) + VLC_ADD_LIBS([libvlccore],[-lsvld])))) if test "${ac_cv_my_have_dlopen}" = "yes"; then AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API]) ac_cv_have_plugins=yes @@ -774,28 +842,28 @@ if test "${THREAD_LIB}" = "error"; then THREAD_LIB="" fi -VLC_ADD_LIBS([libvlc plugin],[${THREAD_LIB}]) +VLC_ADD_LIBS([libvlccore libvlc plugin],[${THREAD_LIB}]) AC_CHECK_LIB(rt, clock_nanosleep, [ - VLC_ADD_LIBS([libvlc],[-lrt]) + VLC_ADD_LIBS([libvlccore],[-lrt]) AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define to 1 if you have clock_nanosleep.]) ], [ dnl HP/UX port - AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlc],[-lrt])]) + AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])]) ]) have_nanosleep=false AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[ AC_CHECK_LIB(rt,nanosleep, - [VLC_ADD_LIBS([libvlc],[-lrt]) have_nanosleep=:], + [VLC_ADD_LIBS([libvlccore],[-lrt]) have_nanosleep=:], [AC_CHECK_LIB(posix4,nanosleep, - [VLC_ADD_LIBS([libvlc],[-lposix4]) have_nanosleep=:])] + [VLC_ADD_LIBS([libvlccore],[-lposix4]) have_nanosleep=:])] ) ]) if ${have_nanosleep}; then AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if nanosleep is available.]) fi -fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" +fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" dnl Check for misc headers AC_MSG_CHECKING(for strncasecmp in strings.h) @@ -806,11 +874,12 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ AC_MSG_RESULT(no)]) dnl Check for headers -AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.h getopt.h strings.h inttypes.h sys/int_types.h wchar.h locale.h) -AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h) +AC_CHECK_HEADERS(getopt.h strings.h locale.h) +AC_CHECK_HEADERS(fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h) AC_CHECK_HEADERS([arpa/inet.h netinet/in.h netinet/udplite.h sys/eventfd.h]) AC_CHECK_HEADERS([net/if.h], [], [], [ + #include #include ]) if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then @@ -867,19 +936,43 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then AC_CHECK_HEADERS(pthread.h) fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -dnl Find where are the X headers and libraries -AC_PATH_XTRA() - dnl it seems that autoconf do the pkg-config detection only for the first PKG_CHECK_MODULES in the configure.ac ( which is logical) but in our case it is nested in a if so it was not working if you're not on linux or have disable hal. dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved -AC_ARG_VAR(PKG_CONFIG_PATH, +AC_ARG_VAR(PKG_CONFIG_PATH, [Paths where to find .pc not at the default location]) PKG_PROG_PKG_CONFIG() +dnl +dnl Check for zlib.h and -lz along with system -lminizip if available +dnl +AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ]) +AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ]) +if test "${have_zlib}" = "yes" +then + VLC_ADD_LIBS([access_http gme mp4 skins2 sap mkv unzip zip],[-lz]) + PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [ + AC_CHECK_HEADERS([unzip.h], [ + have_minizip=yes + MINIZIP_LIBS="-lminizip -lz" + ], [ + have_minizip=no + MINIZIP_CFLAGS="-I\\\${top_srcdir}/libs/unzip" + MINIZIP_LIBS="\\\${top_builddir}/libs/unzip/libunzip.la" + ]) + ]) + VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS]) + VLC_ADD_CFLAGS([zip],[$MINIZIP_CFLAGS]) + VLC_ADD_LIBS([skins2 zip],[$MINIZIP_LIBS]) + VLC_ADD_PLUGIN([unzip]) + VLC_ADD_PLUGIN([zip]) +fi +AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ]) + + dnl Check for hal AC_ARG_ENABLE(hal, [ --enable-hal Linux HAL services discovery (default enabled)]) - + if test "${enable_hal}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" then PKG_CHECK_MODULES(HAL, hal >= 0.5.0, @@ -887,12 +980,27 @@ then AC_DEFINE( HAVE_HAL, 1, [Define if you have the HAL library] ) VLC_ADD_PLUGIN([hal]) VLC_ADD_PLUGIN([probe_hal]) - VLC_ADD_LIBS([libvlc hal probe_hal],[$HAL_LIBS]) - VLC_ADD_CFLAGS([libvlc hal probe_hal],[$HAL_CFLAGS])], + VLC_ADD_LIBS([libvlccore hal probe_hal],[$HAL_LIBS]) + VLC_ADD_CFLAGS([libvlccore hal probe_hal],[$HAL_CFLAGS])], [AC_MSG_WARN([libhal >= 0.5.0 was not found. Install libhal-dev ?])] ) fi +dnl Check for mtp +AC_ARG_ENABLE(mtp, + [ --enable-mtp MTP devices support (default enabled)]) + +if test "${enable_mtp}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" +then + PKG_CHECK_MODULES(MTP, libmtp >= 0.3.0, + [ VLC_ADD_PLUGIN([mtp]) + VLC_ADD_PLUGIN([access_mtp]) + VLC_ADD_LIBS([mtp access_mtp],[$MTP_LIBS]) + VLC_ADD_CFLAGS([mtp access_mtp],[$MTP_CFLAGS])], + [AC_MSG_WARN(MTP library not found)] + ) +fi + dnl Check for dbus AC_ARG_ENABLE(dbus, [ --enable-dbus Linux D-BUS message bus system (default enabled)]) @@ -903,8 +1011,8 @@ then dnl api stable dbus PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0, [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] ) - VLC_ADD_LIBS([screensaver libvlc],[$DBUS_LIBS]) - VLC_ADD_CFLAGS([screensaver libvlc],[$DBUS_CFLAGS]) + VLC_ADD_LIBS([screensaver libvlccore],[$DBUS_LIBS]) + VLC_ADD_CFLAGS([screensaver libvlccore],[$DBUS_CFLAGS]) dnl Check for dbus control interface AC_ARG_ENABLE(dbus-control, [ --disable-dbus-control D-BUS control interface (default enabled)]) if test "${enable_dbus_control}" != "no" @@ -963,7 +1071,7 @@ AC_CACHE_CHECK([if \$CC accepts -Os], AC_TRY_COMPILE([],,ac_cv_c_os=yes, ac_cv_c_os=no)]) if test "${ac_cv_c_os}" != "no"; then CFLAGS_OPTIM_SIZE="${CFLAGS_OPTIM_SIZE} -Os" -else +else AC_CACHE_CHECK([if \$CC accepts -O], [ac_cv_c_o], [CFLAGS="${CFLAGS_save} -O" @@ -975,26 +1083,34 @@ else fi fi -AC_CACHE_CHECK([if \$CC accepts -O3], - [ac_cv_c_o3], - [CFLAGS="${CFLAGS_save} -O3" - AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)]) -if test "${ac_cv_c_o3}" != "no" -a "x${enable_debug}" = "xno"; then - CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O3" +AC_CACHE_CHECK([if \$CC accepts -O4], + [ac_cv_c_o4], + [CFLAGS="${CFLAGS_save} -O4" + AC_TRY_COMPILE([],,ac_cv_c_o4=yes, ac_cv_c_o4=no)]) +if test "${ac_cv_c_o4}" != "no" -a "x${enable_debug}" = "xno"; then + CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O4" else - AC_CACHE_CHECK([if \$CC accepts -O2], - [ac_cv_c_o2], - [CFLAGS="${CFLAGS_save} -O2" - AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)]) - if test "${ac_cv_c_o2}" != "no"; then - CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O2" + AC_CACHE_CHECK([if \$CC accepts -O3], + [ac_cv_c_o3], + [CFLAGS="${CFLAGS_save} -O3" + AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)]) + if test "${ac_cv_c_o3}" != "no" -a "x${enable_debug}" = "xno"; then + CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O3" else - AC_CACHE_CHECK([if \$CC accepts -O], - [ac_cv_c_o], - [CFLAGS="${CFLAGS_save} -O" - AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)]) - if test "${ac_cv_c_o}" != "no"; then - CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O" + AC_CACHE_CHECK([if \$CC accepts -O2], + [ac_cv_c_o2], + [CFLAGS="${CFLAGS_save} -O2" + AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)]) + if test "${ac_cv_c_o2}" != "no"; then + CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O2" + else + AC_CACHE_CHECK([if \$CC accepts -O], + [ac_cv_c_o], + [CFLAGS="${CFLAGS_save} -O" + AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)]) + if test "${ac_cv_c_o}" != "no"; then + CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O" + fi fi fi fi @@ -1085,11 +1201,6 @@ case "${host_cpu}" in "") ARCH=unknown ;; - arm*) - dnl use arm assembly - VLC_ADD_CFLAGS([wma_fixed],[-DCPU_ARM]) - ARCH="${host_cpu}" - ;; *) ARCH="${host_cpu}" ;; @@ -1417,7 +1528,7 @@ AS_IF([test "${enable_altivec}" = "yes"], [ VLC_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}]) - VLC_ADD_CFLAGS([libvlc],[${ac_cv_altivec_inline}]) + VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}]) ]) VLC_ADD_PLUGIN([memcpyaltivec]) VLC_ADD_PLUGIN([i420_yuy2_altivec]) @@ -1479,7 +1590,7 @@ dnl - Others: test should fail AS_IF([test "${ac_cv_c_altivec}" != "no"], [ AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, [Define to 1 if C AltiVec extensions are available.]) - VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}]) + VLC_ADD_CFLAGS([libvlccore],[${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}]) VLC_ADD_PLUGIN([memcpyaltivec]) @@ -1493,7 +1604,7 @@ dnl - Others: test should fail LDFLAGS="${LDFLAGS_save}" ]) AS_IF([test "${ac_cv_ld_altivec}" != "no"], [ - VLC_ADD_LDFLAGS([libvlc idctaltivec motionaltivec memcpyaltivec],[-Wl,-framework,vecLib]) + VLC_ADD_LDFLAGS([libvlccore idctaltivec motionaltivec memcpyaltivec],[-Wl,-framework,vecLib]) ]) ]) @@ -1565,14 +1676,18 @@ AC_ARG_ENABLE(debug, test "${enable_debug}" != "yes" && enable_debug="no" AH_TEMPLATE(NDEBUG, [Define to 1 if debug code should NOT be compiled]) -AS_IF([test "x${enable_debug}" = "xno"], [AC_DEFINE(NDEBUG)]) +AS_IF([test "x${enable_debug}" = "xno"], [ + AC_DEFINE(NDEBUG) +], [ + AC_CHECK_HEADERS([valgrind/valgrind.h]) +]) dnl dnl Allow runing as root (usefull for people runing on embedded platforms) dnl AC_ARG_ENABLE(run-as-root, [ --enable-run-as-root allow runing VLC as root (default disabled)]) -AS_IF([test "${enable_run_as_root}" == "yes"],[ +AS_IF([test "${enable_run_as_root}" = "yes"],[ AC_DEFINE(ALLOW_RUN_AS_ROOT, 1, [Define to 1 to allow runing VLC as root (uid 0).]) ]) @@ -1627,7 +1742,7 @@ fi dnl Lua modules AC_ARG_ENABLE(lua, - AS_HELP_STRING([--enable-lua],[lua playlist, metafetcher and interface + AS_HELP_STRING([--enable-lua],[lua playlist, metafetcher and interface plugins (default enabled)])) if test "${enable_lua}" != "no" then @@ -1754,9 +1869,9 @@ dnl dnl Taglibplugin dnl AC_ARG_ENABLE(taglib, - [ --disable-taglib Taglib support (default enabled) ]) + [ --disable-taglib Taglib support (default enabled) ]) AS_IF([test "${enable_taglib}" != "no"],[ - PKG_CHECK_MODULES(TAGLIB, taglib, + PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5, [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] ) VLC_ADD_PLUGIN([taglib]) VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz]) @@ -1773,7 +1888,7 @@ AC_ARG_WITH(,[Input plugins:]) dnl live555 input dnl -if test "${enable_livedotcom}" +if test "${enable_livedotcom}" then AC_MSG_WARN(--{en|dis}able-livedotcom is deprecated. Use --{en|dis}able-live555 instead.) fi @@ -1791,7 +1906,7 @@ if test "${enable_live555}" != "no"; then dnl dnl test for --with-live555-tree dnl - if test "${with_livedotcom_tree}" + if test "${with_livedotcom_tree}" then AC_MSG_WARN(--with-livedotcom-tree is deprecated. Use --with-live555-tree instead.) with_live555_tree="${with_livedotcom_tree}" @@ -1816,7 +1931,7 @@ if test "${enable_live555}" != "no"; then #endif #endif], [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia. + AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia. lternatively you can use --disable-live555 to disable the liveMedia plugin.]) ],[ AC_MSG_RESULT([yes]) @@ -1866,7 +1981,7 @@ lternatively you can use --disable-live555 to disable the liveMedia plugin.]) #endif #endif], [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia. + AC_MSG_ERROR([Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia. lternatively you can use --disable-live555 to disable the liveMedia plugin.]) ],[ AC_MSG_RESULT([yes]) @@ -1909,28 +2024,28 @@ AC_ARG_ENABLE(dc1394, [ --enable-dc1394 dc1394 access module (default disabled)]) if test "${enable_dc1394}" = "yes" then - AC_CHECK_HEADERS(libraw1394/raw1394.h, [ - AC_CHECK_LIB( raw1394, raw1394_get_nodecount, [ - AC_CHECK_HEADERS(libdc1394/dc1394_control.h , [ -dnl AC_CHECK_LIB( dc1394_control, dc1394_setup_capture, [ - VLC_ADD_PLUGIN([dc1394]) - VLC_ADD_LIBS([dc1394],[-ldc1394_control -lraw1394]) -dnl ], -dnl [ -dnl AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library]) -dnl ]) - ], - [ - AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library]) - ]) + dnl + dnl Check for libraw1394 + dnl + PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 2.0.1, + [ + VLC_ADD_LIBS([dc1394],[`${PKG_CONFIG} --libs libraw1394`]) + VLC_ADD_CPPFLAGS([dc1394],[`${PKG_CONFIG} --cflags libraw1394`]) ], + [AC_MSG_ERROR([Couldn't find libraw1394 >= 2.0.1, install libraw1394 development package])] + ) + + dnl + dnl Check for libdc1394 + dnl + PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.2, [ - AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library]) - ]) - ], - [ - AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library]) - ]) + VLC_ADD_PLUGIN([dc1394]) + VLC_ADD_LIBS([dc1394],[`${PKG_CONFIG} --libs libdc1394-2`]) + VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libdc1394-2`]) + ], + [AC_MSG_ERROR([Couldn't find libdc1394 >= 2.0.2, install libdc1394 development package])] + ) fi dnl @@ -1940,120 +2055,28 @@ AC_ARG_ENABLE(dv, [ --enable-dv dv input module (default disabled)]) if test "${enable_dv}" = "yes" then - AC_ARG_WITH(dv-raw1394, - [ --with-dv-raw1394=PATH libraw1394 headers and libraries]) - AC_ARG_WITH(dv-raw1394-tree, - [ --with-dv-raw1394=PATH libraw1394 tree for static linking]) - - if test -z "${with_dv_raw1394}" -a "${with_dv_raw1394}" != "" - then - AC_MSG_CHECKING(for raw1394 headers in ${with_dv_raw1394}) - if test -f ${with_dv_raw1394}/include/libraw1394/raw1394.h - then - dnl Use ${with_dv_raw1394}/include/libraw1394/raw1394.h - AC_MSG_RESULT(yes) - VLC_ADD_PLUGIN([access_dv]) - VLC_ADD_LIBS([access_dv],[-L${with_dv_raw1394}/lib -lraw1394 -lpthread]) - VLC_ADD_CPPFLAGS([access_dv],[-I${with_dv_raw1394}/include]) - else - dnl No libraw1394 could be found, sorry - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${with_dv_raw1394}/include/libraw1394/raw1394.h]) - fi - else - AC_CHECK_HEADERS(libraw1394/raw1394.h, - [ VLC_ADD_PLUGIN([access_dv]) - VLC_ADD_LIBS([access_dv],[-lraw1394 -lavc1394]) - ],[ - if test -n "${enable_dv}" - then - AC_MSG_ERROR([cannot find libraw1394 headers]) - fi - ]) - fi - - dnl Check for static linking of libraw1394 - if test -z "${with_dv_raw1394_tree}" -a "${with_dv_raw1394_tree}" != "" - then - AC_MSG_CHECKING(for libraw1394.a in ${with_dv_raw1394_tree}) - real_dv_raw1394_tree="`cd ${with_dv_raw1394_tree} 2>/dev/null && pwd`" - if test -z "${real_dv_raw1394_tree}" - then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${real_dv_raw1394_tree}]) - fi - if test -f "${real_dv_raw1394_tree}/src/.libs/libraw1394.a" - then - dnl Use a custom libraw1394 - AC_MSG_RESULT(${real_dv_raw1394_tree}/src/.libs/libraw1394.a) - VLC_ADD_PLUGIN([access_dv]) - VLC_ADD_LIBS([access_dv],[-L${real_dv_raw1394_tree}/src/.libs -lraw1394]) - VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_raw1394_tree}]) - else - dnl The given libraw1394 wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_dv_raw1394_tree}/src/.libs/libraw1394.a, make sure you compiled libraw1394 in ${with_dv_raw1394_tree}]) - fi - fi + dnl + dnl Check for libraw1394 + dnl + PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 2.0.1, + [ + VLC_ADD_LIBS([access_dv],[`${PKG_CONFIG} --libs libraw1394`]) + VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libraw1394`]) + ], + [AC_MSG_ERROR([Couldn't find libraw1394 >= 2.0.1, install libraw1394 development package])] + ) dnl dnl Check for libavc1394 dnl - - AC_ARG_WITH(dv-avc1394, - [ --with-dv-avc1394=PATH libavc1394 headers and libraries]) - AC_ARG_WITH(dv-avc1394-tree, - [ --with-dv-avc1394=PATH libavc1394 tree for static linking]) - - if test -z "${with_dv_avc1394}" -a "${with_dv_avc1394}" != "" - then - AC_MSG_CHECKING(for avc1394 headers in ${with_dv_avc1394}) - if test -f ${with_dv_avc1394}/include/libavc1394/avc1394.h - then - dnl Use ${with_dv_avc1394}/include/libavc1394/avc1394.h - AC_MSG_RESULT(yes) - VLC_ADD_LIBS([access_dv],[-L${with_dv_avc1394}/lib -lavc1394 -lrom1394 -lpthread]) - VLC_ADD_CPPFLAGS([access_dv],[-I${with_avc1394}/include]) - else - dnl No libavc1394 could be found, sorry - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${with_dv_avc1394}/include/libavc1394/avc1394.h]) - fi - else - AC_CHECK_HEADERS(libavc1394/avc1394.h, - [ VLC_ADD_LIBS([access_dv],[-lavc1394 -lrom1394 -lpthread]) - ],[ - if test -n "${enable_dv}" - then - AC_MSG_ERROR([cannot find libavc1394 headers]) - fi - ]) - fi - - dnl Check for static linking of libavc1394 - if test -z "${with_dv_avc1394_tree}" -a "${with_dv_avc1394_tree}" != "" - then - AC_MSG_CHECKING(for libavc1394.a in ${with_dv_avc1394_tree}) - real_dv_avc1394_tree="`cd ${with_dv_avc1394_tree} 2>/dev/null && pwd`" - if test -z "${real_dv_avc1394_tree}" - then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${real_dv_avc1394_tree}]) - fi - if test -f "${real_dv_avc1394_tree}/src/.libs/libavc1394.a" - then - dnl Use a custom libavc1394 - AC_MSG_RESULT(${real_dv_avc1394_tree}/src/.libs/libavc1394.a) - VLC_ADD_LIBS([access_dv],[-L${real_dv_avc1394_tree}/src/.libs -lavc1394 -lrom1394 -lpthread]) - VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_avc1394_tree}]) - else - dnl The given libavc1394 wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_dv_avc1394_tree}/src/.libs/libavc1394.a, make sure you compiled libavc1394 in ${with_dv_avc1394_tree}]) - fi - fi + PKG_CHECK_MODULES(LIBAVC1394, libavc1394 >= 0.5.3, + [ + VLC_ADD_PLUGIN([access_dv]) + VLC_ADD_LIBS([access_dv],[`${PKG_CONFIG} --libs libavc1394`]) + VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libavc1394`]) + ], + [AC_MSG_ERROR([Couldn't find libavc1394 >= 0.5.1, install libavc1394 development package])] + ) fi dnl @@ -2180,7 +2203,7 @@ dnl dnl Windows DirectShow BDA access module dnl AC_ARG_ENABLE(bda, - AS_HELP_STRING([--enable-bda],[Win32 DirectShow BDA support (default + AS_HELP_STRING([--enable-bda],[Win32 DirectShow BDA support (default enabled on Win32)])) if test "${enable_bda}" != "no" then @@ -2218,7 +2241,7 @@ then VLC_ADD_PLUGIN([opencv_example]) VLC_ADD_LIBS([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++) + AC_LANG_POP(C++) else dnl No opencv could be found, sorry AC_MSG_RESULT(no) @@ -2448,7 +2471,7 @@ dnl gnomeVFS access module dnl AC_ARG_ENABLE(gnomevfs, [ --enable-gnomevfs GnomeVFS access module (default disabled)]) -if test "${enable_gnomevfs}" = "yes" +if test "${enable_gnomevfs}" = "yes" then PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0, VLC_ADD_LIBS([access_gnomevfs],[$GNOMEVFS_LIBS]) @@ -2471,7 +2494,7 @@ if test "${enable_libcdio}" != "no" then PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.78.2, have_libcdio=yes - AC_DEFINE(HAVE_LIBCDIO, 1, + AC_DEFINE(HAVE_LIBCDIO, 1, [Define if you have libcdio 0.78.2 or greater installed]), [AC_MSG_WARN(CD Reading and information library not found)]) @@ -2479,7 +2502,7 @@ then then PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.22, [have_libvcdinfo=yes - AC_DEFINE(HAVE_VCDINFO, 1, + AC_DEFINE(HAVE_VCDINFO, 1, [Define if you have libvcdinfo 0.7.22 or greater installed])], [AC_MSG_WARN(VCD information library not found)]) fi @@ -2491,10 +2514,10 @@ dnl AC_ARG_ENABLE(cddax, AS_HELP_STRING([--enable-cddax],[audio CD plugin with CD Text and CD paranoia via libcdio (default disabled)])) - + AC_ARG_ENABLE(libcddb, [ --enable-libcddb CDDB support for libcdio audio CD (default enabled)]) - + if test "${enable_cddax}" = "yes" then if test "$have_libcdio" = "yes" @@ -2506,34 +2529,34 @@ then PKG_CHECK_MODULES(LIBCDIO_PARANOIA, libcdio_paranoia >= 0.72, [ VLC_ADD_LIBS([cddax],[$LIBCDIO_CDDA_LIBS $LIBCDIO_CDDA_LIBS $LIBCDIO_PARANOIA_LIBS])], AC_MSG_WARN([CD Paranoia support disabled because no libcdio >= 0.72 found])) - else + else AC_MSG_WARN([cddax plugin disabled because ok libcdio library not found or disabled]) HAVE_CDDAX=no fi if test "$enable_libcddb" != "no"; then PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [ - HAVE_LIBCDDB=yes + HAVE_LIBCDDB=yes AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed]) VLC_ADD_LIBS([cddax],[$LIBCDDB_LIBS]) VLC_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS]) ], - [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled) + [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled) HAVE_LIBCDDB=no]) fi - + fi AC_ARG_ENABLE(vcdx, [ --enable-vcdx VCD with navigation via libvcdinfo (default disabled)]) - + if test "${enable_vcdx}" = "yes" then if test "${have_libvcdinfo}" = "yes" then VLC_ADD_LIBS([vcdx],[$VCDINFO_LIBS]) VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS]) - else + else AC_MSG_WARN([vcdx plugin disabled because ok libvcdinfo library not found or disabled]) HAVE_VCDX=no fi @@ -2546,12 +2569,12 @@ then if test "$have_libvcdinfo" = "yes" then - AC_DEFINE(HAVE_VCDX, 1, + AC_DEFINE(HAVE_VCDX, 1, [Define for the VCD plugin using libcdio/libvcdinfo]) VLC_ADD_LIBS([vcdx],[$VCDINFO_LIBS]) VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS]) VLC_ADD_PLUGIN([vcdx]) - else + else AC_MSG_WARN([vcdx plugin disabled because ok libvcdinfo library not found]) HAVE_VCDX=no fi @@ -2560,9 +2583,9 @@ fi dnl dnl Built-in CD-DA and VCD module dnl -AC_ARG_ENABLE(cdda, +AC_ARG_ENABLE(cdda, [ --enable-cdda audio CD via built-in VCD (default enabled)]) - + AC_ARG_ENABLE(vcd, [ --enable-vcd built-in VCD (default enabled)]) @@ -2613,12 +2636,12 @@ then if test "$enable_libcddb" != "no"; then PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [ - HAVE_LIBCDDB=yes + HAVE_LIBCDDB=yes AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed]) VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS]) VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS]) ],: - [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled) + [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled) HAVE_LIBCDDB=no]) fi fi @@ -2631,7 +2654,7 @@ AC_ARG_ENABLE(dvb, if test "${enable_dvb}" != "no" then - AS_IF([test "${have_dvbpsi}" = "yes" ],[ + AS_IF([test "${have_dvbpsi}" = "yes" ],[ AC_ARG_WITH(dvb, [ --with-dvb=PATH path to a dvb- and v4l2-enabled kernel tree],[],[]) if test "${with_dvb}" != "no" -a -n "${with_dvb}" @@ -2645,7 +2668,7 @@ then CPPFLAGS="${CPPFLAGS_save}" ],[ AC_MSG_WARN([the dvb access module requires libdvbpsi]) - ]) + ]) fi dnl @@ -2670,14 +2693,6 @@ if test "${enable_screen}" != "no"; then VLC_ADD_PLUGIN([screen]) VLC_ADD_CXXFLAGS([screen],[]) VLC_ADD_LIBS([screen],[-lbe]) - else - CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" - AC_CHECK_HEADERS(X11/Xlib.h, [ - VLC_ADD_PLUGIN([screen]) - VLC_ADD_LIBS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11]) - VLC_ADD_CPPFLAGS([screen],[${X_CFLAGS}]) - ]) - CPPFLAGS="${CPPFLAGS_save}" fi fi @@ -2782,7 +2797,7 @@ if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then AC_CHECK_LIB(ebml, main, [ VLC_ADD_PLUGIN([mkv]) VLC_ADD_LIBS([mkv],[-lmatroska -lebml]) - ]) + ]) ) ], [AC_MSG_RESULT([no]) @@ -2902,6 +2917,16 @@ then VLC_ADD_PLUGIN([wma_fixed]) fi +dnl +dnl shine fixed point mp3 encoder +dnl +AC_ARG_ENABLE(shine, + [ --enable-shine shine mp3 encoding module (default disabled)]) +if test "${enable_shine}" = "yes" +then + VLC_ADD_PLUGIN([shine]) +fi + dnl dnl mad plugin dnl @@ -2967,11 +2992,11 @@ AC_ARG_ENABLE( id3tag, [ --disable-id3tag id3tag metadata reader plugin (default disabled)]) AS_IF([test "${enable_id3tag}" = "yes"], [ AC_CHECK_HEADERS(id3tag.h, [ - AC_CHECK_HEADERS(zlib.h, [ - VLC_ADD_LIBS([id3tag],[-lid3tag -lz]) - VLC_ADD_PLUGIN([id3tag]) + AS_IF([test "${have_zlib}" = "yes"],[ + VLC_ADD_LIBS([id3tag],[-lid3tag -lz]) + VLC_ADD_PLUGIN([id3tag]) + ]) ]) - ]) ]) dnl @@ -2999,7 +3024,7 @@ then VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS]) VLC_RESTORE_FLAGS ],[ - AC_MSG_FAILURE([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.]) + AC_MSG_ERROR([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.]) ]) fi @@ -3023,7 +3048,7 @@ then VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS]) VLC_RESTORE_FLAGS ],[ - AC_MSG_FAILURE([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.]) + AC_MSG_ERROR([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.]) ]) fi @@ -3032,7 +3057,7 @@ dnl swscale image scaling and conversion plugin dnl AC_ARG_ENABLE(swscale, - AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion + AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion (default enabled)])) if test "${enable_swscale}" != "no" then @@ -3047,49 +3072,7 @@ then VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS]) VLC_RESTORE_FLAGS ],[ - AC_MSG_WARN([Could not find libswscale. Trying to enable imgresample.]) - enable_imgresample=yes - ]) -fi - -dnl -dnl avcodec (deprecated API) image scaling and conversion plugin -dnl -dnl This is build as a seperate module than the avcodec one to prevent -dnl stupid run time library load errors from disabling most codecs -dnl from VLC. -dnl - -AC_ARG_ENABLE(imgresample, - AS_HELP_STRING([--enable-imgresample],[deprecated libavcodec image scaling - and conversion (default disabled)])) -if test "${enable_imgresample}" = "yes" -then - PKG_CHECK_MODULES(IMGRESAMPLE,[libavcodec], - [ - VLC_SAVE_FLAGS - CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}" - CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}" - AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) - AC_CHECK_LIB(avcodec,img_resample, - [ - VLC_ADD_PLUGIN([imgresample]) - VLC_ADD_LIBS([imgresample],[$IMGRESAMPLE_LIBS]) - VLC_ADD_CFLAGS([imgresample],[$IMGRESAMPLE_CFLAGS]) - ],[ - AC_MSG_WARN([Could not find img_resample in libavcodec.]) - if test "${enable_swscale}" != "no" - then - AC_MSG_FAILURE([swscale (and its fallback module imgresample) support will be missing. Use --disable-swscale to ignore this error. (This basically means that you will be missing any good software scaling module and some video chroma converters.)]) - fi - # That sed hack to add -rpath is kind of ugly but at least it fixes - # detection when linking against a shared libavcodec with - # a libavutil not in one of your ld.so.conf directories. - # (for example a local install) - ],[${IMGRESAMPLE_LIBS} `echo ${IMGRESAMPLE_LIBS}|sed s'/-L/-Wl,-rpath=/'`]) - VLC_RESTORE_FLAGS - ],[ - AC_MSG_WARN([Could not find libavcodec.]) + AC_MSG_ERROR([Could not find libswscale. Use --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.]) ]) fi @@ -3112,7 +3095,7 @@ then VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS]) VLC_RESTORE_FLAGS ],[ - AC_MSG_ERROR([Could not find libpostproc.]) + AC_MSG_ERROR([Could not find libpostproc. Use --disable-postproc to ignore this error.]) ]) fi @@ -3205,7 +3188,7 @@ then VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC]) VLC_ADD_LIBS([twolame],[-ltwolame]) ], [ AC_MSG_ERROR([Cannot find libtwolame library...]) ]) - LDFLAGS="${LDFLAGS_save}" + LDFLAGS="${LDFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}" fi fi @@ -3214,10 +3197,8 @@ dnl dnl QuickTime plugin dnl AC_ARG_ENABLE(quicktime, - [ --enable-quicktime QuickTime module (default enabled on MacOS X)]) -if test "${enable_quicktime}" != "no" && - (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes") -then + [ --enable-quicktime QuickTime module (deprecated)]) +if test "${enable_quicktime}" = "yes"; then if test "${SYS}" = "mingw32"; then VLC_ADD_PLUGIN([quicktime]) else @@ -3247,15 +3228,6 @@ if test "${enable_realrtsp}" = "yes"; then VLC_ADD_PLUGIN([access_realrtsp]) fi -dnl -dnl MP4 module -dnl -AC_CHECK_HEADERS(zlib.h, [ - VLC_ADD_LIBS([mp4 skins2 sap mkv gme],[-lz]) - VLC_ADD_CPPFLAGS([skins2],[-I../../../@top_srcdir@/libs/unzip]) - VLC_ADD_LIBS([skins2],[../../../libs/unzip/libunzip.la]) -] ) - AC_ARG_ENABLE(libsysfs, [ --enable-libsysfs Get user key from firewire connected iPod via libsysfs (default enabled)]) @@ -3365,7 +3337,7 @@ AS_IF([test "x${with_dts_tree}" != "x"], [ ]) AC_ARG_ENABLE(dca, - AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca + AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca (default enabled)])) AS_IF([test "${enable_dca}" != "no"], [ AC_ARG_WITH(dca-tree, @@ -3474,11 +3446,11 @@ then AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}]) fi ],[ - PKG_CHECK_MODULES(LIBMPEG2,[libmpeg2 > 0.3.2],[ + PKG_CHECK_MODULES(LIBMPEG2,[libmpeg2 > 0.3.2],[ VLC_ADD_PLUGIN([libmpeg2]) VLC_ADD_LIBS([libmpeg2], $LIBMPEG2_LIBS) VLC_ADD_CFLAGS([libmpeg2], $LIBMPEG2_CFLAGS) - ], + ], AC_MSG_WARN([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ . Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])) ]) fi @@ -3504,7 +3476,7 @@ then fi if test -f "${real_vorbis_tree}/lib/.libs/libvorbis.a" then - dnl Use a custom vorbis + dnl Use a custom vorbis AC_MSG_RESULT(${real_vorbis_tree}/lib/.libs/libvorbis.a) VLC_ADD_PLUGIN([vorbis]) VLC_ADD_LIBS([vorbis],[${real_vorbis_tree}/lib/.libs/libvorbis.a ${real_vorbis_tree}/lib/.libs/libvorbisenc.a]) @@ -3648,7 +3620,7 @@ dnl AC_ARG_ENABLE(schroedinger, [ --disable-schroedinger high performance dirac codec (default enabled)]) if test "${enable_schroedinger}" != "no"; then - PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0], [ + PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0.6], [ VLC_ADD_PLUGIN([schroedinger]) VLC_ADD_CFLAGS([schroedinger],[$SCHROEDINGER_CFLAGS]) VLC_ADD_LIBS([schroedinger],[$SCHROEDINGER_LIBS]) ], [ @@ -3706,6 +3678,9 @@ if test "${enable_x264}" != "no"; then VLC_ADD_PLUGIN([x264]) VLC_ADD_LDFLAGS([x264],[${X264_LIBS}]) VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}]) + if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then + VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB]) + fi ],[ AC_MSG_ERROR([the specified tree hasn't been compiled]) ]) @@ -3718,7 +3693,21 @@ if test "${enable_x264}" != "no"; then PKG_CHECK_MODULES(X264,x264, [ VLC_ADD_PLUGIN([x264]) VLC_ADD_LDFLAGS([x264],[${X264_LIBS}]) + + AC_CACHE_CHECK([if linker supports -Bsymbolic], + [ac_cv_ld_bsymbolic], + [LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic" + AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no) + LDFLAGS="${LDFLAGS_save}" + ]) + AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [ + VLC_ADD_LDFLAGS([x264],[-Wl,-Bsymbolic]) + ]) + VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}]) + if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then + VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB]) + fi ],[ if test "${enable_x264}" = "yes"; then AC_MSG_ERROR([Could not find libx264 on your system: you may get it from http://www.videolan.org/x264.html]) @@ -3752,10 +3741,10 @@ dnl telx module dnl uncompatible dnl AC_ARG_ENABLE(zvbi, - AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with + AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with libzvbi (default enabled)])) AC_ARG_ENABLE(telx, - AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with + AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with zvbi) (default enabled if zvbi is absent)])) AS_IF( [test "${enable_zvbi}" != "no"],[ @@ -3765,15 +3754,15 @@ AS_IF( [test "${enable_zvbi}" != "no"],[ VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS]) VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS]) VLC_ADD_PLUGIN([zvbi]) - AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built]) + AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built]) AS_IF( [test "${enable_telx}" = "yes"],[ - AC_MSG_WARN([The zvbi and telx modules are uncompatibles. + AC_MSG_WARN([The zvbi and telx modules are uncompatibles. Using zvbi.]) ]) ],[ AC_MSG_WARN(ZVBI library not found. Enabling the telx module instead) ]) - ]) + ]) AS_IF( [test "${enable_telx}" != "no" ],[ VLC_ADD_PLUGIN([telx]) ]) @@ -3903,9 +3892,40 @@ dnl AC_ARG_WITH(,[Video plugins:]) +dnl +dnl Xlib +dnl + +AC_PATH_XTRA() +AC_ARG_ENABLE(x11, + [ --enable-x11 X11 support (default enabled)],, [ + AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [ + enable_x11="yes" + ], [ + enable_x11="no" + ]) +]) + +CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" + +AS_IF([test "${enable_x11}" != "no"], [ + AC_CHECK_HEADERS(X11/Xlib.h, [ + VLC_ADD_PLUGIN([x11_screen]) + VLC_ADD_CPPFLAGS([x11_screen],[${X_CFLAGS}]) + VLC_ADD_LIBS([x11_screen],[${X_LIBS} ${X_PRE_LIBS} -lX11]) + + VLC_ADD_PLUGIN([panoramix]) + VLC_ADD_LIBS([panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11]) + VLC_ADD_CPPFLAGS([panoramix],[${X_CFLAGS}]) + + VLC_ADD_PLUGIN([x11]) + VLC_ADD_LIBS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11]) + VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}]) + + AC_CHECK_LIB(Xext, XShmAttach, [VLC_ADD_LIBS([x11],[-lXext])]) + ]) + dnl Check for DPMS -if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then - CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" AC_CHECK_HEADERS(X11/extensions/dpms.h, [ AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h) AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[ @@ -3918,45 +3938,17 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then ],,[ #include ]) - CPPFLAGS="${CPPFLAGS_save}" -fi - -dnl -dnl X11 module -dnl (enabled by default except on win32) -dnl -AC_ARG_ENABLE(x11, - [ --enable-x11 X11 support (default enabled)]) -if test "${enable_x11}" != "no" && - (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || - test "${enable_x11}" = "yes"); then - CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}" - AC_CHECK_HEADERS(X11/Xlib.h, [ - VLC_ADD_PLUGIN([panoramix]) - VLC_ADD_LIBS([panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11]) - VLC_ADD_CPPFLAGS([panoramix],[${X_CFLAGS}]) - VLC_ADD_PLUGIN([globalhotkeys]) - VLC_ADD_LIBS([globalhotkeys],[${X_LIBS} ${X_PRE_LIBS} -lX11]) - VLC_ADD_CPPFLAGS([globalhotkeys],[${X_CFLAGS}]) - AC_CHECK_LIB(Xext, XShmAttach, [ - VLC_ADD_PLUGIN([x11]) - VLC_ADD_LIBS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext]) - VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}]) - ]) - ]) - CPPFLAGS="${CPPFLAGS_save}" -fi +]) dnl dnl XVideo module dnl (enabled by default except on win32) dnl AC_ARG_ENABLE(xvideo, - [ --enable-xvideo XVideo support (default enabled)]) -if test "${enable_xvideo}" != "no" && - (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || - test "${enable_xvideo}" = "yes"); then - CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" + [ --enable-xvideo XVideo support (default enabled)],, [ + enable_xvideo="$enable_x11" +]) +AS_IF([test "${enable_xvideo}" != "no"], [ AC_CHECK_HEADERS(X11/extensions/Xv.h, [ CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext" AC_CHECK_LIB(Xv,XvPutImage,[ @@ -3965,20 +3957,18 @@ if test "${enable_xvideo}" != "no" && VLC_ADD_LIBS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv]) ]) CFLAGS="${CFLAGS_save}" - ] - CPPFLAGS="${CPPFLAGS_save}") -fi + ]) +]) dnl dnl GLX module dnl (enabled by default except on win32) dnl AC_ARG_ENABLE(glx, - [ --enable-glx X11 OpenGL (GLX) support (default enabled)]) -if test "${enable_glx}" != "no" && - (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || - test "${enable_glx}" = "yes"); then - CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" + [ --enable-glx X11 OpenGL (GLX) support (default enabled)],, [ + enable_glx="$enable_x11" +]) +AS_IF([test "${enable_glx}" != "no"], [ AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h) AC_COMPILE_IFELSE(AC_LANG_PROGRAM( [[#if !defined(HAVE_X11_XLIB_H) || !defined(HAVE_GL_GLU_H) || !defined(HAVE_GL_GLX_H) @@ -3989,37 +3979,35 @@ if test "${enable_glx}" != "no" && VLC_ADD_LIBS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU]) VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}]) ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])]) - CPPFLAGS="${CPPFLAGS_save}" -fi +]) dnl dnl XVMC module dnl (disabled by default except on win32) dnl AC_ARG_ENABLE(xvmc, - [ --enable-xvmc XVMC support (default disabled)]) -if test "${enable_xvmc}" = "yes" && - (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || - test "${enable_xvmc}" = "yes"); then - CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}" + [ --enable-xvmc XVMC support (default disabled)],, [ + enable_xvmc="no" +]) +AS_IF([test "${enable_xvmc}" != "no"], [ AC_CHECK_HEADERS(X11/extensions/vldXvMC.h, [ VLC_ADD_PLUGIN([xvmc]) - VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv -lXinerama]) - VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS}]) + VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv ${LIBMPEG2_LIBS}]) + VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS} ${LIBMPEG2_CFLAGS}]) + ], [ + AC_MSG_ERROR([XVideo-MotionCompensation extension not found!]) ]) - CPPFLAGS="${CPPFLAGS_save}" -fi +]) dnl dnl Check for the Xinerama extension dnl AC_ARG_ENABLE(xinerama, - [ --enable-xinerama Xinerama support (default enabled)]) -if test "${enable_xvideo}" != "no" && test "${enable_xinerama}" != "no" && - (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || - test "${enable_xvideo}" = "yes"); then + [ --enable-xinerama Xinerama support (default enabled)],, [ + enable_xinerama="$enable_xvideo" +]) +AS_IF([test "$enable_xinerama" != "no"], [ ac_cv_have_xinerama="no" - CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext" AC_CHECK_HEADERS(X11/extensions/Xinerama.h,[ AC_CHECK_LIB(Xinerama_pic, XineramaQueryExtension,[ @@ -4039,15 +4027,11 @@ if test "${enable_xvideo}" != "no" && test "${enable_xinerama}" != "no" && 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}" 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]) @@ -4073,9 +4057,39 @@ dnl [AC_DEFINE(HAVE_XF86VIDMODE, 1, [Define this if you have libXxf86vm installed]) ]) CFLAGS="${CFLAGS_save}" - CPPFLAGS="${CPPFLAGS_save}" +]) + +dnl End of Xlib tests +CPPFLAGS="${CPPFLAGS_save}" -fi + +dnl +dnl X C Bindings modules +dnl (work in progress) +dnl +AC_ARG_ENABLE(xcb, + [ --enable-xcb X C Bindings work-in-progress (default disabled)], + ,[enable_xcb="no"]) +AS_IF([test "${enable_xcb}" != "no"], [ + PKG_CHECK_MODULES(XPROTO, [xproto]) + + dnl libxcb + PKG_CHECK_MODULES(XCB, [xcb]) + PKG_CHECK_MODULES(XCB_SHM, [xcb-shm]) + + AS_IF([test "${enable_xvideo}" != "no"], [ + PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [ + VLC_ADD_PLUGIN([xcb_xv]) + ]) + ]) + + dnl xcb-utils + PKG_CHECK_MODULES(XCB_AUX, [xcb-aux]) + PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms]) + + VLC_ADD_PLUGIN([xcb]) + VLC_ADD_PLUGIN([xcb_window]) +]) dnl dnl OpenGL module @@ -4213,8 +4227,6 @@ then VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}]) if test "${SYS}" = "mingw32"; then VLC_ADD_LIBS([freetype skins2],[-lxml2]) - fi - if test "${SYS}" = "mingw32"; then VLC_ADD_LIBS([freetype],[-liconv]) fi if test "${enable_fontconfig}" != "no" @@ -4249,41 +4261,17 @@ 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`]) - dnl depends on the xmlTextReader extension - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}" - LDFLAGS="${LDFLAGS_save} ${LIBS_xml}" - AC_CHECK_LIB(xml2,xmlTextReaderConstName,[ - AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[ - VLC_ADD_PLUGIN([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 +AS_IF([test "${enable_libxml2}" != "no"], [ + PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5], [ + VLC_ADD_CPPFLAGS([xml],[${XML2_CFLAGS}]) + VLC_ADD_LIBS([xml],[${XML2_LIBS}]) + VLC_ADD_PLUGIN([xml]) + ], [ + AS_IF([test "x${enable_xml2}" != "x"], [ + AC_MSG_ERROR([Could not find libxml version 2.5 or higher]) + ]) + ]) +]) dnl dnl SVG module @@ -4292,7 +4280,7 @@ AC_ARG_ENABLE(svg, [ --enable-svg SVG support (default disabled)]) if test "${enable_svg}" = "yes" then - PKG_CHECK_MODULES(SVG, + PKG_CHECK_MODULES(SVG, librsvg-2.0 >= 2.9.0, [ VLC_ADD_LIBS([svg],[$SVG_LIBS]) @@ -4466,7 +4454,7 @@ dnl TODO: support for static linking dnl AC_ARG_ENABLE(directfb, [ --enable-directfb DirectFB support (default disabled)]) -AC_ARG_WITH(directfb, +AC_ARG_WITH(directfb, [ --with-directfb=PATH path to DirectFB headers and libraries]) if test "${enable_directfb}" = "yes"; then @@ -4502,14 +4490,14 @@ if test "${enable_directfb}" = "yes"; then LIBS_mydirectfb="${LIBS_new} -lz -ldl -ldirectfb -lfusion -ldirect -lpthread" CPPFLAGS_mydirectfb="${CPPFLAGS_new}" fi - else + 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 + else dnl Trying with pkg-config PKG_CHECK_MODULES(DIRECTFB, directfb, [ CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}" @@ -4522,11 +4510,11 @@ if test "${enable_directfb}" = "yes"; then VLC_ADD_PLUGIN([directfb]) VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}]) VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}]) - else + else AC_MSG_ERROR([cannot find directfb headers and/or libraries ]) fi fi - + dnl @@ -4630,10 +4618,10 @@ if test "${enable_oss}" != "no" && (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || test "${enable_oss}" = "yes") then - AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [ + AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [ VLC_ADD_PLUGIN([oss]) VLC_ADD_PLUGIN([access_oss]) - AC_CHECK_LIB(ossaudio,main,VLC_ADD_LIBS([oss],[-lossaudio])) + AC_CHECK_LIB(ossaudio,main,[VLC_ADD_LIBS([oss],[-lossaudio])]) ]) fi @@ -4644,7 +4632,7 @@ AC_ARG_ENABLE(pulse, [ --enable-pulse Pulseaudio support (default enabled)]) if test "${enable_pulse}" != "no" then - PKG_CHECK_MODULES(PULSE, libpulse >= 0.9.8, + PKG_CHECK_MODULES(PULSE, libpulse >= 0.9.11, [ VLC_ADD_PLUGIN([pulse]) VLC_ADD_CFLAGS([pulse],[${PULSE_CFLAGS}]) VLC_ADD_LDFLAGS([pulse],[${PULSE_LIBS}])], @@ -4717,7 +4705,7 @@ AC_ARG_ENABLE(macosx-audio, if test "${enable_macosx-audio}" != "no" && (test "${SYS}" = "darwin" || test "${enable_macosx-audio}" = "yes") then - AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, + AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, [ VLC_ADD_PLUGIN([auhal]) VLC_ADD_LDFLAGS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon]) ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ]) @@ -4779,7 +4767,7 @@ AC_ARG_ENABLE(cyberlink, CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_cyberlink}" AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h], [ VLC_ADD_CXXFLAGS([upnp_cc], [${CPPFLAGS_cyberlink}]) - VLC_ADD_PLUGIN([upnp_cc]) + VLC_ADD_PLUGIN([upnp_cc]) ],[ AC_MSG_ERROR([cannot find CyberLink for C++ headers]) ]) @@ -5060,9 +5048,9 @@ then 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], [-Wl,-framework,QuickTime]) dnl For bug report VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,AddressBook]) VLC_ADD_LDFLAGS([macosx qtcapture], [-Wl,-framework,QTKit]) @@ -5076,7 +5064,7 @@ then VLC_ADD_PLUGIN([qtcapture]) VLC_ADD_PLUGIN([macosx]) VLC_ADD_PLUGIN([minimal_macosx]) - + ORIGCFLAGS=$CFLAGS CFLAGS="$CFLAGS -x objective-c" AC_TRY_COMPILE([#import ],, @@ -5145,19 +5133,12 @@ AC_ARG_ENABLE(xosd, [ --enable-xosd xosd interface support (default disabled)]) if test "${enable_xosd}" = "yes" then - AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false") - AC_CHECK_LIB(xosd,xosd_set_offset, - AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if is 1.0.x), - AC_CHECK_LIB(xosd,xosd_set_horizontal_offset, - AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if is 2.0.x), - AC_TRY_COMPILE([#include ], - [xosd_init("foo","bar",12,XOSD_top,2,12,42);],, - AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if is pre-1.0.0)))) - if test "${have_xosd}" = "true" - then - VLC_ADD_PLUGIN([xosd]) - VLC_ADD_LIBS([xosd],[-lxosd]) - fi + AC_CHECK_HEADERS(xosd.h, + AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [ + VLC_ADD_PLUGIN([xosd]) + VLC_ADD_LIBS([xosd],[-lxosd]) + ]) + ) fi dnl @@ -5259,7 +5240,7 @@ 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) +AS_HELP_STRING([--disable-atmo],[AtmoLight (homebrew philips ambilight) (default enabled)])) if test "${enable_atmo}" != "no"; then AC_LANG_PUSH(C++) @@ -5299,6 +5280,18 @@ then fi fi +dnl +dnl Global hotkeys using XCB +dnl +PKG_CHECK_MODULES(XCB, [xcb], [ + PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms], [ + PKG_CHECK_MODULES(XPROTO, [xproto], [ + VLC_ADD_PLUGIN([globalhotkeys]) + VLC_ADD_CFLAGS([globalhotkeys],[${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}] ) + VLC_ADD_LIBS([globalhotkeys],[${XCB_KEYSYMS_LIBS} ${XCB_LIBS}] ) + ], [ AC_MSG_WARN( [Xproto not found] ) ]) + ], [ AC_MSG_WARN( [XCB keysyms was not found]) ]) +], [ AC_MSG_WARN( [XCB was not found]) ]) AC_ARG_WITH(,[Misc options:]) @@ -5324,7 +5317,7 @@ AC_ARG_ENABLE(gnutls, [ --enable-gnutls gnutls TLS/SSL support (default enabled)]) AS_IF([test "${enable_gnutls}" != "no"], [ - PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.3.3], [ + PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.4], [ VLC_ADD_PLUGIN([gnutls]) VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS]) AS_IF([test "${SYS}" = "mingw32"], [ @@ -5370,7 +5363,7 @@ 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}]) + VLC_ADD_LIBS([stream_out_raop], [${LIBGCRYPT_LIBS} -lgpg-error]) VLC_ADD_CFLAGS([stream_out_raop], [${LIBGCRYPT_CFLAGS}]) ], [ AC_MSG_RESULT(no) @@ -5389,27 +5382,12 @@ then then AC_MSG_ERROR([libgcrypt is required for update checking system]) fi - VLC_ADD_LIBS([libvlc], [${LIBGCRYPT_LIBS}]) - VLC_ADD_CFLAGS([libvlc], [${LIBGCRYPT_CFLAGS}]) + 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 -dnl -dnl ZIP files demuxer -dnl -AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ]) -AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ]) -if test "${have_zlib}" = "yes" -then - VLC_ADD_PLUGIN([unzip]) - VLC_ADD_LIBS([zip],[-lz]) - VLC_ADD_PLUGIN([zip]) - VLC_ADD_CFLAGS([zip],[-I../../../@top_srcdir@/libs/unzip]) - VLC_ADD_LIBS([zip],[../../../libs/unzip/libunzip.la]) -fi - - dnl dnl Endianness check dnl @@ -5426,19 +5404,19 @@ 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 + AS_HELP_STRING([--enable-loader],[build DLL loader for ELF i386 platforms (default disabled)])) AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"]) AS_IF([test "${enable_loader}" = "yes"], [ VLC_ADD_PLUGIN([dmo]) - VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/libs/loader]) - VLC_ADD_LIBS([dmo],[../../../libs/loader/libloader.la -lpthread]) - VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/libs/loader]) - VLC_ADD_LIBS([quicktime],[../../libs/loader/libloader.la -lpthread]) - VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/libs/loader -DLOADER]) - VLC_ADD_LIBS([realaudio],[../../libs/loader/libloader.la]) - VLC_ADD_CPPFLAGS([realvideo],[-I../../@top_srcdir@/libs/loader -DLOADER]) - VLC_ADD_LIBS([realvideo],[../../libs/loader/libloader.la]) + 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:]) @@ -5455,7 +5433,7 @@ dnl Microsoft ActiveX support dnl activex=false AC_ARG_ENABLE(activex, - AS_HELP_STRING([--enable-activex],[build a vlc-based ActiveX control + AS_HELP_STRING([--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]) @@ -5472,11 +5450,11 @@ then WIDL=no fi AC_LANG_PUSH(C++) - AC_CHECK_HEADERS(ole2.h, + AC_CHECK_HEADERS(ole2.h, [AC_CHECK_HEADERS(olectl.h, [ 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]) + VLC_ADD_LIBS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) AC_CHECK_HEADERS(objsafe.h, VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),, [ @@ -5513,12 +5491,12 @@ AC_ARG_WITH(mozilla-sdk-path, AC_ARG_WITH(mozilla-pkg, [ --with-mozilla-pkg=PKG look for PKG.pc to build the mozilla plugin.]) AC_LANG_PUSH(C++) -if test "${enable_mozilla}" = "yes" +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 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]) @@ -5543,10 +5521,11 @@ then fi done fi - fi + fi AS_IF( [test $found = 1],[ CPPFLAGS="${CPPFLAGS_save} ${MOZILLA_CFLAGS}" 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 @@ -5576,8 +5555,8 @@ then CPPFLAGS="${CPPFLAGS_save}" ], [ - AC_PATH_PROGS(MOZILLA_CONFIG, - [mozilla-config seamonkey-config xulrunner-config], + AC_PATH_PROGS(MOZILLA_CONFIG, + [mozilla-config seamonkey-config xulrunner-config], AC_MSG_ERROR([Please install the Mozilla development tools. mozilla-config was not found.]) ) ] @@ -5665,7 +5644,7 @@ then real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`" fi CPPFLAGS="${CPPFLAGS_save}" - ]) + ]) fi AC_LANG_POP(C++) AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) @@ -5760,18 +5739,9 @@ AS_IF([test "${ac_cv_have_plugins}" = "no"], [ plugin_support=no ]) -AS_IF([test "${enable_shared}" = "no"], [ - plugin_support=no -]) - AS_IF([test "${plugin_support}" != "no"], [ - AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins) + AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, [Define if dynamic plugins are supported]) ]) -AM_CONDITIONAL(HAVE_PLUGINS, [test "${plugin_support}" != "no"]) - -dnl Temporary(?) hack for plugins/builtins transition -dnl VLC_ADD_PLUGIN([${BUILTINS}]) -dnl BUILTINS="" dnl dnl Pic and shared libvlc stuff @@ -5799,18 +5769,19 @@ AC_SUBST(VERSION_MESSAGE) AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION_MINOR) AC_SUBST(VERSION_REVISION) +AC_SUBST(VERSION_EXTRA) AC_SUBST(COPYRIGHT_YEARS) -AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure]) +AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure]) if test "${build_os}" = "cygwin" then AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure]) else AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -s`", [host which ran configure]) fi -AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) -AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) +AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) +AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) dnl Win32 need s a numerical version_extra. -case $( echo ${VERSION_EXTRA}|wc -m ) in +case $( echo ${VERSION_EXTRA}|wc -m ) in "1") VERSION_EXTRA_RC="0";; "2") VERSION_EXTRA_RC=$( echo ${VERSION_EXTRA}|tr "abcdefghi" "123456789") ;; *) VERSION_EXTRA_RC="99" @@ -5819,7 +5790,7 @@ AC_SUBST(VERSION_EXTRA_RC) dnl dnl Handle substvars that use $(top_srcdir) dnl -VLC_CONFIG="top_builddir=\"\$(top_builddir)\" \$(top_builddir)/vlc-config" +VLC_CONFIG="top_srcdir=\"\$(top_srcdir)\" top_builddir=\"\$(top_builddir)\" \$(top_builddir)/vlc-config" AC_SUBST(VLC_CONFIG) CPPFLAGS_save="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS_save}" @@ -5830,7 +5801,7 @@ VLC_RESTORE_FLAGS dnl dnl Sort the modules list -dnl +dnl PLUGINS=$( (for i in `echo $PLUGINS`; do echo $i; done)|sort|xargs ) dnl @@ -5866,7 +5837,6 @@ AC_CONFIG_FILES([ extras/package/macosx/Resources/English.lproj/InfoPlist.strings extras/package/macosx/plugin/Info.plist extras/package/macosx/plugin/InstallerInfo.plist - extras/package/macosx/plugin/English.lproj/InfoPlist.strings Makefile projects/activex/Makefile projects/activex/axvlc.inf @@ -5881,16 +5851,16 @@ AC_CONFIG_FILES([ po/Makefile.in projects/activex/axvlc_rc.rc projects/mozilla/npvlc_rc.rc + projects/mozilla/vlc.r + projects/mozilla/install.js share/Makefile share/vlc_win32_rc.rc share/libvlc_win32_rc.rc + compat/Makefile src/Makefile src/test/Makefile bin/Makefile test/Makefile -]) - -AC_CONFIG_FILES([ modules/access/Makefile modules/access/bd/Makefile modules/access/bda/Makefile @@ -5917,6 +5887,7 @@ AC_CONFIG_FILES([ modules/codec/avcodec/Makefile modules/codec/cmml/Makefile modules/codec/dmo/Makefile + modules/codec/shine/Makefile modules/codec/subtitles/Makefile modules/codec/spudec/Makefile modules/codec/wmafixed/Makefile