]> git.sesse.net Git - vlc/blobdiff - configure.ac
* Added Continuous Media Markup Language (CMML) codec
[vlc] / configure.ac
index 6bcb11eaf06ef5c26bc5b0f4439a85a5888bd9b7..42fbc82457413130de6948befd4d1cc058c09f60 100644 (file)
@@ -1,7 +1,7 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.154 2004/01/24 13:08:12 asmax Exp $
-
-AC_INIT(vlc,0.7.1-cvs)
+dnl $Id$
+AC_INIT(vlc,0.7.2-cvs)
 
 CONFIGURE_LINE="$0 $*"
 CODENAME="Bond"
@@ -13,7 +13,7 @@ AC_CANONICAL_SYSTEM
 
 dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
 dnl them. And we need the comma otherwize automake will choke on it.
-AM_INIT_AUTOMAKE(vlc,0.7.1-cvs)
+AM_INIT_AUTOMAKE(vlc,0.7.2-cvs)
 AM_CONFIG_HEADER(config.h)
 
 dnl
@@ -28,6 +28,7 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CPP
 AC_PROG_CXX
+AC_PROG_CXXCPP
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
 
@@ -118,6 +119,7 @@ case "${target_os}" in
     CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
     OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
     AX_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
+    AX_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
     AX_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
     LIBEXT=".dylib"
     ;;
@@ -144,7 +146,8 @@ case "${target_os}" in
         # add ws2_32 for closesocket, select, recv
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
         AX_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
-        AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http httpd stream_out_standard],[-lws2_32])
+        AX_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
+        AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard telnet],[-lws2_32])
     fi
     ;;
   *nto*)
@@ -153,6 +156,9 @@ case "${target_os}" in
     ;;
   solaris*)
     SYS=solaris
+    # _POSIX_PTHREAD_SEMANTICS is needed to get the POSIX ctime_r
+    # Perhaps it is useful other places as well? 
+    CFLAGS_save="${CFLAGS_save} -D_POSIX_PTHREAD_SEMANTICS"; CFLAGS="${CFLAGS_save}"
     ;;
   hpux*)
     SYS=hpux
@@ -199,6 +205,14 @@ fi
 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
 XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
 
+AC_ARG_ENABLE(utf8,
+  [  --enable-utf8           unicode utf8 support (default enabled on darwin/beos/win32)])
+if test "${enable_utf8}" = "yes" || (test "${enable_utf8}" != "no" && (test "${SYS}" = "mingw32" || test "${SYS}" = "beos" || test "${SYS}" = "darwin" ) )
+then
+  AC_DEFINE(ENABLE_UTF8, 1,
+            Define if you want utf8 support)
+fi
+
 AC_MSG_CHECKING(for suffix of libraries)
 AC_MSG_RESULT(${LIBEXT})
 
@@ -273,7 +287,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
 dnl Check for system libs needed
 need_libc=false
 
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof lseek)
@@ -304,16 +318,16 @@ AC_CHECK_FUNCS(connect,,[
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
-    AX_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap httpd access_output_udp stream_out_standard],[-lsocket])
+    AX_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard],[-lsocket])
   ])
 ])
 
 AC_CHECK_FUNCS(gethostbyname,,[
   AC_CHECK_LIB(nsl,gethostbyname,[
-    AX_ADD_LDFLAGS([cddax ipv4 httpd vlc],[-lnsl])
+    AX_ADD_LDFLAGS([cddax ipv4 vlc],[-lnsl])
   ],[
     AC_CHECK_LIB(bind,gethostbyname,[
-      AX_ADD_LDFLAGS([ipv4 access_mms httpd],[-lbind])
+      AX_ADD_LDFLAGS([ipv4 access_mms],[-lbind])
     ])
   ])
 ])
@@ -352,7 +366,7 @@ fi
 
 AC_CHECK_FUNCS(inet_aton,,[
   AC_CHECK_LIB(resolv,inet_aton,[
-    AX_ADD_LDFLAGS([ipv4 httpd],[-lresolv])
+    AX_ADD_LDFLAGS([ipv4 vlc],[-lresolv])
   ])
 ])
 
@@ -373,10 +387,10 @@ AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
 if test "${SYS}" != "mingw32"; then
 AC_TYPE_SIGNAL
 AC_CHECK_LIB(m,cos,[
-  AX_ADD_LDFLAGS([adjust distort a52tofloat32],[-lm])
+  AX_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  AX_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad],[-lm])
+  AX_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad vlc],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
   AX_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
