]> git.sesse.net Git - vlc/blobdiff - configure.ac
Invmem: fix a crash when allocating pictures memory, remove duplicate statement and...
[vlc] / configure.ac
index ffc4d361a9757711c711c70ffb1c4b2ea99259c3..2393011836c03c94dc70db6f74cc582e207e1639 100644 (file)
@@ -2,11 +2,11 @@ dnl Autoconf settings for vlc
 
 AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team])
 
-AC_INIT(vlc, 1.0.0-pre1)
+AC_INIT(vlc, 1.0.0-pre2)
 VERSION_MAJOR="1"
 VERSION_MINOR="0"
 VERSION_REVISION="0"
-VERSION_EXTRA="-pre1"
+VERSION_EXTRA="-pre2"
 PKGDIR="vlc"
 AC_SUBST(PKGDIR)
 
@@ -18,6 +18,7 @@ AC_PREREQ(2.59c)
 AC_CONFIG_SRCDIR(src/libvlc.c)
 AC_CONFIG_AUX_DIR(autotools)
 AC_CONFIG_MACRO_DIR(m4)
+AC_CONFIG_LIBOBJ_DIR(compat)
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 
@@ -211,10 +212,10 @@ case "${host_os}" in
     VLC_ADD_LDFLAGS([mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation])
     VLC_ADD_LDFLAGS([mkv mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation])
     VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup])
-    VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup])
-    VLC_ADD_LDFLAGS([avcodec avformat swscale imgresample postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
+    VLC_ADD_LDFLAGS([libvlc],[-Wl,dynamic_lookup])
+    VLC_ADD_LDFLAGS([avcodec avformat swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
     VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
-    VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,CoreFoundation])
+    VLC_ADD_LDFLAGS([libvlccore],[-Wl,-framework,CoreFoundation])
     VLC_ADD_LDFLAGS([motion],[-Wl,-framework,IOKit,-framework,CoreFoundation])
     AC_ARG_ENABLE(macosx-defaults,
       AS_HELP_STRING([--enable-macosx-defaults],[Build the default configuration on Mac OS X (default enabled)]))
@@ -269,26 +270,6 @@ case "${host_os}" in
         enable_xvideo="no"
         echo "  Assuming --disable-xvideo"
     fi
-    if test ".`uname -p`" = ".i386"; then
-        dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code
-        dnl without hacking it a lot, we disable mmx and sse.
-        dnl (that bug is about ld being unable to handle
-        dnl text relocation)
-        save_cflags="$CFLAGS"
-        CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress"
-        AC_TRY_LINK(
-            [int a;], [asm("movq _a,%mm0\n");],
-            ac_ld_does_not_support_text_reloc=no,
-            ac_ld_does_not_support_text_reloc=yes)
-        CFLAGS="$save_cflags"
-
-        if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then
-            enable_mmx="no"
-            echo "  Assuming --disable-mmx (due to a bug in ld)"
-            enable_sse="no"
-            echo "  Assuming --disable-sse (due to a bug in ld)"
-        fi
-    fi
     dnl
     dnl  Check for Mac OS X SDK settings
     dnl
@@ -301,6 +282,20 @@ case "${host_os}" in
         OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
         LD="${LD} -syslibroot ${with_macosx_sdk}"
     fi
+    if test "${host_cpu}" = "powerpc"; then
+        CPP="${CPP} -arch ppc"
+        CC="${CC} -arch ppc"
+        CXX="${CXX} -arch ppc"
+        OBJC="${OBJC} -arch ppc"
+        LD="${LD} -arch ppc"
+    fi    
+    if test "${host_cpu}" = "i386"; then
+        CPP="${CPP} -arch i386"
+        CC="${CC} -arch i386"
+        CXX="${CXX} -arch i386"
+        OBJC="${OBJC} -arch i386"
+        LD="${LD} -arch i386"
+    fi
     AC_ARG_WITH(macosx-version-min,
        [  --with-macosx-version-min=VERSION  compile for MacOSX VERSION and above])
     if test "${with_macosx_version_min}" != "" ; then
@@ -316,6 +311,28 @@ case "${host_os}" in
         export MACOSX_DEPLOYMENT_TARGET
     fi
     ;;
+  darwin9*)
+    if (test ".`uname -p`" = ".i386"); then
+        dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code
+        dnl without hacking it a lot, we disable mmx and sse.
+        dnl (that bug is about ld being unable to handle
+        dnl text relocation)
+        save_cflags="$CFLAGS"
+        CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress"
+        AC_TRY_LINK(
+            [int a;], [asm("movq _a,%mm0\n");],
+            ac_ld_does_not_support_text_reloc=no,
+            ac_ld_does_not_support_text_reloc=yes)
+        CFLAGS="$save_cflags"
+
+        if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then
+            enable_mmx="no"
+            echo "  Assuming --disable-mmx (due to a bug in ld)"
+            enable_sse="no"
+            echo "  Assuming --disable-sse (due to a bug in ld)"
+        fi
+    fi
+    ;;
   *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
@@ -344,7 +361,7 @@ case "${host_os}" in
 
     if test "${SYS}" = "mingw32"; then
         # add ws2_32 for closesocket, select, recv
-        VLC_ADD_LIBS([libvlc],[-lws2_32 -lnetapi32 -lwinmm])
+        VLC_ADD_LIBS([libvlccore],[-lws2_32 -lnetapi32 -lwinmm])
         VLC_ADD_LDFLAGS([vlc],[-mwindows])
         VLC_ADD_LIBS([activex mozilla],[-lgdi32])
         VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm])
