]> git.sesse.net Git - vlc/blobdiff - configure.ac
Add vlm_MessageSimpleNew with --disable-vlm
[vlc] / configure.ac
index d502f2c16a9483da9c767c364da6cea91260af3b..75f60c2ee270770b06858072207c185f343b7d7e 100644 (file)
@@ -2,11 +2,11 @@ dnl Autoconf settings for vlc
 
 AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team])
 
-AC_INIT(vlc, 1.0.0-git)
+AC_INIT(vlc, 1.0.0-pre1)
 VERSION_MAJOR="1"
 VERSION_MINOR="0"
 VERSION_REVISION="0"
-VERSION_EXTRA="-git"
+VERSION_EXTRA="-pre1"
 PKGDIR="vlc"
 AC_SUBST(PKGDIR)
 
@@ -111,15 +111,20 @@ dnl
 dnl  Check for the contrib directory
 dnl
 AC_ARG_WITH(contrib,
-    [  --without-contrib       do not use the libraries in extras/contrib],[],[])
+    [  --without-contrib       do not use the libraries in CONTRIB_DIR],[],[])
   AS_IF([test "${with_contrib}" != "no"],[
-    AC_MSG_CHECKING([for libs in extras/contrib])
-    topdir="`dirname $0`"
-    if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
-       topdir="`pwd`/$topdir"
+    AC_ARG_VAR([CONTRIB_DIR], [directory containing pre-built contrib, overriding extras/contrib])
+    if test -z "$CONTRIB_DIR"
+    then
+      topdir="`dirname $0`"
+      if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
+         topdir="`pwd`/$topdir"
+      fi
+      CONTRIB_DIR=${topdir}/extras/contrib
     fi
-  AS_IF([test -d ${topdir}/extras/contrib/lib],[
-   AS_IF([test "`grep HOST ${topdir}/extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[
+    AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}])
+  AS_IF([test -d ${CONTRIB_DIR}/lib],[
+   AS_IF([test "`grep HOST ${CONTRIB_DIR}/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[
       if test "${with_contrib}" = "yes"; then
         AC_MSG_RESULT([no])
         AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
@@ -129,36 +134,36 @@ AC_ARG_WITH(contrib,
       fi
      ],[
     AC_MSG_RESULT([yes])
-    export PATH=${topdir}/extras/contrib/bin:$PATH
-    CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include"
-    CPPFLAGS_save="${CPPFLAGS_save} -I${topdir}/extras/contrib/include"
-    CFLAGS="${CFLAGS} -I${topdir}/extras/contrib/include"
-    CFLAGS_save="${CFLAGS_save} -I${topdir}/extras/contrib/include"
-    CXXFLAGS="${CXXFLAGS} -I${topdir}/extras/contrib/include"
-    CXXFLAGS_save="${CXXFLAGS_save} -I${topdir}/extras/contrib/include"
-    OBJCFLAGS="${OBJCFLAGS} -I${topdir}/extras/contrib/include"
-    OBJCFLAGS_save="${OBJCFLAGS_save} -I${topdir}/extras/contrib/include"
+    export PATH=${CONTRIB_DIR}/bin:$PATH
+    CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
+    CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
+    CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
+    CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
+    CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
+    CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
+    OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
+    OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
     if test $build = $host -o "$PKG_CONFIG_LIBDIR"; then
-        export PKG_CONFIG_PATH=${topdir}/extras/contrib/lib/pkgconfig:$PKG_CONFIG_PATH
+        export PKG_CONFIG_PATH=${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
     else
-        export PKG_CONFIG_LIBDIR=${topdir}/extras/contrib/lib/pkgconfig
+        export PKG_CONFIG_LIBDIR=${CONTRIB_DIR}/lib/pkgconfig
     fi
-    LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib"
-    LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib"
+    LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
+    LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
 
     if test -z $with_mozilla_sdk_path; then
-       with_mozilla_sdk_path=${topdir}/extras/contrib/gecko-sdk
+       with_mozilla_sdk_path=${CONTRIB_DIR}/gecko-sdk
     fi
     if test -z $with_cyberlink_tree; then
-       with_cyberlink_tree=${topdir}/extras/contrib/src/clinkcc
+       with_cyberlink_tree=${CONTRIB_DIR}/src/clinkcc
     fi
 
     if test ".`uname -s`" = ".Darwin"; then
-      export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH
-      export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH
+      export LD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH
+      export DYLD_LIBRARY_PATH=${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH
     elif test ".`uname -s`" = ".BeOS"; then
-      export LIBRARY_PATH=${topdir}/extras/contrib/lib:$LIBRARY_PATH
-      export BELIBRARIES=${topdir}/extras/contrib/lib:$BELIBRARIES
+      export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH
+      export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES
     fi
     ])
   ],[
@@ -498,6 +503,24 @@ AC_LANG_PUSH(C++)
 AC_LANG_POP(C++)
 fi
 
+dnl
+dnl Buggy glibc prevention. Purposedly not cached.
+dnl Ubuntu alone has 20 bug numbers for this...
+dnl
+AC_MSG_CHECKING(for buggy GNU/libc versions)
+AC_PREPROC_IFELSE([
+#include <limits.h>
+#if defined (__GLIBC__) && (__GLIBC__ == 2) \
+  && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
+# error GNU/libc with dcgettext killer bug!
+#endif
+], [
+  AC_MSG_RESULT([not present])
+], [
+  AC_MSG_RESULT([found])
+  AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable work-around for this. Check with your distribution vendor on how to update the glibc run-time.])
+])
+
 dnl Plugin compilation stuff
 
 VLC_LIBRARY_SUFFIX
@@ -1802,7 +1825,7 @@ dnl
 AC_ARG_ENABLE(taglib,
   [  --disable-taglib        Taglib support (default enabled) ])
   AS_IF([test "${enable_taglib}" != "no"],[
-    PKG_CHECK_MODULES(TAGLIB, taglib,
+    PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5,
       [ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] )
         VLC_ADD_PLUGIN([taglib])
         VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
@@ -3687,7 +3710,7 @@ dnl
 AC_ARG_ENABLE(schroedinger,
 [  --disable-schroedinger  high performance dirac codec (default enabled)])
 if test "${enable_schroedinger}" != "no"; then
-  PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0], [
+  PKG_CHECK_MODULES(SCHROEDINGER,[schroedinger-1.0 >= 1.0.6], [
       VLC_ADD_PLUGIN([schroedinger])
       VLC_ADD_CFLAGS([schroedinger],[$SCHROEDINGER_CFLAGS])
       VLC_ADD_LIBS([schroedinger],[$SCHROEDINGER_LIBS]) ], [
@@ -3760,6 +3783,17 @@ if test "${enable_x264}" != "no"; then
       PKG_CHECK_MODULES(X264,x264, [
         VLC_ADD_PLUGIN([x264])
         VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
+
+        AC_CACHE_CHECK([if linker supports -Bsymbolic],
+          [ac_cv_ld_bsymbolic],
+          [LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic"
+            AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
+            LDFLAGS="${LDFLAGS_save}"
+          ])
+        AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
+          VLC_ADD_LDFLAGS([x264],[-Wl,-Bsymbolic])
+        ])
+
         VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
         if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
           VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
@@ -4317,7 +4351,7 @@ AS_IF([test "${enable_libxml2}" != "no"], [
     VLC_ADD_PLUGIN([xml])
   ], [
     AS_IF([test "x${enable_xml2}" != "x"], [
-      AC_MSG_ERROR([Could not find libxml2])
+      AC_MSG_ERROR([Could not find libxml version 2.5 or higher])
     ])
   ])
 ])