]> git.sesse.net Git - vlc/blobdiff - configure.ac
Remove extra white spaces
[vlc] / configure.ac
index bebc4ab284d2e4fb69f01020e036b8a67aabf73a..a1f81d88c202c8563ac99473c399afe79771351d 100644 (file)
@@ -108,7 +108,7 @@ dnl kludge because only the debian package provides a ffmpeg-config
        with_live555_tree=${topdir}/extras/contrib/src/live
     fi
     if test -z $with_goom_tree; then
-      with_goom_tree=${topdir}/extras/contrib/src/goom
+       with_goom_tree=${topdir}/extras/contrib/src/goom
     fi
     if test -z $with_mozilla_sdk_path; then
        with_mozilla_sdk_path=${topdir}/extras/contrib/gecko-sdk
@@ -117,7 +117,10 @@ dnl kludge because only the debian package provides a ffmpeg-config
        with_cyberlink_tree=${topdir}/extras/contrib/src/clinkcc
     fi
     if test -z $with_libmpeg2_tree; then
-       with_libmpeg2_tree=${topdir}/extras/contrib/src/mpeg2dec
+       with_libmpeg2_tree=${topdir}/extras/contrib/src/mpeg2dec
+    fi
+    if test -z $with_a52_tree; then
+       with_a52_tree=${topdir}/extras/contrib/src/a52dec
     fi
 
     if test ".`uname -s`" = ".Darwin"; then
@@ -896,8 +899,12 @@ then
           VLC_ADD_PLUGINS([telepathy])
           VLC_ADD_LIBS([telepathy],[$DBUS_LIBS])
           VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
-        fi],
-
+        fi
+        dnl Power Management Inhibiter
+        VLC_ADD_PLUGINS([inhibit])
+        VLC_ADD_LIBS([inhibit],[$DBUS_LIBS])
+        VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS])
+        ],
     if ${PKG_CONFIG} --exists dbus-1
     then
       [AC_ARG_ENABLE(old-dbus,
@@ -1204,12 +1211,11 @@ dnl  default modules
 dnl
 VLC_ADD_PLUGINS([dummy logger memcpy])
 VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 vc1 demux_cdg cdg ps pva avi asf mp4 rawdv rawvid nsv real aiff mjpeg demuxdump flacsys tta])
-VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec subsusf t140 dvbsub mpeg_audio lpcm a52 dts cinepak flac])
+VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec subsusf t140 dvbsub cc mpeg_audio lpcm a52 dts cinepak flac])
 VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise grain extract sharpen seamcarving])
 VLC_ADD_PLUGINS([converter_fixed mono])
 VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
 VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
-VLC_ADD_PLUGINS([spatializer])
 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 smf])
@@ -1220,10 +1226,16 @@ VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
 VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
 VLC_ADD_PLUGINS([packetizer_vc1])
 
+dnl
+dnl default modules that need g++
+dnl
+AC_LANG_PUSH(C++)
+VLC_ADD_PLUGINS([spatializer])
+AC_LANG_POP(C++)
 
 if test "${SYS}" != "mingwce"; then
   VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record access_filter_dump])
-  VLC_ADD_PLUGINS([gestures rc telnet hotkeys netsync showintf marq podcast shout sap fake folder])
+  VLC_ADD_PLUGINS([gestures rc telnet hotkeys showintf marq podcast shout sap fake folder])
   VLC_ADD_PLUGINS([rss mosaic wall motiondetect clone crop erase bluescreen alphamask gaussianblur])
   VLC_ADD_PLUGINS([i420_yuy2 i422_yuy2 i420_ymga])
   VLC_ADD_PLUGINS([aout_file linear_resampler bandlimited_resampler])
@@ -1478,7 +1490,7 @@ if test -n "${with_tuning}"; then
         CFLAGS_TUNING="-mtune=${with_tuning}"
     fi
 else
-    if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; then
+    if test "${SYS}" = "darwin" -a "${host_cpu}" != "powerpc"; then
         CFLAGS_TUNING="-march=pentium-m -mtune=prescott"
     elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
         CFLAGS_TUNING="-mtune=pentium2"
@@ -2870,7 +2882,7 @@ dnl
 dnl  ffmpeg decoder/demuxer plugin
 dnl
 dnl we try to find ffmpeg using : 1- given tree 2- ffmpeg-config, 3- pkg-config
-dnl                            4- default place, 
+dnl                               4- default place,
 
 AC_ARG_ENABLE(ffmpeg,
 [  --enable-ffmpeg         ffmpeg codec (default enabled)])
