]> git.sesse.net Git - vlc/blobdiff - configure.ac
livehttp: allow setting ext-x-allow-cache to no
[vlc] / configure.ac
index 566a9f1b569854eaf8c74e6b5958690fabaec477..421ba14e2577436986c626fa4ba7622bd2a2e37a 100644 (file)
@@ -143,7 +143,6 @@ case "${host_os}" in
         ARCH_flag="-arch x86_64"
       ;;
       arm*)
-        ARCH_flag="-arch armv7"
         ac_cv_c_bigendian="no"
         ac_cv_c_attribute_packed="no"
       ;;
@@ -205,8 +204,12 @@ case "${host_os}" in
   *mingw32* | *cygwin* | *wince* | *mingwce*)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
-    AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2 APIs.])
+    AH_TOP([#if defined(WIN32) && !defined(_WIN32_WINNT)])
+    AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
+    AH_TOP([#endif])
     AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
+    AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
+    AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
 
     case "${host_os}" in
       *mingw32*)
@@ -233,17 +236,20 @@ case "${host_os}" in
         DESTDIR="`pwd`/_win32/"
 
         dnl
-        dnl NSIS Installer prefix and WIN64
+        dnl NSIS/MSI Installer prefix and WIN64
         dnl
         case "${host}" in
             amd64*|x86_64*)
                 HAVE_WIN64="1"
+                WINDOWS_ARCH="x64"
                 PROGRAMFILES="PROGRAMFILES64"
             ;;
             *)
+                WINDOWS_ARCH="x86"
                 PROGRAMFILES="PROGRAMFILES"
             ;;
         esac
+        AC_SUBST(WINDOWS_ARCH)
         AC_SUBST(PROGRAMFILES)
 
     fi
@@ -459,6 +465,16 @@ dnl Check for fnative-struct or mms-bitfields support for mingw32
     fi
 ])
 
+AC_ARG_ENABLE(winstore_app,
+     AS_HELP_STRING([--enable-winstore-app],
+                    [Build targetted for Windows Store apps (default disabled)]))
+
+AS_IF([test "${SYS}" = "mingw32"], [
+    AS_IF([test "${enable_winstore_app}" == "yes"], [
+       AC_DEFINE(WINAPI_FAMILY_APP, 1, [Define if you want to build for Windows Store apps])])
+    ])
+
+
 dnl
 dnl Buggy glibc prevention. Purposedly not cached.
 dnl See sourceware.org bugs 5058 and 5443.
@@ -492,7 +508,7 @@ 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 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_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 strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
 ])
@@ -865,7 +881,7 @@ AS_IF([test "${enable_coverage}" != "no"], [
   LDFLAGS="-lgcov ${LDFLAGS}"
 ])
 
