]> git.sesse.net Git - vlc/blobdiff - configure.ac
Qt: AbtractPLItem: missing vtable entry for destructor (fix #8485)
[vlc] / configure.ac
index 34c0a12b83cf3bbaf5f09686fab2f0ace11611e1..af9c44777ed44d5a782575dc5f4895084a516d52 100644 (file)
@@ -158,7 +158,7 @@ case "${host_os}" in
     VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
     VLC_ADD_LIBS([avcodec access_avio swscale postproc i420_rgb_mmx x264 x26410b],[-Wl,-read_only_relocs,suppress])
     VLC_ADD_CFLAGS([motion rotate],[-fconstant-cfstrings])
-    VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
+    VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,SystemConfiguration])
 
     dnl Allow binaries created on Lion to run on earlier releases
     AC_EGREP_CPP(yes,
@@ -214,8 +214,6 @@ case "${host_os}" in
     case "${host_os}" in
       *mingw32*)
         SYS=mingw32
-        CC="$CC -static-libgcc"
-        CXX="$CXX -static-libgcc -static-libstdc++"
         ;;
       *cygwin*)
         dnl Check if we are using the mno-cygwin mode in which case we are
@@ -473,10 +471,9 @@ 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])])
-    ])
+vlc_winstore_app=0
+AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" = "yes"], [vlc_winstore_app=1])
+AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
 
 
 dnl
@@ -1509,28 +1506,35 @@ AC_ARG_ENABLE(lua,
     [disable LUA scripting support (default enabled)])])
 if test "${enable_lua}" != "no"
 then
-  PKG_CHECK_MODULES(LUA, lua5.1,
+  PKG_CHECK_MODULES(LUA, lua5.2,
     [ have_lua=yes ],
     [
-    AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
-    PKG_CHECK_MODULES(LUA, lua >= 5.1,
+    AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
+
+    PKG_CHECK_MODULES(LUA, lua5.1,
       [ have_lua=yes ],
       [
-        AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
-        have_lua=yes
-        AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
-          [],
-          [ have_lua=no ] )
-        AC_CHECK_LIB(  lua5.1 , luaL_newstate,
-          [LUA_LIBS="-llua5.1"],
-          AC_CHECK_LIB( lua51 , luaL_newstate,
-            [LUA_LIBS="-llua51"],
-            AC_CHECK_LIB( lua , luaL_newstate,
-              [LUA_LIBS="-llua"],
-              [ have_lua=no
-              ], [-lm])
-          )
-        )
+      AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
+      PKG_CHECK_MODULES(LUA, lua >= 5.1,
+        [ have_lua=yes ],
+        [
+          AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
+          have_lua=yes
+          AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
+            [],
+            [ have_lua=no ] )
+          AC_CHECK_LIB(  lua5.2 , luaL_newstate,
+            [LUA_LIBS="-llua5.2"],
+          AC_CHECK_LIB( lua5.1 , luaL_newstate,
+            [LUA_LIBS="-llua5.1"],
+            AC_CHECK_LIB( lua51 , luaL_newstate,
+              [LUA_LIBS="-llua51"],
+              AC_CHECK_LIB( lua , luaL_newstate,
+                [LUA_LIBS="-llua"],
+                [ have_lua=no
+                ], [-lm])
+            )))
+        ])
       ])
     ])
   if test "x${have_lua}" = "xyes" ;  then
@@ -1925,6 +1929,25 @@ then
 fi
 AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" -a "x${enable_macosx_qtkit}" != "xno"])
 
+dnl
+dnl AVFoundation
+AC_SUBST(have_avfoundation, ["no"])
+AC_ARG_ENABLE(macosx-avfoundation,
+  [  --enable-macosx-avfoundation Mac OS X avcapture (video) module (default enabled on Mac OS X)])
+if test "x${enable_macosx_avfoundation}" != "xno" &&
+  (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes")
+then
+  SAVED_LIBS="${LIBS}"
+  LIBS="-framework AVFoundation"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no])
+  LIBS="${SAVED_LIBS}"
+  if test "${have_avfoundation}" != "no"
+  then
+    VLC_ADD_LIBS([macosx],[-Wl,-framework,AVFoundation])
+    VLC_ADD_PLUGIN([avcapture])
+  fi
+fi
+AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"])
 
 dnl
 dnl  Demux plugins
@@ -2283,7 +2306,7 @@ AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
   AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
 ])
 have_avcodec_vaapi="no"
-AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" == "yes"], [
+AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" = "yes"], [
   PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
     VLC_SAVE_FLAGS
     CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
@@ -3005,7 +3028,7 @@ AC_ARG_ENABLE(vdpau,
   [AS_HELP_STRING([--enable-vdpau],
     [VDPAU hardware decoder support (default auto)])])
 have_vdpau="no"
-AS_IF([test "${enable_vdpau}" != "no" -a "${have_avcodec}" == "yes"], [
+AS_IF([test "${enable_vdpau}" != "no" -a "${have_avcodec}" = "yes"], [
   PKG_CHECK_MODULES([VDPAU], [vdpau], [
     have_vdpau="yes"
     AS_IF([test "${no_x}" = "yes"], [