]> git.sesse.net Git - vlc/blobdiff - configure.ac
fi.po: svn:keywords and a small fix
[vlc] / configure.ac
index a9e4f4bb9895f5056ccb72688a38bc4fb1fafd30..3e0cb5fdd78ccb72b9e46338c2057d71bcdac130 100644 (file)
@@ -242,7 +242,8 @@ case "${host_os}" in
     if test "${SYS}" = "mingw32"; then
         # add ws2_32 for closesocket, select, recv
         VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm])
-        VLC_ADD_LDFLAGS([vlc activex mozilla],[-mwindows])
+        VLC_ADD_LDFLAGS([vlc],[-mwindows])
+        VLC_ADD_LDFLAGS([activex mozilla],[-lgdi32])
         VLC_ADD_LDFLAGS([cdda vcdx cddax sdl_image],[-lwinmm])
         VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl flac ts audioscrobbler],[-lws2_32])
     fi
@@ -322,6 +323,7 @@ AC_CACHE_VAL(lt_cv_deplibs_check_method,
     [lt_cv_deplibs_check_method=pass_all])
 
 AC_DISABLE_STATIC
+AC_DISABLE_FAST_INSTALL
 AC_LIBTOOL_DLOPEN
 AC_LIBTOOL_WIN32_DLL
 m4_undefine([AC_PROG_F77])
@@ -331,12 +333,6 @@ AC_PROG_LIBTOOL
 m4_undefine([AC_DEPLIBS_CHECK_METHOD])
 m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
 
-AC_ARG_ENABLE(libtool,
-    [  --enable-libtool        use libtool (default enabled)])
-AS_IF([test "x{enable_libtool}" = "xno"], [
-       AC_MSG_WARN([Disabling libtool is strongly discouraged. There are known bugs.])
-])
-
 lt_cv_deplibs_check_method=pass_all
 
 
@@ -360,39 +356,22 @@ fi
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fa fr fur gl he hi hu it ja ka ko lt lv ms my ne nl no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW"
 AM_GNU_GETTEXT_VERSION(0.16.1)
 AM_GNU_GETTEXT
 AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
   AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, [Define if we use the local libintl])
   AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_builddir)/intl"
-  AS_IF([test "${enable_libtool}" != "no"], [
-    INCLUDED_LIBINTL="${LTLIBINTL}"
-  ],[
-    INCLUDED_LIBINTL="${LIBINTL}"
-  ])
 ], [
-  AS_IF([test "${enable_libtool}" != "no"], [
-    VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
-  ], [
-    VLC_ADD_LDFLAGS([libvlc vlc], [${LIBINTL}])
-  ])
+  VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
 ])
-AC_SUBST(INCLUDED_LIBINTL)
 
 dnl
 dnl Iconv stuff
 dnl
-if test "${SYS}" != "mingwce"; then
 AS_IF([test "$am_cv_func_iconv" != "yes"],
        [AC_MSG_ERROR([libiconv is needed for VLC to work properly])])
-fi
 VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
-AS_IF([test "${enable_libtool}" != "no"], [
-  VLC_ADD_LDFLAGS([libvlc vlc],[${LIBICONV}])
-],[
-  VLC_ADD_LDFLAGS([libvlc vlc],[${LTLIBICONV}])
-])
+VLC_ADD_LDFLAGS([libvlc],[${LTLIBICONV}])
 
 dnl Check for the need to include the mingwex lib for mingw32
 if test "${SYS}" = "mingw32"
@@ -451,24 +430,6 @@ VLC_LIBRARY_SUFFIX
 VLC_SYMBOL_PREFIX
 AC_SUBST(SYMPREF)
 
-AS_IF([test "${enable_libtool}" = "no"], [
-case "${SYS}" in
-  mingw32|cygwin)
-    VLC_ADD_CFLAGS([pic plugin mozilla activex],[${CFLAGS_mingw32_special}])
-    VLC_ADD_CXXFLAGS([pic plugin mozilla activex],[${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}])
-    VLC_ADD_OBJCFLAGS([pic plugin mozilla activex],[${CFLAGS_mingw32_special}])
-    ;;
-  mingwce)
-    ;;
-  *)
-    VLC_ADD_CFLAGS([pic plugin mozilla],[-fpic -fPIC])
-    VLC_ADD_CXXFLAGS([pic plugin mozilla],[-fpic -fPIC])
-    VLC_ADD_OBJCFLAGS([pic plugin mozilla],[-fpic -fPIC])
-    VLC_ADD_LDFLAGS([plugin mozilla],[-fpic -fPIC])
-    ;;
-esac
-])
-
 dnl The -DSYS_FOO flag
 CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
 