@@ -352,8 +369,8 @@ case "${host_os}" in
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
-        VLC_ADD_LIBS([libvlc access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd],[-lws2])
-        VLC_ADD_LIBS([libvlc],[-lmmtimer])
+        VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd],[-lws2])
+        VLC_ADD_LIBS([libvlccore],[-lmmtimer])
    fi
     ;;
   *nto*)
@@ -374,16 +391,16 @@ case "${host_os}" in
     CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
     VLC_ADD_CXXFLAGS([beos],[])
-    VLC_ADD_LIBS([vlc libvlc logger],[-lbe])
+    VLC_ADD_LIBS([vlc libvlccore logger],[-lbe])
     VLC_ADD_LIBS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame])
     VLC_ADD_LIBS([dvdnav dvdread],[-ldl])
     VLC_ADD_LIBS([access_file],[-lpoll])
     LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}"
     dnl Check for BONE
     if test -f /boot/beos/system/lib/libbind.so; then
-        VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl_udp],[-lbind -lsocket])
+        VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlccore growl_udp],[-lbind -lsocket])
     else
-        VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl_udp],[-lnet])
+        VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlccore growl_udp],[-lnet])
     fi
 
     dnl Ugly check for Zeta
@@ -444,21 +461,40 @@ dnl Gettext stuff
 dnl
 AM_GNU_GETTEXT_VERSION([0.17])
 AM_GNU_GETTEXT([external])
-VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}])
+VLC_ADD_LIBS([libvlccore vlc], [${LTLIBINTL}])
 
 dnl
 dnl Iconv stuff
 dnl
 AM_ICONV
-VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
-VLC_ADD_LIBS([libvlc],[${LTLIBICONV}])
+VLC_ADD_CFLAGS([libvlccore],[${INCICONV}])
+VLC_ADD_LIBS([libvlccore],[${LTLIBICONV}])
+
+dnl Check for broken versions of mingw-runtime compatability library
+AS_IF([test "${SYS}" = "mingw32"], [
+    AC_MSG_CHECKING(for broken mingw-runtime)
+    AC_PREPROC_IFELSE([
+#include <_mingw.h>
+#if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 15)
+# error Attempting to use mingw-runtime with broken vsnprintf support
+#endif
+], [
+        AC_MSG_RESULT([ok])
+], [
+        AC_MSG_RESULT([present])
+        AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher!])
+])
+    dnl force use of mingw provided c99 *printf over msvcrt
+    CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
+    CPPFLAGS_save="${CPPFLAGS_save} -D__USE_MINGW_ANSI_STDIO=1"
+])
 
 dnl Check for the need to include the mingwex lib for mingw32
 if test "${SYS}" = "mingw32"
 then
     AC_CHECK_LIB(mingwex,opendir,
         AC_CHECK_LIB(mingw32,opendir,,
-            [VLC_ADD_LIBS([libvlc gtk],[-lmingwex])])
+            [VLC_ADD_LIBS([libvlccore gtk],[-lmingwex])])
     )
 fi
 
@@ -503,6 +539,29 @@ AC_LANG_PUSH(C++)
 AC_LANG_POP(C++)
 fi
 
+dnl
+dnl Buggy glibc prevention. Purposedly not cached.
+dnl Ubuntu alone has 20 bug numbers for this...
+dnl
+AC_MSG_CHECKING(for buggy GNU/libc versions)
+AC_PREPROC_IFELSE([
+#include <limits.h>
+#if defined (__GLIBC__) && (__GLIBC__ == 2) \
+  && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
+# error GNU/libc with dcgettext killer bug!
+#endif
+], [
+  AC_MSG_RESULT([not present])
+], [
+  AC_MSG_RESULT([found])
+  AS_IF([test "x${enable_nls}" != "xno" || test "x${enable_mozilla}" != "xno"], [
+    AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
+work-around for this. Check with your distribution vendor on how to update the
+glibc run-time. Alternatively, build with --disable-nls --disable-mozilla and
+be sure to not use LibVLC from other applications/wrappers.])
+  ])
+])
+
 dnl Plugin compilation stuff
 
 VLC_LIBRARY_SUFFIX
@@ -514,12 +573,11 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale])
-AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
-AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
-AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
+AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r lrintf daemon fork lstat posix_fadvise posix_madvise uselocale])
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(fcntl)
+AC_REPLACE_FUNCS([asprintf atof atoll gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab])
+AC_CHECK_FUNCS([stricmp strnicmp])
 
 dnl Check for Linux system calls
 AC_CHECK_FUNCS([vmsplice])
@@ -546,7 +604,7 @@ fi
 
 AC_CHECK_FUNCS(connect,,[
   AC_CHECK_LIB(socket,connect,[
-    VLC_ADD_LIBS([libvlc cdda cddax],-lsocket)
+    VLC_ADD_LIBS([libvlccore cdda cddax],-lsocket)
     LIBS_socket="-lsocket"
   ])
 ])
@@ -643,7 +701,7 @@ fi
 
 AC_CHECK_FUNCS(inet_aton,,[
   AC_CHECK_LIB(resolv,inet_aton,[
-    VLC_ADD_LIBS([libvlc],[-lresolv])
+    VLC_ADD_LIBS([libvlccore],[-lresolv])
   ])
 ])
 
@@ -656,7 +714,7 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
 [ # FreeBSD has a gnugetopt library for this:
   AC_CHECK_LIB([gnugetopt],[getopt_long],
     [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support)
-     VLC_ADD_LIBS([libvlc],[-lgnugetopt])],
+     VLC_ADD_LIBS([libvlccore],[-lgnugetopt])],
     [need_getopt=:])])
 fi
 AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
@@ -667,7 +725,7 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LIBS([avcodec avformat swscale imgresample postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm])
+  VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlccore vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
   VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
@@ -703,7 +761,7 @@ if test "${ac_cv_have_plugins}" = "no"; then
    [ac_cv_my_have_shl_load=yes,
     AC_CHECK_LIB(dld, shl_load,
      [ac_cv_my_have_shl_load=yes
-      VLC_ADD_LIBS([libvlc],[-ldld])])])
+      VLC_ADD_LIBS([libvlccore],[-ldld])])])
   if test "${ac_cv_my_have_shl_load}" = "yes"; then
     AC_DEFINE(HAVE_DL_SHL_LOAD, 1, [Define if you have the shl_load API])
     ac_cv_have_plugins=yes