@@ -2883,14 +2895,14 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
    [    --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
    [
      if test "$with_ffmpeg_mp3lame" = "yes";   then
-       VLC_ADD_LIBS([ffmpeg],[-lmp3lame])
+        VLC_ADD_LIBS([ffmpeg],[-lmp3lame])
      fi])
 
  AC_ARG_WITH(ffmpeg-faac,
    [    --with-ffmpeg-faac    specify if ffmpeg has been compiled with faac support],
    [
      if test "$with_ffmpeg_faac" = "yes"; then
-       VLC_ADD_LIBS([ffmpeg],[-lfaac])
+        VLC_ADD_LIBS([ffmpeg],[-lfaac])
      fi])
 
  AC_ARG_WITH(ffmpeg-dts,
@@ -2929,35 +2941,35 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
    [    --with-ffmpeg-zlib    specify if ffmpeg has been compiled with zlib support],
    [
      if test "$with_ffmpeg_zlib" = "yes"; then
-               VLC_ADD_LIBS([ffmpeg],[-lz])
+        VLC_ADD_LIBS([ffmpeg],[-lz])
      fi])
 
  AC_ARG_WITH(ffmpeg-amrnb,
    [    --with-ffmpeg-amrnb specify if ffmpeg has been compiled with libamrnb support],
    [
      if test "$with_ffmpeg_amrnb" = "yes";     then
-       VLC_ADD_LIBS([ffmpeg],[-lamrnb])
+        VLC_ADD_LIBS([ffmpeg],[-lamrnb])
      fi])
 
  AC_ARG_WITH(ffmpeg-amrwb,
    [    --with-ffmpeg-amrwb specify if ffmpeg has been compiled with libamrwb support],
    [
      if test "$with_ffmpeg_amrwb" = "yes";     then
-       VLC_ADD_LIBS([ffmpeg],[-lamrwb])
+        VLC_ADD_LIBS([ffmpeg],[-lamrwb])
      fi])
 
  AC_ARG_WITH(ffmpeg-x264,
    [    --with-ffmpeg-x264 specify if ffmpeg has been compiled with libamrnb support],
    [
      if test "$with_ffmpeg_x264" = "yes";      then
-       VLC_ADD_LIBS([ffmpeg],[-lx264])
+        VLC_ADD_LIBS([ffmpeg],[-lx264])
      fi])
 
  AC_ARG_WITH(ffmpeg-a52,
-   [    --with-ffmpeg-x264 specify if ffmpeg has been compiled with libamrnb support],
+   [    --with-ffmpeg-a52 specify if ffmpeg has been compiled with liba52 support],
    [
      if test "$with_ffmpeg_a52" = "yes";       then
-       VLC_ADD_LIBS([ffmpeg],[-la52])
+        VLC_ADD_LIBS([ffmpeg],[-la52])
      fi])
 
  dnl
@@ -2983,7 +2995,7 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
      if test -f "${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a"; then
        VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec/libpostproc ${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a])  
      elif test -f "${real_ffmpeg_tree}/libpostproc/libpostproc.a"; then 
-       VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libpostproc ${real_ffmpeg_tree}/libpostproc/libpostproc.a])
+        VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libpostproc ${real_ffmpeg_tree}/libpostproc/libpostproc.a])
         VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}])
      else
        dnl  The given libavcodec wasn't built with --enable-pp
@@ -2993,43 +3005,42 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
    fi
    dnl  Use a custom libffmpeg
    AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
-   
+
    dnl Use pkg-config to look for the ldflags in libav*-uninstalled.pc
    PKG_CONFIG_PATH_save="$PKG_CONFIG_PATH"
    PKG_CONFIG_LIBDIR_save="$PKG_CONFIG_LIBDIR"
    export PKG_CONFIG_PATH=""
    export PKG_CONFIG_LIBDIR="${real_ffmpeg_tree}"
-  
+
    PKG_CHECK_MODULES( [FFMPEG],[libavcodec libavformat libpostproc], [
-       VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_CFLAGS})
-       VLC_ADD_LIBS([ffmpeg stream_out_switcher], ${FFMPEG_LIBS})]
+        VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_CFLAGS})
+        VLC_ADD_LIBS([ffmpeg stream_out_switcher], ${FFMPEG_LIBS})]
       ,[])
    AS_IF([test -n "${PKG_CONFIG_PATH_save}"],[
          export PKG_CONFIG_PATH="${PKG_CONFIG_PATH_save}"
    ],[
-       unset PKG_CONFIG_PATH
+        unset PKG_CONFIG_PATH
    ])
    AS_IF([test -n "${PKG_CONFIG_LIBDIR_save}"],[   
-       export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR_save}"   
+        export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR_save}"
    ],[
         unset PKG_CONFIG_LIBDIR
    ])
-   
+
    VLC_ADD_BUILTINS([ffmpeg])
    if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then
      VLC_ADD_BUILTINS([stream_out_switcher])
    fi
 
-
    if test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"; then
      AC_DEFINE(HAVE_LIBSWSCALE_TREE, 1, [Define if you have ffmpeg's libswscale.])
      VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libswscale ${real_ffmpeg_tree}/libswscale/libswscale.a])
      VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libswscale])
    fi
-else    
-    
+else
+
 dnl Look for a ffmpeg-config (we are on debian )
