]> git.sesse.net Git - vlc/blobdiff - configure.ac
Add OGT and CVD subtitle demuxers.
[vlc] / configure.ac
index 404f3cae7a8ddaf3a67180dc01b72ce49e986136..4d12d43d9ec84bf951cbc8b699f1f553e5587955 100644 (file)
@@ -1,10 +1,10 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.74 2003/09/09 12:54:19 jpsaman Exp $
+dnl $Id: configure.ac,v 1.142 2004/01/04 16:51:59 rocky Exp $
 
-AC_INIT(vlc,0.6.3-cvs)
+AC_INIT(vlc,0.7.0)
 
 CONFIGURE_LINE="$0 $*"
-CODENAME="Trevelyan"
+CODENAME="Bond"
 
 AC_PREREQ(2.50)
 AC_CONFIG_SRCDIR(src/libvlc.c)
@@ -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.6.3-cvs)
+AM_INIT_AUTOMAKE(vlc,0.7.0)
 AM_CONFIG_HEADER(config.h)
 
 dnl
@@ -53,6 +53,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
 AC_CHECK_TOOL(AR, ar, :)
 AC_CHECK_TOOL(LD, ld, :)
 
+dnl Sam, if you think I didn't see that... --Meuuh
 dnl AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 
@@ -60,6 +61,32 @@ dnl Check for compiler properties
 AC_C_CONST
 AC_C_INLINE
 
+dnl
+dnl  Check for the contrib directory
+dnl
+topdir="`pwd`"
+if test -d ${topdir}/extras/contrib/lib; then
+  export PATH=${topdir}/extras/contrib/bin:$PATH
+  export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH
+  export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_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"
+  if test -d ${topdir}/extras/contrib/vlc-lib; then
+    LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/vlc-lib"
+    LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/vlc-lib"
+  fi
+  LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib"
+  LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib"
+  with_livedotcom_tree=${topdir}/extras/contrib/src/live
+  with_goom_tree=${topdir}/extras/contrib/src/goom
+fi
+
 dnl
 dnl  Set default values
 dnl
@@ -79,7 +106,7 @@ case "${target_os}" in
   bsdi*)
     SYS=bsdi
     CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
-    AX_ADD_LDFLAGS([dvd dvdcss vcd cdda],[-ldvd])
+    AX_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
     ;;
   *bsd*)
     SYS="${target_os}"
@@ -117,7 +144,7 @@ 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_ftp access_output_udp sap slp http httpd stream_out_standard],[-lws2_32])
+        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])
     fi
     ;;
   *nto*)
@@ -135,14 +162,11 @@ case "${target_os}" in
     SYS=beos
     CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
+    AX_ADD_CXXFLAGS([beos],[])
     AX_ADD_LDFLAGS([vlc beos],[-lbe])
     AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
 
-    dnl Check for BONE presence
-    AC_CHECK_LIB(socket, connect,
-        AX_ADD_LDFLAGS([vlc access_mms ipv4 httpd],[-lsocket -lbind]))
-
-    dnl Kludgy check for Zeta
+    dnl Ugly check for Zeta
     if test -f /boot/beos/system/lib/libzeta.so; then
         AX_ADD_LDFLAGS([beos],[-lzeta])
     fi
@@ -158,7 +182,7 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="de en_GB es fr it ja nl no pl pt_BR ru sv"
+ALL_LINGUAS="de en_GB es fr hu it ja nl no pl pt_BR ru sv"
 AM_GNU_GETTEXT_VERSION(0.11.5)
 AM_GNU_GETTEXT
 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
@@ -274,22 +298,22 @@ fi
 
 AC_CHECK_FUNCS(connect,,[
   AC_CHECK_LIB(socket,connect,[
-    AX_ADD_LDFLAGS([vlc ipv4],-lsocket)
+    AX_ADD_LDFLAGS([vlc ipv4 cddax],-lsocket)
   ])
 ])
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
-    AX_ADD_LDFLAGS([access_http access_mms access_udp access_ftp sap http access_output_udp],[-lsocket])
+    AX_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap httpd access_output_udp stream_out_standard],[-lsocket])
   ])
 ])
 
 AC_CHECK_FUNCS(gethostbyname,,[
   AC_CHECK_LIB(nsl,gethostbyname,[
-    AX_ADD_LDFLAGS([ipv4 httpd vlc],[-lnsl])
+    AX_ADD_LDFLAGS([cddax ipv4 httpd vlc],[-lnsl])
   ],[
     AC_CHECK_LIB(bind,gethostbyname,[
-      AX_ADD_LDFLAGS([ipv4 httpd],[-lbind])
+      AX_ADD_LDFLAGS([ipv4 access_mms httpd],[-lbind])
     ])
   ])
 ])