@@ -483,6 +444,10 @@ AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
 AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
 
+AS_IF([test "${SYS}" = "linux"], [
+  AC_CHECK_FUNCS(tee)
+])
+
 dnl Check for setlocal and langinfo
 AC_CHECK_FUNCS(setlocale)
 AC_CHECK_HEADERS(langinfo.h)
@@ -626,7 +591,7 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
+  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
   VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
@@ -831,7 +796,7 @@ AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioc
 AC_CHECK_HEADERS([arpa/inet.h net/if.h netinet/in.h sys/socket.h netinet/udplite.h])
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
-AC_CHECK_HEADERS(linux/version.h)
+AC_CHECK_HEADERS([linux/version.h linux/dccp.h])
 AC_CHECK_HEADERS(syslog.h)
 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
@@ -924,6 +889,14 @@ then
           VLC_ADD_PLUGINS([dbus])
           VLC_ADD_LDFLAGS([dbus],[$DBUS_LIBS])
           VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
+        fi
+      dnl Check for Telepathy
+        AC_ARG_ENABLE(telepathy,
+          [  --enable-telepathy          Telepathy Presence plugin through DBus(default enabled)])
+        if test "${enable_telepathy}" != "no"; then
+          VLC_ADD_PLUGINS([telepathy])
+          VLC_ADD_LDFLAGS([telepathy],[$DBUS_LIBS])
+          VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
         fi],
 
     if ${PKG_CONFIG} --exists dbus-1
@@ -994,7 +967,7 @@ if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
 fi
 CFLAGS="${CFLAGS_save}"
 
-RDC_PROG_CC_WFLAGS([all extra no-unused-parameter sign-compare undef pointer-arith bad-function-cast cast-align write-strings old-style-definition missing-prototypes volatile-register-var])
+RDC_PROG_CC_WFLAGS([all extra no-unused-parameter sign-compare undef pointer-arith bad-function-cast cast-align write-strings missing-prototypes volatile-register-var])
 RDC_PROG_CC_FLAGS_IFELSE([-pipe])
 
 dnl This helps detect broken plugins with undefined symbols
@@ -1027,7 +1000,7 @@ AC_CACHE_CHECK([if \$CC accepts -O3],
     [ac_cv_c_o3],
     [CFLAGS="${CFLAGS_save} -O3"
      AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
-if test "${ac_cv_c_o3}" != "no"; then
+if test "${ac_cv_c_o3}" != "no" -a "x${enable_debug}" = "xno"; then
     CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O3"
 else
     AC_CACHE_CHECK([if \$CC accepts -O2],
@@ -1084,8 +1057,6 @@ AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
      AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
 if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
-    # these plugins do not compile without -fomit-frame-pointer, damn gcc!
-    VLC_ADD_CFLAGS([i420_yuy2_mmx i420_yuy2_sse2],[-fomit-frame-pointer])
 fi
 
 dnl Check for -fvisibility=hidden
@@ -1097,6 +1068,8 @@ if test "${ac_cv_c_visibility_hidden}" != "no"; then
     VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden])
 fi
 
+AM_CONDITIONAL(HAVE_COMPILER_EXPORT, [test "$SYS" = "mingw32" -o "${ac_cv_c_visibility_hidden}" != "no"])
+
 dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers)
 dnl AC_LANG_PUSH(C++)
 dnl     AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden],
@@ -1110,14 +1083,14 @@ dnl     CXXFLAGS="${CXXFLAGS_save}"
 dnl AC_LANG_POP(C++)
 
 dnl Check for -mdynamic-no-pic
-AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
-    [ac_cv_c_dynamic_no_pic],
-    [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
-     AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
-AS_IF([test "${enable_libtool}" = "no" && test "${ac_cv_c_dynamic_no_pic}" != "no"], [
-    VLC_ADD_CFLAGS([builtin],[-mdynamic-no-pic])
-    VLC_ADD_CFLAGS([libvlc],[-mdynamic-no-pic])
-])
+dnl AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
+dnl     [ac_cv_c_dynamic_no_pic],
+dnl     [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
+dnl      AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
+dnl AS_IF([test "${ac_cv_c_dynamic_no_pic}" != "no"], [
+dnl     VLC_ADD_CFLAGS([builtin],[-mdynamic-no-pic])
+dnl     VLC_ADD_CFLAGS([libvlc],[-mdynamic-no-pic])
+dnl ])
 
 dnl Check for Darwin plugin linking flags
 AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
@@ -1130,19 +1103,17 @@ fi
 
 dnl Check for standard plugin linking flags
 dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning)
-AS_IF([test "${enable_libtool}" = "no"], [
-  AS_IF([test "${SYS}" = "beos"], [
-    VLC_ADD_LDFLAGS([plugin mozilla],[-nostart])
-  ], [
-    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)])
-    AS_IF([test "${ac_cv_ld_plugins}" != "no"], [
-      VLC_ADD_LDFLAGS([plugin mozilla],[-shared])
-    ])
-  ])
-])
+dnl AS_IF([test "${SYS}" = "beos"], [
+dnl   VLC_ADD_LDFLAGS([plugin mozilla],[-nostart])
+dnl ], [
+dnl   AC_CACHE_CHECK([if \$CC accepts -shared],
+dnl         [ac_cv_ld_plugins],
+dnl         [CFLAGS="${CFLAGS_save} -shared"
+dnl        AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
+dnl   AS_IF([test "${ac_cv_ld_plugins}" != "no"], [
+dnl     VLC_ADD_LDFLAGS([plugin mozilla],[-shared])
+dnl   ])
+dnl ])
 
 dnl Check for variadic macros
 AC_CACHE_CHECK([for variadic cpp macros],
@@ -1234,13 +1205,14 @@ dnl  default modules
 dnl
 VLC_ADD_PLUGINS([dummy logger memcpy])
 VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 vc1 ps pva avi asf mp4 rawdv rawvid nsv real aiff mjpeg demuxdump flacsys tta])
-VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
-VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise grain extract sharpen])
+VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec subsusf t140 dvbsub mpeg_audio lpcm a52 dts cinepak flac])
+VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise grain extract sharpen seamcarving])
 VLC_ADD_PLUGINS([converter_fixed mono])
 VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
 VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
-VLC_ADD_PLUGINS([playlist export sgimb nsc xtag])
-VLC_ADD_PLUGINS([i420_rgb rawvideo blend scale image logo magnify puzzle colorthres])
+VLC_ADD_PLUGINS([spatializer])
+VLC_ADD_PLUGINS([playlist export nsc xtag])
+VLC_ADD_PLUGINS([i420_rgb grey_yuv rawvideo blend scale image logo magnify puzzle colorthres])
 VLC_ADD_PLUGINS([wav araw subtitle vobsub adpcm a52sys dtssys au ty voc xa nuv])
 VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp])
 VLC_ADD_PLUGINS([access_http access_mms access_ftp])
@@ -1261,16 +1233,6 @@ if test "${SYS}" != "mingwce"; then
   VLC_ADD_PLUGINS([converter_float a52tospdif dtstospdif audio_format])
 fi
 
-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 "${enable_mostly_builtin}" = "yes"; then
-  VLC_ADD_BUILTINS([${PLUGINS}])
-  PLUGINS=""
-fi
-
 dnl
 dnl Some plugins aren't useful on some platforms
 dnl
@@ -1296,7 +1258,7 @@ MMXEXT_MODULES="memcpymmxext"
 #MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext"
 THREEDNOW_MODULES="memcpy3dn"
 SSE_MODULES=""
-SSE2_MODULES="i420_rgb_sse2 i420_yuy2_sse2"
+SSE2_MODULES="i420_rgb_sse2 i420_yuy2_sse2 i422_yuy2_sse2"
 ALTIVEC_MODULES="memcpyaltivec i420_yuy2_altivec"
 #ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec"
 
@@ -1322,7 +1284,7 @@ AC_CACHE_CHECK([if \$CC groks MMX intrinsics],
                     [ac_cv_c_mmx_intrinsics=no])])
 if test "${ac_cv_c_mmx_intrinsics}" != "no"; then
   AC_DEFINE(HAVE_MMX_INTRINSICS, 1, Define if MMX intrinsics are available.)
-  VLC_ADD_CFLAGS([i420_rgb_mmx],[-mmmx])
+  VLC_ADD_CFLAGS([${MMX_MODULES}],[-mmmx])
 fi
 
 dnl  Check for fully workin SSE2 intrinsics
