]> git.sesse.net Git - vlc/blobdiff - configure.ac.in
* skin_main.cpp,x11_theme.cpp: better way to fix the "open skin bug" !
[vlc] / configure.ac.in
index fc5c88cc16ae50a41020a1c49bf124b32336ecc3..58f81b59264c7ecbd343155bc34c3c0d3c58c05a 100644 (file)
@@ -1,17 +1,18 @@
 dnl Autoconf settings for vlc
 
-AC_INIT(vlc,0.5.2)
+AC_INIT(vlc,0.6.0-test2)
 
 CONFIGURE_LINE="$0 $*"
-CODENAME="Natalya"
+CODENAME="Trevelyan"
 
 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.2)
+AM_INIT_AUTOMAKE(vlc,0.6.0-test2)
 AM_CONFIG_HEADER(config.h)
 
 dnl
@@ -84,6 +85,7 @@ case "x${target_os}" in
     LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
     LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvd"
     LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
+    LDFLAGS_cdda="${LDFLAGS_cdda} -ldvd"
     ;;
   x*bsd*)
     SYS="${target_os}"
@@ -121,7 +123,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"
@@ -131,6 +133,7 @@ case "x${target_os}" in
         LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
         LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
         LDFLAGS_slp="${LDFLAGS_slp} -lws2_32"
+        LDFLAGS_http="${LDFLAGS_http} -lws2_32"
         LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32"
     fi
     ;;
@@ -148,17 +151,16 @@ case "x${target_os}" in
     ;;
   xbeos)
     SYS=beos
-    CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
-    CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
+    CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; 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 ?
-    AC_CHECK_LIB( bind, inet_ntoa,
-        [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
-          LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
-          LDFALGS_httpd="${LDFLAGS_httpd} -lbind"],
-        [])
+    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -ltranslation -ltracker -lgame -lstdc++.r4"
+    dnl Check if we have BONE (old net_server doesn't have libsocket.so)
+    AC_CHECK_LIB( socket, connect,
+        LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket -lbind" 
+        LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
+        LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
+        LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind" )
     ;;
   x*)
     SYS="${target_os}"
@@ -172,7 +174,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)
@@ -180,8 +182,8 @@ if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
 else
   AC_CHECK_FUNCS(textdomain,,[
     AC_CHECK_LIB(intl,textdomain,
-      LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
-      LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
+      LDFLAGS_vlc="${LDFLAGS_vlc} ${LIBINTL}",,
+      ${LIBINTL}
     )
   ])
 fi
@@ -290,6 +292,7 @@ AC_CHECK_FUNCS(send,,[
     LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
     LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket"
     LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
+    LDFLAGS_http="${LDFLAGS_http} -lsocket"
     LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
 )])
 
@@ -324,6 +327,7 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
     [need_getopt=:])])
 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
 
+if test "x$SYS" != "xmingw32"; then
 AC_TYPE_SIGNAL
 AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
 AC_CHECK_LIB(m,cos,
@@ -333,6 +337,7 @@ 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"
@@ -342,7 +347,9 @@ AC_CHECK_LIB(m,pow,
 AC_CHECK_LIB(m,sqrt,
   LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm"
 )
+fi # end "x$SYS" != "xmingw32"
 
+if test "x$SYS" != "xmingw32"; then
 dnl Check for pthreads - borrowed from XMMS
 THREAD_LIB=error
 if test "x${THREAD_LIB}" = "xerror"; then
@@ -400,10 +407,8 @@ AC_ARG_ENABLE(st,
     fi
 ])
 
-if test "x${SYS}" != "xmingw32"; then
-  LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
-  LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
-fi
+LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
+LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
 
 dnl Don't link with rt when using GNU-pth
 if test "x${THREAD_LIB}" != "x-lpth" && test "x${THREAD_LIB}" != "x-lst"; then
@@ -438,6 +443,7 @@ AC_EGREP_HEADER(pthread_once,pthread.h,[
   AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
             Define if <pthread.h> defines pthread_once.)],[
   AC_MSG_RESULT(no)])
