]> git.sesse.net Git - vlc/blobdiff - configure.ac
Fix utf8_readdir usage
[vlc] / configure.ac
index 969f2a3d8d27d5a8bf95e56c26c1faf31403315d..ca709c8c4ce56f335c23dddf52efba9d2f6242b2 100644 (file)
@@ -242,7 +242,8 @@ case "${host_os}" in
     if test "${SYS}" = "mingw32"; then
         # add ws2_32 for closesocket, select, recv
         VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm])
-        VLC_ADD_LDFLAGS([vlc activex mozilla],[-mwindows])
+        VLC_ADD_LDFLAGS([vlc],[-mwindows])
+        VLC_ADD_LDFLAGS([activex mozilla],[-lgdi32])
         VLC_ADD_LDFLAGS([cdda vcdx cddax sdl_image],[-lwinmm])
         VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl flac ts audioscrobbler],[-lws2_32])
     fi
@@ -1057,6 +1058,8 @@ if test "${ac_cv_c_visibility_hidden}" != "no"; then
     VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden])
 fi
 
+AM_CONDITIONAL(HAVE_COMPILER_EXPORT, [test "$SYS" = "mingw32" -o "${ac_cv_c_visibility_hidden}" != "no"])
+
 dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers)
 dnl AC_LANG_PUSH(C++)
 dnl     AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden],
@@ -1197,8 +1200,8 @@ VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gra
 VLC_ADD_PLUGINS([converter_fixed mono])
 VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
 VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
-VLC_ADD_PLUGINS([playlist export sgimb nsc xtag])
-VLC_ADD_PLUGINS([i420_rgb rawvideo blend scale image logo magnify puzzle colorthres])
+VLC_ADD_PLUGINS([playlist export nsc xtag])
+VLC_ADD_PLUGINS([i420_rgb grey_yuv rawvideo blend scale image logo magnify puzzle colorthres])
 VLC_ADD_PLUGINS([wav araw subtitle vobsub adpcm a52sys dtssys au ty voc xa nuv])
 VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp])
 VLC_ADD_PLUGINS([access_http access_mms access_ftp])
@@ -1219,16 +1222,6 @@ if test "${SYS}" != "mingwce"; then
   VLC_ADD_PLUGINS([converter_float a52tospdif dtstospdif audio_format])
 fi
 
-dnl
-dnl  Switch to enable a version of VLC where most modules will be builtin
-dnl
-AC_ARG_ENABLE(mostly-builtin,
-[  --enable-mostly-builtin most modules will be built-in (default disabled)])
-if test "${enable_mostly_builtin}" = "yes"; then
-  VLC_ADD_BUILTINS([${PLUGINS}])
-  PLUGINS=""
-fi
-
 dnl
 dnl Some plugins aren't useful on some platforms
 dnl
@@ -1254,7 +1247,7 @@ MMXEXT_MODULES="memcpymmxext"
 #MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext"
 THREEDNOW_MODULES="memcpy3dn"
 SSE_MODULES=""
-SSE2_MODULES="i420_rgb_sse2 i420_yuy2_sse2"
+SSE2_MODULES="i420_rgb_sse2 i420_yuy2_sse2 i422_yuy2_sse2"
 ALTIVEC_MODULES="memcpyaltivec i420_yuy2_altivec"
 #ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec"
 
@@ -1280,7 +1273,7 @@ AC_CACHE_CHECK([if \$CC groks MMX intrinsics],
                     [ac_cv_c_mmx_intrinsics=no])])
 if test "${ac_cv_c_mmx_intrinsics}" != "no"; then
   AC_DEFINE(HAVE_MMX_INTRINSICS, 1, Define if MMX intrinsics are available.)
-  VLC_ADD_CFLAGS([i420_rgb_mmx],[-mmmx])
+  VLC_ADD_CFLAGS([${MMX_MODULES}],[-mmmx])
 fi
 
 dnl  Check for fully workin SSE2 intrinsics
@@ -1305,7 +1298,7 @@ AC_CACHE_CHECK([if \$CC groks SSE2 intrinsics],
                     [ac_cv_c_sse2_intrinsics=no])])
 if test "${ac_cv_c_sse2_intrinsics}" != "no"; then
   AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, Define if SSE2 intrinsics are available.)
-  VLC_ADD_CFLAGS([i420_rgb_sse2],[-msse2])
+  VLC_ADD_CFLAGS([${SSE2_MODULES}],[-msse2])
 fi
 
 AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
@@ -1508,12 +1501,12 @@ dnl
 if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}"="i486" -o "${host_cpu}" = "x86_64"
 then
     ARCH="${ARCH} mmx"
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}])
 fi
 if test "${host_cpu}" = "i686" -o "${host_cpu}" = "x86_64"
 then
     ARCH="${ARCH} sse sse2"
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}])
 fi
 
 dnl
@@ -1544,9 +1537,9 @@ dnl
 AC_ARG_ENABLE(altivec,
 [  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
 [ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ],
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}]) fi ],
 [ if test "${host_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
-    VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ])
+    VLC_ADD_PLUGINS([${ACCEL_MODULES}]) fi ])
 
 dnl
 dnl  Debugging mode
@@ -1648,9 +1641,9 @@ then
     ])
   if test "x${have_lua}" = "xyes" ;  then
      AC_DEFINE(HAVE_LUA, [], [Define if you have the lua library])