@@ -1347,7 +1309,7 @@ AC_CACHE_CHECK([if \$CC groks SSE2 intrinsics],
                     [ac_cv_c_sse2_intrinsics=no])])
 if test "${ac_cv_c_sse2_intrinsics}" != "no"; then
   AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, Define if SSE2 intrinsics are available.)
-  VLC_ADD_CFLAGS([i420_rgb_sse2],[-msse2])
+  VLC_ADD_CFLAGS([${SSE2_MODULES}],[-msse2])
 fi
 
 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
@@ -1550,12 +1512,12 @@ dnl
 if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}"="i486" -o "${host_cpu}" = "x86_64"
 then
     ARCH="${ARCH} mmx"
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}])
 fi
 if test "${host_cpu}" = "i686" -o "${host_cpu}" = "x86_64"
 then
     ARCH="${ARCH} sse sse2"
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}])
 fi
 
 dnl
@@ -1586,9 +1548,9 @@ dnl
 AC_ARG_ENABLE(altivec,
 [  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
 [ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ],
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}]) fi ],
 [ if test "${host_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}]) fi ])
 
 dnl
 dnl  Debugging mode
@@ -1659,9 +1621,9 @@ if test "${enable_shout}" = "yes"; then
     [AC_MSG_WARN(libshout library not found)])
 fi
 
-dnl Lua playlist demux
-AC_ARG_ENABLE(luaplaylist,
-  [  --enable-lua            lua playlist demux plugin (default enabled)])
+dnl Lua modules
+AC_ARG_ENABLE(lua,
+  [  --enable-lua            lua playlist and metafetcher plugins (default enabled)])
 if test "${enable_lua}" != "no"
 then
   PKG_CHECK_MODULES(LUA, lua5.1,
@@ -1690,9 +1652,9 @@ then
     ])
   if test "x${have_lua}" = "xyes" ;  then
      AC_DEFINE(HAVE_LUA, [], [Define if you have the lua library])
-     VLC_ADD_PLUGINS([luaplaylist])
-     VLC_ADD_LDFLAGS([luaplaylist],[$LUA_LIBS])
-     VLC_ADD_CFLAGS([luaplaylist],[$LUA_CFLAGS])
+     VLC_ADD_PLUGINS([lua])
+     VLC_ADD_LDFLAGS([lua],[$LUA_LIBS])
+     VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
   fi
 fi
 
@@ -1773,11 +1735,12 @@ dnl
 dnl Taglibplugin
 dnl
 AC_ARG_ENABLE(taglib,
-  [  --enable-taglib Taglib support (default disabled) ])
-  AS_IF([test "${enable_taglib}" = "yes"],[
+  [  --disable-taglib Taglib support (default enabled) ])
+  AS_IF([test "${enable_taglib}" != "no"],[
     PKG_CHECK_MODULES(TAGLIB, taglib,
-      [ VLC_ADD_PLUGINS([taglib])
-        VLC_ADD_LDFLAGS([taglib],[$TAGLIB_LIBS])
+      [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] )
+        VLC_ADD_PLUGINS([taglib])
+        VLC_ADD_LDFLAGS([taglib],[$TAGLIB_LIBS -lz])
        VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS]) ],
       [AC_MSG_WARN(TagLib library not found)])
   ])
@@ -2893,10 +2856,16 @@ fi
 dnl
 dnl   libid3tag support (FIXME!!! doesn't work with new input)
 dnl
-AC_CHECK_HEADERS(id3tag.h, [
-  AC_CHECK_HEADERS(zlib.h, [
-    VLC_ADD_LDFLAGS([id3tag],[-lid3tag -lz])
-    VLC_ADD_PLUGINS([id3tag])]) ])
+AC_ARG_ENABLE( id3tag,
+  [  --disable-id3tag id3tag metadata reader plugin (default enabled)])
+AS_IF([test "${enable_id3tag}" != "no"], [
+  AC_CHECK_HEADERS(id3tag.h, [
+    AC_CHECK_HEADERS(zlib.h, [
+      VLC_ADD_LDFLAGS([id3tag],[-lid3tag -lz])
+      VLC_ADD_PLUGINS([id3tag])
+    ])
+  ])
+])
 
 dnl
 dnl  ffmpeg decoder/demuxer plugin
@@ -2964,6 +2933,34 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
                VLC_ADD_LDFLAGS([ffmpeg],[-lz])
      fi])
 