@@ -554,7 +568,7 @@ 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 getopt.h strings.h inttypes.h sys/int_types.h wchar.h)
+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)
 AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
 if test "${SYS}" != "mingw32"; then
@@ -868,8 +882,8 @@ test "${enable_cprof}" != "yes" && enable_cprof="no"
 dnl
 dnl  default modules
 dnl
-AX_ADD_PLUGINS([dummy rc logger gestures memcpy hotkeys])
-AX_ADD_PLUGINS([mpgv mpga m4v mpeg_system ps ps2 ts avi asf aac mp4 rawdv demux2 nsv real])
+AX_ADD_PLUGINS([dummy rc telnet logger gestures memcpy hotkeys])
+AX_ADD_PLUGINS([mpgv mpga m4v mpeg_system ps ps2 pva ts avi asf aac mp4 rawdv demux2 nsv real aiff])
 AX_ADD_PLUGINS([cvdsub svcdsub spudec dvbsub mpeg_audio lpcm a52 dts cinepak])
 AX_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur])
 AX_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32])
@@ -877,13 +891,12 @@ AX_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_re
 AX_ADD_PLUGINS([trivial_channel_mixer headphone_channel_mixer])
 AX_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer])
 AX_ADD_PLUGINS([aout_file])
-#AX_ADD_PLUGINS([scope])
 AX_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
-AX_ADD_PLUGINS([id3 m3u])
+AX_ADD_PLUGINS([id3 m3u playlist export sgimb])
 AX_ADD_PLUGINS([rawvideo])
 AX_ADD_PLUGINS([wav araw demuxdump demuxsub adpcm a52sys dtssys au])
 AX_ADD_PLUGINS([access_file access_udp access_tcp access_http ipv4 access_mms])
-AX_ADD_PLUGINS([access_ftp access_directory sap httpd http])
+AX_ADD_PLUGINS([access_ftp access_directory sap http])
 
 dnl
 dnl  Switch to enable a version of VLC where most modules will be builtin
@@ -913,7 +926,7 @@ MMXEXT_MODULES="memcpymmxext"
 #MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext"
 THREEDNOW_MODULES="memcpy3dn"
 SSE_MODULES=""
-ALTIVEC_MODULES="memcpyaltivec"
+ALTIVEC_MODULES="memcpyaltivec i420_yuy2_altivec"
 #ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec"
 
 if test "${enable_gprof}" != "yes"
@@ -927,6 +940,7 @@ AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
      AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
                     ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
 if test "${ac_cv_mmx_inline}" != "no"; then
+  AC_DEFINE(CAN_COMPILE_MMX, 1, Define if \$CC groks MMX inline assembly.)
   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
 fi
 
@@ -936,6 +950,7 @@ AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
      AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
                     ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
 if test "${ac_cv_mmxext_inline}" != "no"; then
+  AC_DEFINE(CAN_COMPILE_MMXEXT, 1, Define if \$CC groks MMX EXT inline assembly.)
   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
 fi
 
@@ -954,7 +969,7 @@ AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
     [CFLAGS="${CFLAGS_save}"
      AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
                     ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
-if test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "mingw32"; then
+if test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "solaris"; then
   AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
 fi
@@ -995,7 +1010,7 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
      CFLAGS="${CFLAGS_save}"])
 if test "${ac_cv_c_altivec}" != "no"; then
   AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
-  AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace],[${ac_cv_c_altivec}])
+  AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}])
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
@@ -1026,7 +1041,8 @@ if test -n "${with_tuning}"; then
         CFLAGS_TUNING="-mcpu=${with_tuning}"
     fi
 else
-    if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
+    if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then
+        CFLAGS_TUNING="-mcpu=pentiumpro"
     else
         if test "${target_cpu}" = "powerpc"; then CFLAGS_TUNING="-mtune=750"; fi
     fi
@@ -1104,15 +1120,39 @@ dnl  live.com input
 dnl
 AC_ARG_ENABLE(livedotcom,
 [  --enable-livedotcom     live.com input plugin (default disabled)])
-if test "${enable_livedotcom}" = "yes"
-then
+if test "${enable_livedotcom}" = "yes"; then
   AC_ARG_WITH(livedotcom-tree,
-    [    --with-livedotcom-tree=PATH live.com tree for static linking (required)])
+    [    --with-livedotcom-tree=PATH live.com tree for static linking])
 
   dnl
   dnl test for --with-livedotcom-tree
   dnl
