]> git.sesse.net Git - vlc/blobdiff - configure.ac
Make sure we download all sources first
[vlc] / configure.ac
index 1b72e1026d6ebb66f27c7b61d68d7f85e681ff45..7cdd018abb744a9ebce21cf4541733cff3cd5fc8 100644 (file)
@@ -192,9 +192,9 @@ case "${host_os}" in
     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 postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
+    VLC_ADD_LDFLAGS([avcodec avformat swscale imgresample postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
     VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
-    VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,Cocoa,-framework,CoreFoundation])
+    VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,CoreFoundation])
     VLC_ADD_LDFLAGS([motion],[-Wl,-framework,IOKit,-framework,CoreFoundation])
     AC_ARG_ENABLE(macosx-defaults,
         [  --enable-macosx-defaults Build the default configuration on Mac OS X (default enabled)])
@@ -231,6 +231,8 @@ case "${host_os}" in
         echo "  Assuming --enable-twolame"
         enable_realrtsp="yes"
         echo "  Assuming --enable-realrtsp"
+        enable_update_check="yes"
+        echo "  Assuming --enable-update-check"
 
         enable_skins2="no"
         echo "  Assuming --disable-skins2"
@@ -313,13 +315,13 @@ case "${host_os}" in
         VLC_ADD_LDFLAGS([vlc],[-mwindows])
         VLC_ADD_LIBS([activex mozilla],[-lgdi32])
         VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm])
-        VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua],[-lws2_32])
+        VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp rtp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd],[-lws2_32])
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
         VLC_ADD_CPPFLAGS([libvlc vlc],[-Dmain(a,b)=maince(a,b)])
         VLC_ADD_LDFLAGS([libvlc vlc],[-e WinMainCRTStartup])
-        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],[-lws2])
+        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])
    fi
     ;;
@@ -518,7 +520,7 @@ AC_CHECK_FUNCS(connect,,[
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
-    VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp],[-lsocket])
+    VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp remoteosd],[-lsocket])
   ])
 ])
 
@@ -645,7 +647,7 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LIBS([avcodec avformat swscale 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 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])
 ])
 AC_CHECK_LIB(m,sqrt,[
   VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
@@ -1080,6 +1082,7 @@ dnl
 dnl  default modules
 dnl
 VLC_ADD_PLUGIN([dummy])
+VLC_ADD_PLUGIN([stats])
 VLC_ADD_PLUGIN([logger])
 VLC_ADD_PLUGIN([memcpy])
 dnl Demuxers:
@@ -1088,34 +1091,11 @@ VLC_ADD_PLUGIN([mpga])
 VLC_ADD_PLUGIN([m4v])
 VLC_ADD_PLUGIN([m4a])
 VLC_ADD_PLUGIN([h264])
-VLC_ADD_PLUGIN([vc1])
-VLC_ADD_PLUGIN([demux_cdg])
 VLC_ADD_PLUGIN([cdg])
 VLC_ADD_PLUGIN([ps])
-VLC_ADD_PLUGIN([pva])
 VLC_ADD_PLUGIN([avi])
 VLC_ADD_PLUGIN([asf])
 VLC_ADD_PLUGIN([mp4])
-VLC_ADD_PLUGIN([rawdv])
-VLC_ADD_PLUGIN([rawvid])
-VLC_ADD_PLUGIN([nsv])
-VLC_ADD_PLUGIN([real])
-VLC_ADD_PLUGIN([aiff])
-VLC_ADD_PLUGIN([mjpeg])
-VLC_ADD_PLUGIN([wav])
-VLC_ADD_PLUGIN([voc])
-VLC_ADD_PLUGIN([smf])
-VLC_ADD_PLUGIN([demuxdump])
-VLC_ADD_PLUGIN([flacsys])
-VLC_ADD_PLUGIN([tta])
-VLC_ADD_PLUGIN([subtitle])
-VLC_ADD_PLUGIN([vobsub])
-VLC_ADD_PLUGIN([a52sys])
-VLC_ADD_PLUGIN([dtssys])
-VLC_ADD_PLUGIN([au])
-VLC_ADD_PLUGIN([ty])
-VLC_ADD_PLUGIN([xa])
-VLC_ADD_PLUGIN([nuv])
 dnl Text codecs:
 VLC_ADD_PLUGIN([cvdsub])
 VLC_ADD_PLUGIN([svcdsub])
@@ -2336,8 +2316,8 @@ dnl
 dnl  Video4Linux2 plugin
 dnl
 AC_ARG_ENABLE(v4l2,
-  [  --enable-v4l2           Video4Linux2 input support (default disabled)])
-if test "${enable_v4l2}" = "yes"
+  [  --enable-v4l2           Video4Linux2 input support (default enabled)])
+if test "${enable_v4l2}" != "no"
 then
   AC_ARG_WITH(v4l2,
     [    --with-v4l2=PATH       path to a v4l2-enabled kernel tree],[],[])
@@ -2579,9 +2559,9 @@ dnl
 dnl  DVB-S/DVB-T/DVB-C satellite/teresterial/cable input using v4l2
 dnl
 AC_ARG_ENABLE(dvb,
-  [  --enable-dvb            DVB-S/T/C card support (default disabled)])
+  [  --enable-dvb            DVB-S/T/C card support (default enabled)])
 