@@ -348,20 +372,85 @@ AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
 
 if test "${SYS}" != "mingw32"; then
 AC_TYPE_SIGNAL
-AC_CHECK_LIB(dl,dlopen,[
-  AX_ADD_LDFLAGS([vlc],[-ldl])
-])
 AC_CHECK_LIB(m,cos,[
-  AX_ADD_LDFLAGS([imdct adjust distort a52tofloat32],[-lm])
+  AX_ADD_LDFLAGS([adjust distort a52tofloat32],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  AX_ADD_LDFLAGS([ffmpeg stream_out_transcode imdct imdct3dn imdctsse i420_rgb faad],[-lm])
+  AX_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
   AX_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
 ])
 fi # end "${SYS}" != "mingw32"
 
+dnl Check for dynamic plugins
+ac_cv_have_plugins=no
+
+# OS X style
+AC_CHECK_HEADERS(mach-o/dyld.h,
+  [AC_CHECK_FUNCS(NSLinkModule,
+    [AC_DEFINE(HAVE_DL_DYLD, 1, [Define if you have the Darwin dyld API])
+     ac_cv_have_plugins=yes])])
+
+# HP-UX style
+if test "${ac_cv_have_plugins}" = "no"; then
+  AC_CHECK_HEADERS(dl.h)
+  ac_cv_my_have_shl_load=no
+  AC_CHECK_FUNC(shl_load,
+   [ac_cv_my_have_shl_load=yes,
+    AC_CHECK_LIB(dld, shl_load,
+     [ac_cv_my_have_shl_load=yes
+      AX_ADD_LDFLAGS([vlc],[-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
+  fi
+fi
+
+# Whatever style
+if test "${ac_cv_have_plugins}" = "no"; then
+  AC_CHECK_LIB(dld, dld_link,
+   [AX_ADD_LDFLAGS([vlc],[-ldld])
+    AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
+    ac_cv_have_plugins=yes])
+fi
+
+# Win32 style
+if test "${ac_cv_have_plugins}" = "no"; then
+  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+    AC_CHECK_LIB(kernel32, main,
+     [AX_ADD_LDFLAGS([vlc],[-lkernel32])
+      AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
+      ac_cv_have_plugins=yes])
+  fi
+fi
+
+# BeOS style
+if test "${ac_cv_have_plugins}" = "no"; then
+  AC_CHECK_HEADERS(image.h)
+  AC_CHECK_FUNCS(load_add_on,
+   [AC_DEFINE(HAVE_DL_BEOS, 1, [Define if you have the BeOS dl])
+    ac_cv_have_plugins=yes])
+fi
+
+# Only test for dlopen() if the others didn't work
+if test "${ac_cv_have_plugins}" = "no"; then
+  AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
+  ac_cv_my_have_dlopen=no
+  AC_CHECK_FUNC(dlopen,
+    ac_cv_my_have_dlopen=yes,
+    AC_CHECK_LIB(dl, dlopen,
+      ac_cv_my_have_dlopen=yes
+      AX_ADD_LDFLAGS([vlc],[-ldl]),
+      AC_CHECK_LIB(svld, dlopen,
+        ac_cv_my_have_dlopen=yes
+        AX_ADD_LDFLAGS([vlc],[-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
+  fi
+fi
+
 if test "${SYS}" != "mingw32"; then
 dnl Check for pthreads - borrowed from XMMS
 THREAD_LIB=error
@@ -467,7 +556,6 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
 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(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
-AC_CHECK_HEADERS(dlfcn.h image.h)
 AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
 if test "${SYS}" != "mingw32"; then
 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
@@ -767,12 +855,6 @@ case "${target_cpu}" in
     ;;
 esac
 
-case "${ARCH}" in
-  hppa64)
-    AX_ADD_CFLAGS([mpeg_video_old],[-ffunction-sections])
-    ;;
-esac
-
 dnl
 dnl  Enable profiling
 dnl
@@ -786,10 +868,8 @@ test "${enable_cprof}" != "yes" && enable_cprof="no"
 dnl
 dnl  default modules
 dnl
-#AX_ADD_BUILTINS([mpeg_video_old idct idctclassic motion])
-AX_ADD_PLUGINS([dummy rc logger gestures memcpy])
-AX_ADD_PLUGINS([es mpga m4v mpeg_system ps ts avi asf aac mp4 rawdv])
-AX_ADD_PLUGINS([spudec mpeg_audio lpcm a52 dts cinepak])
+AX_ADD_PLUGINS([dummy rc logger gestures memcpy hotkeys])
+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])
 AX_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler])
@@ -800,8 +880,8 @@ AX_ADD_PLUGINS([aout_file])
 AX_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
 AX_ADD_PLUGINS([id3 m3u])
 AX_ADD_PLUGINS([rawvideo])
-AX_ADD_PLUGINS([wav araw demuxdump demuxsub adpcm a52sys au])
-AX_ADD_PLUGINS([access_file access_udp access_http ipv4 access_mms])
+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])
 
 dnl
@@ -1000,12 +1080,13 @@ if test "${enable_sout}" != "no"
 then
   AX_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
   AX_ADD_PLUGINS([mux_ts mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
-  AX_ADD_PLUGINS([packetizer_mpegaudio packetizer_mpegvideo])
+  AX_ADD_PLUGINS([packetizer_mpegvideo])
   AX_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
   AX_ADD_PLUGINS([packetizer_copy])
 
-  AX_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es])
+  AX_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp])
   AX_ADD_PLUGINS([stream_out_duplicate stream_out_display stream_out_gather])
+#  AX_ADD_PLUGINS([stream_out_transrate])
 
   dnl Ogg and vorbis are handled in their respective section
 fi
@@ -1017,6 +1098,60 @@ dnl
 
 AC_ARG_WITH(,[Input plugins:])
 
+dnl
+dnl  live.com input
+dnl
+AC_ARG_ENABLE(livedotcom,
+[  --enable-livedotcom   live.com input plugin (default disabled)])
+if test "${enable_livedotcom}" = "yes"
+then
+  AC_ARG_WITH(livedotcom-tree,
+    [    --with-livedotcom-tree=PATH live.com tree for static linking (required)])
+
+  dnl
+  dnl test for --with-livedotcom-tree
+  dnl
+  if test "${with_livedotcom_tree}" != "no" -a -n "${with_livedotcom_tree}";then
+    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
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_livedotcom_tree}])
+    fi
+    if test -f "${real_livedotcom_tree}/liveMedia/libliveMedia.a"; then
+      AC_MSG_RESULT(${real_livedotcom_tree}/liveMedia/libliveMedia.a)
+
+      AX_ADD_BUILTINS([livedotcom])
+
+      if test "${SYS}" = "mingw32"; then
+        # add ws2_32 for closesocket, select, recv
+        AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
+      fi
+
+      AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/liveMedia -lliveMedia])
+      AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
+      AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/groupsock -lgroupsock])
+      AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/UsageEnvironment -lUsageEnvironment])
+
+      AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/BasicUsageEnvironment/include])
+      AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/groupsock/include])
+      AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/liveMedia/include])
+      AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/UsageEnvironment/include ])
+    else
+      dnl  The given live.com wasn't built
+      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
+
+
+
 dnl
 dnl  DVD module: optionally check for installed libdvdcss
 dnl
