]> git.sesse.net Git - vlc/blobdiff - configure.ac
* http interface: added volume control (relative or absolute) and
[vlc] / configure.ac
index 62839885b4306e53f660eed0a096499cb43c9885..81cbc3230339d7c07cea1b0e27b6434bcdb5bba3 100644 (file)
@@ -1,6 +1,7 @@
 dnl Autoconf settings for vlc
+dnl $Id: configure.ac,v 1.104 2003/11/04 11:11:29 titer Exp $
 
-AC_INIT(vlc,0.6.0)
+AC_INIT(vlc,0.6.3-cvs)
 
 CONFIGURE_LINE="$0 $*"
 CODENAME="Trevelyan"
@@ -12,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.0)
+AM_INIT_AUTOMAKE(vlc,0.6.3-cvs)
 AM_CONFIG_HEADER(config.h)
 
 dnl
@@ -78,7 +79,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}"
@@ -90,6 +91,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([vlc],[-Wl,-multiply_defined,suppress])
     LIBEXT=".dylib"
     ;;
   *mingw32* | *cygwin*)
@@ -115,7 +117,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],[-lws2_32])
+        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])
     fi
     ;;
   *nto*)
@@ -134,11 +136,17 @@ case "${target_os}" in
     CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
     AX_ADD_LDFLAGS([vlc beos],[-lbe])
-    AX_ADD_CXXFLAGS([beos],[])
     AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
-    dnl Check if we have BONE (old net_server doesn't have libsocket.so)
+
+    dnl Check for BONE presence
     AC_CHECK_LIB(socket, connect,
-        AX_ADD_LDFLAGS([vlc access_mms ipv4 httpd],[-lsocket -lbind]))
+        AX_ADD_LDFLAGS([vlc ipv4 access_http access_mms access_udp access_ftp sap http access_output_udp],
+                      [-lbind]))
+
+    dnl Ugly check for Zeta
+    if test -f /boot/beos/system/lib/libzeta.so; then
+        AX_ADD_LDFLAGS([beos],[-lzeta])
+    fi
     ;;
   *)
     SYS="${target_os}"
@@ -151,12 +159,12 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
+ALL_LINGUAS="de en_GB es fr 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
   AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
-  INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
+  INCLUDES="${INCLUDES} -I\$(top_builddir)/intl"
 else
   AC_CHECK_FUNCS(textdomain,,[
     AC_CHECK_LIB(intl,textdomain,
@@ -242,13 +250,29 @@ 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 swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof lseek)
 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
 
+dnl Check for setlocal and langinfo
+AC_CHECK_FUNCS(setlocale)
+AC_CHECK_HEADERS(langinfo.h)
+AC_CHECK_FUNCS(nl_langinfo)
+
+AC_CACHE_CHECK([for nl_langinfo and CODESET], ac_cv_langinfo_codeset,
+  [AC_TRY_LINK([#include <langinfo.h>],
+    [char* cs = nl_langinfo(CODESET);],
+    ac_cv_langinfo_codeset=yes,
+    ac_cv_langinfo_codeset=no)
+  ])
+if test ${ac_cv_langinfo_codeset} = yes; then
+  AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+    [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+fi
+
 AC_CHECK_FUNCS(connect,,[
   AC_CHECK_LIB(socket,connect,[
     AX_ADD_LDFLAGS([vlc ipv4],-lsocket)
@@ -309,7 +333,10 @@ AC_CHECK_FUNCS(inet_aton,,[
   ])
 ])
 
-dnl Check for getopt
+dnl Check for getopt (always use builtin one on win32)
+if test "${SYS}" = "mingw32"; then
+need_getopt=:
+else
 need_getopt=false
 AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
 [ # FreeBSD has a gnugetopt library for this:
@@ -317,24 +344,90 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
     [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support)
      AX_ADD_LDFLAGS([vlc],[-lgnugetopt])],
     [need_getopt=:])])
+fi
 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 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
@@ -438,9 +531,8 @@ 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)
+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)
@@ -718,6 +810,16 @@ if test "${ac_cv_c_attribute_format}" != "no"; then
     AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
 fi
 
+dnl Check for __attribute__(())
+AC_CACHE_CHECK([for __attribute__((packed))],
+  [ac_cv_c_attribute_packed],
+  [ac_cv_c_attribute_packed=no
+   AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b;],
+                    [ac_cv_c_attribute_packed=yes])])
+if test "${ac_cv_c_attribute_packed}" != "no"; then
+  AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
+fi
+
 dnl
 dnl  Check the CPU
 dnl
@@ -730,12 +832,6 @@ case "${target_cpu}" in
     ;;
 esac
 
-case "${ARCH}" in
-  hppa64)
-    AX_ADD_CFLAGS([mpeg_video_old],[-ffunction-sections])
-    ;;
-esac
-
 dnl
 dnl  Enable profiling
 dnl
@@ -749,9 +845,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 audio m4v mpeg_system ps ts avi asf aac mp4 rawdv])
+AX_ADD_PLUGINS([dummy rc logger gestures memcpy hotkeys])
+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([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])
@@ -782,6 +877,8 @@ dnl Some plugins aren't useful on some platforms
 dnl
 if test "${SYS}" != "mingw32"; then
     AX_ADD_PLUGINS([screensaver])
+else
+    AX_ADD_PLUGINS([ntservice])
 fi
 
 dnl
@@ -899,7 +996,7 @@ dnl
 AC_ARG_WITH(tuning,
 [  --with-tuning=ARCH      enable special tuning for an architecture
                           (default i686 on IA-32 and 750 on PPC)])