+ AC_ARG_WITH(ffmpeg-amrnb,
+   [    --with-ffmpeg-amrnb specify if ffmpeg has been compiled with libamrnb support],
+   [
+     if test "$with_ffmpeg_amrnb" = "yes";     then
+       VLC_ADD_LDFLAGS([ffmpeg],[-lamrnb])
+     fi])
+
+ AC_ARG_WITH(ffmpeg-amrwb,
+   [    --with-ffmpeg-amrwb specify if ffmpeg has been compiled with libamrwb support],
+   [
+     if test "$with_ffmpeg_amrwb" = "yes";     then
+       VLC_ADD_LDFLAGS([ffmpeg],[-lamrwb])
+     fi])
+
+ AC_ARG_WITH(ffmpeg-x264,
+   [    --with-ffmpeg-x264 specify if ffmpeg has been compiled with libamrnb support],
+   [
+     if test "$with_ffmpeg_x264" = "yes";      then
+       VLC_ADD_LDFLAGS([ffmpeg],[-lx264])
+     fi])
+
+ AC_ARG_WITH(ffmpeg-a52,
+   [    --with-ffmpeg-x264 specify if ffmpeg has been compiled with libamrnb support],
+   [
+     if test "$with_ffmpeg_a52" = "yes";       then
+       VLC_ADD_LDFLAGS([ffmpeg],[-la52])
+     fi])
+
  dnl
  dnl test for --with-ffmpeg-tree
  dnl
@@ -2997,59 +2994,33 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
    fi
    dnl  Use a custom libffmpeg
    AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-
-   if fgrep -s "CONFIG_ZLIB=yes" "${real_ffmpeg_tree}/config.mak"; then
-     if test "${with_ffmpeg_zlib}" != "yes"; then
-       VLC_ADD_LDFLAGS([ffmpeg],[-lz])
-     fi
-   fi
-   if fgrep -s "CONFIG_MP3LAME=yes" "${real_ffmpeg_tree}/config.mak"; then
-     if test "${with_ffmpeg_mp3lame}" != "yes"; then
-       VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
-     fi
-   fi
-   if fgrep -s "CONFIG_FAAC=yes" "${real_ffmpeg_tree}/config.mak"; then
-     if test "${with_ffmpeg_faac}" != "yes"; then
-       VLC_ADD_LDFLAGS([ffmpeg],[-lfaac])
-     fi
-   fi
-   if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then
-     if test "${with_ffmpeg_dts}" != "yes"; then
-       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
-       AC_CHECK_LIB(dts_pic, dts_free, 
-         [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
-         [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
-       LDFLAGS="${LDFLAGS_save}"
-     fi
-   fi
-   if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then
-     VLC_ADD_LDFLAGS([ffmpeg],[-lvorbis -lvorbisenc])
-   fi
-   if fgrep -s "CONFIG_FAAD=yes" "${real_ffmpeg_tree}/config.mak"; then
-     VLC_ADD_LDFLAGS([ffmpeg],[-lfaad])
-   fi
-   if fgrep -s "CONFIG_XVID=yes" "${real_ffmpeg_tree}/config.mak"; then
-     VLC_ADD_LDFLAGS([ffmpeg],[-lxvidcore])
-   fi
-
+   
+   dnl Use pkg-config to look for the ldflags in libav*-uninstalled.pc
+   PKG_CONFIG_PATH_save="$PKG_CONFIG_PATH"
+   PKG_CONFIG_LIBDIR_save="$PKG_CONFIG_LIBDIR"
+   export PKG_CONFIG_PATH=""
+   export PKG_CONFIG_LIBDIR="${real_ffmpeg_tree}"
+  
+   PKG_CHECK_MODULES( [FFMPEG],[libavcodec libavformat libpostproc], [
+       VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_CFLAGS})
+       VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_LIBS})]
+      ,[])
+   AS_IF([test -n "${PKG_CONFIG_PATH_save}"],[
+         export PKG_CONFIG_PATH="${PKG_CONFIG_PATH_save}"
+   ],[
+       unset PKG_CONFIG_PATH
+   ])
+   AS_IF([test -n "${PKG_CONFIG_LIBDIR_save}"],[   
+       export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR_save}"   
+   ],[
+        unset PKG_CONFIG_LIBDIR
+   ])
+   
    VLC_ADD_BUILTINS([ffmpeg])
    if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then
      VLC_ADD_BUILTINS([stream_out_switcher])
    fi
 