-AS_IF([test "${SYS}" != "mingw32"], [
+AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [
   VLC_SAVE_FLAGS
   CFLAGS="${CFLAGS} -fvisibility=hidden"
   CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
@@ -1510,6 +1526,9 @@ then
   AS_IF([test "${LUAC}" = "false"], [
     AC_MSG_ERROR([Could not find the LUA byte compiler.])
   ])
+  AS_IF([test -f ${CONTRIB_DIR}/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|cut -d' ' -f2` != 0404], [
+    AC_MSG_ERROR([You need 32-bits luac when using using lua from contrib.])
+  ])
 fi
 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
 
@@ -1706,16 +1725,7 @@ PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0]
 dnl
 dnl  libsmbclient plugin
 dnl
-AC_ARG_ENABLE(smb,
-  [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])])
-if test "${enable_smb}" != "no"; then
-  AC_CHECK_HEADERS(libsmbclient.h,
-    [ VLC_ADD_PLUGIN([access_smb])
-      VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
-    [ if test -n "${enable_smb}"; then
-        AC_MSG_ERROR([cannot find libsmbclient headers])
-     fi ])
-fi
+PKG_ENABLE_MODULES_VLC([SMBCLIENT], [access_smb], [smbclient], (SMB/CIFS support), [auto])
 
 
 dnl
@@ -1750,7 +1760,7 @@ if test "${enable_decklink}" != "no"
 then
   if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
   then
-    VLC_ADD_CXXFLAGS([decklink],[-I${with_decklink_sdk}/include])
+    VLC_ADD_CXXFLAGS([decklink decklinkoutput],[-I${with_decklink_sdk}/include])
   fi
   VLC_SAVE_FLAGS
   CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_decklink}"
@@ -2209,23 +2219,25 @@ dnl
 AC_ARG_ENABLE(avcodec,
 [  --enable-avcodec        libavcodec codec (default enabled)])
 AS_IF([test "${enable_avcodec}" != "no"], [
-  PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0],
-    [
-      VLC_SAVE_FLAGS
-      CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
-      CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
-      AC_CHECK_HEADERS(libavcodec/avcodec.h)
-      AC_CHECK_HEADERS(libavutil/avutil.h)
-      VLC_ADD_PLUGIN([avcodec])
-      VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
-      AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
-        VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
-      ])
-      VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
-      VLC_RESTORE_FLAGS
-      have_avcodec="yes"
-    ],[
-      AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
+  PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
+    PKG_CHECK_EXISTS([libavcodec < 55],, [
+      AC_MSG_ERROR([libavcodec versions 55 and later are not supported yet.])
+    ])
+    VLC_SAVE_FLAGS
+    CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
+    CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
+    AC_CHECK_HEADERS(libavcodec/avcodec.h)
+    AC_CHECK_HEADERS(libavutil/avutil.h)
+    VLC_ADD_PLUGIN([avcodec])
+    VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
+    AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
+      VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
+    ])
+    VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
+    VLC_RESTORE_FLAGS
+    have_avcodec="yes"
+  ],[
+    AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
   ])
 ], [
   have_avcodec="no"
@@ -3146,7 +3158,6 @@ AC_ARG_ENABLE(ios-vout,
 if test "${enable_ios_vout}" = "yes"
 then
   VLC_ADD_PLUGIN([vout_ios])
-  VLC_ADD_CFLAGS([vout_ios], [-DUSE_OPENGL_ES=1])
   VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
 fi
 
@@ -3455,7 +3466,7 @@ if test "x${enable_macosx_audio}" != "xno" &&
 then
   AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
     [ VLC_ADD_PLUGIN([auhal])
-      VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
+      VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices])
     ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
 fi
 
@@ -3659,7 +3670,7 @@ AC_ARG_ENABLE(macosx,
   [  --enable-macosx         Mac OS X gui support (default enabled on Mac OS X)])
 if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
 then
-  VLC_ADD_LIBS([macosx], [-Wl,-framework,Cocoa -Wl,-framework,OpenGL -Wl,-framework,Carbon -Wl,-framework,CoreServices -Wl,-framework,AGL])
+  VLC_ADD_LIBS([macosx], [-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices])
   VLC_ADD_OBJCFLAGS([macosx], [-fobjc-exceptions] )
   VLC_ADD_PLUGIN([macosx])
 
@@ -3798,12 +3809,6 @@ AS_IF([test "${enable_atmo}" != no], [
   ])
 ])
 
-AC_ARG_ENABLE(osdmenu,
-  AS_HELP_STRING([--enable-osdmenu],[OSD menu (default disabled)]),, [
-  enable_osdmenu="no"
-])
-AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_osdmenu}" != "no"])
-
 
 EXTEND_HELP_STRING([Service Discovery plugins:])
 dnl
@@ -3874,17 +3879,6 @@ AS_IF([test "${enable_gnutls}" != "no"], [
 ])
 
 
-dnl
-dnl Nokia MCE plugin (Maemo screen unblanking)
-dnl
-PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
-
-
-AS_IF([test -f "/etc/maemo_version"], [
-  AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.])
-])
-
-
 dnl
 dnl Taglib plugin
 dnl
@@ -4136,6 +4130,7 @@ AM_COND_IF([HAVE_WIN32], [
   AC_CONFIG_FILES([
     extras/package/win32/NSIS/spad.nsi
     extras/package/win32/NSIS/vlc.win32.nsi
+    extras/package/win32/msi/config.wxi
   ])
 ])