@@ -1341,6 +1476,61 @@ then
   AX_ADD_PLUGINS([pvr])
 fi
 
+dnl
+dnl  VCDX and CDDAX modules
+dnl
+AC_ARG_ENABLE(libcdio,
+  [  --enable-libcdio         CDDA support via libcdio (default enabled)])
+
+AC_ARG_ENABLE(libcddb,
+  [  --enable-libcddb         CDDB support for CDDAX (default enabled)])
+
+AC_ARG_ENABLE(vcdx,
+  [  --enable-vcdx            VCD support with Navigation (default enabled)])
+
+if test "${enable_cddax}" != "no"
+then
+  PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
+   [enable_cddax="no"
+    AC_DEFINE(HAVE_CDDAX, [], [Define for the CD-DA plugin using libcdio])
+    AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
+    AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
+    AX_ADD_PLUGINS([cddax])], 
+   [AC_MSG_WARN(libcdio library not found)
+   HAVE_CDDAX=no])
+
+  if test x$enable_cddb != no; then
+    PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.4, [
+      HAVE_LIBCDDB=yes 
+      AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
+      AX_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
+      AX_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
+      ],
+      [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled) 
+      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,
+     [enable_vcd="no"
+      AC_DEFINE(HAVE_VCDX, [], 
+      [Define for the VCD plugin using libcdio/libvcdinfo])
+      AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
+      AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
+      AX_ADD_PLUGINS([vcdx])], 
+     [AC_MSG_WARN(vcdinfo library not found)
+     HAVE_VCDX=no])
+  fi
+fi
+
 dnl
 dnl  VCD module
 dnl
@@ -1394,6 +1584,8 @@ AC_ARG_ENABLE(satellite,
   [  --enable-satellite      satellite card support (default disabled)],
   [ if test "${enable_satellite}" = "yes"
     then
+      AC_DEFINE(HAVE_SATELLITE, [], 
+      [Define for the VCD plugin using libcdio/libvcdinfo])
       AX_ADD_PLUGINS([satellite])
     fi])
 
