]> git.sesse.net Git - vlc/blobdiff - configure.ac
macosx: re-implement macosx-background
[vlc] / configure.ac
index 394807685c8aebd07789c2e08bd3efa88d5870f1..3cf2412b47a71a4a8167af84aa11a98a30c706f0 100644 (file)
@@ -1,10 +1,10 @@
 dnl Autoconf settings for vlc
 
-AC_COPYRIGHT([Copyright 2002-2011 VLC authors and VideoLAN])
+AC_COPYRIGHT([Copyright 2002-2012 VLC authors and VideoLAN])
 
-AC_INIT(vlc, 1.3.0-git)
-VERSION_MAJOR=1
-VERSION_MINOR=3
+AC_INIT(vlc, 2.1.0-git)
+VERSION_MAJOR=2
+VERSION_MINOR=1
 VERSION_REVISION=0
 VERSION_EXTRA=0
 VERSION_DEV=git
@@ -14,7 +14,7 @@ AC_SUBST(PKGDIR)
 
 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
 CODENAME="Rincewind"
-COPYRIGHT_YEARS="1996-2011"
+COPYRIGHT_YEARS="1996-2012"
 
 AC_CONFIG_SRCDIR(src/libvlc.c)
 AC_CONFIG_AUX_DIR(autotools)
@@ -59,6 +59,7 @@ AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
 AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
 AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
+AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
 
 AM_PROG_CC_C_O
 AC_PROG_CXX
@@ -107,19 +108,22 @@ case "${host_os}" in
     CFLAGS="${CFLAGS} -pthread"
     VLC_ADD_LIBS([vcd cdda vcdx],[-ldvd])
     ;;
-  *bsd*)
-    SYS="${host_os}"
+  freebsd*)
+    SYS=freebsd
     CFLAGS="${CFLAGS} -pthread"
-    case "${host_os}" in
-      freebsd*)
-        CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-        LDFLAGS="${LDFLAGS} -L/usr/local/lib"
-        ;;
-      openbsd*)
-        CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
-        LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
-        ;;
-    esac
+    CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+    LDFLAGS="${LDFLAGS} -L/usr/local/lib"
+    ;;
+  openbsd*)
+    SYS=openbsd
+    CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
+    LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
+    ;;
+  netbsd*)
+    SYS=netbsd
+    ;;
+  dragonfly*)
+    SYS=dragonfly
     ;;
   darwin*)
 
@@ -138,6 +142,11 @@ case "${host_os}" in
       x86_64*)
         ARCH_flag="-arch x86_64"
       ;;
+      arm*)
+        ARCH_flag="-arch armv7"
+        ac_cv_c_bigendian="no"
+        ac_cv_c_attribute_packed="no"
+      ;;
     esac
 
     SYS=darwin
@@ -147,40 +156,49 @@ case "${host_os}" in
     OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu99 ${ARCH_flag}"
     LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
     VLC_ADD_LIBS([mkv mp4 motion], [-Wl,-framework,IOKit,-framework,CoreFoundation])
-    VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup])
-    VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
+    VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,Appkit])
+    VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb_mmx x264 x26410b],[-Wl,-read_only_relocs,suppress])
     VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
     VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
 
+    dnl Allow binaries created on Lion to run on earlier releases
+    AC_EGREP_CPP(yes,
+           [#import <Cocoa/Cocoa.h>
+            #ifdef MAC_OS_X_VERSION_10_7
+            yes
+            #endif],
+            [AC_MSG_RESULT([yes])
+            AC_LIBOBJ([getdelim])
+            AC_LIBOBJ([strndup])
+            AC_LIBOBJ([strnlen])],)
+
     dnl
-    dnl  Check for Mac OS X SDK settings
+    dnl  Handle Mac OS X SDK flags
     dnl
     AC_ARG_WITH(macosx-sdk,
       [AS_HELP_STRING([--with-macosx-sdk=DIR],
         [compile using the SDK in DIR])])
-    test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.5.sdk
-    ! test -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
-    CPP="${CPP} -isysroot ${with_macosx_sdk}"
-    CC="${CC} -isysroot ${with_macosx_sdk}"
-    CXX="${CXX} -isysroot ${with_macosx_sdk}"
-    OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
-    LD="${LD} -syslibroot ${with_macosx_sdk}"
+    if test "${with_macosx_sdk}" != "" ; then
+        test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
+        CPP="${CPP} -isysroot ${with_macosx_sdk}"
+        CC="${CC} -isysroot ${with_macosx_sdk}"
+        CXX="${CXX} -isysroot ${with_macosx_sdk}"
+        OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
+        LD="${LD} -syslibroot ${with_macosx_sdk}"
+    fi
     AC_ARG_WITH(macosx-version-min,
       [AS_HELP_STRING([--with-macosx-version-min=VERSION],
-        [compile for MacOS X VERSION and above])])
-    if test "${with_macosx_version_min}" = "" ; then
-       with_macosx_version_min=10.5
-    fi 
+        [compile for Mac OS X VERSION and above])])
     if test "${with_macosx_version_min}" != "" ; then
+        MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
         CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
         CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
         CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
         OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
-        LD="${LD} -macosx_version_min=${with_macosx_version_min}"
+        LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
         CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
         CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
         OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
-        MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
         export MACOSX_DEPLOYMENT_TARGET
     fi
     ;;
@@ -396,7 +414,7 @@ dnl
 dnl Gettext stuff
 dnl
 AM_GNU_GETTEXT_VERSION([0.18.1])
-AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT([external], [need-ngettext])
 
 dnl
 dnl Iconv stuff
@@ -408,16 +426,18 @@ AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
     AC_MSG_CHECKING(for broken mingw-runtime)
     AC_PREPROC_IFELSE([AC_LANG_SOURCE([
 #include <_mingw.h>
-#if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 15)
-#ifndef __MINGW64_VERSION_MAJOR
+#if defined(__MINGW64_VERSION_MAJOR)
+# if __MINGW64_VERSION_MAJOR < 3
+#  error Attempting to use mingw-runtime with broken vsnprintf and direct2d support
+# endif
+#elif __MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15
 # error Attempting to use mingw-runtime with broken vsnprintf support
-#endif
 #endif
     ])], [
         AC_MSG_RESULT([ok])
     ], [
         AC_MSG_RESULT([present])
-        AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher!])
+        AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher, or mingw-w64 version 3.0 or higher!])
     ])
     dnl force use of mingw provided c99 *printf over msvcrt
     CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