@@ -713,7 +771,7 @@ fi
 # Whatever style
 if test "${ac_cv_have_plugins}" = "no"; then
   AC_CHECK_LIB(dld, dld_link,
-   [VLC_ADD_LIBS([libvlc],[-ldld])
+   [VLC_ADD_LIBS([libvlccore],[-ldld])
     AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
     ac_cv_have_plugins=yes])
 fi
@@ -722,7 +780,7 @@ fi
 if test "${ac_cv_have_plugins}" = "no"; then
   if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
     AC_CHECK_LIB(kernel32, main,
-     [VLC_ADD_LIBS([libvlc],[-lkernel32])
+     [VLC_ADD_LIBS([libvlccore],[-lkernel32])
       AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
       ac_cv_have_plugins=yes])
   fi
@@ -752,10 +810,10 @@ if test "${ac_cv_have_plugins}" = "no"; then
     ac_cv_my_have_dlopen=yes,
     AC_CHECK_LIB(dl, dlopen,
       ac_cv_my_have_dlopen=yes
-      VLC_ADD_LIBS([libvlc realaudio realvideo],[-ldl]),
+      VLC_ADD_LIBS([libvlccore realaudio realvideo],[-ldl]),
       AC_CHECK_LIB(svld, dlopen,
         ac_cv_my_have_dlopen=yes
-        VLC_ADD_LIBS([libvlc],[-lsvld]))))
+        VLC_ADD_LIBS([libvlccore],[-lsvld]))))
   if test "${ac_cv_my_have_dlopen}" = "yes"; then
     AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API])
     ac_cv_have_plugins=yes
@@ -779,22 +837,22 @@ if test "${THREAD_LIB}" = "error"; then
   THREAD_LIB=""
 fi
 
-VLC_ADD_LIBS([libvlc plugin],[${THREAD_LIB}])
+VLC_ADD_LIBS([libvlccore libvlc plugin],[${THREAD_LIB}])
 
 AC_CHECK_LIB(rt, clock_nanosleep, [
-  VLC_ADD_LIBS([libvlc],[-lrt])
+  VLC_ADD_LIBS([libvlccore],[-lrt])
   AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define to 1 if you have clock_nanosleep.])
 ], [
   dnl HP/UX port
-  AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlc],[-lrt])])
+  AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
 ])
 
 have_nanosleep=false
 AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
   AC_CHECK_LIB(rt,nanosleep,
-    [VLC_ADD_LIBS([libvlc],[-lrt]) have_nanosleep=:],
+    [VLC_ADD_LIBS([libvlccore],[-lrt]) have_nanosleep=:],
     [AC_CHECK_LIB(posix4,nanosleep,
-        [VLC_ADD_LIBS([libvlc],[-lposix4]) have_nanosleep=:])]
+        [VLC_ADD_LIBS([libvlccore],[-lposix4]) have_nanosleep=:])]
   )
 ])
 if ${have_nanosleep}; then
@@ -811,11 +869,12 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
   AC_MSG_RESULT(no)])
 
 dnl Check for headers
-AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.h getopt.h strings.h inttypes.h sys/int_types.h wchar.h locale.h)
-AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h)
+AC_CHECK_HEADERS(getopt.h strings.h locale.h)
+AC_CHECK_HEADERS(fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h xlocale.h)
 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h netinet/udplite.h sys/eventfd.h])
 AC_CHECK_HEADERS([net/if.h], [], [],
   [
+    #include <sys/types.h>
     #include <sys/socket.h>
   ])
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
@@ -916,8 +975,8 @@ then
       AC_DEFINE( HAVE_HAL, 1, [Define if you have the HAL library] )
       VLC_ADD_PLUGIN([hal])
       VLC_ADD_PLUGIN([probe_hal])