@@ -1452,8 +1644,6 @@ if test "${enable_ogg}" != "no"
 then
   AC_CHECK_HEADERS(ogg/ogg.h, [
     AC_CHECK_LIB( ogg, oggpack_read, [
-      AC_CHECK_LIB( ogg, oggpackB_read, [
-        AX_ADD_CPPFLAGS([ogg],[-DHAVE_OGGPACKB])])
       AX_ADD_PLUGINS([ogg mux_ogg])
       AX_ADD_LDFLAGS([ogg mux_ogg],[-logg])])
    ],[])
@@ -1467,12 +1657,10 @@ AC_ARG_ENABLE(mkv,
 if test "${enable_mkv}" != "no"
 then
 AC_LANG_PUSH(C++)
-  dnl matroska headers include ebml headers directly... pouah that stinks
-  CPPFLAGS="${CPPFLAGS_save} -I/usr/local/include/ebml -I/usr/include/ebml"
-  AC_CHECK_HEADERS(EbmlVersion.h matroska/KaxVersion.h, [
+  AC_CHECK_HEADERS(ebml/EbmlVersion.h matroska/KaxVersion.h, [
     AC_CHECK_HEADERS(matroska/KaxAttachments.h)
     AX_ADD_PLUGINS([mkv])
-    AX_ADD_CXXFLAGS([mkv],[-I/usr/local/include/ebml -I/usr/include/ebml])
+    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])
@@ -1571,6 +1759,14 @@ then
       AX_ADD_LDFLAGS([stream_out_transcode],[])
       AX_ADD_LDFLAGS([ffmpeg],[-lmp3lame]) ])
 
+  AC_ARG_WITH(ffmpeg-faac,
+    [    --with-ffmpeg-faac      if ffmpeg has been compiled with faac support],
+    [
+      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],[])
+      AX_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
+
   AC_ARG_WITH(ffmpeg-tree,
     [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
 
@@ -1620,13 +1816,6 @@ then
       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
     fi
   fi
-
-  ac_have_vorbis_headers=yes
-  AC_CHECK_HEADERS(vorbis/vorbisenc.h vorbis/codec.h,,
-      ac_have_vorbis_headers=no)
-  if test "$ac_have_vorbis_headers" = "yes"; then
-    AX_ADD_LDFLAGS([stream_out_transcode],[-lvorbisenc -lvorbis -logg])
-  fi
 fi
 
 dnl
@@ -1655,14 +1844,6 @@ then
       AX_ADD_BUILTINS([faad])
       AX_ADD_LDFLAGS([faad],[-L${real_faad_tree}/libfaad/.libs -lfaad])
       AX_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
-      CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
-      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
-      AC_TRY_COMPILE([#include <faad.h>],
-        [faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
-         unsigned long d; faacDecDecode(a,b,c,d);],
-        [], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)])
-      LDFLAGS="${LDFLAGS_save}"
-      CPPFLAGS="${CPPFLAGS_save}"
     else
       dnl  The given libfaad wasn't built
       AC_MSG_RESULT(no)
@@ -1675,11 +1856,7 @@ then
       [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
     AC_CHECK_LIB(faad, faacDecOpen, [
       AX_ADD_PLUGINS([faad])
-      AX_ADD_LDFLAGS([faad],[-lfaad])
-      AC_TRY_COMPILE([#include <faad.h>],
-        [faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
-         unsigned long d; faacDecDecode(a,b,c,d);],
-        [], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)]) ],
+      AX_ADD_LDFLAGS([faad],[-lfaad]) ],
       [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
     LDFLAGS="${LDFLAGS_save}"
     CPPFLAGS="${CPPFLAGS_save}"
@@ -1687,58 +1864,58 @@ then
 fi
 
 
-dnl
-dnl  xvid decoder plugin
-dnl
-AC_ARG_ENABLE(xvid,
-[  --enable-xvid           xvid codec (default disabled)])
-if test "${enable_xvid}" = "yes"
-then
-  AC_ARG_WITH(xvid,
-    [    --with-xvid=PATH      path to xvid installation],[],[])
-  if test "${with_xvid}" != "no" -a -n "${with_xvid}"
-  then
-    AX_ADD_CPPFLAGS([xvid],[-I${with_xvid}/include])
-    AX_ADD_LDFLAGS([xvid],[-L${with_xvid}/lib])
-  fi
-
-  AC_ARG_WITH(xvid-tree,
-  [    --with-xvid-tree=PATH xvid tree for static linking])
-  if test -n "${with_xvid_tree}"
-  then
-    AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
-    real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
-    if test -z "${real_xvid_tree}"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
-    fi
-    if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
-    then
-      dnl  Use a custom xvid
-      AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
-      AX_ADD_BUILTINS([xvid])
-      AX_ADD_LDFLAGS([xvid],[-L${real_xvid_tree}/build/generic -lxvidcore])
-      AX_ADD_CPPFLAGS([xvid],[-I${real_xvid_tree}/src])
-    else
-      dnl  The given libxvidcore wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
-    fi
-  else
-    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
-    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
-    AC_CHECK_HEADERS(xvid.h, ,
-      [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
-    AC_CHECK_LIB(xvidcore, xvid_init, [
-      AX_ADD_PLUGINS([xvid])
-      AX_ADD_LDFLAGS([xvid],[-lxvidcore]) ],
-      [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
-    LDFLAGS="${LDFLAGS_save}"
-    CPPFLAGS="${CPPFLAGS_save}"
-  fi
-fi
+dnl dnl
+dnl dnl  xvid decoder plugin
+dnl dnl
+dnl AC_ARG_ENABLE(xvid,
+dnl [  --enable-xvid           xvid codec (default disabled)])
+dnl if test "${enable_xvid}" = "yes"
+dnl then
+dnl   AC_ARG_WITH(xvid,
+dnl     [    --with-xvid=PATH      path to xvid installation],[],[])
+dnl   if test "${with_xvid}" != "no" -a -n "${with_xvid}"
+dnl   then
+dnl     AX_ADD_CPPFLAGS([xvid],[-I${with_xvid}/include])
+dnl     AX_ADD_LDFLAGS([xvid],[-L${with_xvid}/lib])
+dnl   fi
+dnl 
+dnl   AC_ARG_WITH(xvid-tree,
+dnl   [    --with-xvid-tree=PATH xvid tree for static linking])
+dnl   if test -n "${with_xvid_tree}"
+dnl   then
+dnl     AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
+dnl     real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
+dnl     if test -z "${real_xvid_tree}"
+dnl     then
+dnl       dnl  The given directory can't be found
+dnl       AC_MSG_RESULT(no)
+dnl       AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
+dnl     fi
+dnl     if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
+dnl     then
+dnl       dnl  Use a custom xvid
+dnl       AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
+dnl       AX_ADD_BUILTINS([xvid])
+dnl       AX_ADD_LDFLAGS([xvid],[-L${real_xvid_tree}/build/generic -lxvidcore])
+dnl       AX_ADD_CPPFLAGS([xvid],[-I${real_xvid_tree}/src])
+dnl     else
+dnl       dnl  The given libxvidcore wasn't built
+dnl       AC_MSG_RESULT(no)
+dnl       AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
+dnl     fi
+dnl   else
+dnl     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
+dnl     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
+dnl     AC_CHECK_HEADERS(xvid.h, ,
+dnl       [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
+dnl     AC_CHECK_LIB(xvidcore, xvid_init, [
+dnl       AX_ADD_PLUGINS([xvid])
+dnl       AX_ADD_LDFLAGS([xvid],[-lxvidcore]) ],
+dnl       [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
+dnl     LDFLAGS="${LDFLAGS_save}"
+dnl     CPPFLAGS="${CPPFLAGS_save}"
+dnl   fi
+dnl fi
 
 dnl
 dnl  QuickTime plugin
@@ -1762,7 +1939,7 @@ dnl
 dnl MP4 module
 dnl
 AC_CHECK_HEADERS(zlib.h, [
-  AX_ADD_LDFLAGS([mp4 skins],[-lz])
+  AX_ADD_LDFLAGS([mp4 skins skins2 sap],[-lz])
 ] )
 
 
@@ -1770,7 +1947,7 @@ dnl
 dnl skins module
 dnl
 AC_CHECK_HEADERS(libtar.h, [
-  AX_ADD_LDFLAGS([skins],[-ltar])
+  AX_ADD_LDFLAGS([skins skins2],[-ltar])
 ] )
 
 
@@ -1845,18 +2022,18 @@ then
   fi
 fi
 
-dnl
-dnl  DV plugin
-dnl
-AC_ARG_ENABLE(dv,
-  [  --enable-dv             DV decoder support (deprecated in favor of ffmpeg) (default disabled)])
-if test "${enable_dv}" = "yes"
-then
-  AC_CHECK_HEADERS(libdv/dv.h, [
-    AX_ADD_PLUGINS([dv])
-    AX_ADD_LDFLAGS([dv],[-ldv])
-   ],[])
-fi
+dnl dnl
+dnl dnl  DV plugin
+dnl dnl
+dnl AC_ARG_ENABLE(dv,
+dnl   [  --enable-dv             DV decoder support (deprecated in favor of ffmpeg) (default disabled)])
+dnl if test "${enable_dv}" = "yes"
+dnl then
+dnl   AC_CHECK_HEADERS(libdv/dv.h, [
+dnl     AX_ADD_PLUGINS([dv])
+dnl     AX_ADD_LDFLAGS([dv],[-ldv])
+dnl    ],[])
+dnl fi
 
 dnl
 dnl  Flac plugin
@@ -1934,6 +2111,9 @@ then
   AC_CHECK_HEADERS(vorbis/codec.h, [
     AX_ADD_PLUGINS([vorbis])
     AX_ADD_LDFLAGS([vorbis],[-lvorbis -logg]) ],[])
+
+  AC_CHECK_HEADERS(vorbis/vorbisenc.h, [
+    AX_ADD_LDFLAGS([vorbis],[-lvorbisenc]) ],[])
 fi
 
 dnl
@@ -1949,6 +2129,18 @@ then
    ],[])
 fi
 
+dnl
+dnl  Speex plugin
+dnl
+AC_ARG_ENABLE(speex,
+  [  --enable-speex         Speex decoder support (default enabled)])
+if test "${enable_speex}" != "no"
+then
+  AC_CHECK_HEADERS(speex.h, [
+    AX_ADD_PLUGINS([speex])
+    AX_ADD_LDFLAGS([speex],[-lspeex]) ],[])
+fi
+
 dnl
 dnl  tarkin decoder plugin
 dnl
@@ -1986,12 +2178,12 @@ if test "${enable_theora}" = "yes"
 then
   AC_CHECK_HEADERS(theora/theora.h, [
     AC_CHECK_LIB(theora, theora_granule_time, [
-      AX_ADD_BUILTINS([theora])
-      if test "${SYS}" = "darwin"; then
-        theora_libs="-ltheora"
+      if test "${SYS}" = "mingw32"; then
+        AX_ADD_PLUGINS([theora])
       else
-        theora_libs="-ltheora -logg"
+        AX_ADD_BUILTINS([theora])
       fi
+      theora_libs="-ltheora -logg"
       AX_ADD_LDFLAGS([theora],[${theora_libs}]) ],[
       AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
 You also need to check that you have a libogg posterior to the 1.0 release.])],
@@ -2016,7 +2208,10 @@ dnl   png
 dnl
 AC_CHECK_HEADERS(png.h, [
     AX_ADD_LDFLAGS([logo],[-lpng -lz])
-    AX_ADD_PLUGINS([logo])])
+    AX_ADD_PLUGINS([logo])
+    AX_ADD_LDFLAGS([svcdsub],[-lpng -lz])
+    AX_ADD_LDFLAGS([cvdsub],[-lpng -lz])
+    AC_DEFINE(HAVE_LIBPNG, [], [Define if you have the PNG library: libpng])])
 
 dnl
 dnl  Video plugins
@@ -2177,6 +2372,8 @@ dnl  freetype module
 dnl
 AC_ARG_ENABLE(freetype,
   [  --enable-freetype       freetype support (default enabled)])
+AC_ARG_ENABLE(fribidi,
+  [  --enable-fribidi        fribidi support (default enabled)])
 if test "${enable_freetype}" != "no"
 then
   FREETYPE_PATH="${PATH}"
@@ -2191,8 +2388,8 @@ then
   if test "${FREETYPE_CONFIG}" != "no"
   then
     AX_ADD_PLUGINS([freetype])
-    AX_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
-    AX_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`])
+    AX_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags` ${INCICONV}])
+    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}"
@@ -2202,6 +2399,25 @@ then
 from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
     ])
   fi
+
+  dnl fribidi support
+  if test "${enable_fribidi}" != "no"
+  then
+    FRIBIDI_PATH="${PATH}"
+    AC_ARG_WITH(fribidi-config-path,
+      [    --with-fribidi-config-path=PATH fribidi-config path (default search in \$PATH)],
+      [ if test "${with_fribidi_config_path}" != "no"
+        then
+          FRIBIDI_PATH="${with_fribidi_config_path}:${PATH}"
+        fi ])
+    AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no, ${FRIBIDI_PATH})
+
+    if test "${FRIBIDI_CONFIG}" != "no"
+    then
+      AX_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
+      AX_ADD_LDFLAGS([freetype], [`${FRIBIDI_CONFIG} --libs`])
+    fi
+  fi
 fi
 
 dnl
@@ -2224,7 +2440,7 @@ then
   fi
   AX_ADD_PLUGINS([qte])
   NEED_QTE_MAIN=yes
-  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
+  CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
   AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
     AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
   ] )