@@ -482,8 +502,8 @@ need_libc=false
 
 dnl Check for usual libc functions
 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
-AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp uselocale])
-AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy])
+AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
+AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
 ])
@@ -496,13 +516,28 @@ AC_LINK_IFELSE([
             c = NULL;
     ])],[AC_DEFINE([HAVE_ASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([asprintf])])
 AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([#include <stdio.h>], [
+    AC_LANG_PROGRAM([#include <stdio.h>
+                     #include <stdarg.h>], [
         char *c;
         va_list ap;
         if (vasprintf(&c, "%s %d", ap) == -1)
             c = NULL;
     ])],[AC_DEFINE([HAVE_VASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([vasprintf])])
 
+dnl C11 static_assert()
+AC_MSG_CHECKING([for static_assert in assert.h])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+#include <assert.h>
+#ifndef static_assert
+# error BOOM!
+#endif
+])], [
+  AC_MSG_RESULT([yes])
+  AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
+], [
+  AC_MSG_RESULT([no])
+])
+
 # Windows CE does not have strcoll()
 AC_FUNC_STRCOLL
 
@@ -511,15 +546,6 @@ AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
 
 AH_BOTTOM([#include <vlc_fixups.h>])
 
-dnl Check for poll
-AC_SEARCH_LIBS(poll, [poll], [
-  AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().])
-], [
-  AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "os2"], [
-    AC_MSG_ERROR([poll() is required.])
-  ])
-])
-
 dnl Check for struct pollfd
 AC_CHECK_TYPES([struct pollfd],,,
 [#include <sys/types.h>
@@ -530,7 +556,7 @@ AC_CHECK_TYPES([struct pollfd],,,
 #endif
 ])
 
-dnl Check for connect
+dnl Checks for socket stuff
 VLC_SAVE_FLAGS
 SOCKET_LIBS=""
 AC_SEARCH_LIBS(connect, [socket], [
@@ -545,9 +571,18 @@ AC_SEARCH_LIBS(connect, [socket], [
     SOCKET_LIBS="-lws2"
   ])
 ])
+
+AC_SEARCH_LIBS([getaddrinfo], [nsl], [
+ AS_IF([test "$ac_cv_search_getaddrinfo" != "none required"], [
+    SOCKET_LIBS="$ac_cv_search_getaddrinfo $SOCKET_LIBS"
+  ])
+],, [${SOCKET_LIBS}])
+
+AC_CHECK_FUNCS([if_nameindex if_nametoindex])
 VLC_RESTORE_FLAGS
+
 AS_IF([test -n "$SOCKET_LIBS"], [
-  VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_select stream_out_standard stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[${SOCKET_LIBS}])
+  VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_select stream_out_standard stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync stream_filter_dash],[${SOCKET_LIBS}])
 ])
 AC_SUBST(SOCKET_LIBS)
 
@@ -588,13 +623,6 @@ AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
   AC_DEFINE(ss_family, sa_family)
 ])
 
-dnl getaddrinfo, getnameinfo and gai_strerror check
-dnl  -lnsl and -lsocket are needed on Solaris;
-dnl  we purposedly make the test fail on Windows
-VLC_SAVE_FLAGS
-AC_SEARCH_LIBS([getaddrinfo], [nsl],,, [${SOCKET_LIBS}])
-VLC_RESTORE_FLAGS
-
 dnl FreeBSD has a gnugetopt library for this:
 GNUGETOPT_LIBS=""
 AC_CHECK_FUNC(getopt_long,, [
@@ -605,7 +633,7 @@ AC_CHECK_FUNC(getopt_long,, [
 AC_SUBST(GNUGETOPT_LIBS)
 
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264 hqdn3d],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo mp4 quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x26410b hqdn3d anaglyph oldrc ncurses],[-lm])
   LIBM="-lm"
 ], [
   LIBM=""
@@ -647,7 +675,7 @@ AS_IF([test "${have_dynamic_objects}" != "no"], [
 AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
 
 AC_SUBST(LIBDL)
-VLC_ADD_LIBS([realvideo lua],[$LIBDL])
+VLC_ADD_LIBS([lua],[$LIBDL])
 
 dnl Check for thread library
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
@@ -676,18 +704,10 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
   ])
 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
-dnl Check for misc headers
-AC_MSG_CHECKING(for strncasecmp in strings.h)
-AC_EGREP_HEADER(strncasecmp,strings.h,[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
-            Define if <strings.h> defines strncasecmp.)],[
-  AC_MSG_RESULT(no)])
-
 dnl Check for headers
 AC_CHECK_HEADERS([search.h])
-AC_CHECK_HEADERS(getopt.h strings.h locale.h xlocale.h)
-AC_CHECK_HEADERS(fcntl.h sys/time.h sys/ioctl.h sys/stat.h)
+AC_CHECK_HEADERS(getopt.h locale.h xlocale.h)
+AC_CHECK_HEADERS([sys/time.h sys/ioctl.h])
 AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
 AC_CHECK_HEADERS([net/if.h], [], [],
   [
@@ -702,7 +722,7 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
   AC_CHECK_HEADERS(machine/param.h sys/shm.h)
   AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
-  AC_CHECK_HEADERS(syslog.h)
+  AC_CHECK_HEADERS(syslog.h mntent.h)
 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 
 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
@@ -756,20 +776,6 @@ fi
 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
 
 
-dnl Manual switch for UTF-8
-AC_ARG_ENABLE(non-utf8,
-  [AS_HELP_STRING([--enable-non-utf8],
-    [support legacy non-UTF-8 systems (default disabled)])],, [
-  AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "os2"], [
-    enable_non_utf8="no"
-  ])
-])
-AS_IF([test "${enable_non_utf8}" != "no"], [
-  AC_DEFINE([ASSUME_UTF8], [1],
-            [Define to 1 if the operating system uses UTF-8 internally])
-])
-
-
 dnl Check for dbus
 AC_ARG_ENABLE(dbus,
   [AS_HELP_STRING([--enable-dbus],
@@ -957,6 +963,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [
     ])
   ])
   AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS])
+  AH_BOTTOM([
+#ifndef __FAST_MATH__
+# pragma STDC FENV_ACCESS OFF
+# pragma STDC FP_CONTRACT ON
+#endif
+])
 
   dnl Check for -funroll-loops
   VLC_SAVE_FLAGS