-     VLC_ADD_PLUGINS([luaplaylist])
-     VLC_ADD_LDFLAGS([luaplaylist],[$LUA_LIBS])
-     VLC_ADD_CFLAGS([luaplaylist],[$LUA_CFLAGS])
+     VLC_ADD_PLUGINS([luaplaylist luameta])
+     VLC_ADD_LDFLAGS([luaplaylist luameta],[$LUA_LIBS])
+     VLC_ADD_CFLAGS([luaplaylist luameta],[$LUA_CFLAGS])
   fi
 fi
 
@@ -1731,11 +1724,12 @@ dnl
 dnl Taglibplugin
 dnl
 AC_ARG_ENABLE(taglib,
-  [  --enable-taglib Taglib support (default disabled) ])
-  AS_IF([test "${enable_taglib}" = "yes"],[
+  [  --disable-taglib Taglib support (default enabled) ])
+  AS_IF([test "${enable_taglib}" != "no"],[
     PKG_CHECK_MODULES(TAGLIB, taglib,
-      [ VLC_ADD_PLUGINS([taglib])
-        VLC_ADD_LDFLAGS([taglib],[$TAGLIB_LIBS])
+      [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] )
+        VLC_ADD_PLUGINS([taglib])
+        VLC_ADD_LDFLAGS([taglib],[$TAGLIB_LIBS -lz])
        VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS]) ],
       [AC_MSG_WARN(TagLib library not found)])
   ])
@@ -4139,6 +4133,9 @@ then
     VLC_ADD_PLUGINS([freetype])
     VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
     VLC_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`])
+    if test "${SYS}" = "mingw32"; then
+       VLC_ADD_LDFLAGS([freetype],[-lxml2])]
+    fi
     AC_CHECK_HEADERS(fontconfig/fontconfig.h,
       [VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
        VLC_ADD_LDFLAGS([freetype],[-lfontconfig])])
@@ -5555,7 +5552,7 @@ then
       [AC_CHECK_HEADERS(olectl.h,
         [ VLC_ADD_CPPFLAGS([activex],[-DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_])
           VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
-          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi -lgdi32]) 
+          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
           AC_CHECK_HEADERS(objsafe.h,
             VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
             [
@@ -5743,7 +5740,7 @@ then
         dnl latest gecko sdk does not have embedstring
         if test -d "${real_mozilla_sdk}/embedstring/bin"
         then
-          VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
+          VLC_ADD_LDFLAGS([mozilla],[-lembedstring])
         fi
       fi
     fi
@@ -5821,7 +5818,6 @@ then
   VLC_ADD_LDFLAGS([test3],[-lobjc])
 
   VLC_ADD_PLUGINS([${TESTS}])
-  #VLC_ADD_BUILTINS([${TESTS}])
 fi
 
 dnl
@@ -5882,42 +5878,36 @@ fi
 dnl
 dnl  Plugin and builtin checks
 dnl
-builtin_support=false
-plugin_support=:
-
-dnl Support for plugins - this must be AT THE END
-AC_ARG_ENABLE(plugins,
-  [  --disable-plugins       make all plugins built-in (default plugins enabled)],
-  [if test "${enable_plugins}" = "no"
-   then
-     plugin_support=false
-   fi])
+plugin_support=yes
 
 dnl Automagically disable plugins if there is no system support for
 dnl dynamically loadable files (.so, .dll, .dylib).
 dnl don't forget vlc-win32 still can load .dll as plugins
-if test "${ac_cv_have_plugins}" = "no"
-then
-  echo "*** Your system doesn't have plugin support. All plugins will be built"
-  echo "statically."
-  plugin_support=false
-fi
+AS_IF([test "${ac_cv_have_plugins}" = "no"], [
+  AC_MSG_WARN([*** No plugin support! Building statically! ***])
+  plugin_support=no
+])
+
+AS_IF([test "${enable_shared}" = "no"], [
+  plugin_support=no
+])
 
-AS_IF([${plugin_support}], [
+AS_IF([test "${plugin_support}" != "no"], [
   AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1, Define if we have support for dynamic plugins)
-], [
-  VLC_ADD_BUILTINS([${PLUGINS}])
-  PLUGINS=""
 ])
 
+AM_CONDITIONAL(HAVE_PLUGINS, [test "${plugin_support}" != "no"])
+
+dnl Temporary(?) hack for plugins/builtins transition
+VLC_ADD_PLUGINS([${BUILTINS}])
+BUILTINS=""
+
 dnl
 dnl Pic and shared libvlc stuff
 dnl
-VLC_ADD_PLUGINS([${BUILTINS}])
 AS_IF([test "${SYS}" = "mingw32"], [
   FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
 ])
-BUILTINS=""
 
 dnl
 dnl  Stuff used by the program
@@ -5937,11 +5927,6 @@ AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])
 AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) 
 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) 
 
-dnl Old definitions for version-dependant plugins
-dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
-dnl AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
-dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
-
 dnl New definitions with value matching 0.9.0 release
 module_symbol="0_9_0b"
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
@@ -6033,6 +6018,7 @@ AC_CONFIG_FILES([
   modules/codec/cmml/Makefile
   modules/codec/dmo/Makefile
   modules/codec/ffmpeg/Makefile
+  modules/codec/subtitles/Makefile
   modules/codec/spudec/Makefile
   modules/codec/xvmc/Makefile
   modules/control/Makefile