@@ -2348,6 +2564,22 @@ then
   fi
 fi
 
+dnl
+dnl  libcaca plugin
+dnl
+AC_ARG_ENABLE(caca,
+  [  --enable-caca           libcaca output (default disabled)])
+if test "${enable_caca}" = "yes"
+then
+  AC_PATH_PROG(CACA_CONFIG, caca-config, no)
+  if test "${CACA_CONFIG}" != "no"
+  then
+    AX_ADD_PLUGINS([caca])
+    AX_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`])
+    AX_ADD_LDFLAGS([caca],[`${CACA_CONFIG} --plugin-libs`])
+  fi
+fi
+
 dnl
 dnl  win32 GDI plugin
 dnl
@@ -2494,20 +2726,38 @@ if test "${enable_skins}" != "no"; then
     AX_ADD_LDFLAGS([skins],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
 
   else if test "${enable_skins}" = "yes"; then
-    IMLIB2_PATH="${PATH}"
-    AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
-    if test "${IMLIB2_CONFIG_SKINS}" = "no"; then
-    AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-skins.])
-    fi
-
     AX_ADD_PLUGINS([skins])
     ALIASES="${ALIASES} svlc"
-    AX_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS])
+    AX_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} -I/usr/include/freetype2 -DX11_SKINS])
     AX_ADD_CXXFLAGS([skins],[-O2 -fno-rtti])
-    AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`])
+    AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lImlib2 -lXext -lX11 -lfreetype -lpng -lz ])
+  fi fi
+fi
+
+dnl
+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
+
+    AX_ADD_PLUGINS([skins2])
+    ALIASES="${ALIASES} svlc"
+    AX_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2])
+    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 "${enable_skins2}" = "yes"; then
+    AX_ADD_PLUGINS([skins2])
+    ALIASES="${ALIASES} svlc"
+    AX_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -I/usr/include/freetype2 -DX11_SKINS])
+    AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    AX_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11 -lfreetype -lpng ])
   fi fi
 fi
 