@@ -1091,11 +1103,10 @@ AC_ARG_ENABLE(mmx,
   esac
 ])
 have_mmx="no"
-have_mmxext="no"
 AS_IF([test "${enable_mmx}" != "no"], [
   ARCH="${ARCH} mmx"
   VLC_SAVE_FLAGS
-  CFLAGS="${CFLAGS} -O -mmmx"
+  CFLAGS="${CFLAGS} -mmmx"
   AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 [#include <mmintrin.h>
@@ -1138,26 +1149,9 @@ asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
     have_mmx="yes"
   ])
 
-  AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
-                 [ac_cv_mmxext_inline], [
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
-void *p;
-asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
-]])
-    ], [
-      ac_cv_mmxext_inline=yes
-    ], [
-      ac_cv_mmxext_inline=no
-    ])
-  ])
   VLC_RESTORE_FLAGS
-  AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
-    AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.])
-    have_mmxext="yes"
-  ])
 ])
 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
-AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
 
 dnl  Check for fully workin SSE2 intrinsics
 dnl  We need support for -mmmx, we need <emmintrin.h>, and we also need a
@@ -1179,7 +1173,7 @@ AS_IF([test "${enable_sse}" != "no"], [
   ARCH="${ARCH} sse sse2"
 
   VLC_SAVE_FLAGS
-  CFLAGS="${CFLAGS} -O -msse2"
+  CFLAGS="${CFLAGS} -msse2"
   AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 [#include <emmintrin.h>
@@ -1321,29 +1315,6 @@ asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
 ])
 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
 
-VLC_SAVE_FLAGS
-CFLAGS="${CFLAGS} -mmmx"
-have_3dnow="no"
-AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
-void *p;
-asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
-]])
-  ], [
-    ac_cv_3dnow_inline=yes
-  ], [
-    ac_cv_3dnow_inline=no
-  ])
-])
-VLC_RESTORE_FLAGS
-AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
-  AC_DEFINE(CAN_COMPILE_3DNOW, 1,
-            [Define to 1 if 3D Now! inline assembly is available.])
-  have_3dnow="yes"
-])
-AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
-
-
 AC_ARG_ENABLE(neon,
   [AS_HELP_STRING([--disable-neon],
     [disable NEON optimizations (default auto)])],, [
@@ -1476,44 +1447,6 @@ dnl - Others: test should fail
 ])
 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
 
-dnl
-dnl  Special arch tuning
-dnl
-AC_ARG_WITH(tuning,
-  [AS_HELP_STRING([--with-tuning=ARCH],
-    [tune compilation for an architecture (default varies)])])
-if test -n "${with_tuning}"; then
-    if test "${with_tuning}" != "no"; then
-        CFLAGS_TUNING="-mtune=${with_tuning}"
-    fi
-else
-    if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; then
-        CFLAGS_TUNING="-march=prescott -mtune=generic"
-    elif test "${SYS}" = "darwin" -a "${host_cpu}" = "x86_64"; then
-        CFLAGS_TUNING="-march=core2 -mtune=core2"
-    elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
-        CFLAGS_TUNING="-mtune=pentium2"
-    elif test "${host_cpu}" = "x86_64"; then
-        CFLAGS_TUNING="-mtune=athlon64"
-    elif test "${host_cpu}" = "powerpc"; then
-        CFLAGS_TUNING="-mtune=G4";
-    fi
-fi
-
-dnl NOTE: this can't be cached cleanly
-AS_IF([test -n "${CFLAGS_TUNING}"], [
-  VLC_SAVE_FLAGS
-  CFLAGS="${CFLAGS} ${CFLAGS_TUNING}"
-  AC_MSG_CHECKING([whether $CC accepts ${CFLAGS_TUNING}])
-  AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [
-    AC_MSG_RESULT([yes])
-  ], [
-    VLC_RESTORE_FLAGS
-    AC_MSG_RESULT([no])
-    AS_IF([test "${with_tuning}"], [AC_MSG_ERROR([requested tuning not supported])])
-  ])
-])
-
 dnl
 dnl  Memory usage
 dnl
@@ -1653,7 +1586,14 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
   AC_LANG_PUSH(C++)
   VLC_SAVE_FLAGS
   AS_IF([test -z "${CONTRIB_DIR}"], [
-    CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
+    AS_IF([test ${SYS} != "os2"], [
+      LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
+      CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
+    ], [
+      LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
+      CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
+      LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
+    ])
   ], [
     CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
   ])
@@ -1661,11 +1601,12 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
     CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
   ])
   CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
+  LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
 
-  AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [
+  AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
     AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
 [#include <liveMedia_version.hh>
-#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200)
+#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
 # error BOOM
 #endif]])
     ], [
@@ -1676,39 +1617,12 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
   ])
   AS_IF([test "$ac_cv_live555" = "no"], [
     AC_MSG_WARN([liveMedia is missing or its installed version is too old:
-Version 2010.05.29 or later is required to proceed.
+Version 2011.12.23 or later is required to proceed.
 You can get an updated one from http://www.live555.com/liveMedia .])
     AS_IF([test -n "${enable_live555}"], [
       AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
     ])
-    ac_cv_live555_usable=""
   ], [
-    dnl Check that live555 is patched correctly.
-    AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-[#include <locale.h>
-#ifdef __APPLE__
-# include <xlocale.h>
-#endif
-#undef LC_ALL
-#define LC_ALL BOOM
-#ifdef LC_ALL_MASK
-#include <Locale.hh>
-#endif
-#include <GroupsockHelper.hh>]], [
-[struct in_addr addr;
-our_inet_ntoa(addr, NULL);]])
-      ], [
-        ac_cv_live555_usable="yes"
-      ], [
-        ac_cv_live555_usable="no"
-      ])
-    ])
-    AS_IF([test "$ac_cv_live555_usable" = "no"], [
-      AC_MSG_ERROR([liveMedia lacks patches and is not usable.
-Please apply our patches from the VLC contrib (contrib/src/live555/).
-You can also disable RTSP input with --disable-live555. You were warned.])
-    ])
     other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
     other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
     AS_IF([test "${SYS}" = "mingw32"], [
@@ -1722,6 +1636,7 @@ You can also disable RTSP input with --disable-live555. You were warned.])
     dnl We need to check for pic because live555 don't provide shared libs
     dnl and we want to build a plugins so we need -fPIC on some arch.
     VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
