]> git.sesse.net Git - vlc/blobdiff - configure.ac.in
* Fixed support of wheel for playlist with GTK2
[vlc] / configure.ac.in
index 287e18b51584eaeeba8f1213faae5eb169dda528..9600dc8ad71b96b0f68bb79a1e719e92d109ffc2 100644 (file)
@@ -1,17 +1,18 @@
 dnl Autoconf settings for vlc
 
-AC_INIT(vlc,0.5.0-test4)
+AC_INIT(vlc,0.5.4-cvs)
 
 CONFIGURE_LINE="$0 $*"
 CODENAME="Natalya"
 
 AC_PREREQ(2.50)
 AC_CONFIG_SRCDIR(src/libvlc.c)
+AC_CONFIG_AUX_DIR(autotools)
 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.5.0-test4)
+AM_INIT_AUTOMAKE(vlc,0.5.4-cvs)
 AM_CONFIG_HEADER(config.h)
 
 dnl
@@ -95,6 +96,7 @@ case "x${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}"
     LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
+    LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -all_load"
     LIBEXT=".dylib"
     ;;
   x*mingw32* | x*cygwin*)
@@ -120,7 +122,7 @@ case "x${target_os}" in
         # add ws2_32 for closesocket, select, recv
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
         CPPFLAGS="${CPPFLAGS_save}"
-        LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -mwindows"
+        LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -lwinmm -mwindows"
         LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
         LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
         LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
@@ -128,8 +130,9 @@ case "x${target_os}" in
         LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
         LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
         LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
-        LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
         LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
+        LDFLAGS_slp="${LDFLAGS_slp} -lws2_32"
+        LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32"
     fi
     ;;
   x*nto*)
@@ -150,11 +153,12 @@ case "x${target_os}" in
     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
     LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
-    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
-    dnl BONE or not BONE ?
+    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation -lgame"
+    dnl BONE or not BONE ? only BONE has libbind.so
     AC_CHECK_LIB( bind, inet_ntoa,
-        [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
-          LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"],
+        [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
+          LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
+          LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind"],
         [])
     ;;
   x*)
@@ -169,7 +173,7 @@ dnl
 dnl Gettext stuff
 dnl
 ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
-AM_GNU_GETTEXT_VERSION(0.10.40)
+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)
@@ -183,7 +187,7 @@ else
   ])
 fi
 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
-XGETTEXT="${XGETTEXT} --keyword=_NS"
+XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
 
 AC_MSG_CHECKING(for suffix of libraries)
 AC_MSG_RESULT(${LIBEXT})