+
 dnl
 dnl  Gtk+ module
 dnl
@@ -2562,7 +2812,7 @@ then
 fi
 
 dnl
-dnl  Gtk+2 module ! Disabled for know as it is unuseable and confuses users
+dnl  Gtk+2 module ! Disabled for now as it is unusable and confuses users
 dnl
 dnl AC_ARG_ENABLE(gtk2,
 dnl   [  --enable-gtk2           Gtk2 support (default disabled)])
@@ -2580,20 +2830,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
@@ -2667,6 +2917,7 @@ then
     then
       AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
     fi
+    AC_LANG_PUSH(C++)
     AX_ADD_CXXFLAGS([wxwindows],[`${WX_CONFIG} --cxxflags`])
     AX_ADD_LDFLAGS([wxwindows],[`${WX_CONFIG} --libs`])
     # now look for the wxprec.h header
@@ -2682,6 +2933,7 @@ then
       ALIASES="${ALIASES} wxvlc"
     fi
     CPPFLAGS="${CPPFLAGS_save}"
+    AC_LANG_POP(C++)
   fi
 fi
 
@@ -2761,7 +3013,7 @@ AC_ARG_ENABLE(opie,
        AX_ADD_LDFLAGS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`])
        AX_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`])
      fi
-     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
+     CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
      AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
        AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
      ] )