+    VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
     AC_CHECK_LIB(liveMedia_pic, main, [
       VLC_ADD_PLUGIN([live555])
       VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
@@ -1740,8 +1655,8 @@ dnl - special access module for dc1394 input
 dnl - dv module: digital video module check for libraw1394
 dnl - linsys modules: access module check for libzvbi
 dnl
-PKG_ENABLE_MODULES_VLC([DC1394], [], [libraw1394 >= 2.0.1 libdc1394-2 >= 2.1.0], [dc1394 access module], [auto])
-PKG_ENABLE_MODULES_VLC([DV], [access_dv], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV input module], [auto])
+PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto])
+PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto])
 
 AC_ARG_ENABLE(linsys,
   [AS_HELP_STRING([--enable-linsys],
@@ -1796,7 +1711,7 @@ then
       AC_CHECK_HEADERS(dshow.h,
       [ VLC_ADD_PLUGIN([dshow])
         VLC_ADD_CXXFLAGS([dshow],[])
-        VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid]) ])
+        VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid -lstrmiids -lksuser])])
     AC_LANG_POP(C++)
   fi
 fi
@@ -1804,7 +1719,7 @@ fi
 dnl
 dnl  Blu-ray Disc Support with libbluray
 dnl
-PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 libxml-2.0 >= 2.6 ], (libbluray for Blu-ray disc support ) )
+PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2.1], (libbluray for Blu-ray disc support ) )
 
 dnl
 dnl  OpenCV wrapper and example filters
@@ -1843,22 +1758,25 @@ fi
 dnl
 dnl  Video4Linux 2
 dnl
-AC_ARG_ENABLE(libv4l2, [AS_HELP_STRING([--disable-libv4l2],
-  [disable userspace V4L2 library (default auto)])])
+AC_ARG_ENABLE(v4l2, [AS_HELP_STRING([--disable-v4l2],
+  [disable Video4Linux version 2 (default auto)])])
 AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr],
   [support PVR V4L2 cards (default disabled)])])
 have_v4l2="no"
-AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
-  have_v4l2="yes"
+AS_IF([test "$enable_v4l2" != "no"], [
+  AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
+    have_v4l2="yes"
+  ])
+  AC_CHECK_DECLS([V4L2_CTRL_TYPE_BITMASK],,, [
+#ifdef HAVE_LINUX_VIDEODEV2_H
+# include <linux/videodev2.h>
+#endif
+#ifdef HAVE_SYS_VIDEOIO_H
+# include <sys/videoio.h>
+#endif
+  ])
 ])
 AS_IF([test "$have_v4l2" = "yes"], [
-  AS_IF([test "${enable_libv4l2}" != "no"], [
-    PKG_CHECK_MODULES(LIBV4L2, libv4l2, [
-      AC_DEFINE(HAVE_LIBV4L2, 1, [Define to 1 if libv4l2 is available])
-    ], [
-      AC_MSG_WARN([${LIBV4L2_PKG_ERRORS}.])
-    ])
-  ])
   AS_IF([test "${enable_pvr}" = "yes"], [
     VLC_ADD_PLUGIN([pvr])
   ])
@@ -1981,17 +1899,21 @@ fi
 dnl
 dnl Linux DVB
 dnl
-AC_CACHE_CHECK([for Linux DVB version 5], [ac_cv_linux_s2api], [
+AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
   AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
 [#include <linux/dvb/version.h>
 #if (DVB_API_VERSION < 5)
-EXPLODE
-#endif]])], [
-  ac_cv_linux_s2api=yes
+# error Linux DVB API v3.2 and older are not supported.
+#endif
+#if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
+# error Linux DVB API v5.0 is unsupported. Please update.
+#endif
+]])], [
+  ac_cv_linux_dvb_5_1=yes
 ], [
-  ac_cv_linux_s2api=no
+  ac_cv_linux_dvb_5_1=no
 ])])
-AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"])
+AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
 
 dnl
 dnl  Screen capture module