-      VLC_ADD_LIBS([libvlc hal probe_hal],[$HAL_LIBS])
-      VLC_ADD_CFLAGS([libvlc hal probe_hal],[$HAL_CFLAGS])],
+      VLC_ADD_LIBS([libvlccore hal probe_hal],[$HAL_LIBS])
+      VLC_ADD_CFLAGS([libvlccore hal probe_hal],[$HAL_CFLAGS])],
     [AC_MSG_WARN([libhal >= 0.5.0 was not found. Install libhal-dev ?])]
   )
 fi
@@ -947,8 +1006,8 @@ then
   dnl api stable dbus
   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
     [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
-      VLC_ADD_LIBS([screensaver libvlc],[$DBUS_LIBS])
-      VLC_ADD_CFLAGS([screensaver libvlc],[$DBUS_CFLAGS])
+      VLC_ADD_LIBS([screensaver libvlccore],[$DBUS_LIBS])
+      VLC_ADD_CFLAGS([screensaver libvlccore],[$DBUS_CFLAGS])
       dnl Check for dbus control interface
         AC_ARG_ENABLE(dbus-control, [  --disable-dbus-control  D-BUS control interface (default enabled)])
         if test "${enable_dbus_control}" != "no"
@@ -1464,7 +1523,7 @@ AS_IF([test "${enable_altivec}" = "yes"], [
       VLC_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}])
       VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
       VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
-      VLC_ADD_CFLAGS([libvlc],[${ac_cv_altivec_inline}])
+      VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
     ])
     VLC_ADD_PLUGIN([memcpyaltivec])
     VLC_ADD_PLUGIN([i420_yuy2_altivec])
@@ -1526,7 +1585,7 @@ dnl - Others: test should fail
   AS_IF([test "${ac_cv_c_altivec}" != "no"], [
     AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1,
               [Define to 1 if C AltiVec extensions are available.])
-    VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}])
+    VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
     VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
     VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
     VLC_ADD_PLUGIN([memcpyaltivec])
@@ -1540,7 +1599,7 @@ dnl - Others: test should fail
      LDFLAGS="${LDFLAGS_save}"
     ])
   AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
-    VLC_ADD_LDFLAGS([libvlc idctaltivec motionaltivec memcpyaltivec],[-Wl,-framework,vecLib])
+    VLC_ADD_LDFLAGS([libvlccore idctaltivec motionaltivec memcpyaltivec],[-Wl,-framework,vecLib])
   ])
 ])
 
@@ -3052,7 +3111,7 @@ then
       VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_FAILURE([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.])
+      AC_MSG_ERROR([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.])
   ])
 fi
 
@@ -3076,7 +3135,7 @@ then
       VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_FAILURE([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.])
+      AC_MSG_ERROR([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.])
   ])
 fi
 
@@ -3100,49 +3159,7 @@ then
       VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_WARN([Could not find libswscale. Trying to enable imgresample.])