-  if test "${with_livedotcom_tree}" != "no" -a -n "${with_livedotcom_tree}";then
+  if test -z "${with_livedotcom_tree}"; then
+    AC_LANG_PUSH(C++)
+    CPPFLAGS_save="${CPPFLAGS}"
+    CPPFLAGS_livedotcom="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
+    CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_livedotcom}"
+    AC_CHECK_HEADERS(liveMedia.hh, [
+      AX_ADD_CXXFLAGS([livedotcom], [${CPPFLAGS_livedotcom}])
+      AC_CHECK_LIB(liveMedia_pic, main, [
+        # We have -lliveMedia_pic, build plugins
+        AX_ADD_PLUGINS([livedotcom])
+        AX_ADD_LDFLAGS([livedotcom], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
+      ], [
+        AC_CHECK_LIB(liveMedia, main, [
+          # We only have -lliveMedia, do builtins
+          AX_ADD_BUILTINS([livedotcom])
+          AX_ADD_LDFLAGS([livedotcom], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
+        ])
+      ])
+      if test "${SYS}" = "mingw32"; then
+        # add ws2_32 for closesocket, select, recv
+        AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
+      fi
+    ])
+    CPPFLAGS="${CPPFLAGS_save}"
+    AC_LANG_POP(C++)
+  else
     AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_livedotcom_tree})
     real_livedotcom_tree="`cd ${with_livedotcom_tree} 2>/dev/null && pwd`"
     if test -z "${real_livedotcom_tree}"; then
@@ -1144,10 +1184,6 @@ then
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot find ${real_livedotcom_tree}/liveMedia/libliveMedia.a, make sure you compiled live.com in ${with_livedotcom_tree}])
     fi
-  else
-    dnl  The --with-livedotcom-tree isn't specified wasn't built
-    AC_MSG_RESULT(no)
-    AC_MSG_ERROR([You have to specify a tree with --with-livedotcom-tree])
   fi
 fi
 
@@ -1354,7 +1390,7 @@ dnl  libdvdnav plugin
 dnl
 AC_ARG_ENABLE(dvdnav,
   [  --enable-dvdnav         dvdnav input module (default enabled)])
-if test "${enable_caca}" != "no"
+if test "${enable_dvdnav}" != "no"
 then
   DVDNAV_PATH="${PATH}"
   AC_ARG_WITH(dvdnav-config-path,
@@ -1512,6 +1548,9 @@ AC_ARG_ENABLE(libcddb,
 AC_ARG_ENABLE(vcdx,
   [  --enable-vcdx           VCD support with Navigation (default enabled)])
 
+AC_ARG_ENABLE(cdda,           
+  [  --enable-cdda            CDDA plugin support (default enabled)])
+
 if test "${enable_cddax}" != "no"
 then
   PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
@@ -1523,7 +1562,7 @@ then
    [AC_MSG_WARN(libcdio library not found)
    HAVE_CDDAX=no])
 
-  if test x$enable_cddb != no; then
+  if test x$enable_libcddb != no; then
     PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.4, [
       HAVE_LIBCDDB=yes 
       AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
@@ -1534,16 +1573,9 @@ then
       HAVE_LIBCDDB=no])
   fi
 
-  PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
-   [enable_cddax="no"
-    AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
-    AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
-    AX_ADD_PLUGINS([cddax])], 
-   [AC_MSG_WARN(libcdio library not found)])
-
   if test "${enable_vcdx}" != "no"
   then