-if test "${enable_dvb}" = "yes"
+if test "${enable_dvb}" != "no"
 then
   AC_ARG_WITH(dvb,
   [    --with-dvb=PATH       path to a dvb- and v4l2-enabled kernel tree],[],[])
@@ -2925,7 +2905,7 @@ AC_ARG_ENABLE(avcodec,
 [  --enable-avcodec       libavcodec codec (default enabled)])
 if test "${enable_avcodec}" != "no"
 then
-  PKG_CHECK_MODULES(AVCODEC,[libavcodec, libavutil],
+  PKG_CHECK_MODULES(AVCODEC,[libavcodec libavutil],
     [
       VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
@@ -2937,7 +2917,7 @@ then
       VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_ERROR([Could not find libavcodec or libavutil.])
+      AC_MSG_ERROR([Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.])
   ])
 fi
 
@@ -2949,20 +2929,19 @@ AC_ARG_ENABLE(avformat,
 [  --enable-avformat   libavformat containers (default enabled)])
 if test "${enable_avformat}" != "no"
 then
-  PKG_CHECK_MODULES(AVFORMAT,[libavformat, libavcodec, libavutil],
+  PKG_CHECK_MODULES(AVFORMAT,[libavformat libavutil],
     [
       VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
       CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
       AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
-      AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
       AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
       VLC_ADD_PLUGIN([avformat])
       VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS])
       VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_ERROR([Could not find libavformat, libavcodec or libavutil.])
+      AC_MSG_ERROR([Could not find libavformat or libavutil. Use --disable-avformat to ignore this error.])
   ])
 fi
 
@@ -2974,19 +2953,59 @@ AC_ARG_ENABLE(swscale,
 [  --enable-swscale    libswscale image scaling and conversion (default enabled)])
 if test "${enable_swscale}" != "no"
 then