-      enable_imgresample=yes
-  ])
-fi
-
-dnl
-dnl  avcodec (deprecated API) image scaling and conversion plugin
-dnl
-dnl  This is build as a seperate module than the avcodec one to prevent
-dnl  stupid run time library load errors from disabling most codecs
-dnl  from VLC.
-dnl
-
-AC_ARG_ENABLE(imgresample,
-  AS_HELP_STRING([--enable-imgresample],[deprecated libavcodec image scaling
-                 and conversion (default disabled)]))
-if test "${enable_imgresample}" = "yes"
-then
-  PKG_CHECK_MODULES(IMGRESAMPLE,[libavcodec],
-    [
-      VLC_SAVE_FLAGS
-      CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}"
-      CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}"
-      AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
-      AC_CHECK_LIB(avcodec,img_resample,
-        [
-          VLC_ADD_PLUGIN([imgresample])
-          VLC_ADD_LIBS([imgresample],[$IMGRESAMPLE_LIBS])
-          VLC_ADD_CFLAGS([imgresample],[$IMGRESAMPLE_CFLAGS])
-        ],[
-          AC_MSG_WARN([Could not find img_resample in libavcodec.])
-          if test "${enable_swscale}" != "no"
-          then
-            AC_MSG_FAILURE([swscale (and its fallback module imgresample) support will be missing. Use --disable-swscale to ignore this error. (This basically means that you will be missing any good software scaling module and some video chroma converters.)])
-          fi
-       # That sed hack to add -rpath is kind of ugly but at least it fixes
-        # detection when linking against a shared libavcodec with
-        # a libavutil not in one of your ld.so.conf directories.
-       # (for example a local install)
-        ],[${IMGRESAMPLE_LIBS} `echo ${IMGRESAMPLE_LIBS}|sed s'/-L/-Wl,-rpath=/'`])
-      VLC_RESTORE_FLAGS
-    ],[
-      AC_MSG_WARN([Could not find libavcodec.])
+      AC_MSG_ERROR([Could not find libswscale. Use --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
   ])
 fi
 
@@ -3165,7 +3182,7 @@ then
       VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_ERROR([Could not find libpostproc.])
+      AC_MSG_ERROR([Could not find libpostproc. Use --disable-postproc to ignore this error.])
   ])
 fi
 
@@ -3267,10 +3284,8 @@ dnl
 dnl  QuickTime plugin
 dnl
 AC_ARG_ENABLE(quicktime,
-  [  --enable-quicktime      QuickTime module (default enabled on MacOS X)])
-if test "${enable_quicktime}" != "no" &&
-  (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes")
-then
+  [  --enable-quicktime      QuickTime module (deprecated)])
+if test "${enable_quicktime}" = "yes"; then
   if test "${SYS}" = "mingw32"; then
     VLC_ADD_PLUGIN([quicktime])
   else
@@ -3692,7 +3707,7 @@ dnl
 AC_ARG_ENABLE(schroedinger,
 [  --disable-schroedinger  high performance dirac codec (default enabled)])
 if test "${enable_schroedinger}" != "no"; then
-  PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0], [
+  PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0.6], [
       VLC_ADD_PLUGIN([schroedinger])
       VLC_ADD_CFLAGS([schroedinger],[$SCHROEDINGER_CFLAGS])
       VLC_ADD_LIBS([schroedinger],[$SCHROEDINGER_LIBS]) ], [
@@ -3748,7 +3763,7 @@ if test "${enable_x264}" != "no"; then
       VLC_ADD_LIBS([x264],[-L${real_x264_tree}])
       PKG_CHECK_MODULES(X264,x264, [
         VLC_ADD_PLUGIN([x264])
-        VLC_ADD_LDFLAGS([x264],[${X264_LIBS} -Wl,-Bsymbolic])
+        VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
         VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
         if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
           VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
@@ -3764,7 +3779,18 @@ if test "${enable_x264}" != "no"; then
   else
       PKG_CHECK_MODULES(X264,x264, [
         VLC_ADD_PLUGIN([x264])
-        VLC_ADD_LDFLAGS([x264],[${X264_LIBS} -Wl,-Bsymbolic])
+        VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
+
+        AC_CACHE_CHECK([if linker supports -Bsymbolic],
+          [ac_cv_ld_bsymbolic],
+          [LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic"
+            AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
+            LDFLAGS="${LDFLAGS_save}"
+          ])
+        AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
+          VLC_ADD_LDFLAGS([x264],[-Wl,-Bsymbolic])
+        ])
+
         VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
         if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
           VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
@@ -4053,8 +4079,10 @@ AC_ARG_ENABLE(xvmc,
 AS_IF([test "${enable_xvmc}" != "no"], [
   AC_CHECK_HEADERS(X11/extensions/vldXvMC.h, [
     VLC_ADD_PLUGIN([xvmc])
-    VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv -lXinerama])
-    VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS}])
+    VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv ${LIBMPEG2_LIBS}])
+    VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS} ${LIBMPEG2_CFLAGS}])
+  ], [
+    AC_MSG_ERROR([XVideo-MotionCompensation extension not found!])
   ])
 ])
 