@@ -3050,7 +3302,7 @@ dnl
 mozilla=false
 AC_ARG_ENABLE(mozilla,
   [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
-if test "${enable_mozilla}" = "yes"
+if test "${enable_mozilla}" = "yes" -a "${SYS}" != "mingw32"
 then
   AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
   if test "${MOZILLA_CONFIG}" = "no"
@@ -3068,12 +3320,30 @@ then
     dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
     AX_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
     AX_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
-    dnl Not necessarily in ${PATH}
-    if test -z "${XPIDL}" -o ! -x "${XPIDL}"
-    then
-      XPIDL="/usr/lib/mozilla/xpidl"
-    fi
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
+    AC_CHECK_HEADERS(mozilla-config.h)
+    CPPFLAGS="${CPPFLAGS_save}"
   fi
+
+dnl special case for mingw32
+elif test "${enable_mozilla}" = "yes"
+then
+  AC_ARG_WITH(mozilla-sdk-path,
+    [    --with-mozilla-sdk-path=PATH path to win32 mozilla sdk], [
+    real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
+    CPPFLAGS="${CPPFLAGS_save} ${real_mozilla_sdk}"
+    AC_CHECK_HEADERS(mozilla-config.h, [
+      mozilla=:
+      AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk} -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
+      AX_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue -Wl,--kill-at])
+      XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl" ])
+    CPPFLAGS="${CPPFLAGS_save}"
+  ])
+fi
+
+dnl Not necessarily in ${PATH}
+if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
+  XPIDL="/usr/lib/mozilla/xpidl"
 fi
 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
 
@@ -3109,8 +3379,8 @@ fi
 if test "${NEED_GNOME_MAIN}" != "no"
 then
     AX_ADD_PLUGINS([gnome_main])
-    AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_pda} ${CFLAGS_gnome}])
-    AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_pda} ${LDFLAGS_gnome}])
+    AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
+    AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
 fi
 
 if test "${NEED_GTK2_MAIN}" != "no"