+fi # end "x$SYS" != "xmingw32"
 
 AC_MSG_CHECKING(for strncasecmp in strings.h)
 AC_EGREP_HEADER(strncasecmp,strings.h,[
@@ -451,8 +457,10 @@ AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.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 "x$SYS" != "xmingw32"; then
 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
 AC_CHECK_HEADERS(linux/version.h)
+fi # end "x$SYS" != "xmingw32"
 
 AC_HEADER_TIME
 
@@ -462,6 +470,7 @@ AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
 AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
 
 dnl Mac OS X and other OSes don't have declaration for nanosleep
+if test "x$SYS" != "xmingw32"; then
 AC_MSG_CHECKING(for nanosleep in time.h)
 AC_EGREP_HEADER(nanosleep,time.h,[
   AC_MSG_RESULT(yes)
@@ -470,6 +479,7 @@ AC_EGREP_HEADER(nanosleep,time.h,[
 ],[
   AC_MSG_RESULT(no)
 ])
+fi # end "x$SYS" != "xmingw32"
 
 dnl Make sure we have timespecs
 AC_MSG_CHECKING(for timespec in sys/time.h)
@@ -482,7 +492,9 @@ AC_EGREP_HEADER(timespec,sys/time.h,[
 ])
 
 dnl Check for threads library
+if test "x$SYS" != "xmingw32"; then
 AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
+fi # end "x$SYS" != "xmingw32"
 
 dnl Default X headers and libraries
 if test "x${x_includes}" = "xNONE"; then
@@ -495,29 +507,12 @@ 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
 
-dnl Check for DPMS
-if test "x${SYS}" != "xmingw32"
-then
-  CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
-  AC_CHECK_HEADERS(X11/extensions/dpms.h, [
-    AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
-    AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
-                Define if <X11/extensions/dpms.h> defines DPMSInfo.)
-    ],[
-      AC_MSG_RESULT(no)
-    ])
-  ],,[
-    #include <X11/Xlib.h>
-  ])
-  CPPFLAGS="${CPPFLAGS_save}"
-fi
-
 dnl Check for ntohl, etc.
 AC_CACHE_CHECK([for ntohl in sys/param.h],
     [ac_cv_c_ntohl_sys_param_h],
@@ -678,12 +673,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
@@ -717,12 +716,17 @@ if test "x${ac_cv_ld_darwin}" != "xno"; then
 fi
 
 dnl Check for standard plugin linking flags
-AC_CACHE_CHECK([if \$CC accepts -shared],
-    [ac_cv_ld_plugins],
-    [CFLAGS="${CFLAGS_save} -shared"
-     AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
-if test "x${ac_cv_ld_plugins}" != "xno"; then
-    LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
+dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning)
+if test "x${SYS}" = "xbeos"; then
+    LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
+else
+    AC_CACHE_CHECK([if \$CC accepts -shared],
+        [ac_cv_ld_plugins],
+        [CFLAGS="${CFLAGS_save} -shared"
+         AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
+    if test "x${ac_cv_ld_plugins}" != "xno"; then
+        LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
+    fi
 fi
 
 dnl Check for variadic macros
@@ -782,7 +786,7 @@ esac
 
 case "${ARCH}" in
   hppa64)
-    CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
+    CFLAGS_mpeg_video_old="${CFLAGS_mpeg_video_old} -ffunction-sections"
     ;;
 esac
 
@@ -799,12 +803,12 @@ AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
 dnl
 dnl  default modules
 dnl
-BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
-PLUGINS="${PLUGINS} dummy rc logger gestures access_file memcpy"
+#BUILTINS="${BUILTINS} mpeg_video_old 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 dtstospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
+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"
@@ -812,9 +816,20 @@ PLUGINS="${PLUGINS} aout_file"
 #PLUGINS="${PLUGINS} scope"
 PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
 PLUGINS="${PLUGINS} id3 m3u"
+PLUGINS="${PLUGINS} rawvideo"
 PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au"
-PLUGINS="${PLUGINS} access_udp access_http ipv4 access_mms access_ftp"
-PLUGINS="${PLUGINS} sap httpd"
+PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms"
+PLUGINS="${PLUGINS} access_ftp access_directory sap httpd http"
+
+dnl
+dnl  Switch to enable a version of VLC where most modules will be builtin
+dnl
+AC_ARG_ENABLE(mostly-builtin,
+[  --enable-mostly-builtin most modules will be built-in (default disabled)])
+if test "x${enable_mostly_builtin}" = "xyes"; then
+  BUILTINS="${BUILTINS} ${PLUGINS}"
+  PLUGINS=""
+fi
 
 dnl
 dnl Some plugins aren't useful on some platforms
@@ -826,11 +841,14 @@ fi
 dnl
 dnl  Accelerated modules
 dnl
-MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
-MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
+MMX_MODULES="memcpymmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
+#MMX_MODULES="${MMX_MODULES} idctmmx motionmmx"
+MMXEXT_MODULES="memcpymmxext"
+#MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext"
 THREEDNOW_MODULES="memcpy3dn"
 SSE_MODULES=""
-ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
+ALTIVEC_MODULES="memcpyaltivec"
+#ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec"
 
 if test "${enable_gprof}" != "yes"
 then
@@ -875,8 +893,6 @@ if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
 fi
 
-# don't try to grok AltiVec with native mingw32 it doesn't work right now
-# we should be able to remove this test with future versions of mingw32
 if test "x${SYS}" != "xmingw32"; then
 AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
     [ac_cv_altivec_inline],
@@ -932,7 +948,7 @@ if test "x${ac_cv_ld_altivec}" != "xno"; then
   LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
   LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
 fi
-fi # end if mingw32
+fi # end "x$SYS" != "xmingw32"
 
 AC_ARG_WITH(,[])
 AC_ARG_WITH(,[Optimization options:])
@@ -1009,7 +1025,8 @@ then
   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, [
@@ -1162,7 +1179,7 @@ dnl
 dnl dvdplay module: check for libdvdplay
 dnl
 AC_ARG_ENABLE(dvdplay,
-[  --enable-dvdplay        dvdplay input module (default disabled)])
+[  --enable-dvdplay        dvdplay input module (default enabled)])
 if test "x${enable_dvdplay}" != "xno"
 then
   AC_ARG_WITH(dvdplay,
@@ -1242,7 +1259,11 @@ then
           PLUGINS="${PLUGINS} mux_ts_dvbpsi"
           LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -ldvbpsi" ],
         [  AC_MSG_WARN([cannot find libdvbpsi headers]) ],
-        [#include <stdint.h>
+        [#if defined( HAVE_STDINT_H )
+#   include <stdint.h>
+#elif defined( HAVE_INTTYPES_H )
+#   include <inttypes.h>
+#endif
 #include <dvbpsi/dvbpsi.h>
 #include <dvbpsi/descriptor.h>
 #include <dvbpsi/pat.h>
@@ -1315,11 +1336,21 @@ 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
 
+dnl
+dnl  special access module for Hauppauge PVR cards
+dnl
+AC_ARG_ENABLE(pvr,
+  [  --enable-pvr            PVR cards access module (default disabled)])
+if test "x${enable_pvr}" = "xyes"
+then
+  PLUGINS="${PLUGINS} pvr"
+fi
+
 dnl
 dnl  VCD module
 dnl
@@ -1331,7 +1362,7 @@ then
   AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
   AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
     AC_MSG_RESULT(yes)
-    PLUGINS="${PLUGINS} vcd"
+    PLUGINS="${PLUGINS} vcd cdda"
   ],[
     AC_MSG_RESULT(no)
   ])
@@ -1339,7 +1370,7 @@ then
   AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
   AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
     AC_MSG_RESULT(yes)
-    PLUGINS="${PLUGINS} vcd"
+    PLUGINS="${PLUGINS} vcd cdda"
     AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
   ],[
     AC_MSG_RESULT(no)
@@ -1348,7 +1379,7 @@ then
   AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
   AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
     AC_MSG_RESULT(yes)
-    PLUGINS="${PLUGINS} vcd"
+    PLUGINS="${PLUGINS} vcd cdda"
     AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
   ],[
     AC_MSG_RESULT(no)
@@ -1356,13 +1387,14 @@ then
 
   if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
   then
-    PLUGINS="${PLUGINS} vcd"
+    PLUGINS="${PLUGINS} vcd cdda"
   fi
 
   if test "x${SYS}" = "xdarwin"
   then
-    PLUGINS="${PLUGINS} vcd"
+    PLUGINS="${PLUGINS} vcd cdda"
     LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
+    LDFLAGS_cdda="${LDFLAGS_cdda} -framework IOKit -framework CoreFoundation"
   fi
 fi
 
@@ -1427,7 +1459,7 @@ dnl
 dnl  mad plugin
 dnl
 AC_ARG_ENABLE(mad,
-  [  --enable-mad            libmad module (default disabled)])
+  [  --enable-mad            libmad module (default enabled)])
 if test "x${enable_mad}" != "xno"
 then
   AC_ARG_WITH(mad,
@@ -1471,7 +1503,7 @@ then
     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
     AC_CHECK_HEADERS(mad.h, ,
-      [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
+      [ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
     AC_CHECK_LIB(mad, mad_bit_init, [
       PLUGINS="${PLUGINS} mpgatofixed32"
       LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad" ],
@@ -1493,60 +1525,72 @@ dnl
 dnl  ffmpeg decoder plugin
 dnl
 AC_ARG_ENABLE(ffmpeg,
-[  --enable-ffmpeg         ffmpeg codec (default disabled)])
-if test "x${enable_ffmpeg}" = "xyes"
+[  --enable-ffmpeg         ffmpeg codec (default enabled)])
+if test "x${enable_ffmpeg}" != "xno"
 then
-  AC_ARG_WITH(ffmpeg,
-    [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
-  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"
-  fi
-
-  dnl Add postprocessing modules
-  PLUGINS="${PLUGINS} postprocessing_c"
-  if test "x${ac_cv_mmx_inline}" != "xno"; then
-    PLUGINS="${PLUGINS} postprocessing_mmx"
-  fi
+  AC_ARG_WITH(ffmpeg-tree,
+    [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
 
-  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_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
+    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([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ])
+    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 Duplicate the ffmpeg CPPFLAGS and LDFLAGS for the encoder
+  CPPFLAGS_encoder_ffmpeg="${CPPFLAGS_ffmpeg}"
+  dnl XXX: we don't link with -lavcodec blah blah blah
+  #LDFLAGS_encoder_ffmpeg="${LDFLAGS_ffmpeg}"
+
+  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
 
@@ -1657,17 +1701,46 @@ then
     LDFLAGS="${LDFLAGS_save}"
     CPPFLAGS="${CPPFLAGS_save}"
   fi
-fi
 
+  dnl Duplicate the xvid CPPFLAGS and LDFLAGS for the encoder
+  LDFLAGS_encoder_xvid=${LDFLAGS_xvid}
+  CPPFLAGS_encoder_xvid=${CPPFLAGS_xvid}
+fi
 
+dnl
+dnl  QuickTime plugin
+dnl
+AC_ARG_ENABLE(quicktime,
+  [  --enable-quicktime      QuickTime module (default enabled on MacOS X)])
+if test "x${enable_quicktime}" != "xno" &&
+  (test "x${SYS}" = "xdarwin" || test "x${enable_quicktime}" = "xyes")
+then
+  AC_CHECK_HEADERS(QuickTime/QuickTime.h,
+    [ BUILTINS="${BUILTINS} quicktime"
+      LDFLAGS_quicktime="${LDFLAGS_quicktime} -framework QuickTime -framework Carbon"
+    ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
+fi
 
 dnl
 dnl MP4 module
 dnl
 AC_CHECK_HEADERS(zlib.h, [
   LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
+  LDFLAGS_skins="${LDFLAGS_skins} -lz"
+  LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lz"
 ] )
 
+
+dnl
+dnl skins module
+dnl
+AC_CHECK_HEADERS(libtar.h, [
+  LDFLAGS_skins="${LDFLAGS_skins} -ltar"
+  LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -ltar"
+] )
+
+
+
 dnl
 dnl  a52 AC3 decoder plugin
 dnl
@@ -1730,7 +1803,7 @@ then
         LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
       ],[
-        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.])
+        AC_MSG_ERROR([Could not find liba52 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}"
@@ -1742,7 +1815,7 @@ dnl
 dnl  DV plugin
 dnl
 AC_ARG_ENABLE(dv,
-  [  --enable-dv             DV decoder support (default disabled)])
+  [  --enable-dv             DV decoder support (deprecated in favor of ffmpeg) (default disabled)])
 if test "x${enable_dv}" = "xyes"
 then
   AC_CHECK_HEADERS(libdv/dv.h, [
@@ -1768,13 +1841,53 @@ dnl
 dnl  Libmpeg2 plugin
 dnl
 AC_ARG_ENABLE(libmpeg2,
-  [  --enable-libmpeg2       libmpeg2 decoder support (default disabled)])
-if test "x${enable_libmpeg2}" = "xyes"
+  [  --enable-libmpeg2       libmpeg2 decoder support (default enabled)])
+if test "x${enable_libmpeg2}" != "xno"
 then
-  AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
-    PLUGINS="${PLUGINS} libmpeg2"
-    LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"
-   ],[])
+  AC_ARG_WITH(libmpeg2-tree,
+  [    --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
+  if test "x${with_libmpeg2_tree}" != "x"
+  then
+    AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
+    real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
+    if test "x${real_libmpeg2_tree}" = x
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_libmpeg2_tree}])
+    fi
+    if test -f "${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a"
+    then
+      dnl  Use a custom libmpeg2
+      AC_MSG_RESULT(${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a)
+      PLUGINS="${PLUGINS} libmpeg2"
+      LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -L${real_libmpeg2_tree}/libmpeg2/.libs -lmpeg2"
+      CFLAGS_libmpeg2="${CFLAGS_libmpeg2} -I${real_libmpeg2_tree}/include"
+      eval "`cd ${real_libmpeg2_tree}/include && ln -sf . mpeg2dec 2>/dev/null`"
+    else
+      dnl  The given libmpeg2 wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}])
+    fi
+  else
+    AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
+      AC_MSG_CHECKING(for libmpeg2 version >= 0.3.2)
+      AC_EGREP_CPP(yes,
+        [#include <mpeg2dec/mpeg2.h>
+         #ifdef MPEG2_RELEASE
+         #if MPEG2_RELEASE >= MPEG2_VERSION(0,3,2)
+         yes
+         #endif
+         #endif],
+        [AC_MSG_RESULT([yes])
+          PLUGINS="${PLUGINS} libmpeg2"
+          LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"],
+        [AC_MSG_RESULT([no])
+          AC_MSG_ERROR([Your libmpeg2 is too old (you need the cvs version): you may get a more recent one from http://libmpeg2.sf.net/. Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])])],
+
+      [AC_MSG_ERROR([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ (you need the cvs version). Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])]
+    )
+  fi
 fi
 
 dnl
@@ -1789,7 +1902,7 @@ then
     LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
    ],[])
 fi
-         
+
 dnl
 dnl  Tremor plugin
 dnl
@@ -1854,6 +1967,25 @@ dnl
 
 AC_ARG_WITH(,[Video plugins:])
 
+dnl Check for DPMS
+if test "x${SYS}" != "xmingw32"
+then
+  CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
+  AC_CHECK_HEADERS(X11/extensions/dpms.h, [
+    AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
+    AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
+      AC_MSG_RESULT(yes)
+      AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
+                Define if <X11/extensions/dpms.h> defines DPMSInfo.)
+    ],[
+      AC_MSG_RESULT(no)
+    ])
+  ],,[
+    #include <X11/Xlib.h>
+  ])
+  CPPFLAGS="${CPPFLAGS_save}"
+fi
+
 dnl
 dnl  X11 module
 dnl  (enabled by default except on win32)
@@ -1867,6 +1999,13 @@ if test "x${enable_x11}" != "xno" &&
     PLUGINS="${PLUGINS} x11"
     LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
     CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
+    AC_CHECK_HEADERS(X11/extensions/Xinerama.h, [
+      CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
+      AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
+        AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
+        LDFLAGS_x11="${LDFLAGS_x11} -lXinerama")
+      CFLAGS="${CFLAGS_save}"
+    ])
   ])
   CPPFLAGS="${CPPFLAGS_save}"
 fi
@@ -1896,6 +2035,11 @@ if test "x${enable_xvideo}" != "xno" &&
         :
       )
     )
+    AC_CHECK_HEADERS(X11/extensions/Xinerama.h, [
+      AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
+        AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
+        LDFLAGS_xvideo="${LDFLAGS_xvideo} -lXinerama")
+    ])
     CFLAGS="${CFLAGS_save}"
   ]
   CPPFLAGS="${CPPFLAGS_save}")
@@ -1970,6 +2114,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"
+  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)
@@ -2214,6 +2388,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
@@ -2226,6 +2420,77 @@ then
     PLUGINS="${PLUGINS} beos"
 fi
 