@@ -206,13 +210,19 @@ then
         [CFLAGS="${CFLAGS_save} -mms-bitfields"
          AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
     if test x"$ac_cv_c_mms_bitfields" != x"no"; then
-        CFLAGS_mingw32_special="-mms-bitfields"
+        CFLAGS_save="${CFLAGS_save} -mms-bitfields";
+        CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
     else
-        CFLAGS_mingw32_special="-fnative-struct"
+        AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
+            [ac_cv_c_fnative_struct],
+            [CFLAGS="${CFLAGS_save} -fnative-struct"
+             AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
+        if test x"$ac_cv_c_fnative_struct" != x"no"; then
+            CFLAGS_save="${CFLAGS_save} -fnative-struct";
+            CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
+        fi
     fi
 
-    CFLAGS_save="${CFLAGS_save} ${CFLAGS_mingw32_special}";
-    CXXFLAGS_save="${CXXFLAGS_save} ${CFLAGS_mingw32_special}";
     CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
 fi
 
@@ -285,23 +295,10 @@ AC_CHECK_FUNCS(send,,[
 )])
 
 AC_CHECK_FUNCS(gethostbyname,,[
-  AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl",[
-    AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind")])
+  AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl" LDFLAGS_httpd="${LDFLAGS_httpd} -lnsl",[
+    AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind" LDFLAGS_httpd="${LDFLAGS_httpd} -lbind")])
 ])
 
-have_nanosleep=false
-AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
-  AC_CHECK_LIB(rt,nanosleep,
-    [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
-    [AC_CHECK_LIB(posix4,nanosleep,
-        [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
-  )
-])
-if ${have_nanosleep}; then
-  AC_DEFINE(HAVE_NANOSLEEP, 1,
-            Define if nanosleep is available.)
-fi
-
 dnl Check for socklen_t
 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
   [AC_TRY_COMPILE(
@@ -315,11 +312,8 @@ if test x$ac_cv_type_socklen_t != xno; then
             Define if <sys/socket.h> defines socklen_t.)
 fi
 
-dnl HP/UX port
-AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
-
 AC_CHECK_FUNCS(inet_aton,,[
-  AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv")
+  AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv" LDFLAGS_httpd="${LDFLAGS_httpd} -lresolv")
 ])
 
 dnl Check for getopt
@@ -340,12 +334,16 @@ AC_CHECK_LIB(m,cos,
   LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
 AC_CHECK_LIB(m,pow,
   LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
+  LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -lm"
   LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
   LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
   LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
   LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
   LDFLAGS_faad="${LDFLAGS_faad} -lm"
 )
+AC_CHECK_LIB(m,sqrt,
+  LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm"
+)
 
 dnl Check for pthreads - borrowed from XMMS
 THREAD_LIB=error
@@ -366,6 +364,68 @@ fi
 dnl Check for cthreads under GNU/Hurd for instance
 AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
 
+dnl
+dnl  GNU portable threads
+dnl
+AC_ARG_ENABLE(pth,
+  [  --enable-pth            GNU Pth support (default disabled)],
+  [ if test "x${enable_pth}" = "xyes"; then
+    AC_CHECK_LIB(pth,pth_init)
+    AC_MSG_CHECKING(for pth_init in pth.h)
+    AC_EGREP_HEADER(pth_init,pth.h,[
+      AC_MSG_RESULT(yes)
+      AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
+                Define if <pth.h> defines pth_init)
+      THREAD_LIB="-lpth"
+    ],[
+      AC_MSG_RESULT(no)
+    ])
+    fi
+])
+
+dnl
+dnl  State Threads
+dnl
+AC_ARG_ENABLE(st,
+  [  --enable-st             State Threads (default disabled)],
+  [ if test "x${enable_st}" = "xyes"; then
+    AC_CHECK_LIB(st,st_init)
+    AC_MSG_CHECKING(for st_init in st.h)
+    AC_EGREP_HEADER(st_init,st.h,[
+      AC_MSG_RESULT(yes)
+      AC_DEFINE(ST_INIT_IN_ST_H, 1,
+                Define if <st.h> defines st_init)
+      THREAD_LIB="-lst"
+    ],[
+      AC_MSG_RESULT(yes)
+    ])
+    fi
+])
+
+if test "x${SYS}" != "xmingw32"; then
+  LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
+  LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
+fi
+
+dnl Don't link with rt when using GNU-pth
+if test "x${THREAD_LIB}" != "x-lpth" && test "x${THREAD_LIB}" != "x-lst"; then
+  dnl HP/UX port
+  AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
+
+  have_nanosleep=false
+  AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
+    AC_CHECK_LIB(rt,nanosleep,
+      [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
+      [AC_CHECK_LIB(posix4,nanosleep,
+          [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
+    )
+  ])
+  if ${have_nanosleep}; then
+    AC_DEFINE(HAVE_NANOSLEEP, 1,
+              Define if nanosleep is available.)
+  fi
+fi
+
 dnl Check for misc headers
 AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
 AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
@@ -437,6 +497,8 @@ fi
 dnl Build the gtk_main plugins?
 NEED_GTK_MAIN=no
 NEED_GNOME_MAIN=no
+NEED_GTK2_MAIN=no
+NEED_GNOME2_MAIN=no
 
 dnl build the qte plugin ?
 NEED_QTE_MAIN=no
@@ -620,12 +682,16 @@ if test "x${ac_cv_c_fast_math}" != "xno"; then
 fi
 
 dnl Check for -funroll-loops
-AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
-    [ac_cv_c_unroll_loops],
-    [CFLAGS="${CFLAGS_save} -funroll-loops"
-     AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
-if test "x${ac_cv_c_unroll_loops}" != "xno"; then
-    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
+dnl Disabled on BeOS because BeOS' gcc is buggy and may crash with it
+if test "x${SYS}" != "xbeos"
+then
+  AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
+      [ac_cv_c_unroll_loops],
+      [CFLAGS="${CFLAGS_save} -funroll-loops"
+       AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
+  if test "x${ac_cv_c_unroll_loops}" != "xno"; then
+      CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
+  fi
 fi
 
 dnl Check for -fomit-frame-pointer
@@ -728,36 +794,58 @@ case "${ARCH}" in
     ;;
 esac
 
+dnl
+dnl  Enable profiling
+dnl
+AC_ARG_ENABLE(gprof,
+[  --enable-gprof          gprof profiling (default disabled)])
+AC_ARG_ENABLE(cprof,
+[  --enable-cprof          cprof profiling (default disabled)])
+AM_CONDITIONAL(GPROF, test "${enable_gprof}" = "yes")
+AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
+
 dnl
 dnl  default modules
 dnl
-PLUGINS="${PLUGINS} dummy rc logger access_file memcpy"
-PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts"
-PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
-#PLUGINS="${PLUGINS} a52old imdct downmix imdct3dn downmix3dn imdctsse downmixsse"
-PLUGINS="${PLUGINS} lpcm a52"
+#BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
+PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
+PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
+PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
 PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
-PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
-PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
+PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
+PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler bandlimited_resampler"
 PLUGINS="${PLUGINS} trivial_channel_mixer headphone_channel_mixer"
 PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
 PLUGINS="${PLUGINS} aout_file"
 #PLUGINS="${PLUGINS} scope"
 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
 PLUGINS="${PLUGINS} id3 m3u"
-PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys"
-PLUGINS="${PLUGINS} access_udp access_http ipv4 access_mms access_ftp"
-PLUGINS="${PLUGINS} sap"
+PLUGINS="${PLUGINS} rawvideo"
+PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au"
+PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms"
+PLUGINS="${PLUGINS} access_ftp access_directory sap httpd"
+
+dnl
+dnl Some plugins aren't useful on some platforms
+dnl
+if test "x${SYS}" != "xmingw32"; then
+    PLUGINS="${PLUGINS} screensaver"
+fi
 
 dnl
 dnl  Accelerated modules
 dnl
-MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i420_yuy2_mmx i422_yuy2_mmx i420_ymga_mmx"
+MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
 THREEDNOW_MODULES="memcpy3dn"
 SSE_MODULES=""
 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
 
+if test "${enable_gprof}" != "yes"
+then
+  MMX_MODULES="${MMX_MODULES} i420_yuy2_mmx"
+fi
+
 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
     [ac_cv_mmx_inline],
     [CFLAGS="${CFLAGS_save}"
@@ -883,7 +971,7 @@ dnl
 if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
 then
     ARCH="${ARCH} mmx"
-    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
+    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
 fi
 
 dnl
@@ -924,13 +1012,21 @@ AC_ARG_ENABLE(sout,
   [  --enable-sout           Stream output modules (default enabled)])
 if test "x${enable_sout}" != "xno"
 then
-  PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file"
+  PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file access_output_http"
   PLUGINS="${PLUGINS} mux_ts mux_ps mux_avi mux_dummy"
   PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
   PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_mpeg4audio"
   PLUGINS="${PLUGINS} packetizer_copy"
 
-  PLUGINS="${PLUGINS} vout_encoder"
+  PLUGINS="${PLUGINS} stream_out_dummy stream_out_standard stream_out_es"
+  PLUGINS="${PLUGINS} stream_out_duplicate stream_out_display"
+
+    dnl Ogg/ogm
+    AC_CHECK_HEADERS(ogg/ogg.h, [
+      AC_CHECK_LIB( ogg, ogg_stream_packetin, [
+        PLUGINS="${PLUGINS} mux_ogg"
+        LDFLAGS_mux_ogg="${LDFLAGS_mux_ogg} -logg" ])
+    ],[])
 fi
 
 
@@ -1229,7 +1325,7 @@ AC_ARG_ENABLE(v4l,
   [  --enable-v4l            Video4Linux input support (default disabled)])
 if test "x${enable_v4l}" = "xyes"
 then
-  AC_CHECK_HEADERS(libv4l/v4l.h, [
+  AC_CHECK_HEADERS(linux/videodev.h, [
     PLUGINS="${PLUGINS} v4l"
    ],[])
 fi
@@ -1315,36 +1411,6 @@ then
     PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
 fi
 
-dnl
-dnl  AVI demux plugin
-dnl
-AC_ARG_ENABLE(avi,
-  [  --enable-avi            AVI demux module (default enabled)])
-if test "x${enable_avi}" != "xno"
-then
-  PLUGINS="${PLUGINS} avi"
-fi
-
-dnl
-dnl  ASF demux plugin
-dnl
-AC_ARG_ENABLE(asf,
-  [  --enable-asf            ASF demux module (default enabled)])
-if test "x${enable_asf}" != "xno"
-then
-  PLUGINS="${PLUGINS} asf"
-fi
-
-dnl
-dnl  AAC demux plugin
-dnl
-AC_ARG_ENABLE(aac,
-  [  --enable-aac            AAC demux module (default enabled)])
-if test "x${enable_aac}" != "xno"
-then
-  PLUGINS="${PLUGINS} aac"
-fi
-
 dnl
 dnl  ogg plugin
 dnl
@@ -1361,16 +1427,6 @@ then
    ],[])
 fi
 
-dnl
-dnl  raw dv demux plugin
-dnl
-AC_ARG_ENABLE(rawdv,
-  [  --enable-rawdv          raw dv demux module (default enabled)])
-if test "x${enable_rawdv}" != "xno"
-then
-  PLUGINS="${PLUGINS} rawdv"
-fi
-
 dnl
 dnl  Codec plugins
 dnl
@@ -1382,7 +1438,7 @@ dnl  mad plugin
 dnl
 AC_ARG_ENABLE(mad,
   [  --enable-mad            libmad module (default disabled)])
-if test "x${enable_mad}" = "xyes"
+if test "x${enable_mad}" != "xno"
 then
   AC_ARG_WITH(mad,
     [    --with-mad=PATH       path to libmad],[],[])
@@ -1439,8 +1495,9 @@ dnl
 dnl   libid3tag support
 dnl
 AC_CHECK_HEADERS(id3tag.h, [
-  LDFLAGS_id3tag="${LDFLAGS_id3tag} -lz -lid3tag"
-  PLUGINS="${PLUGINS} id3tag"])
+  AC_CHECK_HEADERS(zlib.h, [
+    LDFLAGS_id3tag="${LDFLAGS_id3tag} -lid3tag -lz"
+    PLUGINS="${PLUGINS} id3tag"]) ])
 
 dnl
 dnl  ffmpeg decoder plugin
@@ -1450,56 +1507,84 @@ AC_ARG_ENABLE(ffmpeg,
 if test "x${enable_ffmpeg}" = "xyes"
 then
   AC_ARG_WITH(ffmpeg,
-    [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
-  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
-  then
+    [    --with-ffmpeg=PATH    path to ffmpeg installation])
+  AC_ARG_WITH(ffmpeg-tree,
+    [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
+
+  dnl
+  dnl test for --with-ffmpeg
+  dnl
+  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"; then
     CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/ffmpeg"
     LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
+
+    CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${with_ffmpeg}/include/ffmpeg"
+    LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${with_ffmpeg}/lib"
   fi
 
-  dnl Add postprocessing modules
-  PLUGINS="${PLUGINS} postprocessing_c"
-  if test "x${ac_cv_mmx_inline}" != "xno"; then
-    PLUGINS="${PLUGINS} postprocessing_mmx"
+  dnl
+  dnl test for !(--with-ffmpeg) && !(--with-ffmpeg-tree)
+  dnl
+  if test "x${with_ffmpeg_tree}" == "xno" -o "x${with_ffmpeg_tree}" == "x";then
+    if test "x${with_ffmpeg}" == "xno" -o "x${with_ffmpeg}" == "x"; then
+      AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
+    fi
   fi
 
-  if test "x${ac_cv_mmxext_inline}" != "xno"; then
-    PLUGINS="${PLUGINS} postprocessing_mmxext"
+  dnl
+  dnl test for !(--with-ffmpeg-tree)
+  dnl
+  if test "x${with_ffmpeg_tree}" == "xno" -o "x${with_ffmpeg_tree}" == "x";then
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+    AC_CHECK_LIB(avcodec, avcodec_init, [
+      BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
+      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec"
+      dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X
+      dnl       linker would miserably barf on multiple definitions.
+      LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode}" ],
+      [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
+    LDFLAGS="${LDFLAGS_save}"
+    CPPFLAGS="${CPPFLAGS_save}"
   fi
 
-  AC_ARG_WITH(ffmpeg-tree,
-  [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
-  if test "x${with_ffmpeg_tree}" != "x"
-  then
+  dnl
+  dnl test for --with-ffmpeg-tree
+  dnl
+  if test "x${with_ffmpeg_tree}" != "xno" -a "x${with_ffmpeg_tree}" != "x";then
     AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
-    if test "x${real_ffmpeg_tree}" = x
-    then
+    if test "x${real_ffmpeg_tree}" = x; then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
     fi
-    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
-    then
+    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
       dnl  Use a custom libffmpeg
       AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-      BUILTINS="${BUILTINS} ffmpeg"
+      BUILTINS="${BUILTINS} ffmpeg stream_out_transcode"
       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec"
       CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
+
+      dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X
+      dnl       linker would miserably barf on multiple definitions.
+      LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${real_ffmpeg_tree}/libavcodec"
+      CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${real_ffmpeg_tree}/libavcodec"
     else
       dnl  The given libavcodec wasn't built
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
     fi
-  else
-    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
-    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
-    AC_CHECK_LIB(avcodec, avcodec_init, [
-      BUILTINS="${BUILTINS} ffmpeg"
-      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
-      [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
-    LDFLAGS="${LDFLAGS_save}"
-    CPPFLAGS="${CPPFLAGS_save}"
+  fi
+
+  dnl Add postprocessing modules
+  PLUGINS="${PLUGINS} postprocessing_c"
+  if test "x${ac_cv_mmx_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} postprocessing_mmx"
+  fi
+
+  if test "x${ac_cv_mmxext_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} postprocessing_mmxext"
   fi
 fi
 
@@ -1603,9 +1688,9 @@ then
     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
     AC_CHECK_HEADERS(xvid.h, ,
       [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
-    AC_CHECK_LIB(xvid, xvid_init, [
+    AC_CHECK_LIB(xvidcore, xvid_init, [
       PLUGINS="${PLUGINS} xvid"
-      LDFLAGS_xvid="${LDFLAGS_xvid} -lxvid" ],
+      LDFLAGS_xvid="${LDFLAGS_xvid} -lxvidcore" ],
       [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
     LDFLAGS="${LDFLAGS_save}"
     CPPFLAGS="${CPPFLAGS_save}"
@@ -1617,15 +1702,20 @@ fi
 dnl
 dnl MP4 module
 dnl
-AC_ARG_ENABLE(mp4,
-  [  --enable-mp4            MP4 demux module (default enabled)])
-if test "x${enable_mp4}" != "xno"
-then
+AC_CHECK_HEADERS(zlib.h, [
+  LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
+  LDFLAGS_skins="${LDFLAGS_skins} -lz"
+] )
+
+
+dnl
+dnl skins module
+dnl
+AC_CHECK_HEADERS(libtar.h, [
+  LDFLAGS_skins="${LDFLAGS_skins} -ltar"
+] )
+
 
-    PLUGINS="${PLUGINS} mp4"
-    AC_CHECK_HEADERS(zlib.h,
-              [ LDFLAGS_mp4="${LDFLAGS_mp4} -lz" ] )
-fi
 
 dnl
 dnl  a52 AC3 decoder plugin
@@ -1689,10 +1779,7 @@ then
         LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
       ],[
-        if test "x${enable_dvbpsi}" != "x"
-        then
-          AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
-        fi
+        AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
       ])
     ])
     CPPFLAGS="${CPPFLAGS_save}"
@@ -1700,16 +1787,6 @@ then
   fi
 fi
 
-dnl
-dnl  cinepak plugin
-dnl
-AC_ARG_ENABLE(cinepak,
-  [  --enable-cinepak        Cinepak decoder (default enabled)])
-if test "x${enable_cinepak}" != "xno"
-then
-  PLUGINS="${PLUGINS} cinepak"
-fi
-
 dnl
 dnl  DV plugin
 dnl
@@ -1723,6 +1800,32 @@ then
    ],[])
 fi
 
+dnl
+dnl  Flac plugin
+dnl
+AC_ARG_ENABLE(flac,
+  [  --enable-flac           flac decoder support (default disabled)])
+if test "x${enable_flac}" = "xyes"
+then
+  AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
+    PLUGINS="${PLUGINS} flac flacdec"
+    LDFLAGS_flacdec="${LDFLAGS_flacdec} -lFLAC"
+   ],[])
+fi
+
+dnl
+dnl  Libmpeg2 plugin
+dnl
+AC_ARG_ENABLE(libmpeg2,
+  [  --enable-libmpeg2       libmpeg2 decoder support (default disabled)])
+if test "x${enable_libmpeg2}" = "xyes"
+then
+  AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
+    PLUGINS="${PLUGINS} libmpeg2"
+    LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"
+   ],[])
+fi
+
 dnl
 dnl  Vorbis plugin
 dnl
@@ -1735,7 +1838,7 @@ then
     LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
    ],[])
 fi
-
+         
 dnl
 dnl  Tremor plugin
 dnl
@@ -1916,6 +2019,36 @@ from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
   fi
 fi
 
+dnl
+dnl  freetype module
+dnl
+AC_ARG_ENABLE(freetype,
+  [  --enable-freetype       freetype support (default enabled)])
+if test "x${enable_freetype}" != "xno"
+then
+  FREETYPE_PATH="${PATH}"
+  AC_ARG_WITH(freetype-config-path,
+    [    --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
+    [ if test "x${with_freetype_config_path}" != "xno"
+      then
+        FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
+      fi ])
+  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
+
+  if test "x${FREETYPE_CONFIG}" != "xno" -a "x${have_xosd}" = "xtrue"
+  then
+    PLUGINS="${PLUGINS} osdtext"
+    CFLAGS_osdtext="${CFLAGS_osdtext} `${FREETYPE_CONFIG} --cflags`"
+    LDFLAGS_osdtext="${LDFLAGS_osdtext} `${FREETYPE_CONFIG} --libs`"
+    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}"
+  elif test "x${enable_freetype}" =  "xyes"
+  then
+    AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
+from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
+    ])
+  fi
+fi
+
 dnl
 dnl  Qt Embedded module
 dnl  (disabled by default)
@@ -2136,8 +2269,15 @@ AC_ARG_ENABLE(alsa,
      AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
      if test "x${have_alsa}" = "xtrue"
      then
+       AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
+                       #define ALSA_PCM_NEW_SW_PARAMS_API
+                       #include <alsa/asoundlib.h>],
+          [void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
+           AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
        PLUGINS="${PLUGINS} alsa"
        LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
+     else
+       AC_MSG_ERROR([Could not find ALSA development headers])
      fi
    fi])
 
@@ -2153,6 +2293,26 @@ if test "x${enable_waveout}" != "xno"; then
   fi
 fi
 
+dnl
+dnl  CoreAudio plugin
+dnl
+AC_ARG_ENABLE(coreaudio,
+  [  --enable-coreaudio      CoreAudio module (default enabled on MacOS X)])
+if test "x${enable_coreaudio}" != "xno" &&
+  (test "x${SYS}" = "xdarwin" || test "x${enable_coreaudio}" = "xyes")
+then
+  AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, 
+    [ BUILTINS="${BUILTINS} coreaudio"
+      LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
+      AC_MSG_CHECKING(for kAudioConverterPrimeMethod in AudioToolbox/AudioConverter.h)
+      AC_EGREP_HEADER(kAudioConverterPrimeMethod,AudioToolbox/AudioConverter.h,[
+        AC_MSG_RESULT(yes)
+        PLUGINS="${PLUGINS} coreaudio_resampler"
+        LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
+      ],[ AC_MSG_RESULT(no) ])
+    ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
+fi
+
 dnl
 dnl  Interface plugins
 dnl
@@ -2165,6 +2325,26 @@ then
     PLUGINS="${PLUGINS} beos"
 fi
 
+dnl
+dnl Skins module
+dnl
+AC_ARG_ENABLE(skins,
+  [  --enable-skins          Win32 skins module (default enabled on Win32)])
+if test "x${enable_skins}" != "xno"; then
+  if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
+    PLUGINS="${PLUGINS} skins"
+    CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/win32 -Imodules/gui/skins/controls"
+    LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 -lmsimg32"
+  else
+    if test "x${enable_skins}" = "xyes"; then
+      PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
+      PLUGINS="${PLUGINS} skins"
+      CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS}"
+      LDFLAGS_skins="${LDFLAGS_skins} -lstdc++  ${GTK2_LIBS}"
+    fi
+  fi
+fi
+
 dnl
 dnl  Gtk+ module
 dnl
@@ -2218,6 +2398,22 @@ then
   fi
 fi
 
+dnl
+dnl  Gtk+2 module
+dnl
+AC_ARG_ENABLE(gtk2,
+  [  --enable-gtk2           Gtk2 support (default disabled)])
+if test "x${enable_gtk2}" = "xyes"
+then
+  PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
+  CFLAGS_gtk2="${CFLAGS_gtk2} ${GTK2_CFLAGS}"
+  LDFLAGS_gtk2="${LDFLAGS_gtk2} ${GTK2_LIBS}"
+  PLUGINS="${PLUGINS} gtk2"
+  if test "x${SYS}" != "xmingw32"; then
+    NEED_GTK2_MAIN=yes
+  fi
+fi
+
 dnl
 dnl  Familiar module uses Gtk+ library
 dnl
@@ -2334,6 +2530,22 @@ developement tools or remove the --enable-gnome option])
     CPPFLAGS="${CPPFLAGS_save}"
   fi])
 
+dnl
+dnl  Gnome2 module
+dnl
+AC_ARG_ENABLE(gnome2,
+  [  --enable-gnome2         Gnome2 support (default disabled)])
+if test "x${enable_gnome2}" = "xyes"
+then
+  PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
+  CFLAGS_gnome2="${CFLAGS_gnome2} ${GNOME2_CFLAGS}"
+  LDFLAGS_gnome2="${LDFLAGS_gnome2} ${GNOME2_LIBS}"
+  PLUGINS="${PLUGINS} gnome2"
+  if test "x${SYS}" != "xmingw32"; then
+    NEED_GNOME2_MAIN=yes
+  fi
+fi
+
 dnl
 dnl  wxWindows module
 dnl
@@ -2382,8 +2594,17 @@ AC_ARG_ENABLE(qt,
   [if test "x${enable_qt}" = "xyes"; then
      PLUGINS="${PLUGINS} qt"
      ALIASES="${ALIASES} qvlc"
-     LDFLAGS_qt="${LDFLAGS_qt} -lqt -L${QTDIR}/lib"
-     CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt -I${QTDIR}/include"
+     LDFLAGS_qt="${LDFLAGS_qt} -L${QTDIR}/lib"
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
+     AC_CHECK_LIB(qt-mt,main,[
+       LDFLAGS_qt="${LDFLAGS_qt} -lqt-mt"
+     ],[
+       AC_CHECK_LIB(qt,main,[
+         LDFLAGS_qt="${LDFLAGS_qt} -lqt"
+       ])
+     ])
+     LDFLAGS="${LDFLAGS_save}"
+     CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -2400,8 +2621,22 @@ AC_ARG_ENABLE(kde,
   [if test "x${enable_kde}" = "xyes"; then
      PLUGINS="${PLUGINS} kde"
      ALIASES="${ALIASES} kvlc"
-     LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib -lkfile"
-     CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt"
+     LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
+     dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kfile,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
+     ])
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kdeui,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
+     ])
+     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
+     AC_CHECK_LIB(kio,main,[
+       LDFLAGS_kde="${LDFLAGS_kde} -lkio"
+     ])
+     LDFLAGS="${LDFLAGS_save}"
+     CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt"
      CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
@@ -2453,11 +2688,11 @@ AC_ARG_ENABLE(macosx,
   [if test "x${enable_macosx}" = "xyes"
    then
      BUILTINS="${BUILTINS} macosx"
-     LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
+     LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
      BUILTINS="${BUILTINS} macosx"
-     LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
+     LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
    )])
 
 dnl
@@ -2532,7 +2767,7 @@ then
     if test "x${have_slp}" = "xtrue"
     then
       PLUGINS="${PLUGINS} slp"
-      LDFLAGS_slp="${LDFLAGS_slp} -lslp"
+      LDFLAGS_slp="-lslp ${LDFLAGS_slp}"
     fi
   else
     AC_MSG_CHECKING(for slp headers in ${with_slp})
@@ -2541,7 +2776,7 @@ then
       dnl  Use ${with_slp}/libslp/slp.h
       AC_MSG_RESULT(yes)
       PLUGINS="${PLUGINS} slp"
-      LDFLAGS_slp="${LDFLAGS_slp} -L${with_slp} -lslp"
+      LDFLAGS_slp="-L${with_slp} -lslp ${LDFLAGS_slp}"
       CPPFLAGS_slp="${CPPFLAGS_slp} -I${with_slp}"
     else
       dnl  No libslp could be found, sorry
@@ -2627,59 +2862,6 @@ then
   AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
 fi
 
-dnl
-dnl  Profiling
-dnl
-AC_ARG_ENABLE(gprof,
-[  --enable-gprof          gprof profiling (default disabled)])
-AC_ARG_ENABLE(cprof,
-[  --enable-cprof          cprof profiling (default disabled)])
-AM_CONDITIONAL(GPROF, test "x${enable_gprof}" = "xyes")
-AM_CONDITIONAL(CPROF, test "x${enable_gprof}" = "xyes")
-
-dnl
-dnl  GNU portable threads
-dnl
-AC_ARG_ENABLE(pth,
-  [  --enable-pth            GNU Pth support (default disabled)],
-  [ if test "x${enable_pth}" = "xyes"; then
-    AC_CHECK_LIB(pth,pth_init)
-    AC_MSG_CHECKING(for pth_init in pth.h)
-    AC_EGREP_HEADER(pth_init,pth.h,[
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
-                Define if <pth.h> defines pth_init)
-      THREAD_LIB="-lpth"
-    ],[
-      AC_MSG_RESULT(no)
-    ])
-    fi
-])
-
-dnl
-dnl  State Threads
-dnl
-AC_ARG_ENABLE(st,
-  [  --enable-st             State Threads (default disabled)],
-  [ if test "x${enable_st}" = "xyes"; then
-    AC_CHECK_LIB(st,st_init)
-    AC_MSG_CHECKING(for st_init in st.h)
-    AC_EGREP_HEADER(st_init,st.h,[
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(ST_INIT_IN_ST_H, 1,
-                Define if <st.h> defines st_init)
-      THREAD_LIB="-lst"
-    ],[
-      AC_MSG_RESULT(yes)
-    ])
-    fi
-])
-
-if test "x${SYS}" != "xmingw32"; then
-  LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
-  LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
-fi
-
 dnl
 dnl  Mozilla plugin
 dnl
@@ -2738,7 +2920,7 @@ if test "x${NEED_GTK_MAIN}" != "xno"
 then
     PLUGINS="${PLUGINS} gtk_main"
     CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
-       CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
+    CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
     CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
     LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
 fi
@@ -2750,6 +2932,21 @@ then
     LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
 fi
 
+if test "x${NEED_GTK2_MAIN}" != "xno"
+then
+    PLUGINS="${PLUGINS} gtk2_main"
+    CFLAGS_gtk2="${CFLAGS_gtk2} -DNEED_GTK2_MAIN"
+    CFLAGS_gtk2_main="${CFLAGS_gtk2_main} ${CFLAGS_gtk2}"
+    LDFLAGS_gtk2_main="${LDFLAGS_gtk2_main} ${LDFLAGS_gtk2}"
+fi
+
+if test "x${NEED_GNOME2_MAIN}" != "xno"
+then
+    PLUGINS="${PLUGINS} gnome2_main"
+    CFLAGS_gnome2_main="${CFLAGS_gnome2_main} ${CFLAGS_gtk2} ${CFLAGS_gnome2}"
+    LDFLAGS_gnome2_main="${LDFLAGS_gnome2_main} ${LDFLAGS_gtk2} ${LDFLAGS_gnome2}"
+fi
+
 dnl
 dnl  qte_main plugin
 dnl
@@ -2757,7 +2954,8 @@ if test "x${NEED_QTE_MAIN}" != "xno"
 then
     PLUGINS="${PLUGINS} qte_main"
     CPPFLAGS_qte="${CPPFLAGS_qte} -DNEED_QTE_MAIN"
-       CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
+    CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
+    CFLAGS_vout_sdl="${CFLAGS_vout_sdl} -DNEED_QTE_MAIN"
     CPPFLAGS_qte_main="${CFLAGS_qte_main} ${CPPFLAGS_qte}"
     LDFLAGS_qte_main="${LDFLAGS_qte_main} ${LDFLAGS_qte}"
 fi
@@ -2817,7 +3015,7 @@ dnl
 dnl  Stuff used by the program
 dnl
 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
-AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
+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/.-/__/'`"
@@ -2825,9 +3023,9 @@ AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module f
 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
 
-DATA_PATH="${ac_tool_prefix}/share/videolan"
+DATA_PATH="${ac_tool_prefix}/share/vlc"
 AC_SUBST(DATA_PATH)
-PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
+PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
 AC_SUBST(PLUGIN_PATH)
 
 dnl
@@ -2865,6 +3063,7 @@ AC_SUBST(WINDRES)
 AC_SUBST(XPIDL)
 AC_SUBST(LIBEXT)
 AC_SUBST(INCLUDES)
+AC_SUBST(ALL_LINGUAS)
 
 AC_SUBST(CFLAGS_TUNING)
 AC_SUBST(CFLAGS_OPTIM)
@@ -2888,6 +3087,7 @@ AC_SUBST(LDFLAGS_mozilla)
 
 AC_OUTPUT([
   Makefile
+  autotools/Makefile
   debian/Makefile
   doc/Makefile
   intl/Makefile