@@ -3158,7 +3428,7 @@ AC_ARG_ENABLE(plugins,
 dnl Automagically disable plugins if there is no system support for
 dnl dynamically loadable files (.so, .dll, .dylib).
 dnl don't forget vlc-win32 still can load .dll as plugins
-if test "${ac_cv_header_dlfcn_h}" = "no" -a "${ac_cv_header_image_h}" = "no" -a "${SYS}" != "mingw32"
+if test "${ac_cv_have_plugins}" = "no"
 then
   echo "*** Your system doesn't have plugin support. All plugins will be built"
   echo "statically."
@@ -3198,7 +3468,7 @@ AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version st
 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
 
-VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
+VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
@@ -3236,6 +3506,7 @@ AC_SUBST(ASM)
 AC_SUBST(MOC)
 AC_SUBST(WINDRES)
 AC_SUBST(XPIDL)
+AC_SUBST(XPIDL_INCL)
 AC_SUBST(LIBEXT)
 AC_SUBST(INCLUDES)
 AC_SUBST(ALL_LINGUAS)
@@ -3246,9 +3517,7 @@ AX_VLC_SUBSTS
 dnl Create vlc-config.in
 AX_OUTPUT_VLC_CONFIG_IN
 
-AC_OUTPUT([
-  vlc-config
-
+AC_CONFIG_FILES([
   Makefile
   autotools/Makefile
   debian/Makefile
@@ -3262,7 +3531,9 @@ AC_OUTPUT([
   po/Makefile.in
   share/Makefile
   src/Makefile
+])
 
+AC_CONFIG_FILES([
   modules/access/Makefile
   modules/access/dshow/Makefile
   modules/access/dvb/Makefile
@@ -3273,7 +3544,9 @@ AC_OUTPUT([
   modules/access/pvr/Makefile
   modules/access/satellite/Makefile
   modules/access/v4l/Makefile
+  modules/access/cdda/Makefile
   modules/access/vcd/Makefile
+  modules/access/vcdx/Makefile
   modules/access_output/Makefile
   modules/audio_filter/Makefile
   modules/audio_filter/channel_mixer/Makefile
@@ -3282,19 +3555,10 @@ AC_OUTPUT([
   modules/audio_mixer/Makefile
   modules/audio_output/Makefile
   modules/codec/Makefile
-  modules/codec/a52old/Makefile
-  modules/codec/a52old/downmix/Makefile
-  modules/codec/a52old/imdct/Makefile
-  modules/codec/cinepak/Makefile
-  modules/codec/faad/Makefile
   modules/codec/ffmpeg/Makefile
   modules/codec/ffmpeg/postprocessing/Makefile
-  modules/codec/mpeg_audio/Makefile
-  modules/codec/mpeg_video/Makefile
-  modules/codec/mpeg_video/idct/Makefile
-  modules/codec/mpeg_video/motion/Makefile
+  modules/codec/ogt/Makefile
   modules/codec/spudec/Makefile
-  modules/codec/subsdec/Makefile
   modules/control/Makefile
   modules/control/corba/Makefile
   modules/control/lirc/Makefile
@@ -3316,6 +3580,7 @@ AC_OUTPUT([
   modules/gui/qnx/Makefile
   modules/gui/qt/Makefile
   modules/gui/skins/Makefile
+  modules/gui/skins2/Makefile
   modules/gui/wxwindows/Makefile
   modules/misc/Makefile
   modules/misc/dummy/Makefile
@@ -3327,6 +3592,7 @@ AC_OUTPUT([
   modules/mux/mpeg/Makefile
   modules/packetizer/Makefile
   modules/stream_out/Makefile
+  modules/stream_out/transrate/Makefile
   modules/video_chroma/Makefile
   modules/video_filter/Makefile
   modules/video_filter/deinterlace/Makefile
@@ -3339,11 +3605,12 @@ AC_OUTPUT([
   modules/visualization/scope/Makefile
   modules/visualization/xosd/Makefile
   modules/visualization/visual/Makefile
-],[
-  chmod 0755 vlc-config
 ])
 
-dnl Generate makefiles found by bootstrap
+AC_CONFIG_FILES([vlc-config], [chmod 0755 vlc-config])
+
+dnl Generate makefiles
+AC_OUTPUT
 
 printf "
 vlc configuration