-    PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.20-cdio,
+    PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21,
      [enable_vcd="no"
       AC_DEFINE(HAVE_VCDX, [], 
       [Define for the VCD plugin using libcdio/libvcdinfo])
@@ -1597,7 +1629,7 @@ then
   if test "${SYS}" = "darwin"
   then
     AX_ADD_PLUGINS([vcd cdda])
-    AX_ADD_LDFLAGS([vcd cdda],[-framework IOKit -framework CoreFoundation])
+    AX_ADD_LDFLAGS([vcd vcdx cdda],[-framework IOKit -framework CoreFoundation])
   fi
 fi
 
@@ -1678,22 +1710,39 @@ dnl  matroska demux plugin
 dnl
 AC_ARG_ENABLE(mkv,
   [  --enable-mkv            Matroska demux support (default enabled)])
-if test "${enable_mkv}" != "no"
-then
-AC_LANG_PUSH(C++)
-  AC_CHECK_HEADERS(ebml/EbmlVersion.h matroska/KaxVersion.h, [
-    AC_CHECK_HEADERS(matroska/KaxAttachments.h)
-    AX_ADD_PLUGINS([mkv])
-    AX_ADD_CXXFLAGS([mkv],[])
-    AC_CHECK_LIB(ebml_pic,main,[
-      # We have ebml_pic, that's good, we can build an mkv.so plugin !
-      AX_ADD_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic])
-    ],[
-      AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
+if test "${enable_mkv}" != "no"; then
+  AC_LANG_PUSH(C++)
+  AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
+    AC_CHECK_HEADERS(matroska/KaxVersion.h, [
+      AC_CHECK_HEADERS(matroska/KaxAttachments.h)
+      AX_ADD_CXXFLAGS([mkv],[])
+      AC_CHECK_LIB(ebml_pic, main, [
+        # We have ebml_pic, that's good, we can build an mkv.so plugin !
+        AX_ADD_PLUGINS([mkv])
+        AX_ADD_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic])
+      ], [
+        AC_CHECK_LIB(ebml, main, [
+          # We only have libebml, make mkv.a a builtin
+          AX_ADD_BUILTINS([mkv])
+          AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
+        ])
+      ])
     ])
   ])
-  CPPFLAGS="${CPPFLAGS_save}"
-AC_LANG_POP(C++)
+  AC_LANG_POP(C++)
+fi
+
+dnl
+dnl  modplug demux plugin
+dnl
+AC_ARG_ENABLE(mod,
+  [  --enable-mod            Mod demux support (default enabled)])
+if test "${enable_mod}" != "no"
+then
+  AC_CHECK_HEADERS(libmodplug/modplug.h, [
+    AX_ADD_PLUGINS([mod])
+    AX_ADD_CXXFLAGS([mod],[])
+    AX_ADD_LDFLAGS([mod],[-lmodplug])])
 fi
 
 dnl
@@ -1729,12 +1778,12 @@ then
       AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
     fi
     dnl  Use a custom libmad
-    AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
-    if test -f ${real_mad_tree}/libmad/mad.h
+    AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
+    if test -f ${real_mad_tree}/mad.h
     then
       AC_MSG_RESULT(yes)
-      AX_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}/libmad])
-      AX_ADD_LDFLAGS([mpgatofixed32],[-L${real_mad_tree}/libmad/.libs])
+      AX_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
+      AX_ADD_LDFLAGS([mpgatofixed32],[-L${real_mad_tree}/.libs])
       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
       AC_CHECK_LIB(mad, mad_bit_init, [
         AX_ADD_BUILTINS([mpgatofixed32])
@@ -1797,10 +1846,11 @@ then
   dnl
   dnl test for !(--with-ffmpeg-tree)
   dnl
-  if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}";then
+  if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}"; then
     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
-    AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
+    AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
+    AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
     AC_CHECK_LIB(avcodec, avcodec_init, [
       AX_ADD_BUILTINS([ffmpeg stream_out_transcode])
       AX_ADD_LDFLAGS([ffmpeg],[-lavcodec])
@@ -1819,7 +1869,7 @@ then
   dnl
   dnl test for --with-ffmpeg-tree
   dnl
-  if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}";then
+  if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
     AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
     if test -z "${real_ffmpeg_tree}"; then
@@ -1827,29 +1877,32 @@ then
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
     fi
-    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
-      dnl  Use a custom libffmpeg
-      AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-      AX_ADD_BUILTINS([ffmpeg stream_out_transcode])
-      AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec -lavcodec])
-      AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavcodec])
-
-      if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
-        AC_DEFINE(HAVE_LIBAVFORMAT, 1,
-        [Define if you have ffmpeg's libavformat.])
-        AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat -lavformat -lz])
-        AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavformat])
-      fi
-
-      dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X
-      dnl       linker would miserably barf on multiple definitions.
-      AX_ADD_LDFLAGS([stream_out_transcode],[-L${real_ffmpeg_tree}/libavcodec])
-      AX_ADD_CPPFLAGS([stream_out_transcode],[-I${real_ffmpeg_tree}/libavcodec])
-    else
+    if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
       dnl  The given libavcodec wasn't built
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
     fi