-if test "${with_tuning}" != ""; then
+if test -n "${with_tuning}"; then
     if test "${target_cpu}" = "powerpc"; then
         CFLAGS_TUNING="-mtune=${with_tuning}"
     else
@@ -960,13 +1057,13 @@ AC_ARG_ENABLE(sout,
 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_dummy])
-  AX_ADD_PLUGINS([packetizer_mpegaudio packetizer_mpegvideo packetizer_a52])
+  AX_ADD_PLUGINS([mux_ts mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
+  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_duplicate stream_out_display])
+  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])
 
   dnl Ogg and vorbis are handled in their respective section
 fi
@@ -991,7 +1088,7 @@ then
   [    --with-dvdcss-tree=PATH libdvdcss tree for static linking])
   case "${with_dvdcss}" in
   ""|yes)
-    if test "${with_dvdcss_tree}" = ""
+    if test -z "${with_dvdcss_tree}"
     then
       AC_CHECK_HEADERS(dvdcss/dvdcss.h,
         [ AX_ADD_PLUGINS([dvd])
@@ -1001,7 +1098,7 @@ then
     else
       AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
       real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
-      if test "${real_dvdcss_tree}" = ""
+      if test -z "${real_dvdcss_tree}"
       then
         dnl  The given directory can't be found
         AC_MSG_RESULT(no)
@@ -1056,15 +1153,15 @@ then
   [    --with-dvdread=PATH    libdvdread headers and libraries])
   AC_ARG_WITH(dvdread-tree,
   [    --with-dvdread-tree=PATH libdvdread tree for static linking])
-  if test "${with_dvdread}" = ""
+  if test -z "${with_dvdread}"
   then
-    if test "${with_dvdread_tree}" = ""
+    if test -z "${with_dvdread_tree}"
     then
       AC_CHECK_HEADERS(dvdread/dvd_reader.h,
         [ AX_ADD_PLUGINS([dvdread])
           AX_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
         ],[
-          if test "${enable_dvdread}" != ""
+          if test -n "${enable_dvdread}"
           then
             AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
             AC_MSG_ERROR([cannot find libdvdread headers])
@@ -1073,7 +1170,7 @@ then
     else
       AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
       real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
-      if test "${real_dvdread_tree}" = ""
+      if test -z "${real_dvdread_tree}"
       then
         dnl  The given directory can't be found
         AC_MSG_RESULT(no)
@@ -1120,16 +1217,16 @@ then
   [    --with-dvdplay=PATH    libdvdplay headers and libraries])
   AC_ARG_WITH(dvdplay-tree,
   [    --with-dvdplay-tree=PATH libdvdplay tree for static linking])
-  if test "${with_dvdplay}" = ""
+  if test -z "${with_dvdplay}"
   then
-    if test "${with_dvdplay_tree}" = ""
+    if test -z "${with_dvdplay_tree}"
     then
       AC_CHECK_HEADERS(dvdplay/dvdplay.h,[
           AX_ADD_PLUGINS([dvdplay])
           AX_ADD_LDFLAGS([dvdplay],[-ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}])
           AX_ADD_CPPFLAGS([dvdplay],[${CPPFLAGS_dvdread}])
         ],[
-          if test "${enable_dvdplay}" != ""
+          if test -n "${enable_dvdplay}"
           then
             AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
             AC_MSG_ERROR([cannot find libdvdplay headers])
@@ -1138,7 +1235,7 @@ then
     else
       AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
       real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
-      if test "${real_dvdplay_tree}" = ""
+      if test -z "${real_dvdplay_tree}"
       then
         dnl  The given directory can't be found
         AC_MSG_RESULT(no)
@@ -1174,6 +1271,22 @@ then
   fi
 fi
 
+dnl
+dnl  Windows DirectShow access module
+dnl
+AC_ARG_ENABLE(dshow,
+  [  --enable-dshow       Win32 DirectShow support (default enabled on Win32)])
+if test "${enable_dshow}" != "no"
+then
+  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+  then
+      AC_CHECK_HEADERS(dshow.h,
+      [ AX_ADD_PLUGINS([dshow])
+        AX_ADD_CXXFLAGS([dshow],[])
+        AX_ADD_LDFLAGS([dshow],[-lole32 -loleaut32]) ])
+  fi
+fi
+
 dnl
 dnl  libdvbpsi ts demux/mux
 dnl
@@ -1187,7 +1300,7 @@ then
   [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
   case "${with_dvbpsi}" in
   ""|yes)
-    if test "${with_dvbpsi_tree}" = ""
+    if test -z "${with_dvbpsi_tree}"
     then
       AC_CHECK_HEADERS(dvbpsi/dr.h,
         [ AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi])
@@ -1205,7 +1318,7 @@ then
     else
       AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
       real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
-      if test "${real_dvbpsi_tree}" = ""
+      if test -z "${real_dvbpsi_tree}"
       then
         dnl  The given directory can't be found
         AC_MSG_RESULT(no)
@@ -1230,7 +1343,7 @@ then
   ;;
   *)
     AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
-    if test "${with_dvbpsi}" = ""
+    if test -z "${with_dvbpsi}"
     then
       LDFLAGS_test=""
       CPPFLAGS_test=""
@@ -1245,7 +1358,7 @@ then
       AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[${LDFLAGS_test} -ldvbpsi])
 
     ],[
-      if test "${enable_dvbpsi}" != ""
+      if test -n "${enable_dvbpsi}"
       then
         AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
       fi
@@ -1262,9 +1375,18 @@ AC_ARG_ENABLE(v4l,
   [  --enable-v4l            Video4Linux input support (default disabled)])
 if test "${enable_v4l}" = "yes"
 then
+  AC_ARG_WITH(v4l,
+    [    --with-v4l=PATH       path to a v4l-enabled kernel tree],[],[])
+  if test "${with_v4l}" != "no" -a -n "${with_v4l}"
+  then
+    AX_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
+  fi
+
+  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l}"
   AC_CHECK_HEADERS(linux/videodev.h, [
     AX_ADD_PLUGINS([v4l])
-   ],[])
+  ],[])
+  CPPFLAGS="${CPPFLAGS_save}"
 fi
 
 dnl