@@ -2149,9 +2071,6 @@ if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
             [AC_MSG_RESULT([yes])
               AC_CHECK_HEADERS(matroska/KaxAttachments.h)
               VLC_ADD_CXXFLAGS([mkv],[])
-              if test "${SYS}" = "darwin"; then
-                VLC_ADD_CXXFLAGS([mkv],[-O1])
-              fi
               AC_CHECK_LIB(ebml_pic, main, [
                 VLC_ADD_PLUGIN([mkv])
                 VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
@@ -2251,18 +2170,7 @@ AC_ARG_ENABLE(iomx,
   [  --enable-iomx           iomx codec module (default disabled)])
 if test "${enable_iomx}" = "yes"
 then
-  VLC_SAVE_FLAGS
-  CPPFLAGS="${CPPFLAGS} -I${srcdir}/modules/codec/omxil" # For the OMX headers
-  AC_LANG_PUSH([C++])
-  AC_CHECK_HEADER(media/stagefright/OMXClient.h, [
-    VLC_ADD_PLUGIN([iomx])
-    VLC_ADD_CXXFLAGS([iomx], [-fno-exceptions -fno-rtti])
-    VLC_ADD_LIBS([iomx], [-lstagefright -lmedia -lutils -lbinder])
-  ], [
-    AC_MSG_ERROR("Could not find IOMX headers")
-  ])
-  AC_LANG_POP([C++])
-  VLC_RESTORE_FLAGS
+  VLC_ADD_PLUGIN([iomx])
 fi
 
 dnl
@@ -2450,7 +2358,9 @@ AS_IF([test "${enable_dxva2}" != "no"], [
     AS_IF([test "${enable_dxva2}" = "yes"],
           [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
               [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
-        ])
+        ], [#undef _WIN32_WINNT
+            /* DXVA2 is only available in Vista and above */
+            #define _WIN32_WINNT 0x600])
       ],[
     AS_IF([test "${enable_dxva2}" = "yes"],
               [AC_MSG_ERROR([Could not find required dxva2api.h])],
@@ -2473,7 +2383,7 @@ AC_ARG_ENABLE(switcher,
 AS_IF([test "${enable_switcher}" = "yes"], [
   AS_IF([test "x${have_avcodec}" = "xyes"], [
     VLC_ADD_PLUGIN([stream_out_switcher])
-    VLC_ADD_LIBS([stream_out_switcher],[$AVCODEC_LIBS $AVUTIL_LIBS])
+    VLC_ADD_LIBS([stream_out_switcher],[$AVCODEC_LIBS $AVUTIL_LIBS $LIBM])
     VLC_ADD_CFLAGS([stream_out_switcher],[$AVCODEC_CFLAGS $AVUTIL_CFLAGS])
   ],[AC_MSG_ERROR([Stream_out switcher depends on avcodec])
   ])
@@ -2568,24 +2478,19 @@ dnl
 dnl  faad decoder plugin
 dnl
 AC_ARG_ENABLE(faad,
-[  --enable-faad           faad codec (default disabled)])
-if test "${enable_faad}" = "yes"
-then
-  AC_ARG_WITH(faad-tree,
-  [  --with-faad-tree=PATH   faad tree for static linking])
-  if test -n "${with_faad_tree}"
-  then
+[  --enable-faad           faad codec (default auto)])
+if test "${enable_faad}" != "no"; then
+  AC_ARG_WITH(faad-tree,  [  --with-faad-tree=PATH   faad tree for static linking])
+  if test -n "${with_faad_tree}"; then
     AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
     real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
-    if test -z "${real_faad_tree}"
-    then
+    if test -z "${real_faad_tree}"; then
       dnl  The given directory can't be found
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
     fi
-    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
-    then
-      dnl  Use a custom faad
+    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"; then
+      dnl  Use the custom faad
       AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
       VLC_ADD_PLUGIN([faad])
       VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
@@ -2599,15 +2504,19 @@ then
     VLC_SAVE_FLAGS
     CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
     LDFLAGS="${LDFLAGS} ${LIBS_faad}"
-    AC_CHECK_HEADERS(faad.h, ,
-      [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
-    AC_CHECK_LIB(faad, faacDecOpen, [
-      VLC_ADD_PLUGIN([faad])
-      VLC_ADD_LIBS([faad],[-lfaad]) ],
-      AC_CHECK_LIB(faad, NeAACDecOpen, [
-        VLC_ADD_PLUGIN([faad])
-        VLC_ADD_LIBS([faad],[-lfaad]) ],
-        [ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
+    AC_CHECK_HEADERS(faad.h,
+      [ AC_CHECK_LIB(faad, faacDecOpen, [
+          VLC_ADD_PLUGIN([faad])
+          VLC_ADD_LIBS([faad],[-lfaad]) ], [
+            AC_CHECK_LIB(faad, NeAACDecOpen, [
+              VLC_ADD_PLUGIN([faad])
+              VLC_ADD_LIBS([faad],[-lfaad]) ], [
+                AS_IF([test "${enable_faad}" = "yes"],
+                [ AC_MSG_ERROR([Cannot find libfaad library...]) ],
+                [ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
+      ] , [ AS_IF([test "${enable_faad}" = "yes"],
+        [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
+        [ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
     VLC_RESTORE_FLAGS
   fi
 fi
@@ -2633,15 +2542,6 @@ if test "${enable_quicktime}" = "yes"; then
   fi
 fi
 
-dnl
-dnl  Real plugin
-dnl
-AC_ARG_ENABLE(real,
-  [  --enable-real           Real video decoder module (default disabled)])
-if test "${enable_real}" = "yes"; then
-  VLC_ADD_PLUGIN([realvideo])
-fi
-
 dnl
 dnl A52/AC3 decoder plugin
 dnl
@@ -2761,11 +2661,7 @@ AS_IF([test "${enable_speex}" != "no"], [
   PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
     have_speexdsp="yes"
   ], [
-    AS_IF([test -n "${enable_speex}"], [
-      AC_MSG_ERROR([${SPEEXDSP_PKG_ERRORS}.])
-    ], [
-      AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
-    ])
+    AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
   ])
 ])
 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
@@ -2773,7 +2669,7 @@ AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
 dnl
 dnl  theora decoder plugin
 dnl
-PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theora >= 1.0], [experimental theora codec], [auto])
+PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
 
 dnl
 dnl  dirac encoder plugin
@@ -2793,16 +2689,70 @@ AC_ARG_ENABLE(png,
 if test "${enable_png}" != "no"; then
 AC_CHECK_HEADERS(png.h, [
   VLC_SAVE_FLAGS
-  LDFLAGS="${LDFLAGS} -lz"
+  LDFLAGS="${LDFLAGS} -lz $LIBM"
   AC_CHECK_LIB(png, png_set_rows, [
-    VLC_ADD_LIBS([png],[-lpng -lz -lm])
+    VLC_ADD_LIBS([png],[-lpng -lz $LIBM])
     VLC_ADD_PLUGIN([png osdmenu osd_parser])],
-    [],[-lz])
+    [],[-lz $LIBM] )
   VLC_RESTORE_FLAGS
   ])
 fi
 AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
 
+dnl
+dnl H264 encoder plugin (10-bit lib264)
+dnl
+AC_ARG_ENABLE(x26410b,
+  [  --enable-x26410b           H264 10-bit encoding support with static libx264 (default disabled)])
+if test "${enable_x26410b}" != "no"; then
+AC_ARG_WITH(x26410b-tree,
+  [ --with-x26410b-tree=PATH      H264 10-bit encoding module with libx264 (static linking)],[],[])
+  if test "${with_x26410b_tree}" != "no" -a -n "${with_x26410b_tree}"
+  then
+    real_x26410b_tree="̧`cd ${with_x26410b_tree} 2>/dev/null && pwd`"
+    if test -z "${real_x26410b_tree}"
+    then
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${with_x26410b_tree} directory does not exist])
+    fi
+    AC_MSG_CHECKING(for x264.h in ${real_x26410b_tree})
+    if test -f ${with_x26410b_tree}/x264_config.h
+    then
+      AC_MSG_RESULT(yes)
+      AC_MSG_CHECKING(for 10-bit build of x264)
+      if grep -q "BIT_DEPTH.*10"  ${with_x26410b_tree}/x264_config.h ;then
+        AC_MSG_RESULT(yes)
+        VLC_ADD_PLUGIN([x26410b])
+        VLC_ADD_CFLAGS([x26410b],[-I${with_x26410b_tree}])
+        VLC_ADD_LIBS([x26410b],[-L${with_x26410b_tree} -lm -lpthread -lx264])
+      else
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([${with_x26410b_tree} isnt build 10-bit])
+      fi
+    else
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([${with_x26410b_tree} doesnt have x264_config.h])
+    fi
+  else
+    PKG_CHECK_MODULES(X26410B, x26410b, [
+        VLC_ADD_PLUGIN([x26410b])
+        VLC_ADD_LDFLAGS([x26410b],[${X26410B_LIBS}])
+        AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
+          VLC_ADD_LIBS([x26410b],[-Wl,-Bsymbolic])
+        ])
+        VLC_ADD_CFLAGS([x26410b],[${X26410B_CFLAGS}])
+        if echo ${X26410B_LIBS} |grep -q 'pthreadGC2'; then
+          VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
+        fi
+    ], [
+       if test "${enable_x26410b}" = "yes"; then
+        AC_MSG_ERROR([x26410b module doesn't work without staticly compiled libx264.a])
+       fi
+    ])
+  fi
+fi
+
+
 dnl
 dnl H264 encoder plugin (using libx264)
 dnl
@@ -2865,7 +2815,7 @@ fi
 dnl
 dnl libfluidsynth (MIDI synthetizer) plugin
 dnl
-PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto])
+PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
 
 dnl
 dnl Teletext Modules
@@ -3045,11 +2995,7 @@ AS_IF([test "${enable_xcb}" != "no"], [
     AS_IF([test "${have_gl}" != "yes"], [
       AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
     ])
-    PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb], [
-      VLC_ADD_PLUGIN([xcb_glx])
-    ], [
-      AC_MSG_ERROR([${XLIB_XCB_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
-    ])
+    VLC_ADD_PLUGIN([xcb_glx])
   ])
 ])
 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
@@ -3206,33 +3152,40 @@ then
 fi
 
 AC_ARG_ENABLE(directx,
-  [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
-if test "${enable_directx}" != "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
-      dnl DDraw
-      AC_CHECK_HEADERS(ddraw.h,
-      [ VLC_ADD_PLUGIN([directx aout_directx])
-        VLC_ADD_LIBS([directx],[-luser32 -lgdi32])
-      ],[AC_MSG_ERROR([Cannot find DirectX headers!])]
-      )
-
-      dnl OpenGL
-      AC_CHECK_HEADERS(GL/wglew.h,
-      [ VLC_ADD_PLUGIN([glwin32])
-        VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
-      ],[],[
-        #include <windows.h>
-        #include <GL/gl.h>
-      ])
+  [AS_HELP_STRING([--enable-directx],
+    [Microsoft DirectX support (default enabled on Windows)])],, [
+  AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
+    enable_directx="yes"
+  ], [
+    enable_directx="no"
+  ])
+])
+have_directx="no"
+AS_IF([test "${enable_directx}" != "no"], [
+  dnl DirectDraw
+  AC_CHECK_HEADERS(ddraw.h, [
+    have_directx="yes"
+  ], [
+    AC_MSG_ERROR([Cannot find DirectX headers!])
+  ])
 
-      dnl Direct3D
-      AC_CHECK_HEADERS(d3d9.h,
-      [ VLC_ADD_PLUGIN([direct3d])
-        VLC_ADD_LIBS([direct3d],[-lgdi32])
-      ])
-      VLC_ADD_LIBS([direct3d directx glwin32],[-lole32])
-  fi
-fi
+  dnl OpenGL
+  AC_CHECK_HEADERS(GL/wglew.h, [
+    VLC_ADD_PLUGIN([glwin32])
+    VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
+   ],, [
+     #include <windows.h>
+     #include <GL/gl.h>
+   ])
+
+   dnl Direct3D
+   AC_CHECK_HEADERS(d3d9.h, [
+     VLC_ADD_PLUGIN([direct3d])
+     VLC_ADD_LIBS([direct3d],[-lgdi32])
+   ])
+   VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid])
+])
+AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
 
 dnl
 dnl  Windows Direct2D plugin
@@ -3246,7 +3199,7 @@ AC_ARG_ENABLE(direct2d,
 AS_IF([test "${enable_direct2d}" != "no"], [
   AC_CHECK_HEADERS(d2d1.h, [
     VLC_ADD_PLUGIN([direct2d])
-    VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32])
+    VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32 -luuid])
   ], [
     AC_MSG_WARN([Cannot find Direct2D headers!])
   ])
@@ -3260,7 +3213,7 @@ AC_ARG_ENABLE(wingdi,
 if test "${enable_wingdi}" != "no"; then
   if test "${SYS}" = "mingw32"; then
     VLC_ADD_PLUGIN([wingdi])
-    VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32])
+    VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32 -luuid])
   fi
   if test "${SYS}" = "mingwce"; then
     VLC_ADD_PLUGIN([wingdi wingapi])
@@ -3451,8 +3404,8 @@ dnl  Open Sound System module
 dnl
 AC_ARG_ENABLE(oss,
   [AS_HELP_STRING([--enable-oss],
-    [support the Open Sound System OSS (default enabled on BSD)])],, [
-  AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux"], [
+    [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [
+  AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
     enable_oss="no"
   ])
 ])
@@ -3470,9 +3423,41 @@ AC_SUBST(OSS_LIBS)
 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
 
 dnl
-dnl  Portaudio module
+dnl  OpenBSD sndio module
+dnl
+AC_ARG_ENABLE([sndio],
+  [AS_HELP_STRING([--disable-sndio],
+    [support the OpenBSD sndio (default auto)])],, [
+  AS_IF([test "$SYS" = "opensd"], [
+    enable_sndio="yes"
+  ])
+])
+have_sndio="no"
+AS_IF([test "$enable_sndio" != "no"], [
+  AC_CHECK_HEADER([sndio.h], [
+    have_sndio="yes"
+  ])
+])
+AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
+
+dnl
+dnl  Windows Audio Session plugin
 dnl
-PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
+AC_ARG_ENABLE([wasapi],
+  [AS_HELP_STRING([--enable-wasapi],
+    [use the Windows Audio Session API (default auto)])
+])
+have_wasapi="no"
+AS_IF([test "$enable_wasapi" != "no"], [
+  AC_CHECK_HEADER([audioclient.h], [
+    have_wasapi="yes"
+  ], [
+    AS_IF([test "x${enable_wasapi}" != "x"], [
+      AC_MSG_ERROR([Windows Audio Session API not found.])
+    ])
+  ])
+])
+AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
 
 dnl
 dnl  win32 waveOut plugin
@@ -3593,64 +3578,71 @@ AS_IF([test "${enable_hildon}" = "yes"], [
 AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
 
 dnl
-dnl QT 4
+dnl QT
 dnl
-AC_ARG_ENABLE(qt4,
-  [  --enable-qt4            Qt 4 support (default enabled) ],, [
-  AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
+AC_ARG_ENABLE(qt, [
+  AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])],, [
+  AS_IF([test "${SYS}" = "darwin"], [
+    enable_qt="no"
+  ])
 ])
-AS_IF([test "${enable_qt4}" != "no"], [
-  PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.6.0], [
-    VLC_ADD_PLUGIN([qt4])
-    VLC_ADD_LIBS([qt4],[${QT4_LIBS}])
-    VLC_ADD_CXXFLAGS([qt4],[${QT4_CFLAGS}])
-    ALIASES="${ALIASES} qvlc"
-
-    AC_LANG_PUSH([C++])
-    VLC_SAVE_FLAGS
+AS_IF([test "${enable_qt}" != "no"], [
+  PKG_CHECK_MODULES([QT], [QtCore >= 5 QtWidgets QtGui],, [
+    PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
+      AS_IF([test -n "${enable_qt}"],[
+        AC_MSG_ERROR([${QT_PKG_ERRORS}.])
+      ],[
+        AC_MSG_WARN([${QT_PKG_ERRORS}.])
+      ])
+      enable_qt="no"
+    ])
+  ])
+])
+AS_IF([test "${enable_qt}" != "no"], [
+  VLC_ADD_PLUGIN([qt4])
+  VLC_ADD_LIBS([qt4],[${QT_LIBS}])
+  VLC_ADD_CXXFLAGS([qt4],[${QT_CFLAGS}])
+  ALIASES="${ALIASES} qvlc"
 
-    AC_MSG_CHECKING([whether Qt uses X11])
-    CPPFLAGS="${CPPFLAGS} ${QT4_CFLAGS}"
-    AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+  AC_LANG_PUSH([C++])
+  VLC_SAVE_FLAGS
+
+  AC_MSG_CHECKING([whether Qt uses Xlib])
+  CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
+  AC_PREPROC_IFELSE([AC_LANG_SOURCE([
 #include <QWidget>
 #if !defined (Q_WS_X11)
 # error Fail
 #endif
-    ])], [
-      AC_MSG_RESULT([yes])
-      VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
-      VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
-    ], [
-      AC_MSG_RESULT([no])
-    ])
+  ])], [
+    AC_MSG_RESULT([yes])
+    VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
+    VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
+  ], [
+    AC_MSG_RESULT([no])
+  ])
 
-    VLC_RESTORE_FLAGS
-    AC_LANG_POP([C++])
+  VLC_RESTORE_FLAGS
+  AC_LANG_POP([C++])
 
-    AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
-        VLC_ADD_LIBS([qt4],[-lole32])
-    ])
-    AS_IF([test "${SYS}" = "darwin" ],[
-         VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
-    ])
-    AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
-    AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
-    AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
-  ], [
-    AS_IF([test -n "${enable_qt4}"],[
-      AC_MSG_ERROR([${QT4_PKG_ERRORS}.])
-    ],[
-      AC_MSG_WARN([${QT4_PKG_ERRORS}.])
-    ])
-    enable_qt4="no"
+  AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
+      VLC_ADD_LIBS([qt4],[-lole32])
   ])
+  AS_IF([test "${SYS}" = "darwin" ],[
+       VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
+  ])
+
+  QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
+  AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin])
+  AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin])
+  AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin])
 ])
-AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])
+AM_CONDITIONAL(ENABLE_QT4, [test "$enable_qt" != "no"])
 
 dnl
 dnl Simple test for skins2 dependency
 dnl
-AS_IF([test "x$enable_qt4" = "xno"], [
+AS_IF([test "$enable_qt" = "no"], [
   AS_IF([test "${enable_skins2}" = "yes"], [
     AC_MSG_ERROR([The skins2 module depends on the Qt4 interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
   ], [
@@ -3669,24 +3661,24 @@ AS_IF([test "${enable_skins2}" != "no"], [
 
   dnl Win32
   AS_IF([test "${SYS}" = "mingw32"], [
-    VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
-    VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
     VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
   dnl MacOS
   ], [test "${SYS}" = "darwin"], [
-    VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
-    VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    VLC_ADD_CPPFLAGS([skins2],[ -DMACOSX_SKINS])
     VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
   dnl Linux/Unix
   ], [
     PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
     PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
     PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
-    VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
-    VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
     VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
   ])
 
+  dnl for All OSes
+  VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+
   dnl we need freetype
   AS_IF([test "${have_freetype}" != "yes"], [
     have_skins_deps="no"
@@ -3726,16 +3718,16 @@ then
   VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
   VLC_ADD_PLUGIN([macosx minimal_macosx])
 
-  VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit])
+  VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration])
 
-  VLC_SAVE_FLAGS
-  CFLAGS="-I${CONTRIB_DIR}/Sparkle.framework/Headers ${CFLAGS}"
-  AC_CHECK_HEADERS(Sparkle.h, [
-    VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
-    VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
-  ], VLC_RESTORE_FLAGS)
+  if test ! -d ${CONTRIB_DIR}/Sparkle.framework
+  then
+    AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
+  fi
+  VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
+  VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
 
-  if ! test -d ${CONTRIB_DIR}/BGHUDAppKit.framework
+  if test ! -d ${CONTRIB_DIR}/BGHUDAppKit.framework
   then
     AC_MSG_ERROR([BGHUDAppKit framework is required and was not found in ${CONTRIB_DIR}])
   fi
@@ -3782,33 +3774,6 @@ if test "${enable_ncurses}" != "no"; then
   VLC_RESTORE_FLAGS
 fi
 
-dnl
-dnl  XOSD plugin
-dnl
-AC_ARG_ENABLE(xosd,
-  [  --enable-xosd           xosd interface support (default disabled)])
-if test "${enable_xosd}" = "yes"
-then
-  AC_CHECK_HEADERS(xosd.h,
-    AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
-      VLC_ADD_PLUGIN([xosd])
-      VLC_ADD_LIBS([xosd],[-lxosd])
-    ])
-  )
-fi
-
-dnl
-dnl Framebuffer (overlay) plugin
-dnl
-AC_ARG_ENABLE(fbosd,
-  [  --enable-fbosd          fbosd interface support (default disabled)])
-if test "${enable_fbosd}" = "yes"
-then
-  AC_CHECK_HEADERS(linux/fb.h, [
-    VLC_ADD_PLUGIN([fbosd])
- ])
-fi
-
 dnl
 dnl  Lirc plugin
 dnl
@@ -3861,6 +3826,23 @@ AS_IF([test "${enable_projectm}" != "no"],
     ])
   ])
 
+dnl
+dnl Vovoid VSXu visualization plugin
+dnl
+AC_ARG_ENABLE(vsxu,
+  [  --enable-vsxu           Vovoid VSXu visualization plugin (default auto)])
+AS_IF([test "${enable_vsxu}" != "no"],
+  [
+    PKG_CHECK_MODULES(VSXU, libvsxu,
+    [
+      VLC_ADD_PLUGIN([vsxu])
+      VLC_ADD_CXXFLAGS([vsxu],[$VSXU_CFLAGS])
+      VLC_ADD_LIBS([vsxu],[$VSXU_LIBS])
+    ],[
+      AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
+    ])
+  ])
+
 dnl
 dnl  AtmoLight (homemade Philips Ambilight clone)
 dnl
@@ -3941,7 +3923,7 @@ AS_IF([test "${have_libgcrypt}" != "yes"], [
   enable_gnutls="no"
 ])
 AS_IF([test "${enable_gnutls}" != "no"], [
-  PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.0.0], [
+  PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.6.6], [
     VLC_ADD_PLUGIN([gnutls])
   ], [
     AS_IF([test -n "${enable_gnutls}"], [
@@ -4001,9 +3983,9 @@ AC_ARG_ENABLE(growl,
   [  --enable-growl          growl notification plugin (default disabled)],,
   [enable_growl=no])
 AS_IF([test "${enable_growl}" != "no"], [
-    AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl.framework/Versions/A/Headers/GrowlDefines.h, [
+    AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl.framework/Versions/A/Headers/Growl.h, [
       VLC_ADD_PLUGIN([growl])
-      VLC_ADD_LIBS([growl], [-F${CONTRIB_DIR} -Wl,-framework,Growl,-framework,CoreFoundation])
+      VLC_ADD_LIBS([growl], [-F${CONTRIB_DIR} -Wl,-framework,Growl,-framework,Foundation])
       VLC_ADD_OBJCFLAGS([growl], [-F${CONTRIB_DIR}])
       VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
     ])
@@ -4066,7 +4048,7 @@ AC_ARG_WITH(kde-solid,
   AS_HELP_STRING([--with-kde-solid=PATH],
                  [KDE Solid actions directory (auto)]),, [
 
-if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ; then
+if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" ; then
   with_kde_solid="yes"
 fi
 ])
@@ -4093,9 +4075,8 @@ AC_ARG_ENABLE(loader,
 AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
 AS_IF([test "${enable_loader}" = "yes"],
   [ VLC_ADD_PLUGIN([dmo])
-    VLC_ADD_CPPFLAGS([dmo quicktime realvideo],[-I\\\${top_srcdir}/modules/codec/loader])
-    VLC_ADD_LIBS([dmo quicktime realvideo],[\\\${top_builddir}/modules/codec/loader/libloader.la])
-    VLC_ADD_CPPFLAGS([realvideo], [-DLOADER])
+    VLC_ADD_CPPFLAGS([dmo quicktime ],[-I\\\${top_srcdir}/modules/codec/loader])
+    VLC_ADD_LIBS([dmo quicktime ],[\\\${top_builddir}/modules/codec/loader/libloader.la])
     VLC_ADD_LIBS([dmo quicktime], [-lpthread])
   ])
 
@@ -4134,19 +4115,14 @@ AC_SUBST(VERSION_MINOR)
 AC_SUBST(VERSION_REVISION)
 AC_SUBST(VERSION_EXTRA)
 AC_SUBST(COPYRIGHT_YEARS)
-AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])
+AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami|sed -e 's/\\\/\\\\\\\/g'`", [user who ran configure])
 AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
-AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])
+AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", [compiler])
 dnl
 dnl  Handle substvars that use $(top_srcdir)
 dnl
 CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS}"
 
-dnl
-dnl Sort the modules list
-dnl
-PLUGINS=$( (for i in `echo $PLUGINS`; do echo $i; done)|sort|xargs )
-
 dnl
 dnl  Configuration is finished
 dnl
@@ -4181,7 +4157,6 @@ AC_CONFIG_FILES([
   modules/access/Makefile
   modules/access/bd/Makefile
   modules/access/dshow/Makefile
-  modules/access/dvb/Makefile
   modules/access/mms/Makefile
   modules/access/rtp/Makefile
   modules/access/rtsp/Makefile
@@ -4245,8 +4220,6 @@ AC_CONFIG_FILES([
   modules/visualization/Makefile
   modules/visualization/visual/Makefile
   modules/mmx/Makefile
-  modules/mmxext/Makefile
-  modules/3dnow/Makefile
   modules/sse2/Makefile
   modules/altivec/Makefile
   modules/arm_neon/Makefile
@@ -4270,21 +4243,27 @@ dnl Generate makefiles
 AC_OUTPUT
 
 dnl Do we have to use make or gmake ?
-USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac`
+if make --version 2>&1|grep -q GNU
+then
+    # GNU make, all seems good
+    MAKE=make
+else
+    # Known GNU make alias (on BSD)
+    MAKE=gmake
+fi
 dnl Shortcut to nice compile message
-rm -f compile
 if test -n $SHELL; then
   SHELL=${CONFIG_SHELL-/bin/sh}
 fi
-echo '#! '$SHELL >compile
-echo rm -f .error\$\$ >>compile
-echo ERROR=0 >>compile
-echo export PATH=$PATH LANG=C >>compile
-echo "($USE_MAKE_OR_GMAKE V=1 \$@ 2>&1 || touch .error\$\$)| \\" >>compile
-echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl' >>compile
-echo test -f .error\$\$ \&\& ERROR=1 >>compile
-echo rm -f .error\$\$ >>compile
-echo exit \$ERROR >>compile
+rm -f compile
+echo "#! $SHELL
+rm -f .error\$\$
+ERROR=0
+export PATH=\"$PATH\" LANG=C
+($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| `sed -ne \"s/^top_srcdir *= *//p\" < Makefile`/extras/buildsystem/make.pl
+test -f .error\$\$ && ERROR=1
+rm -f .error\$\$
+exit \$ERROR" >compile
 chmod a+x compile
 
 echo "
@@ -4300,4 +4279,4 @@ else
 echo "build vlc executable  : no"
 fi
 echo "
-To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."
+To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."