]> git.sesse.net Git - vlc/blobdiff - configure.ac
Spatializer module should be built with g++
[vlc] / configure.ac
index 63eeb5349f28c8fda62f6e9f9e17defdca307e0f..9b069817c763ae533d61a8fc5f9e63d41a18da8f 100644 (file)
@@ -1207,12 +1207,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])
@@ -1223,6 +1222,12 @@ 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])
@@ -1481,7 +1486,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"
@@ -2873,7 +2878,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)])
@@ -2886,14 +2891,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,
@@ -2932,35 +2937,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-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
@@ -2986,7 +2991,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
@@ -2996,43 +3001,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)],
@@ -3053,7 +3057,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
@@ -3063,8 +3067,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}]) 
@@ -3087,16 +3091,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}]) 
-       AC_CHECK_LIB(swscale, sws_getContext,
-         [AC_CHECK_HEADERS(ffmpeg/swscale.h)],[])
-       ],[ true ])
+     PKG_CHECK_MODULES(SWSCALE,[libavutil, libswscale],[
+       VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
+       VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
+       AC_CHECK_HEADERS(ffmpeg/swscale.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/swscale.h.])])
+dnl       AC_CHECK_LIB(swscale, sws_getContext,
+dnl         [AC_CHECK_HEADERS([ffmpeg/avutil.h, ffmpeg/swscale.h])],[])
+dnl       ],[ true ])
      VLC_RESTORE_FLAGS
     ],[
-     
+
     dnl
     dnl last chance: at the default place
     dnl
@@ -3119,11 +3125,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])
@@ -5305,7 +5310,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],
@@ -5315,7 +5320,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])
     ])])