@@ -1323,6 +1445,29 @@ then
   fi
 fi
 
+dnl
+dnl  VCDX and CDX modules
+dnl
+AC_ARG_ENABLE(vcdx,
+  [  --enable-vcdx            VCD support with Navigation for Linux and Win32 (default enabled)])
+
+if test "${enable_vcdx}" != "no"
+then
+  PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.63,
+   [enable_cdda="no"
+    AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
+    AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
+    AX_ADD_PLUGINS([cddax])], 
+   [AC_MSG_WARN(libcdio library not found)])
+
+  PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.18-cdio,
+   [enable_vcd="no"
+    AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
+    AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
+    AX_ADD_PLUGINS([vcdx])], 
+   [AC_MSG_WARN(vcdinfo library not found)])
+fi
+
 dnl
 dnl  Satellite input module
 dnl
@@ -1333,6 +1478,27 @@ AC_ARG_ENABLE(satellite,
       AX_ADD_PLUGINS([satellite])
     fi])
 
+dnl
+dnl  DVB-S/DVB-T/DVB-C satellite/teresterial/cable input using v4l2
+dnl
+AC_ARG_ENABLE(dvb,
+  [  --enable-dvb            DVB-S/T/C card support (default disabled)])
+
+if test "${enable_dvb}" = "yes"
+then
+  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}"
+  then
+    AX_ADD_CFLAGS([dvb],[-I${with_dvb}/include])
+  fi
+  CPPFLAGS="${CPPFLAGS_save} -I${with_dvb}/include"
+  AC_CHECK_HEADERS(linux/dvb/version.h linux/dvb/frontend.h, [
+    AX_ADD_PLUGINS([dvb])
+  ],[])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
 dnl
 dnl  ipv6 plugin - not for QNX yet
 dnl
@@ -1378,18 +1544,20 @@ dnl
 dnl  matroska demux plugin
 dnl
 AC_ARG_ENABLE(mkv,
-  [  --enable-mkv            Matroska demux support (default disabled)])
-if test "${enable_mkv}" = "yes"
+  [  --enable-mkv            Matroska demux support (default enabled)])
+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/include/ebml -I/usr/include/matroska"
-  AC_CHECK_HEADERS(EbmlVersion.h 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/include/ebml -I/usr/include/matroska])
-    AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
-  ],[
-    AC_MSG_ERROR([libebml or libmatroska include files not found])
+    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])
+    ])
   ])
   CPPFLAGS="${CPPFLAGS_save}"
 AC_LANG_POP(C++)
@@ -1410,7 +1578,7 @@ if test "${enable_mad}" != "no"
 then
   AC_ARG_WITH(mad,
     [    --with-mad=PATH       path to libmad],[],[])
-  if test "${with_mad}" != "no" -a "${with_mad}" != ""
+  if test "${with_mad}" != "no" -a -n "${with_mad}"
   then
     AX_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
     AX_ADD_LDFLAGS([mpgatofixed32],[-L${with_mad}/lib])
@@ -1418,10 +1586,10 @@ then
 
   AC_ARG_WITH(mad-tree,
     [    --with-mad-tree=PATH  mad tree for static linking],[],[])
-  if test "${with_mad_tree}" != "no" -a "${with_mad_tree}" != ""
+  if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
   then
     real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
-    if test "${real_mad_tree}" = ""
+    if test -z "${real_mad_tree}"
     then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
@@ -1474,13 +1642,29 @@ AC_ARG_ENABLE(ffmpeg,
 [  --enable-ffmpeg         ffmpeg codec (default enabled)])
 if test "${enable_ffmpeg}" != "no"
 then
+  AC_ARG_WITH(ffmpeg-mp3lame,
+    [    --with-ffmpeg-mp3lame   if ffmpeg has been compiled with mp3lame 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],[-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])
 
   dnl
   dnl test for !(--with-ffmpeg-tree)
   dnl
-  if test "${with_ffmpeg_tree}" == "no" -o "${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)
@@ -1498,10 +1682,10 @@ then
   dnl
   dnl test for --with-ffmpeg-tree
   dnl
-  if test "${with_ffmpeg_tree}" != "no" -a "${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 "${real_ffmpeg_tree}" = ""; then
+    if test -z "${real_ffmpeg_tree}"; then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
@@ -1523,11 +1707,6 @@ then
       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
     fi
   fi
-
-  dnl Duplicate the ffmpeg CPPFLAGS and LDFLAGS for the encoder
-  AX_ADD_CPPFLAGS([encoder_ffmpeg],[${CPPFLAGS_ffmpeg}])
-  dnl XXX: we don't link with -lavcodec blah blah blah
-  dnl AX_ADD_LDFLAGS([encoder_ffmpeg],[${LDFLAGS_ffmpeg}])
 fi
 
 dnl
@@ -1539,11 +1718,11 @@ if test "${enable_faad}" = "yes"
 then
   AC_ARG_WITH(faad-tree,
   [    --with-faad-tree=PATH faad tree for static linking])
-  if test "${with_faad_tree}" != ""
+  if test -n "${with_faad_tree}"
   then
     AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
     real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
