]> git.sesse.net Git - vlc/blobdiff - configure.ac
* extras/contrib/bootstrap, extras/contrib/src/Makefile: start of wince gcc cross...
[vlc] / configure.ac
index 94b31c117964d6be5b4707da42ed06a011d47c69..35f66469a4f22dba38fa073cb7d3f0623ee260d8 100644 (file)
@@ -4,8 +4,8 @@ dnl $Id$
 AC_INIT(vlc,0.8.5-svn)
 VERSION_MAJOR="0"
 VERSION_MINOR="8"
-VERSION_REVISION="4"
-VERSION_EXTRA="test1"
+VERSION_REVISION="5"
+VERSION_EXTRA="svn"
 
 CONFIGURE_LINE="$0 $*"
 CODENAME="Janus"
@@ -235,7 +235,7 @@ AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="ca da de en_GB es fr it ja ko nl pt_BR ro ru tr zh_CN zh_TW"
+ALL_LINGUAS="ca da de en_GB es fr it ja ko nl pt_BR ro ru sv tr zh_CN zh_TW"
 AM_GNU_GETTEXT_VERSION(0.11.5)
 AM_GNU_GETTEXT
 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
@@ -731,12 +731,21 @@ AC_ARG_ENABLE(hal,
  
 if test "${enable_hal}" != "no" -a "${SYS}" = "linux"
 then
-  PKG_CHECK_MODULES(HAL, hal >= 0.2.97,
-    [AC_DEFINE(HAVE_HAL, [], [Define if you have the HAL library])
-     VLC_ADD_PLUGINS([hal])
-     VLC_ADD_LDFLAGS([vlc hal],[$HAL_LIBS])
-     VLC_ADD_CFLAGS([vlc hal],[$HAL_CFLAGS])],
-    [AC_MSG_WARN(HAL library not found)])
+  PKG_CHECK_MODULES(HAL, hal >= 0.5.0,
+    [ AC_DEFINE( HAVE_HAL_1, [] , [Define if you have the new HAL library API])
+      AC_DEFINE( HAVE_HAL, [], [Define if you have the HAL library] )
+      VLC_ADD_PLUGINS([hal]) 
+      VLC_ADD_LDFLAGS([vlc hal],[$HAL_LIBS])
+      VLC_ADD_CFLAGS([vlc hal],[$HAL_CFLAGS])],   
+    dnl No hal 0.5 Test for 0.2
+    [ PKG_CHECK_MODULES( HAL, hal >= 0.2.97, 
+       [AC_DEFINE(HAVE_HAL, [], [Define if you have the HAL library])
+        VLC_ADD_PLUGINS([hal])
+        VLC_ADD_LDFLAGS([vlc hal],[$HAL_LIBS])
+        VLC_ADD_CFLAGS([vlc hal],[$HAL_CFLAGS])],
+       [AC_MSG_WARN(HAL library not found)])
+    ]
+  )
 fi
 
 dnl Build the gtk_main plugins?
@@ -1160,7 +1169,8 @@ fi
 dnl The AltiVec C extensions
 dnl
 dnl There are several possible cases:
-dnl - OS X PPC, gcc 4.x: use -mpim-altivec, don't need <altivec.h>
+dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't
+dnl                      need <altivec.h>
 dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
 dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
 dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
@@ -1169,10 +1179,10 @@ dnl - Others: test should fail
 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
   [ac_cv_c_altivec],
   [# OS X/PPC test (gcc 4.x)
-   CFLAGS="${CFLAGS_save} -mpim-altivec"
+   CFLAGS="${CFLAGS_save} -mpim-altivec -force_cpusubtype_ALL"
    AC_TRY_COMPILE([],
      [vec_ld(0, (unsigned char *)0);],
-     [ac_cv_c_altivec="-mpim-altivec"],
+     [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
      [# OS X/PPC test (gcc 3.x)
       CFLAGS="${CFLAGS_save} -faltivec"
       AC_TRY_COMPILE([],
@@ -2241,8 +2251,7 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
       [
         if test "$with_ffmpeg_mp3lame" = "yes";        then
                VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
-       fi
-       ])
+       fi])
 
     AC_ARG_WITH(ffmpeg-faac,
       [    --with-ffmpeg-faac    specify if ffmpeg has been compiled with faac support],
@@ -2255,7 +2264,11 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
       [    --with-ffmpeg-dts     specify if ffmpeg has been compiled with dts support],
       [
         if test "$with_ffmpeg_dts" = "yes"; then
-               VLC_ADD_LDFLAGS([ffmpeg],[-ldts])
+                LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+                AC_CHECK_LIB(dts_pic, dts_free, 
+                  [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
+                  [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
+                LDFLAGS="${LDFLAGS_save}"
        fi])
 
     AC_ARG_WITH(ffmpeg-zlib,
@@ -2350,7 +2363,11 @@ dnl Trying with pkg-config
       fi
       if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then
         if test "${with_ffmpeg_dts}" != "yes"; then
-          VLC_ADD_LDFLAGS([ffmpeg],[-ldts])
+          LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
+          AC_CHECK_LIB(dts_pic, dts_free, 
+            [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
+            [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
+          LDFLAGS="${LDFLAGS_save}"
         fi
       fi
       if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then
@@ -3019,7 +3036,7 @@ if test "${enable_x264}" != "no"; then
       AC_MSG_RESULT(yes)
       VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
       VLC_ADD_LDFLAGS([x264],[-L${real_x264_tree}])
-      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264}"
+      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264} ${THREAD_LIB}"
       AC_CHECK_LIB(x264, x264_encoder_open, [
         VLC_ADD_BUILTINS([x264])
         VLC_ADD_LDFLAGS([x264],[-lx264])
@@ -3032,7 +3049,7 @@ if test "${enable_x264}" != "no"; then
       AC_MSG_ERROR([the specified tree doesn't have x264.h])
     fi
   else
-    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264}"
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264} ${THREAD_LIB}"
     AC_CHECK_HEADERS(x264.h, [
       AC_CHECK_LIB(x264, x264_encoder_open, [
         VLC_ADD_PLUGINS([x264])