+    if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
+      dnl  The given libavcodec wasn't built with --enable-pp
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodec.a was not compiled with postprocessing support, make sure you configured ffmpeg with --enable-pp])
+    fi
+    dnl  Use a custom libffmpeg
+    AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
+    AX_ADD_BUILTINS([ffmpeg stream_out_transcode])
+    AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec -lavcodec])
+    AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat])
+
+    if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
+      AC_DEFINE(HAVE_LIBAVFORMAT, 1, [Define if you have ffmpeg's libavformat.])
+      AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat -lavformat -lz])
+      AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavformat])
+    fi
+
+    dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X
+    dnl       linker would miserably barf on multiple definitions.
+    AX_ADD_LDFLAGS([stream_out_transcode],[-L${real_ffmpeg_tree}/libavcodec])
+    AX_ADD_CPPFLAGS([stream_out_transcode],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat])
   fi
 fi
 
@@ -1877,7 +1930,7 @@ then
       dnl  Use a custom faad
       AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
       AX_ADD_BUILTINS([faad])
-      AX_ADD_LDFLAGS([faad],[-L${real_faad_tree}/libfaad/.libs -lfaad])
+      AX_ADD_LDFLAGS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
       AX_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
     else
       dnl  The given libfaad wasn't built
@@ -1991,7 +2044,7 @@ AC_CHECK_HEADERS(libtar.h, [
 
 
 dnl
-dnl  a52 AC3 decoder plugin
+dnl A52/AC3 decoder plugin
 dnl
 AC_ARG_ENABLE(a52,
   [  --enable-a52            A/52 support with liba52 (default enabled)])
@@ -2060,6 +2113,63 @@ then
   fi
 fi
 
+dnl
+dnl DTS Coherent Acoustics decoder plugin
+dnl
+AC_ARG_ENABLE(dts,
+  [  --enable-dts            DTS Coherent Acoustics support with libdts (default enabled)])
+if test "${enable_dts}" != "no"; then
+  AC_ARG_WITH(dts-tree,
+    [    --with-dts-tree=PATH  libdts tree for static linking ],[],[])
+  if test "${with_dts_tree}" != "no" -a -n "${with_dts_tree}"
+  then
+    real_dts_tree="`cd ${with_dts_tree} 2>/dev/null && pwd`"
+    if test -z "${real_dts_tree}"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${with_dts_tree} directory doesn't exist])
+    fi
+    dnl  Use a custom libdts
+    AC_MSG_CHECKING(for dts.h in ${real_dts_tree}/include)
+    if test -f ${real_dts_tree}/include/dts.h
+    then
+      AC_MSG_RESULT(yes)
+      AX_ADD_CPPFLAGS([dtstofloat32],[-I${real_dts_tree}/include])
+      AX_ADD_LDFLAGS([dtstofloat32],[-L${real_dts_tree}/libdts])
+      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}"
+      AC_CHECK_LIB(dts, dts_free, [
+        AX_ADD_BUILTINS([dtstofloat32])
+        AX_ADD_LDFLAGS([dtstofloat32],[-ldts])
+        ],[
+        if test -f ${real_dts_tree}/libdts/libdts.a
+        then
+          AC_MSG_ERROR([make sure you have at least libdts-0.0.2])
+        else
+          AC_MSG_ERROR([the specified tree hasn't been compiled])
+        fi
+      ])
+      LDFLAGS="${LDFLAGS_save}"
+    else
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([the specified tree doesn't have dts.h])
+    fi
+  else
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}"
+    AC_CHECK_HEADERS(dts.h, [
+      AC_CHECK_LIB(dts, dts_free, [
+        AX_ADD_PLUGINS([dtstofloat32])
+        AX_ADD_LDFLAGS([dtstofloat32],[-ldts])
+      ],[
+        if test "${enable_dts}" = "yes"; then
+          AC_MSG_ERROR([Could not find libdts on your system: you may get it from http://www.videolan.org/dtsdec.html])
+        fi
+      ])
+    ])
+    LDFLAGS="${LDFLAGS_save}"
+  fi
+fi
+
 dnl dnl
 dnl dnl  DV plugin
 dnl dnl
@@ -2236,6 +2346,16 @@ AX_ADD_LDFLAGS([subsdec],[${LIBICONV}])
 AX_ADD_CPPFLAGS([subsdec],[${INCICONV}])
 AX_ADD_PLUGINS([subsdec])
 
+dnl
+dnl  CMML plugin
+dnl
+AC_ARG_ENABLE(cmml,
+  [  --enable-cmml           CMML support (default enabled)])
+if test "${enable_cmml}" != "no"
+then
+  AX_ADD_PLUGINS([cmml])
+fi
+
 
 dnl
 dnl  Video Filters
@@ -2430,7 +2550,6 @@ then
     AX_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs` ${LIBICONV}])
     AC_CHECK_HEADERS(Carbon/Carbon.h,
       [AX_ADD_LDFLAGS([freetype],[-framework Carbon])])
-    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}"
   elif test "${enable_freetype}" =  "yes"
   then
     AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
@@ -2744,6 +2863,21 @@ then
     ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
 fi
 
+dnl
+dnl  Roku HD1000 audio
+dnl
+AC_ARG_ENABLE(hd1000a,
+  [  --enable-hd1000a        HD1000 audio module (default enabled on HD1000)])
+if test "${enable_hd1000a}" != "no" &&
+  (test "${SYS}" != "mingw32" || test "${enable_hd1000a}" = "yes")
+then
+  AC_LANG_PUSH([C++])
+  AC_CHECK_HEADERS(deschutes/libraries/hdmachinex225/PCMAudioPlayer.h, [
+    AX_ADD_PLUGINS([hd1000a])
+    AC_CHECK_LIB(HDMachineX225,main,AX_ADD_LDFLAGS([hd1000a],[-lHDMachineX225]))  ])
+  AC_LANG_POP([C++])
+fi
+
 dnl
 dnl  Interface plugins
 dnl
@@ -2784,38 +2918,74 @@ dnl Skins2 module
 dnl
 AC_ARG_ENABLE(skins2,
   [  --enable-skins2         Skins2 interface module (experimental)])
-if test "${enable_skins2}" != "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+if test "${enable_skins2}" = "yes" || (test "${SYS}" != "darwin" && test "${SYS}" != "beos" && test "${enable_skins2}" != "no"); then
 
-    AX_ADD_PLUGINS([skins2])
-    ALIASES="${ALIASES} svlc"
-    AX_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
-    AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
-    AX_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 -lmsimg32])
+  dnl test for the required libraries
+  skins2_missing_lib="no"
 
+  dnl freetype
+  if test "${FREETYPE_CONFIG}" != "no"; then
+    AX_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
+    AX_ADD_LDFLAGS([skins2],[`${FREETYPE_CONFIG} --libs`])
   else
-    AX_ADD_PLUGINS([skins2])
-    ALIASES="${ALIASES} svlc"
-    AX_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -DX11_SKINS])
-    AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
-    AX_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11])
+    skins2_missing_lib="yes"
+    if test "${enable_skins2}" = "yes"; then
+      AC_MSG_ERROR([Could not find freetype (required for skins2)])
+    fi
   fi
 
-  if test "${FREETYPE_CONFIG}" != "no"
-  then
-    AX_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
-    AX_ADD_LDFLAGS([skins2],[`${FREETYPE_CONFIG} --libs`])
+  dnl iconv
+  if test "$am_cv_func_iconv" = "yes"; then
+    AX_ADD_CPPFLAGS([skins2],[${INCICONV}])
+    AX_ADD_LDFLAGS([skins2],[${LIBICONV} -lpng])
+  else
+    skins2_missing_lib="yes"
+    if test "${enable_skins2}" = "yes"; then
+      AC_MSG_ERROR([Could not find iconv (required for skins2)])
+    fi
   fi
 
-  AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
-  if test "${XML2_CONFIG}" != "no"
-  then
+  dnl libxml2
+  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
     AX_ADD_CPPFLAGS([skins2],[`${XML2_CONFIG} --cflags`])
     AX_ADD_LDFLAGS([skins2],[`${XML2_CONFIG} --libs`])
+    dnl skins2 depends on the xmlTextReader extension
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_skins2}"
+    AC_CHECK_LIB(xml2,xmlTextReaderConstName,[],[
+      skins2_missing_lib="yes"
+      AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version; maybe you are missing libpng.])
+      if test "${enable_skins2}" = "yes"; then
+        AC_MSG_ERROR([libxml2 missing the xmlTextReader extension (required for skins2)])
+      fi])
+    LDFLAGS="${LDFLAGS_save}"
+  else
+    skins2_missing_lib="yes"
+    if test "${enable_skins2}" = "yes"; then
+      AC_MSG_ERROR([Could not find libxml2 (required for skins2)])
+    fi
   fi
 
-  AX_ADD_CPPFLAGS([skins2],[${INCICONV}])
-  AX_ADD_LDFLAGS([skins2],[${LIBICONV} -lpng])
+  if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
+    AX_ADD_PLUGINS([skins2])
+    ALIASES="${ALIASES} svlc"
+    AX_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
+    AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    AX_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
+
+  else if test "${skins2_missing_lib}" = "no"; then
+    AX_ADD_PLUGINS([skins2])
+    ALIASES="${ALIASES} svlc"
+    AX_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -DX11_SKINS])
+    AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    AX_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11])
+  fi fi
 fi
 
 
@@ -2891,20 +3061,20 @@ dnl fi
 dnl
 dnl  PDA Gtk+2 module
 dnl
-#AC_ARG_ENABLE(pda,
-#  [  --enable-pda          PDA interface needs Gtk2 support (default disabled)])
-#if test "x${enable_pda}" = "xyes"
-#then
# PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
-#  AX_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
-#  AX_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
-#  AX_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
-#  AX_ADD_LDFLAGS([pda],[${GTK2_LIBS} ${LDFLAGS_pda}])
-#  AX_ADD_PLUGINS([pda])
-#  if test "${SYS}" != "mingw32"; then
-#    NEED_GTK2_MAIN=yes
-#  fi
-#fi
+AC_ARG_ENABLE(pda,
+  [  --enable-pda          PDA interface needs Gtk2 support (default disabled)])
+if test "x${enable_pda}" = "xyes"
+then
+  PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
+  AX_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
+  AX_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
+  AX_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
+  AX_ADD_LDFLAGS([pda],[${GTK2_LIBS} ${LDFLAGS_pda}])
+  AX_ADD_PLUGINS([pda])
+  if test "${SYS}" != "mingw32"; then
+    NEED_GTK2_MAIN=yes
+  fi
+fi
 
 dnl
 dnl  Gnome module
@@ -3100,11 +3270,11 @@ AC_ARG_ENABLE(macosx,
   [if test "${enable_macosx}" = "yes"
    then
      AX_ADD_BUILTINS([macosx])
-     AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC])
+     AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
      AX_ADD_BUILTINS([macosx])
-     AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC])
+     AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
    )])
 
 dnl
@@ -3175,7 +3345,7 @@ then
   dnl
   dnl test for --with-goom-tree
   dnl
-  if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}";then
+  if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then
     AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
     real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
     if test -z "${real_goom_tree}"; then
@@ -3616,14 +3786,13 @@ AC_CONFIG_FILES([
   modules/audio_mixer/Makefile
   modules/audio_output/Makefile
   modules/codec/Makefile
+  modules/codec/cmml/Makefile
   modules/codec/ffmpeg/Makefile
   modules/codec/ffmpeg/postprocessing/Makefile
   modules/codec/ogt/Makefile
   modules/codec/spudec/Makefile
   modules/control/Makefile
   modules/control/corba/Makefile
-  modules/control/lirc/Makefile
-  modules/control/rc/Makefile
   modules/demux/Makefile
   modules/demux/asf/Makefile
   modules/demux/avi/Makefile
@@ -3646,7 +3815,6 @@ AC_CONFIG_FILES([
   modules/gui/wxwindows/Makefile
   modules/misc/Makefile
   modules/misc/dummy/Makefile
-  modules/misc/logger/Makefile
   modules/misc/memcpy/Makefile
   modules/misc/network/Makefile
   modules/misc/testsuite/Makefile
@@ -3658,15 +3826,11 @@ AC_CONFIG_FILES([
   modules/stream_out/transrate/Makefile
   modules/video_chroma/Makefile
   modules/video_filter/Makefile
-  modules/video_filter/deinterlace/Makefile
   modules/video_output/Makefile
   modules/video_output/directx/Makefile
-  modules/video_output/mga/Makefile
   modules/video_output/qte/Makefile
   modules/video_output/x11/Makefile
   modules/visualization/Makefile
-  modules/visualization/scope/Makefile
-  modules/visualization/xosd/Makefile
   modules/visualization/visual/Makefile
 ])