+dnl
+dnl Skins module
+dnl
+AC_ARG_ENABLE(skins,
+  [  --enable-skins          Skins interface module (default enabled on Win32)])
+if test "x${enable_skins}" != "xno"; 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 "x${with_skins_wx_config_path}" != "xno"
+      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 "x${WX_CONFIG_SKINS}" != "xno"
+  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
+    CPPFLAGS_skins="${CPPFLAGS_skins} `${WX_CONFIG_SKINS} --cxxflags` -DWX_SKINS"
+    LDFLAGS_skins="${LDFLAGS_skins} `${WX_CONFIG_SKINS} --libs`"
+  fi
+
+  if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
+    PLUGINS="${PLUGINS} skins"
+    CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -U_OFF_T_ -U_off_t -fno-rtti -Imodules/gui/skins"
+    LDFLAGS_skins="${LDFLAGS_skins} -loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32"
+  else
+    if test "x${enable_skins}" = "xyes"; then
+      IMLIB2_PATH="${PATH}"
+      AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
+      if test "x${IMLIB2_CONFIG_SKINS}" = "xno"; then
+        AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-skins.])
+      fi
+
+      PLUGINS="${PLUGINS} skins"
+      CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
+      LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
+      PLUGINS="${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 "x${enable_basic_skins}" = "xyes"; then
+  if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
+
+    CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -U_OFF_T_ -U_off_t -fno-rtti -Imodules/gui/skins"
+    LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32"
+
+  else
+    IMLIB2_PATH="${PATH}"
+    AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
+    if test "x${IMLIB2_CONFIG_SKINS}" = "xno"; then
+    AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-basic-skins.])
+    fi
+
+    CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
+    LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
+  fi
+
+  PLUGINS="${PLUGINS} basic_skins"
+  CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -DBASIC_SKINS"
+fi
+
 dnl
 dnl  Gtk+ module
 dnl