-    if test "${real_faad_tree}" = ""
+    if test -z "${real_faad_tree}"
     then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
@@ -1556,14 +1735,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)
@@ -1576,11 +1747,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}"
@@ -1597,7 +1764,7 @@ if test "${enable_xvid}" = "yes"
 then
   AC_ARG_WITH(xvid,
     [    --with-xvid=PATH      path to xvid installation],[],[])
-  if test "${with_xvid}" != "no" -a "${with_xvid}" != ""
+  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])
@@ -1605,11 +1772,11 @@ then
 
   AC_ARG_WITH(xvid-tree,
   [    --with-xvid-tree=PATH xvid tree for static linking])
-  if test "${with_xvid_tree}" != ""
+  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 "${real_xvid_tree}" = ""
+    if test -z "${real_xvid_tree}"
     then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
@@ -1639,10 +1806,6 @@ then
     LDFLAGS="${LDFLAGS_save}"
     CPPFLAGS="${CPPFLAGS_save}"
   fi
-
-  dnl Duplicate the xvid CPPFLAGS and LDFLAGS for the encoder
-  AX_ADD_LDFLAGS([encoder_xvid],[${LDFLAGS_xvid}])
-  AX_ADD_CPPFLAGS([encoder_xvid],[${CPPFLAGS_xvid}])
 fi
 
 dnl