-   if test -f "${real_ffmpeg_tree}/libavutil/libavutil.a"; then
-     VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavutil ${real_ffmpeg_tree}/libavutil/libavutil.a])
-     VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavutil])
-   fi
-
-   VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec ${real_ffmpeg_tree}/libavcodec/libavcodec.a])
-   VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec])
-
-   if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
-     AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.])
-     VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a])
-     VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
-   fi
 
    if test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"; then
      AC_DEFINE(HAVE_LIBSWSCALE_TREE, 1, [Define if you have ffmpeg's libswscale.])
@@ -4181,6 +4152,9 @@ then
     VLC_ADD_PLUGINS([freetype])
     VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
     VLC_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`])
+    if test "${SYS}" = "mingw32"; then
+       VLC_ADD_LDFLAGS([freetype],[-lxml2])]
+    fi
     AC_CHECK_HEADERS(fontconfig/fontconfig.h,
       [VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
        VLC_ADD_LDFLAGS([freetype],[-lfontconfig])])
@@ -4439,38 +4413,73 @@ fi
 
 dnl
 dnl  DirectFB module
+dnl  try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
+dnl  TODO: support for static linking
 dnl
 AC_ARG_ENABLE(directfb,
   [  --enable-directfb       DirectFB support (default disabled)])
-if test "${enable_directfb}" = "yes"
-then
-  if test "${with_directfb}" = "no"
-  then
-    AC_CHECK_HEADER(directfb.h, have_directfb="true", have_directfb="false")
-    if test "${have_directfb}"= "true"
-    then
+AC_ARG_WITH(directfb, 
+  [    --with-directfb=PATH  path to DirectFB headers and libraries])
+
+if test "${enable_directfb}" = "yes"; then
+    have_directfb="false"
+    CPPFLAGS_mydirectfb=
+    LDFLAGS_mydirectfb=
+    if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
+        dnl Trying the given location
+        CPPFLAGS_save=${CPPFLAGS}
+        LDFLAGS_save=${LDFLAGS}
+
+        CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
+        LDFLAGS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/"
+        LDFLAGS_new="${LDFLAGS_new} -L${with_directfb}/src/.libs/"
+
+        CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
+        LDFLAGS="${LD_FLAGS} ${LDFLAGS_new}"
+
+        dnl FIXME: too obscure
+        AC_CHECK_HEADER([directfb.h], [
+            AC_CHECK_LIB([direct],[direct_initialize], [
+                AC_CHECK_LIB([fusion], [fusion_enter], [
+                    AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
+                ], have_directfb="false")
+            ], have_directfb="false")
+        ], have_directfb="false")
+
+        dnl Restore flags
+        CPPFLAGS="${CPPFLAGS_save}"
+        LDFLAGS="${LDFLAGS_save}"
+
+        if test "${have_directfb}" = "true"; then
+            LDFLAGS_mydirectfb="${LDFLAGS_new} -lz -ldl -ldirectfb -lfusion -ldirect -lpthread"
+            CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
+        fi
+    else 
+        dnl Look for directfb-config
+        AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
+        if test "${DIRECTFB_CONFIG}" != "no"; then
+            CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
+            LDFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
+            have_directfb="true"
+        else 
+            dnl Trying with pkg-config
+            PKG_CHECK_MODULES(DIRECTFB, directfb, [
+                CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
+                LDFLAGS_mydirectfb="${DIRECTFB_LIBS}"
+                have_directfb="true"
+                ], [have_directfb="false"])
+        fi
+    fi
+    if test "${have_directfb}" = "true"; then
         VLC_ADD_PLUGINS([directfb])
-        VLC_ADD_LDFLAGS([directfb],[-ldirectfb -lfusion -ldirect -lpthread -ljpeg -lz -ldl])
-        VLC_ADD_CPPFLAGS([directfb],[-I/usr/include/directfb -D_REENTRANT])
-    else
-        AC_MSG_ERROR([cannot find /usr/include/directfb headers, make sure directfb is installed on your system or use --disable-directfb])
+        VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
+        VLC_ADD_LDFLAGS([directfb],[${LDFLAGS_mydirectfb}])
+    else 
+        AC_MSG_ERROR([cannot find directfb headers and/or libraries ])
     fi
-  else
-    CPPFLAGS_save="${CPPFLAGS}"
-    CPPFLAGS="${CPPFLAGS} -I${with_directfb}/include"
-    AC_CHECK_HEADER(directfb.h, have_directfb="true", have_directfb="false")
-    CPPFLAGS="${CPPFLAGS_save}"
-    AC_ARG_WITH(directfb,
-        [    --with-directfb=PATH  path to directfb],
-        [ if test "${with_directfb}" != "no" -a -n "${with_directfb}"
-        then
-            VLC_ADD_PLUGINS([directfb])
-            VLC_ADD_CPPFLAGS([directfb],[-I${with_directfb}/include -D_REENTRANT])
-            VLC_ADD_LDFLAGS([directfb],[-L${with_directfb}/lib -ldirectfb -lfusion -ldirect -lpthread -ljpeg -lz -ldl])
-        fi ],
-        [ AC_MSG_ERROR([cannot find directfb headers in ${with_directfb}/include]) ])
-  fi
 fi
+
 
 dnl
 dnl  GGI module
@@ -5275,15 +5284,20 @@ AC_ARG_ENABLE(macosx,
    then
      VLC_ADD_PLUGINS([access_eyetv])
      VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,CoreFoundation])
+     VLC_ADD_LDFLAGS([minimal_macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL])
      VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit])
      VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
+     VLC_ADD_OBJCFLAGS( [minimal_macosx],[-fobjc-exceptions] )
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
     [VLC_ADD_PLUGINS([access_eyetv])
      VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,CoreFoundation])
      VLC_ADD_BUILTINS([macosx])
+     VLC_ADD_BUILTINS([minimal_macosx])
+     VLC_ADD_LDFLAGS([minimal_macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL])
      VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit])
      VLC_ADD_OBJCFLAGS([macosx],[-fobjc-exceptions])
+     VLC_ADD_OBJCFLAGS([minimal_macosx],[-fobjc-exceptions])
     ])])
 CFLAGS=$ORIGCFLAGS
 
@@ -5304,10 +5318,20 @@ dnl
 dnl  ncurses module
 dnl
 AC_ARG_ENABLE(ncurses,
-  [  --enable-ncurses        ncurses interface support (default disabled)],
-  [if test "${enable_ncurses}" = "yes"; then
-     VLC_ADD_PLUGINS([ncurses])
-     VLC_ADD_LDFLAGS([ncurses],[-lncurses])
+  [  --disable-ncurses        ncurses interface support (default enabled)],
+  [if test "${enable_ncurses}" != "no"; then
+     AC_CHECK_HEADERS(ncursesw/curses.h,
+       [AC_CHECK_LIB( ncursesw, mvprintw,
+         [VLC_ADD_PLUGINS([ncurses])
+         VLC_ADD_LDFLAGS([ncurses],[-lncursesw])])
+       ],
+       [AC_CHECK_HEADER(curses.h,
+         [AC_CHECK_LIB(ncurses, mvprintw,
+           [VLC_ADD_PLUGINS([ncurses])
+           VLC_ADD_LDFLAGS([ncurses],[-lncurses])]
+         )]
+       )]
+     )  
    fi])
 
 dnl
@@ -5464,11 +5488,7 @@ AS_IF([test "${enable_gnutls}" != "no"], [
     AS_IF([test "${SYS}" = "mingw32"], [
       dnl pkg-config --libs gnutls omits these
       VLC_ADD_LDFLAGS([gnutls], [-lz])
-      AS_IF([test "${enable_libtool}" != "no"], [
-        VLC_ADD_LDFLAGS([gnutls], [${LTLIBINTL}])
-      ], [
-        VLC_ADD_LDFLAGS([gnutls], [${LIBINTL}])
-      ])
+      VLC_ADD_LDFLAGS([gnutls], [${LTLIBINTL}])
     ])
     AC_CHECK_LIB([gcrypt], [gcry_control], [
       VLC_ADD_LDFLAGS([gnutls], [-lgcrypt -lgpg-error])
@@ -5601,7 +5621,7 @@ then
       [AC_CHECK_HEADERS(olectl.h,
         [ VLC_ADD_CPPFLAGS([activex],[-DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_])
           VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
-          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi -lgdi32]) 
+          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
           AC_CHECK_HEADERS(objsafe.h,
             VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
             [
@@ -5789,7 +5809,7 @@ then
         dnl latest gecko sdk does not have embedstring
         if test -d "${real_mozilla_sdk}/embedstring/bin"
         then
-          VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
+          VLC_ADD_LDFLAGS([mozilla],[-lembedstring])
         fi
       fi
     fi
@@ -5867,7 +5887,6 @@ then
   VLC_ADD_LDFLAGS([test3],[-lobjc])
 
   VLC_ADD_PLUGINS([${TESTS}])
-  #VLC_ADD_BUILTINS([${TESTS}])
 fi
 
 dnl
@@ -5928,48 +5947,35 @@ fi
 dnl
 dnl  Plugin and builtin checks
 dnl
-builtin_support=false
-plugin_support=:
-
-dnl Support for plugins - this must be AT THE END
-AC_ARG_ENABLE(plugins,
-  [  --disable-plugins       make all plugins built-in (default plugins enabled)],
-  [if test "${enable_plugins}" = "no"
-   then
-     plugin_support=false
-   fi])
+plugin_support=yes
 
 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_have_plugins}" = "no"
-then
-  echo "*** Your system doesn't have plugin support. All plugins will be built"
-  echo "statically."
-  plugin_support=false
-fi
+AS_IF([test "${ac_cv_have_plugins}" = "no"], [
+  AC_MSG_WARN([*** No plugin support! Building statically! ***])
+  plugin_support=no
+])
+
+AS_IF([test "${enable_shared}" = "no"], [
+  plugin_support=no
+])
 
-AS_IF([${plugin_support}], [
+AS_IF([test "${plugin_support}" != "no"], [
   AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
-], [
-  VLC_ADD_BUILTINS([${PLUGINS}])
-  PLUGINS=""
 ])
 
+AM_CONDITIONAL(HAVE_PLUGINS, [test "${plugin_support}" != "no"])
+
+dnl Temporary(?) hack for plugins/builtins transition
+VLC_ADD_PLUGINS([${BUILTINS}])
+BUILTINS=""
+
 dnl
 dnl Pic and shared libvlc stuff
 dnl
-AS_IF([test "${enable_libtool}" != "no"], [
-  AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
-  VLC_ADD_PLUGINS([${BUILTINS}])
-  AS_IF([test "${SYS}" = "mingw32"], [
-    FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
-  ])
-  BUILTINS=""
-], [
-  LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
-  FILE_LIBVLC_DLL=""
-  VLC_ADD_CPPFLAGS([libvlc],[-DDLL_EXPORT])
+AS_IF([test "${SYS}" = "mingw32"], [
+  FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
 ])
 
 dnl
@@ -5990,11 +5996,6 @@ AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])
 AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) 
 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) 
 
-dnl Old definitions for version-dependant plugins
-dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
-dnl AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
-dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
-
 dnl New definitions with value matching 0.9.0 release
 module_symbol="0_9_0b"
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
@@ -6034,7 +6035,6 @@ AC_SUBST(MOZILLA_SDK_PATH)
 AC_SUBST(WINE_SDK_PATH)
 AC_SUBST(LIBEXT)
 AC_SUBST(AM_CPPFLAGS)
-AC_SUBST(ALL_LINGUAS)
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
 AC_SUBST(FILE_LIBVLC_DLL)
 
@@ -6080,12 +6080,14 @@ AC_CONFIG_FILES([
   modules/audio_filter/channel_mixer/Makefile
   modules/audio_filter/converter/Makefile
   modules/audio_filter/resampler/Makefile
+  modules/audio_filter/spatializer/Makefile
   modules/audio_mixer/Makefile
   modules/audio_output/Makefile
   modules/codec/Makefile
   modules/codec/cmml/Makefile
   modules/codec/dmo/Makefile
   modules/codec/ffmpeg/Makefile
+  modules/codec/subtitles/Makefile
   modules/codec/spudec/Makefile
   modules/codec/xvmc/Makefile
   modules/control/Makefile
@@ -6100,6 +6102,7 @@ AC_CONFIG_FILES([
   modules/gui/beos/Makefile
   modules/gui/pda/Makefile
   modules/gui/macosx/Makefile
+  modules/gui/minimal_macosx/Makefile
   modules/gui/qnx/Makefile
   modules/gui/qt4/Makefile
   modules/gui/skins2/Makefile
@@ -6108,6 +6111,7 @@ AC_CONFIG_FILES([
   modules/meta_engine/Makefile
   modules/misc/Makefile
   modules/misc/dummy/Makefile
+  modules/misc/lua/Makefile
   modules/misc/memcpy/Makefile
   modules/misc/notify/Makefile
   modules/misc/testsuite/Makefile
@@ -6170,6 +6174,8 @@ echo "
 vlc aliases           :${ALIASES}
 plugins/bindings      :${PLUGINS_BINDINGS}
 
+You can check which modules have been enabled 
+with \`./vlc-config --list plugin'.
 You can tune the compiler flags in vlc-config.
 To build vlc and its plugins, type \`./compile' or \`make'.
 "