@@ -2279,6 +2544,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
@@ -2395,6 +2676,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
@@ -2443,7 +2740,16 @@ 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"
+     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
@@ -2528,11 +2834,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
@@ -2548,18 +2854,6 @@ AC_ARG_ENABLE(qnx,
       ])
     fi
 
-dnl
-dnl  Windows native interface module, built with Borland C++ Builder
-dnl
-AC_ARG_ENABLE(intfwin,
-[  --enable-intfwin        Win32 interface support (default disabled)],
-[ if test "x${enable_intfwin}" != "xno"
-  then
-    AC_CHECK_TOOL(BPR2MAK, bpr2mak, AC_ERROR(bpr2mak not found))
-    AC_CHECK_TOOL(BCMAKE, bcmake, AC_ERROR(bcmake not found))
-    PLUGINS="${PLUGINS} win32"
-  fi ])
-
 dnl
 dnl  ncurses module
 dnl
@@ -2607,7 +2901,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})
@@ -2616,7 +2910,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
@@ -2760,7 +3054,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
@@ -2772,6 +3066,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
@@ -2779,7 +3088,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
@@ -2911,6 +3221,7 @@ AC_SUBST(LDFLAGS_mozilla)
 
 AC_OUTPUT([
   Makefile
+  autotools/Makefile
   debian/Makefile
   doc/Makefile
   intl/Makefile