@@ -1653,17 +1816,21 @@ AC_ARG_ENABLE(quicktime,
 if test "${enable_quicktime}" != "no" &&
   (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes")
 then
+  if test "${SYS}" = "mingw32"; then
+    AX_ADD_BUILTINS([quicktime])
+  else
   AC_CHECK_HEADERS(QuickTime/QuickTime.h,
     [ AX_ADD_BUILTINS([quicktime])
       AX_ADD_LDFLAGS([quicktime],[-framework QuickTime -framework Carbon])
-    ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
+    ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
+  fi
 fi
 
 dnl
 dnl MP4 module
 dnl
 AC_CHECK_HEADERS(zlib.h, [
-  AX_ADD_LDFLAGS([mp4 skins basic_skins],[-lz])
+  AX_ADD_LDFLAGS([mp4 skins],[-lz])
 ] )
 
 
@@ -1671,7 +1838,7 @@ dnl
 dnl skins module
 dnl
 AC_CHECK_HEADERS(libtar.h, [
-  AX_ADD_LDFLAGS([skins basic_skins],[-ltar])
+  AX_ADD_LDFLAGS([skins],[-ltar])
 ] )
 
 
@@ -1687,10 +1854,10 @@ then
     [    --with-a52=PATH       a52 headers and libraries])
   AC_ARG_WITH(a52-tree,
     [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
-  if test "${with_a52_tree}" != "no" -a "${with_a52_tree}" != ""
+  if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
   then
     real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
-    if test "${real_a52_tree}" = ""
+    if test -z "${real_a52_tree}"
     then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
@@ -1722,7 +1889,7 @@ then
       AC_MSG_ERROR([the specified tree doesn't have a52.h])
     fi
   else
-    if test "${with_a52}" = ""
+    if test -z "${with_a52}"
     then
       LDFLAGS_test=""
       CPPFLAGS_test=""
@@ -1781,11 +1948,11 @@ if test "${enable_libmpeg2}" != "no"
 then
   AC_ARG_WITH(libmpeg2-tree,
   [    --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
-  if test "${with_libmpeg2_tree}" != ""
+  if test -n "${with_libmpeg2_tree}"
   then
     AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
     real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
-    if test "${real_libmpeg2_tree}" = ""
+    if test -z "${real_libmpeg2_tree}"
     then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
@@ -1834,11 +2001,10 @@ if test "${enable_vorbis}" != "no"
 then
   AC_CHECK_HEADERS(vorbis/codec.h, [
     AX_ADD_PLUGINS([vorbis])
-    AX_ADD_LDFLAGS([vorbis],[-lvorbis -logg])
-    if test "${enable_sout}" != "no"; then
-      AX_ADD_PLUGINS([packetizer_vorbis])
-      AX_ADD_LDFLAGS([packetizer_vorbis],[-lvorbis -logg])
-    fi ],[])
+    AX_ADD_LDFLAGS([vorbis],[-lvorbis -logg]) ],[])
+
+  AC_CHECK_HEADERS(vorbis/vorbisenc.h, [
+    AX_ADD_LDFLAGS([vorbis],[-lvorbisenc]) ],[])
 fi
 
 dnl
@@ -1854,6 +2020,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
@@ -1863,7 +2041,7 @@ if test "${enable_tarkin}" = "yes"
 then
   AC_ARG_WITH(tarkin-tree,
   [    --with-tarkin-tree=PATH tarkin tree for static linking])
-  if test "${with_tarkin_tree}" != ""
+  if test -n "${with_tarkin_tree}"
   then
     AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
     real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
@@ -1891,14 +2069,38 @@ if test "${enable_theora}" = "yes"
 then
   AC_CHECK_HEADERS(theora/theora.h, [
     AC_CHECK_LIB(theora, theora_granule_time, [
-      AX_ADD_BUILTINS([theora])
-      AX_ADD_LDFLAGS([theora],[-ltheora -logg]) ],[
+      if test "${SYS}" = "mingw32"; then
+        AX_ADD_PLUGINS([theora])
+      else
+        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.])],
       [-logg])
   ])
 fi
 
+dnl
+dnl   subsdec support
+dnl
+AX_ADD_LDFLAGS([subsdec],[${LIBICONV}])
+AX_ADD_CPPFLAGS([subsdec],[${INCICONV}])
+AX_ADD_PLUGINS([subsdec])
+
+
+dnl
+dnl  Video Filters
+dnl
+
+dnl
+dnl   png
+dnl
+AC_CHECK_HEADERS(png.h, [
+    AX_ADD_LDFLAGS([logo],[-lpng -lz])
+    AX_ADD_PLUGINS([logo])])
+
 dnl
 dnl  Video plugins
 dnl
@@ -2020,7 +2222,7 @@ then
     [    --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
                                e.g use as:
                                --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
-  if test "${with_sdl_prefix}" != "no" -a "${with_sdl_prefix}" != ""
+  if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
   then
     SDL_PREFIX="--prefix=${with_sdl_prefix}"
   fi
@@ -2058,6 +2260,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}"
@@ -2071,9 +2275,11 @@ then
 
   if test "${FREETYPE_CONFIG}" != "no"
   then
-    AX_ADD_PLUGINS([osdtext])
-    AX_ADD_CFLAGS([osdtext],[`${FREETYPE_CONFIG} --cflags`])
-    AX_ADD_LDFLAGS([osdtext],[`${FREETYPE_CONFIG} --libs`])
+    AX_ADD_PLUGINS([freetype])
+    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}"
   elif test "${enable_freetype}" =  "yes"
   then
@@ -2081,6 +2287,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
@@ -2093,7 +2318,7 @@ if test "${enable_qte}" = "yes"
 then
   AC_ARG_WITH(qte,
   [    --with-qte=PATH       Qt Embedded headers and libraries])
-  if test "${with_qte}" != "no" -a "${with_qte}" != ""
+  if test "${with_qte}" != "no" -a -n "${with_qte}"
   then
     AX_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
     AX_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])
@@ -2121,7 +2346,7 @@ then
   then
     AC_ARG_WITH(directx,
     [    --with-directx=PATH   Win32 DirectX headers])
-    if test "${with_directx}" = ""
+    if test -z "${with_directx}"
     then
       AC_CHECK_HEADERS(ddraw.h,
       [ AX_ADD_PLUGINS([vout_directx aout_directx])
@@ -2161,7 +2386,7 @@ AC_ARG_ENABLE(mga,
   [  --enable-mga            Linux kernel Matrox support (default disabled)],
   [ if test "${enable_mga}" = "yes"
     then
-      AX_ADD_PLUGINS([mga xmga])
+      AX_ADD_PLUGINS([mga])
     fi ])
 
 dnl
@@ -2186,7 +2411,7 @@ then
   AX_ADD_LDFLAGS([ggi],[-lggi])
   AC_ARG_WITH(ggi,
     [    --with-ggi=PATH       path to libggi],
-    [ if test "${with_ggi}" != "no" -a "${with_ggi}" != ""
+    [ if test "${with_ggi}" != "no" -a -n "${with_ggi}"
       then
         AX_ADD_CPPFLAGS([ggi],[-I${with_ggi}/include])
         AX_ADD_LDFLAGS([ggi],[-L${with_ggi}/lib])
@@ -2205,7 +2430,7 @@ then
   AX_ADD_CPPFLAGS([glide],[-I/usr/include/glide])
   AC_ARG_WITH(glide,
     [    --with-glide=PATH     path to libglide],
-    [ if test "${with_glide}" != "no" -a "${with_glide}" != ""
+    [ if test "${with_glide}" != "no" -a -n "${with_glide}"
       then
         AX_ADD_CPPFLAGS([glide],[-I${with_glide}/include])
         AX_ADD_LDFLAGS([glide],[-L${with_glide}/lib])
@@ -2364,72 +2589,27 @@ dnl
 AC_ARG_ENABLE(skins,
   [  --enable-skins          Skins interface module (default enabled on Win32)])
 if test "${enable_skins}" != "no"; then
-  WXWINDOWS_PATH="${PATH}"
-  AC_ARG_WITH(skins-wx-config-path,
-    [    --with-skins-wx-config-path=PATH wx-config path for the skins plugin (default search in \$PATH)],
-    [ if test "${with_skins_wx_config_path}" != "no"
-      then
-        WXWINDOWS_PATH="${with_skins_wx_config_path}:${PATH}"
-      fi ])
-  # look for wx-config
-  AC_PATH_PROG(WX_CONFIG_SKINS, wx-config, no, ${WXWINDOWS_PATH})
-  if test "${WX_CONFIG_SKINS}" != "no"
-  then
-    if expr 2.3.0 \> `${WX_CONFIG_SKINS} --version` >/dev/null
-    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-skins.])
-    fi
-    AX_ADD_CPPFLAGS([skins],[`${WX_CONFIG_SKINS} --cxxflags` -DWX_SKINS])
-    AX_ADD_LDFLAGS([skins],[`${WX_CONFIG_SKINS} --libs`])
-  fi
-
   if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+
     AX_ADD_PLUGINS([skins])
+    ALIASES="${ALIASES} svlc"
     AX_ADD_CPPFLAGS([skins],[-U_OFF_T_ -U_off_t -Imodules/gui/skins])
     AX_ADD_CXXFLAGS([skins],[-O2 -fno-rtti])
     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])
-      AX_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS])
-      AX_ADD_CXXFLAGS([skins],[-O2 -fno-rtti])
-      AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`])
-      AX_ADD_PLUGINS([skins])
-    fi
-  fi
-fi
-
-dnl
-dnl Basic skins module (i.e. without wxWindows dialogs)
-dnl
-AC_ARG_ENABLE(basic-skins,
-  [  --enable-basic-skins    Skins interface module without wxWindows dialogs (default disabled)])
-if test "${enable_basic_skins}" = "yes"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
-
-    AX_ADD_CPPFLAGS([basic_skins],[-U_OFF_T_ -U_off_t -Imodules/gui/skins])
-    AX_ADD_CXXFLAGS([basic_skins],[-O2 -fno-rtti])
-    AX_ADD_LDFLAGS([basic_skins],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
-
-  else
+  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-basic-skins.])
+    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_CPPFLAGS([basic_skins],[-Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS])
-    AX_ADD_CXXFLAGS([basic_skins],[-O2 -fno-rtti])
-    AX_ADD_LDFLAGS([basic_skins],[-L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`])
-  fi
-
-  AX_ADD_PLUGINS([basic_skins])
+    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_CXXFLAGS([skins],[-O2 -fno-rtti])
+    AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`])
+  fi fi
 fi
 
 dnl
@@ -2486,103 +2666,39 @@ then
 fi
 
 dnl
-dnl  Gtk+2 module
+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)])
+dnl if test "${enable_gtk2}" = "yes"
+dnl then
+dnl   PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
+dnl   AX_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
+dnl   AX_ADD_LDFLAGS([gtk2],[${GTK2_LIBS}])
+dnl   AX_ADD_PLUGINS([gtk2])
+dnl   if test "${SYS}" != "mingw32"; then
+dnl     NEED_GTK2_MAIN=yes
+dnl   fi
+dnl fi
+
+dnl
+dnl  PDA Gtk+2 module
 dnl
-AC_ARG_ENABLE(gtk2,
-  [  --enable-gtk2           Gtk2 support (default disabled)])
-if test "${enable_gtk2}" = "yes"
+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_PLUGINS([gtk2])
+  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  Familiar module uses Gtk+ library
-dnl
-AC_ARG_ENABLE(familiar,
-  [  --enable-familiar       Familiar Gtk+ support (default disabled)])
-if test "${enable_familiar}" = "yes"
-then
-  GTK_PATH="${PATH}"
-  AC_ARG_WITH(gtk-config-path,
-    [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
-    [ if test "${with_gtk_config_path}" != "no"
-      then
-        GTK_PATH="${with_gtk_config_path}:${PATH}"
-      fi ])
-  # look for gtk-config
-  AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
-  GTK_CONFIG=${GTK12_CONFIG}
-  if test "${GTK_CONFIG}" = "no"
-  then
-    AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
-  fi
-  # check for cross-compiling
-  GTK_PREFIX=
-  AC_ARG_WITH(gtk-prefix,
-    [    --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
-                          e.g use as:
-                          --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
-  if test "${with_gtk_prefix}" != "no" -a "${with_gtk_prefix}" != ""
-  then
-    GTK_PREFIX="--prefix=${with_gtk_prefix}"
-  fi
-  if test "${GTK_CONFIG}" != "no"
-  then
-    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
-    then
-      AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
-    fi
-    AX_ADD_CFLAGS([familiar],[`${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`])
-    AX_ADD_LDFLAGS([familiar],[`${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`])
-    # now look for the gtk.h header
-    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
-    ac_cv_gtk_headers=yes
-    AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
-      ac_cv_gtk_headers=no
-      echo "Cannot find gtk development headers."
-    ])
-    if test "${ac_cv_gtk_headers}" = "yes"
-    then
-      AX_ADD_PLUGINS([familiar])
-    fi
-    CPPFLAGS="${CPPFLAGS_save}"
-
-    # now look for gpe support
-    AC_ARG_WITH(gpe-prefix,
-    [    --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
-    if test "${with_gpe_prefix}" != "no"  -a "${with_gpe_prefix}" != ""
-    then
-      AX_ADD_CFLAGS([gpe],[-I${with_gpe_prefix}/include])
-      AX_ADD_LDFLAGS([gpe],[-lXi -lgdk_pixbuf -L${with_gpe_prefix}/lib -lgpewidget])
-      # now look for gpe/init.h header file
-      CFLAGS_save="${CFLAGS}"
-      LDFLAGS_save="${LDFLAGS}"
-      CFLAGS="${CFLAGS_familiar} ${CFLAGS_gpe}"
-      LDFLAGS="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
-      CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar} ${CFLAGS_gpe}"
-      ac_cv_gpe_headers=yes
-      AC_CHECK_HEADERS(gpe/init.h, ,
-        [ ac_cv_gpe_headers=no
-          AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
-      CFLAGS="${CFLAGS_save}"
-      LDFLAGS="${LDFLAG_save}"
-      if test "${ac_cv_gpe_headers}" = "yes"
-      then
-        AX_ADD_CFLAGS([familiar],[${CFLAGS_gpe}])
-        AX_ADD_LDFLAGS([familiar],[${LDFLAGS_gpe}])
-      fi
-    else
-         NEED_GTK_MAIN=yes
-    fi # end gpe support
-  fi # end gtk+ support
-fi
-
 dnl
 dnl  Gnome module
 dnl
@@ -2618,20 +2734,20 @@ developement tools or remove the --enable-gnome option])
   fi])
 
 dnl
-dnl  Gnome2 module
+dnl  Gnome2 module ! Disabled for know as it is unuseable and confuses users
 dnl
-AC_ARG_ENABLE(gnome2,
-  [  --enable-gnome2         Gnome2 support (default disabled)])
-if test "${enable_gnome2}" = "yes"
-then
-  PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
-  AX_ADD_CFLAGS([gnome2],[${GNOME2_CFLAGS}])
-  AX_ADD_LDFLAGS([gnome2],[${GNOME2_LIBS}])
-  AX_ADD_PLUGINS([gnome2])
-  if test "${SYS}" != "mingw32"; then
-    NEED_GNOME2_MAIN=yes
-  fi
-fi
+dnl AC_ARG_ENABLE(gnome2,
+dnl   [  --enable-gnome2         Gnome2 support (default disabled)])
+dnl if test "${enable_gnome2}" = "yes"
+dnl then
+dnl   PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
+dnl   AX_ADD_CFLAGS([gnome2],[${GNOME2_CFLAGS}])
+dnl   AX_ADD_LDFLAGS([gnome2],[${GNOME2_LIBS}])
+dnl   AX_ADD_PLUGINS([gnome2])
+dnl   if test "${SYS}" != "mingw32"; then
+dnl     NEED_GNOME2_MAIN=yes
+dnl   fi
+dnl fi
 
 dnl
 dnl  wxWindows module
@@ -2655,6 +2771,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
@@ -2670,6 +2787,7 @@ then
       ALIASES="${ALIASES} wxvlc"
     fi
     CPPFLAGS="${CPPFLAGS_save}"
+    AC_LANG_POP(C++)
   fi
 fi
 
@@ -2741,7 +2859,7 @@ AC_ARG_ENABLE(opie,
   [if test "${enable_opie}" = "yes"; then
      AC_ARG_WITH(qte,
      [    --with-qte=PATH       Qt Embedded headers and libraries])
-     if test "${with_qte}" != "no" -a "${with_qte}" != ""
+     if test "${with_qte}" != "no" -a -n "${with_qte}"
      then
        AX_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
        AX_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])
@@ -2759,7 +2877,7 @@ AC_ARG_ENABLE(opie,
      NEED_QTE_MAIN=yes
      AX_ADD_LDFLAGS([opie],[-lqpe ${LDFLAGS_qte}])
      AX_ADD_CXXFLAGS([opie],[${CXXFLAGS_qte}])
-     if test "${with_qte}" != "no" -a "${with_qte}" != ""
+     if test "${with_qte}" != "no" -a -n "${with_qte}"
      then
        MOC=${with_qte}/bin/moc
      else
@@ -2827,6 +2945,54 @@ then
   fi
 fi
 
+dnl
+dnl Visualisation plugin
+dnl
+AC_ARG_ENABLE(visual,
+  [  --enable-visual           visualisation plugin (default enabled)])
+if test "${enable_visual}" != "no"
+then
+    AX_ADD_PLUGINS([visual])
+fi
+
+dnl
+dnl  goom visualization plugin
+dnl
+AC_ARG_ENABLE(goom,
+[  --enable-goom         goom visualisation plugin (default disabled)])
+if test "${enable_goom}" = "yes"
+then
+  AC_ARG_WITH(goom-tree,
+    [    --with-goom-tree=PATH goom tree for static linking (required)])
+
+  dnl
+  dnl test for --with-goom-tree
+  dnl
+  if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}";then
+    AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
+    real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
+    if test -z "${real_goom_tree}"; then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_goom_tree}])
+    fi
+    if test -f "${real_goom_tree}/libgoom.a"; then
+      AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
+      AX_ADD_BUILTINS([goom])
+      AX_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom])
+      AX_ADD_CPPFLAGS([goom],[-I${real_goom_tree}])
+    else
+      dnl  The given libgoom wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_goom_tree}/libgoom.a, make sure you compiled goom in ${with_goom_tree}])
+    fi
+  else
+    dnl  The --with-goom-tree isn't specified wasn't built
+    AC_MSG_RESULT(no)
+    AC_MSG_ERROR([You have to specify a tree with --with-goom-tree])
+  fi
+fi
+
 dnl
 dnl  SLP access plugin
 dnl
@@ -2836,13 +3002,14 @@ if test "${enable_slp}" != "no"
 then
   AC_ARG_WITH(slp,
   [    --with-slp=PATH       libslp headers and libraries])
-  if test "${with_slp}" = ""
+  if test -z "${with_slp}"
   then
-    AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
+    AC_CHECK_HEADERS(slp.h, have_slp="true", have_slp="false")
     if test "${have_slp}" = "true"
     then
       AX_ADD_PLUGINS([slp])
       AX_ADD_LDFLAGS([slp],[-lslp])
+      AX_ADD_LDFLAGS([stream_out_standard],[-lslp])
     fi
   else
     AC_MSG_CHECKING(for slp headers in ${with_slp})
@@ -2852,7 +3019,9 @@ then
       AC_MSG_RESULT(yes)
       AX_ADD_PLUGINS([slp])
       AX_ADD_LDFLAGS([slp],[-L${with_slp} -lslp])
+      AX_ADD_LDFLAGS([stream_out_standard],[-L${with_slp} -lslp])
       AX_ADD_CPPFLAGS([slp],[-I${with_slp}])
+      AC_DEFINE(HAVE_SLP_H)
     else
       dnl  No libslp could be found, sorry
       AC_MSG_RESULT(no)
@@ -2876,6 +3045,50 @@ then
   fi
 fi
 
+dnl 
+dnl  Joystick plugin
+dnl
+AC_ARG_ENABLE(joystick,
+  [  --enable-joystick       joystick control (default disabled)])
+if test "${enable_joystick}" = "yes"
+then
+ AC_CHECK_HEADER( linux/joystick.h, 
+               [AX_ADD_PLUGINS([joystick])]
+               )
+fi
+
+
+dnl
+dnl corba (ORBit) plugin
+dnl
+AC_ARG_ENABLE(corba,
+  [  --enable-corba          corba interface support (default disabled)])
+if test "${enable_corba}" = "yes"; then
+  ORBIT_PATH="${PATH}"
+  AC_ARG_WITH(orbit-config-path,
+  [    --with-orbit-config-path=PATH orbit-config path (default search in \$PATH)])
+  if test "${with_orbit_config_path}" != "no"; then
+    ORBIT_PATH="${with_orbit_config_path}:${PATH}"
+  fi
+  # look for orbit2-config
+  AC_PATH_PROG(ORBIT_CONFIG, orbit2-config, no, ${ORBIT_PATH})
+  if test "${ORBIT_CONFIG}" != "no"; then
+    AX_ADD_CFLAGS(corba,[`${ORBIT_CONFIG} --cflags server`])
+    AX_ADD_LDFLAGS(corba,[`${ORBIT_CONFIG} --libs server | sed 's,-rdynamic,,'`])
+    # now look for the orbit.h header
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_corba}"
+    ac_cv_corba_headers=yes
+    AC_CHECK_HEADERS(orbit/orbit.h, , [
+      ac_cv_corba_headers=no
+      AC_MSG_ERROR([Could not find corba development headers])
+    ])
+    if test "${ac_cv_corba_headers}" = "yes"; then
+      AX_ADD_PLUGINS(corba)
+    fi
+    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+fi
+
 AC_ARG_WITH(,[Misc options:])
 
 dnl
@@ -2943,11 +3156,13 @@ 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"
+  if test "${MOZILLA_CONFIG}" = "no"
   then
+    AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+  else
     if test "${SYS}" != "mingw32"; then
       LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
       AC_CHECK_LIB(Xt,XtStrings,[
@@ -2959,12 +3174,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 "${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})
 
@@ -2993,24 +3226,24 @@ dnl
 if test "${NEED_GTK_MAIN}" != "no"
 then
     AX_ADD_PLUGINS([gtk_main])
-    AX_ADD_CFLAGS([gtk familiar],[-DNEED_GTK_MAIN])
-    AX_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk} ${CFLAGS_familiar}])
-    AX_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk} ${LDFLAGS_familiar}])
+    AX_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
+    AX_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
 fi
 
 if test "${NEED_GNOME_MAIN}" != "no"
 then
     AX_ADD_PLUGINS([gnome_main])
-    AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}])
-    AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}])
+    AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_pda} ${CFLAGS_gnome}])
+    AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_pda} ${LDFLAGS_gnome}])
 fi
 
 if test "${NEED_GTK2_MAIN}" != "no"
 then
     AX_ADD_PLUGINS([gtk2_main])
     AX_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
-    AX_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2}])
-    AX_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2}])
+    AX_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
+    AX_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
+    AX_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
 fi
 
 if test "${NEED_GNOME2_MAIN}" != "no"
@@ -3049,7 +3282,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."
@@ -3102,7 +3335,7 @@ AC_SUBST(PLUGIN_PATH)
 dnl
 dnl  Handle substvars that use $(top_srcdir)
 dnl
-VLC_CONFIG="\$(top_srcdir)/vlc-config"
+VLC_CONFIG="top_builddir=\"\$(top_builddir)\" \$(top_builddir)/vlc-config"
 AC_SUBST(VLC_CONFIG)
 CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"
 
@@ -3127,6 +3360,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)
@@ -3148,12 +3382,15 @@ AC_OUTPUT([
   ipkg/Makefile
   lib/Makefile
   modules/Makefile
+  mozilla/Makefile
   m4/Makefile
   po/Makefile.in
   share/Makefile
   src/Makefile
 
   modules/access/Makefile
+  modules/access/dshow/Makefile
+  modules/access/dvb/Makefile
   modules/access/dvd/Makefile
   modules/access/dvdplay/Makefile
   modules/access/dvdread/Makefile
@@ -3162,6 +3399,7 @@ AC_OUTPUT([
   modules/access/satellite/Makefile
   modules/access/v4l/Makefile
   modules/access/vcd/Makefile
+  modules/access/vcdx/Makefile
   modules/access_output/Makefile
   modules/audio_filter/Makefile
   modules/audio_filter/channel_mixer/Makefile
@@ -3170,34 +3408,22 @@ 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/spudec/Makefile
   modules/control/Makefile
+  modules/control/corba/Makefile
   modules/control/lirc/Makefile
   modules/control/rc/Makefile
   modules/demux/Makefile
-  modules/demux/aac/Makefile
   modules/demux/asf/Makefile
   modules/demux/avi/Makefile
   modules/demux/mp4/Makefile
   modules/demux/mpeg/Makefile
   modules/demux/util/Makefile
-  modules/demux/wav/Makefile
-  modules/encoder/Makefile
-  modules/encoder/ffmpeg/Makefile
   modules/gui/Makefile
   modules/gui/beos/Makefile
-  modules/gui/familiar/Makefile
+  modules/gui/pda/Makefile
   modules/gui/gtk/Makefile
   modules/gui/gtk2/Makefile
   modules/gui/kde/Makefile
@@ -3206,7 +3432,6 @@ AC_OUTPUT([
   modules/gui/qnx/Makefile
   modules/gui/qt/Makefile
   modules/gui/skins/Makefile
-  modules/gui/win32/Makefile
   modules/gui/wxwindows/Makefile
   modules/misc/Makefile
   modules/misc/dummy/Makefile
@@ -3229,6 +3454,7 @@ AC_OUTPUT([
   modules/visualization/Makefile
   modules/visualization/scope/Makefile
   modules/visualization/xosd/Makefile
+  modules/visualization/visual/Makefile
 ],[
   chmod 0755 vlc-config
 ])