@@ -4136,9 +4164,14 @@ AS_IF([test "${enable_xcb}" != "no"], [
   PKG_CHECK_MODULES(XCB, [xcb])
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
 
+  AS_IF([test "${enable_xvideo}" != "no"], [
+    PKG_CHECK_MODULES(XCB_XV, [xcb-xv], [
+      VLC_ADD_PLUGIN([xcb_xv])
+    ])
+  ])
+
   dnl xcb-utils
   PKG_CHECK_MODULES(XCB_AUX, [xcb-aux])
-  PKG_CHECK_MODULES(XCB_IMAGE, [xcb-image])
   PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms])
 
   VLC_ADD_PLUGIN([xcb])
@@ -5102,9 +5135,9 @@ then
   VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa])
   VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,OpenGL])
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,Carbon])
+  VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,CoreServices])
   VLC_ADD_LDFLAGS([macosx minimal_macosx],            [-Wl,-framework,AGL])
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,IOKit])
-  VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,QuickTime])
   dnl For bug report
   VLC_ADD_LDFLAGS([macosx],                           [-Wl,-framework,AddressBook])
   VLC_ADD_LDFLAGS([macosx qtcapture],                 [-Wl,-framework,QTKit])
@@ -5187,19 +5220,12 @@ AC_ARG_ENABLE(xosd,
   [  --enable-xosd           xosd interface support (default disabled)])
 if test "${enable_xosd}" = "yes"
 then
-  AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
-  AC_CHECK_LIB(xosd,xosd_set_offset,
-      AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
-    AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
-        AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
-      AC_TRY_COMPILE([#include <xosd.h>],
-         [xosd_init("foo","bar",12,XOSD_top,2,12,42);],,
-          AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
-  if test "${have_xosd}" = "true"
-  then
-    VLC_ADD_PLUGIN([xosd])
-    VLC_ADD_LIBS([xosd],[-lxosd])
-  fi
+  AC_CHECK_HEADERS(xosd.h,
+    AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
+      VLC_ADD_PLUGIN([xosd])
+      VLC_ADD_LIBS([xosd],[-lxosd])
+    ])
+  )
 fi
 
 dnl
@@ -5424,7 +5450,7 @@ AC_MSG_CHECKING([whether to enable RAOP plugin])
 AS_IF([test "${have_libgcrypt}" = "yes"], [
   AC_MSG_RESULT(yes)
   VLC_ADD_PLUGIN([stream_out_raop])
-  VLC_ADD_LIBS([stream_out_raop], [${LIBGCRYPT_LIBS}])
+  VLC_ADD_LIBS([stream_out_raop], [${LIBGCRYPT_LIBS} -lgpg-error])
   VLC_ADD_CFLAGS([stream_out_raop], [${LIBGCRYPT_CFLAGS}])
 ], [
   AC_MSG_RESULT(no)
@@ -5443,8 +5469,8 @@ then
   then
     AC_MSG_ERROR([libgcrypt is required for update checking system])
   fi
-  VLC_ADD_LIBS([libvlc], [${LIBGCRYPT_LIBS}])
-  VLC_ADD_CFLAGS([libvlc], [${LIBGCRYPT_CFLAGS}])
+  VLC_ADD_LIBS([libvlccore], [${LIBGCRYPT_LIBS}])
+  VLC_ADD_CFLAGS([libvlccore], [${LIBGCRYPT_CFLAGS}])
   AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
 fi
 
@@ -5917,6 +5943,7 @@ AC_CONFIG_FILES([
   share/Makefile
   share/vlc_win32_rc.rc
   share/libvlc_win32_rc.rc
+  compat/Makefile
   src/Makefile
   src/test/Makefile
   bin/Makefile