+
   FFMPEG_PATH="${PATH}"
   AC_ARG_WITH(ffmpeg-config-path,
     [    --with-ffmpeg-config-path=PATH ffmpeg-config path (default search in \$PATH)],
@@ -3050,7 +3061,7 @@ dnl Look for a ffmpeg-config (we are on debian )
     fi
     VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --cflags`])
     VLC_ADD_LIBS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
+
  else
 
 dnl Trying with pkg-config
@@ -3060,8 +3071,8 @@ dnl Trying with pkg-config
      CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}"
      CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}"
      AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
-     AC_CHECK_HEADERS(ffmpeg/avformat.h)
-     AC_CHECK_HEADERS(ffmpeg/avutil.h)
+     AC_CHECK_HEADERS(ffmpeg/avformat.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avformat.h.])] )
+     AC_CHECK_HEADERS(ffmpeg/avutil.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avutil.h.])] )
      dnl newer ffmpeg have a separate libpostproc
      PKG_CHECK_MODULES(POSTPROC, libpostproc,[
        VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}]) 
@@ -3084,16 +3095,18 @@ dnl Trying with pkg-config
      fi
      VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
      VLC_ADD_LIBS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
+
      dnl even newer ffmpeg has a libswscale
-     PKG_CHECK_MODULES(SWSCALE, libswscale,[
-       VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}]) 
-       VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}]) 
+     PKG_CHECK_MODULES(SWSCALE,[libswscale],[
+       VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
+       VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
+dnl    AC_CHECK_HEADERS(ffmpeg/swscale.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/swscale.h.])])
        AC_CHECK_LIB(swscale, sws_getContext,
-         [AC_CHECK_HEADERS(ffmpeg/swscale.h)],[])
+         [AC_CHECK_HEADERS([ffmpeg/avutil.h, ffmpeg/swscale.h])],[],[-lavutil -lm])
        ],[ true ])
      VLC_RESTORE_FLAGS
     ],[
-     
+
     dnl
     dnl last chance: at the default place
     dnl
@@ -3116,11 +3129,10 @@ dnl Trying with pkg-config
         fi],
          [ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
 
-      
       AC_CHECK_LIB(postproc, pp_postprocess, [
         VLC_ADD_LIBS([ffmpeg],[-lpostproc])],
-       AC_MSG_ERROR([Could not find libpostproc inside FFmpeg. You should configure FFmpeg with --enable-gpl --enable-pp.]),
-       [$LDAVUTIL])
+      AC_MSG_ERROR([Could not find libpostproc inside FFmpeg. You should configure FFmpeg with --enable-gpl --enable-pp.]),
+        [$LDAVUTIL])
 
       AC_CHECK_LIB(avformat, av_open_input_stream, [
         VLC_ADD_LIBS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
@@ -3359,7 +3371,7 @@ then
       AC_MSG_RESULT(yes)
       VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
       VLC_ADD_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
-      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
+      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32} -lm"
       AC_CHECK_LIB(a52, a52_free, [
         VLC_ADD_BUILTINS([a52tofloat32])
         VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
@@ -3367,7 +3379,7 @@ then
         ],[
         if test -f ${real_a52_tree}/liba52/.libs/liba52.a
         then
-          AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
+          AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
         else
           AC_MSG_ERROR([the specified tree hasn't been compiled])
         fi
@@ -3701,7 +3713,7 @@ dnl
 AC_ARG_ENABLE(dirac,
 [  --enable-dirac          experimental dirac codec (default disabled)])
 if test "${enable_dirac}" = "yes"; then
-  PKG_CHECK_MODULES(DIRAC,[dirac >= 0.6.0], [
+  PKG_CHECK_MODULES(DIRAC,[dirac >= 0.8.0], [
       VLC_ADD_PLUGINS([dirac])
       VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS])
       VLC_ADD_LIBS([dirac],[$DIRAC_LIBS -lstdc++]) ],[
@@ -5302,7 +5314,7 @@ AC_ARG_ENABLE(macosx,
      VLC_ADD_PLUGINS([access_eyetv])
      VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,CoreFoundation])
      VLC_ADD_LDFLAGS([minimal_macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL])
-     VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit])
+     VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit,-framework,WebKit])
      VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
      VLC_ADD_OBJCFLAGS( [minimal_macosx],[-fobjc-exceptions] )
    fi],
@@ -5312,7 +5324,7 @@ AC_ARG_ENABLE(macosx,
      VLC_ADD_BUILTINS([macosx])
      VLC_ADD_BUILTINS([minimal_macosx])
      VLC_ADD_LDFLAGS([minimal_macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL])
-     VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit])
+     VLC_ADD_LDFLAGS([macosx],[-Wl,-framework,IOKit,-framework,Cocoa,-framework,Carbon,-framework,QuickTime,-lobjc,-ObjC,-framework,OpenGL,-framework,AGL,-framework,QTKit,-framework,WebKit])
      VLC_ADD_OBJCFLAGS([macosx],[-fobjc-exceptions])
      VLC_ADD_OBJCFLAGS([minimal_macosx],[-fobjc-exceptions])
     ])])