-  PKG_CHECK_MODULES(SWSCALE,[libswscale, libavutil],
+  PKG_CHECK_MODULES(SWSCALE,[libswscale],
     [
       VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
       CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
       AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h)
-      AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
       VLC_ADD_PLUGIN([swscale])
       VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
       VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-      AC_MSG_ERROR([Could not find libswscale or libavutil.])
+      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,
+[  --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_ERROR([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.])
   ])
 fi
 
@@ -2998,7 +3017,7 @@ AC_ARG_ENABLE(postproc,
 [  --enable-postproc   libpostproc image post-processing (default enabled)])
 if test "${enable_postproc}" != "no"
 then
-  PKG_CHECK_MODULES(POSTPROC,[libpostproc],
+  PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
     [
       VLC_SAVE_FLAGS
       CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
@@ -3713,7 +3732,7 @@ dnl
 AC_ARG_ENABLE(kate,
 [  --enable-kate           kate codec (default enabled)])
 AS_IF([test "${enable_kate}" != "no"], [
-  PKG_CHECK_MODULES(KATE,[kate >= 0.1.1], [
+  PKG_CHECK_MODULES(KATE,[kate >= 0.1.2], [
       VLC_ADD_PLUGIN([kate])
       VLC_ADD_CFLAGS([kate],[$KATE_CFLAGS])
       VLC_ADD_LIBS([kate],[$KATE_LIBS]) ],[
@@ -4513,7 +4532,7 @@ AC_ARG_ENABLE(pulse,
        [ VLC_ADD_PLUGIN([pulse])
         VLC_ADD_CFLAGS([pulse],[${PULSE_CFLAGS}])
         VLC_ADD_LDFLAGS([pulse],[${PULSE_LIBS}])],
-       [AC_MSG_WARN(pulsaudio library not found)])
+       [AC_MSG_WARN(pulseaudio library not found)])
    fi
 
 dnl
@@ -5260,33 +5279,15 @@ dnl libgcrypt
 dnl
 AC_ARG_ENABLE(libgcrypt,
   [  --enable-libgcrypt      libgcrypts support (default enabled)])
-
-GCRYPT_PATH="${PATH}"
-AC_ARG_WITH(libgcrypt-config-path,
-[    --with-libgcrypt-config-path=PATH libgcrypt-config path (default search in \$PATH)],
-   [ if test "${with_libgcrypt_config_path}" != "no"
-     then
-       GCRYPT_PATH="${with_libgcrypt_config_path}:${PATH}"
-     fi ])
-
-if test "${enable_libgcrypt}" != "no"
-then
-  dnl Workaround for cross-compiling since AM_PATH_LIBGRYPT doesn't dectect
-  dnl it and looks for libgcrypt headers in the wrong place.
-  if test "${host_cpu}" = "${build_cpu}"
-  then
-    AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"])
-  else
-    AC_CHECK_HEADERS(gcrypt.h,have_libgcrypt="yes",have_libgcrypt="no")
-  fi
+AS_IF([test "${enable_libgcrypt}" != "no"], [
+  AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"])
+])
+if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
+  AS_IF([test "${have_libgcrypt}" = "yes"],[
+    VLC_ADD_LIBS([rtp], [${LIBGCRYPT_LIBS}])
+  ])
 fi
 AM_CONDITIONAL([HAVE_LIBGCRYPT], [test "${have_libgcrypt}" = "yes"])
-AS_IF([test "${have_libgcrypt}" = "yes"],[
-       # look for libgcrypt-config
-       AC_PATH_PROG(GCRYPT_CONFIG, "libgcrypt-config", no, ${GCRYPT_PATH})
-       GCRYPT_CFLAGS=`${GCRYPT_CONFIG} --cflags`
-       GCRYPT_LIBS=`${GCRYPT_CONFIG} --libs`
-])
 
 dnl
 dnl TLS/SSL
@@ -5303,10 +5304,11 @@ AS_IF([test "${enable_gnutls}" != "no"], [
       VLC_ADD_LIBS([gnutls], [-lz])
       VLC_ADD_LIBS([gnutls], [${LTLIBINTL}])
     ])
+    dnl The GnuTLS plugin invokes gcry_control directly.
     AS_IF([test "${have_libgcrypt}" = "yes"],[
-      VLC_ADD_LIBS([gnutls], ${GCRYPT_LIBS})
-      VLC_ADD_CFLAGS([gnutls], ${GCRYPT_CFLAGS})
-    ], [-lgpg-error])
+      VLC_ADD_LIBS([gnutls], [${LIBGCRYPT_LIBS}])
+      VLC_ADD_CFLAGS([gnutls], [${LIBGCRYPT_CFLAGS}])
+    ])
     VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])
   ], [
     AS_IF([test "${enable_gnutls}" = "yes"], [
@@ -5315,6 +5317,24 @@ AS_IF([test "${enable_gnutls}" != "no"], [
   ])
 ])
 
+
+dnl
+dnl RemoteOSD plugin (VNC client as video filter)
+dnl
+AC_ARG_ENABLE(remoteosd,
+  [  --disable-remoteosd         RemoteOSD plugin (default enabled)])
+
+AS_IF([test "${enable_remoteosd}" != "no"], [
+  AS_IF([test "${have_libgcrypt}" = "yes"],[
+    VLC_ADD_PLUGIN([remoteosd])
+    VLC_ADD_LIBS([remoteosd], ${LIBGCRYPT_LIBS})
+    VLC_ADD_CFLAGS([remoteosd], ${LIBGCRYPT_CFLAGS})
+  ], [
+    AC_MSG_ERROR([libgcrypt support required for RemoteOSD plugin])
+  ])
+])
+
+
 dnl
 dnl update checking system
 dnl
@@ -5326,8 +5346,8 @@ then
   then
     AC_MSG_ERROR([libgcrypt is required for update checking system])
   fi
-  VLC_ADD_LIBS([libvlc], ${GCRYPT_LIBS})
-  VLC_ADD_CFLAGS([libvlc], ${GCRYPT_CFLAGS})
+  VLC_ADD_LIBS([libvlc], [${LIBGCRYPT_LIBS}])
+  VLC_ADD_CFLAGS([libvlc], [${LIBGCRYPT_CFLAGS}])
   AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
 fi
 
@@ -5826,9 +5846,9 @@ AC_CONFIG_FILES([
   modules/audio_mixer/Makefile
   modules/audio_output/Makefile
   modules/codec/Makefile
+  modules/codec/avcodec/Makefile
   modules/codec/cmml/Makefile
   modules/codec/dmo/Makefile
-  modules/codec/ffmpeg/Makefile
   modules/codec/subtitles/Makefile
   modules/codec/spudec/Makefile
   modules/codec/xvmc/Makefile
@@ -5836,6 +5856,7 @@ AC_CONFIG_FILES([
   modules/control/http/Makefile
   modules/demux/Makefile
   modules/demux/asf/Makefile
+  modules/demux/avformat/Makefile
   modules/demux/avi/Makefile
   modules/demux/mp4/Makefile
   modules/demux/mpeg/Makefile
@@ -5859,11 +5880,11 @@ AC_CONFIG_FILES([
   modules/misc/testsuite/Makefile
   modules/misc/playlist/Makefile
   modules/misc/osd/Makefile
+  modules/misc/stats/Makefile
   modules/misc/xml/Makefile
   modules/misc/probe/Makefile
   modules/mux/Makefile
   modules/mux/mpeg/Makefile
-  modules/mux/rtp/Makefile
   modules/packetizer/Makefile
   modules/services_discovery/Makefile
   modules/stream_out/Makefile