diff --git a/.gitignore b/.gitignore
index d709434..2a81749 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
 shave
 shave-libtool
+Makefile
+Makefile.in
+*~
diff --git a/Makefile.am b/Makefile.am
index bafde23..1807c3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ CONFIG_CLEAN_FILES = shave shave-libtool
 EXTRA_DIST = \
 	ChangeLog \
 	gettext.patch \
-	glib-gen.mak gtk-doc.mak upload.mak upload-doc.mak \
+	glib-gen.mak gtk-doc.mak upload-doc.mak \
 	release.mak win32.mak po.mak \
 	gst-autogen.sh \
 	check-exports \
diff --git a/check-exports b/check-exports
index cd829b0..c6d3eca 100755
--- a/check-exports
+++ b/check-exports
@@ -58,10 +58,11 @@ nm $NMARGS $lib_path | awk \
 	> $lib_result
 
 diffoutput=`diff -u $def_path $lib_result`
+diffresult=$?
 
 rm $lib_result
 
-if test "x$diffoutput" = "x"; then
+if test "$diffresult" -eq 0; then
   exit 0;
 else
   echo -n "$diffoutput" >&2
diff --git a/download-translations b/download-translations
index bb71c31..21f2ac0 100755
--- a/download-translations
+++ b/download-translations
@@ -93,12 +93,12 @@ if [ -n "$DOMAINS_UPDATED" ]; then
   echo "===================================================================="
   echo
   echo "Language domains updated    :$DOMAINS_UPDATED"
-  echo "Language domains to cvs add :$DOMAINS_TO_ADD"
+  echo "Language domains to git add :$DOMAINS_TO_ADD"
   echo
   echo "Source: http://translationproject.org/latest/$PACKAGE/"
   echo
   if [ -n "$DOMAINS_TO_ADD" ]; then
-    CMD_STRING="cvs add"
+    CMD_STRING="git add"
     for d in $DOMAINS_TO_ADD; do
       CMD_STRING="$CMD_STRING po/$d.po"
     done
diff --git a/glib-gen.mak b/glib-gen.mak
index f9027da..e5fcde1 100644
--- a/glib-gen.mak
+++ b/glib-gen.mak
@@ -30,9 +30,9 @@ enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
 	glib-mkenums \
 	--fhead "#include \"$*-enumtypes.h\"\n$(enum_headers)" \
 	--fprod "\n/* enumerations from \"@filename@\" */" \
-	--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"     \
+	--vhead "GType\n@enum_name@_get_type (void)\n{\n  static volatile gsize g_define_type_id__volatile = 0;\n  if (g_once_init_enter (&g_define_type_id__volatile)) {\n    static const G@Type@Value values[] = {"     \
 	--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
-	--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
+	--vtail "      { 0, NULL, NULL }\n    };\n    GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n    g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n  }\n  return g_define_type_id__volatile;\n}\n" \
 	$^ > $@
 
 # a hack rule to make sure .Plo files exist because they get include'd
diff --git a/gst-autogen.sh b/gst-autogen.sh
index fe4a78d..f05e021 100644
--- a/gst-autogen.sh
+++ b/gst-autogen.sh
@@ -20,6 +20,82 @@ debug ()
   fi
 }
 
+version_get ()
+# based on the command's version output, set variables
+# _MAJOR, _MINOR, _MICRO, _VERSION, using the given prefix as variable prefix
+#
+# arg 1: command binary name
+# arg 2: (uppercased) variable name prefix
+{
+  COMMAND=$1
+  VARPREFIX=`echo $2 | tr .,- _`
+
+  # strip everything that's not a digit, then use cut to get the first field
+  pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
+  debug "pkg_version $pkg_version"
+  # remove any non-digit characters from the version numbers to permit numeric
+  # comparison
+  pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
+  pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
+  pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
+  test -z "$pkg_major" && pkg_major=0
+  test -z "$pkg_minor" && pkg_minor=0
+  test -z "$pkg_micro" && pkg_micro=0
+  debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
+  eval ${VARPREFIX}_MAJOR=$pkg_major
+  eval ${VARPREFIX}_MINOR=$pkg_minor
+  eval ${VARPREFIX}_MICRO=$pkg_micro
+  eval ${VARPREFIX}_VERSION=$pkg_version
+}
+
+version_compare ()
+# Checks whether the version of VARPREFIX is equal to or
+# newer than the requested version
+# arg1: VARPREFIX
+# arg2: MAJOR
+# arg3: MINOR
+# arg4: MICRO
+{
+  VARPREFIX=`echo $1 | tr .,- _`
+  MAJOR=$2
+  MINOR=$3
+  MICRO=$4
+
+  eval pkg_major=\$${VARPREFIX}_MAJOR;
+  eval pkg_minor=\$${VARPREFIX}_MINOR;
+  eval pkg_micro=\$${VARPREFIX}_MICRO;
+
+  #start checking the version
+  debug "version_compare: $VARPREFIX against $MAJOR.$MINOR.$MICRO"
+
+    # reset check
+    WRONG=
+
+    if [ ! "$pkg_major" -gt "$MAJOR" ]; then
+      debug "major: $pkg_major <= $MAJOR"
+      if [ "$pkg_major" -lt "$MAJOR" ]; then
+        debug "major: $pkg_major < $MAJOR"
+        WRONG=1
+      elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
+        debug "minor: $pkg_minor <= $MINOR"
+        if [ "$pkg_minor" -lt "$MINOR" ]; then
+          debug "minor: $pkg_minor < $MINOR"
+          WRONG=1
+        elif [ "$pkg_micro" -lt "$MICRO" ]; then
+          debug "micro: $pkg_micro < $MICRO"
+	  WRONG=1
+        fi
+      fi
+    fi
+    if test ! -z "$WRONG"; then
+      debug "version_compare: $VARPREFIX older than $MAJOR.$MINOR.$MICRO"
+      return 1
+    fi
+    debug "version_compare: $VARPREFIX equal to/newer than $MAJOR.$MINOR.$MICRO"
+    return 0
+}
+
+
 version_check ()
 # check the version of a package
 # first argument : package name (executable)
@@ -50,7 +126,7 @@ version_check ()
 
     # don't check if asked not to
     test -z "$NOCHECK" && {
-      echo -n "  checking for $COMMAND >= $VERSION ... "
+      printf "  checking for $COMMAND >= $VERSION ... "
     } || {
       # we set a var with the same name as the package, but stripped of
       # unwanted chars
@@ -60,49 +136,18 @@ version_check ()
       return 0
     }
 
-    debug "checking version with $COMMAND"
-    ($COMMAND --version) < /dev/null > /dev/null 2>&1 ||
-    {
-      echo "not found."
+    which $COMMAND > /dev/null 2>&1
+    if test $? -eq 1;
+    then 
+      debug "$COMMAND not found"
       continue
-    }
-    # strip everything that's not a digit, then use cut to get the first field
-    pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
-    debug "pkg_version $pkg_version"
-    # remove any non-digit characters from the version numbers to permit numeric
-    # comparison
-    pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
-    pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
-    pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
-    test -z "$pkg_major" && pkg_major=0
-    test -z "$pkg_minor" && pkg_minor=0
-    test -z "$pkg_micro" && pkg_micro=0
-    debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
-
-    #start checking the version
-    debug "version check"
-
-    # reset check
-    WRONG=
-
-    if [ ! "$pkg_major" -gt "$MAJOR" ]; then
-      debug "major: $pkg_major <= $MAJOR"
-      if [ "$pkg_major" -lt "$MAJOR" ]; then
-        debug "major: $pkg_major < $MAJOR"
-        WRONG=1
-      elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
-        debug "minor: $pkg_minor <= $MINOR"
-        if [ "$pkg_minor" -lt "$MINOR" ]; then
-          debug "minor: $pkg_minor < $MINOR"
-          WRONG=1
-        elif [ "$pkg_micro" -lt "$MICRO" ]; then
-          debug "micro: $pkg_micro < $MICRO"
-	  WRONG=1
-        fi
-      fi
     fi
 
-    if test ! -z "$WRONG"; then
+    VARPREFIX=`echo $COMMAND | sed 's/-//g' | tr [:lower:] [:upper:]`
+    version_get $COMMAND $VARPREFIX
+
+    version_compare $VARPREFIX $MAJOR $MINOR $MICRO
+    if test $? -ne 0; then
       echo "found $pkg_version, not ok !"
       continue
     else
@@ -116,7 +161,7 @@ version_check ()
     fi
   done
 
-  echo "not found !"
+  echo "$PACKAGE not found !"
   echo "You must have $PACKAGE installed to compile $package."
   echo "Download the appropriate package for your distribution,"
   echo "or get the source tarball at $URL"
@@ -186,6 +231,22 @@ autoconf_2_52d_check ()
   }
   return 0
 }
+libtool_2_2_gettext_check ()
+{
+  # libtool 2.2 needs autopoint 0.17 or higher
+  version_compare LIBTOOLIZE 2 2 0
+  if test $? -eq 0
+  then
+    version_compare AUTOPOINT 0 17 0
+    if test $? -ne 0
+    then
+      echo "libtool 2.2 requires autopoint 0.17 or higher"
+      return 1
+    fi
+  fi
+  return 0
+}
+
 
 die_check ()
 {
@@ -222,7 +283,7 @@ autogen_options ()
           echo "+ autotools version check disabled"
           shift
           ;;
-      --debug)
+      -d|--debug)
           DEBUG=defined
 	  AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug"
           echo "+ debug output enabled"
diff --git a/gst.supp b/gst.supp
index ff0a7cb..dd34923 100644
--- a/gst.supp
+++ b/gst.supp
@@ -2921,3 +2921,1064 @@
    fun:gst_ffmpegenc_setcaps
    fun:gst_pad_set_caps
 }
+
+## Leak/overreads with glibc-2.10
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:do_sym
+   fun:dlsym_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlsym
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:do_sym
+   fun:dlsym_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlsym
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_relocate_object
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_check_map_versions
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_relocate_object
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_check_map_versions
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_map_object*
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_map_object*
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_check_caller
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_check_caller
+   fun:dl_open_worker
+   fun:_dl_catch_error
+   fun:_dl_open
+   fun:dlopen_doit
+   fun:_dl_catch_error
+   fun:_dlerror_run
+   fun:dlopen*
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   obj:/lib64/libc-2.10.1.so
+   obj:/lib64/libc-2.10.1.so
+   fun:_vgnU_freeres
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   obj:/lib64/libc-2.10.1.so
+   obj:/lib64/libc-2.10.1.so
+   fun:_vgnU_freeres
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_fini
+   fun:__run_exit_handlers
+   fun:exit
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_fini
+   fun:__run_exit_handlers
+   fun:exit
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_sort_fini
+   fun:_dl_fini
+   fun:__run_exit_handlers
+   fun:exit
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_sort_fini
+   fun:_dl_fini
+   fun:__run_exit_handlers
+   fun:exit
+}
+
+# glibc-2.10 dl overreads
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_fixup
+   fun:_dl_runtime_resolve
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_fixup
+   fun:_dl_runtime_resolve
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_lookup_symbol_x
+   fun:_dl_fixup
+   fun:_dl_runtime_resolve
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_lookup_symbol_x
+   fun:_dl_fixup
+   fun:_dl_runtime_resolve
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:call_init
+   fun:_dl_init
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_init
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:dl_main
+   fun:_dl_sysdep_start
+   fun:_dl_start
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:dl_main
+   fun:_dl_sysdep_start
+   fun:_dl_start
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_check_map_versions
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_check_map_versions
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_check_map_versions
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_check_map_versions
+   fun:_dl_check_all_versions
+   fun:version_check_doit
+   fun:_dl_receive_error
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:init_tls
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:init_tls
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_protect_relro
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_setup_hash
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:open_path
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:open_path
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_name_match_p
+   fun:_dl_check_map_versions
+   fun:_dl_check_all_versions
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:do_lookup_x
+   fun:_dl_lookup_symbol_x
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+   fun:dl_open_worker
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+   fun:dl_open_worker
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+   fun:dl_open_worker
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+   fun:dl_open_worker
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_lookup_symbol_x
+   fun:_dl_relocate_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:_dl_check_map_versions
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_check_map_versions
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:_dl_check_map_versions
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_check_map_versions
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:openaux
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_name_match_p
+   fun:_dl_map_object
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_close_worker
+   fun:_dl_close
+   fun:_dl_catch_error
+   fun:dlerror_run
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_close_worker
+   fun:_dl_close
+   fun:_dl_catch_error
+   fun:dlerror_run
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_close_worker
+   fun:_dl_close
+   fun:_dl_catch_error
+   fun:dlerror_run
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_close_worker
+   fun:_dl_close
+   fun:_dl_catch_error
+   fun:dlerror_run
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:fillin_rpath
+   fun:_dl_init_paths
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:fillin_rpath
+   fun:_dl_init_paths
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:fillin_rpath
+   fun:_dl_init_paths
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:fillin_rpath
+   fun:_dl_init_paths
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_map_object
+   fun:map_doit
+   fun:_dl_catch_error
+   fun:do_preload
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_map_object
+   fun:map_doit
+   fun:_dl_catch_error
+   fun:do_preload
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Param
+   open(filename)
+   fun:open
+   fun:open_verify
+   fun:_dl_map_object
+   fun:map_doit
+   fun:_dl_catch_error
+   fun:do_preload
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Param
+   stat(file_name)
+   fun:_xstat
+   fun:open_path
+   fun:_dl_map_object
+   fun:openaux
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_catch_error
+   fun:_dl_map_object_deps
+   fun:dl_open_worker
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:_dl_map_object_deps
+   fun:dl_main
+}
+
+# glibc-2.10 tls issues
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:init_tls
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:init_tls
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:*
+   fun:init_tls
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:init_tls
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:_dl_allocate_tls_init
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:_dl_allocate_tls_init
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:*
+   fun:_dl_allocate_tls_init
+   fun:dl_main
+}
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Value8
+   fun:*
+   fun:_dl_allocate_tls_init
+   fun:dl_main
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Cond
+   fun:__tls*
+   obj:*
+   obj:*
+   fun:_vgnU_freeres
+}
+
+{
+   <glibc-2.10 overreads/conditionals>
+   Memcheck:Param
+   arch_prctl(arg2)
+   fun:init_tls
+}
+# GLib caching tmp/home directories (glibc-2.10 variants)
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Cond
+   fun:*
+   fun:dl_open_worker
+   fun:*
+   fun:*
+   fun:*
+   fun:_dl_catch_error
+   fun:dlerror_run
+   fun:*
+   fun:__nss_lookup_function
+   fun:__nss_lookup
+   fun:getpwnam*
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:dl_open_worker
+   fun:*
+   fun:*
+   fun:*
+   fun:_dl_catch_error
+   fun:dlerror_run
+   fun:*
+   fun:__nss_lookup_function
+   fun:__nss_lookup
+   fun:getpwnam*
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Cond
+   fun:dl_open_worker
+   fun:*
+   fun:*
+   fun:do_dlopen
+   fun:*
+   fun:dlerror_run
+   fun:*
+   fun:__nss_lookup_function
+   fun:__nss_lookup
+   fun:getpwnam*
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:dl_open_worker
+   fun:*
+   fun:*
+   fun:do_dlopen
+   fun:*
+   fun:dlerror_run
+   fun:*
+   fun:__nss_lookup_function
+   fun:__nss_lookup
+   fun:getpwnam*
+}
+
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:_dl_add_to_slotinfo
+   fun:dl_main
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Param
+   open(filename)
+   fun:open
+   fun:open_verify
+   fun:open_path
+   fun:_dl_map_object
+}
+
+
+
+# GModule issues with glibc-2.10
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:dlsym
+   fun:g_module_symbol
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:g_module_*
+   fun:gst_plugin*
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:g_module_*
+   fun:gst_plugin*
+}
+
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:dlopen*
+   fun:g_module_open
+}
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:dlsym
+   fun:g_module_symbol
+}
+
+{
+   <glibc-2.10 GLIB leaks>
+   Memcheck:Value8
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:*
+   fun:dlopen*
+   fun:g_module_open
+}
+
+# Leak in GSlice
+{
+   <insert a suppression name here>
+   Memcheck:Value8
+   fun:g_parse_debug_string
+   fun:slice_config_init
+   fun:g_slice_init_nomessage
+   fun:_g_slice_thread_init_nomessage
+   fun:g_thread_init_glib
+}
+
+# 2.10 pthread issues
+{
+   <insert a suppression name here>
+   Memcheck:Value8
+   fun:__pthread_initialize_minimal
+}
diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
index 51067d6..7ea1254 100644
--- a/gtk-doc-plugins.mak
+++ b/gtk-doc-plugins.mak
@@ -4,7 +4,7 @@
 help:
 	@echo
 	@echo "If you are a doc maintainer, run 'make update' to update"
-	@echo "the documentation files maintained in CVS"
+	@echo "the documentation files maintained in git"
 	@echo
 	@echo Other useful make targets:
 	@echo
@@ -46,7 +46,7 @@ MAINTAINER_DOC_STAMPS =			\
 	inspect.stamp
 
 # we don't add inspect-build.stamp and scanobj-build.stamp here since they are
-# built manually by docs maintainers and result is commited to CVS
+# built manually by docs maintainers and result is commited to git
 DOC_STAMPS =				\
 	scan-build.stamp		\
 	tmpl-build.stamp		\
diff --git a/gtk-doc.mak b/gtk-doc.mak
index 95757f1..ea5f1ca 100644
--- a/gtk-doc.mak
+++ b/gtk-doc.mak
@@ -160,7 +160,7 @@ clean-local: clean-local-gtkdoc
 	rm -f *~ *.bak
 	rm -rf .libs
 
-# company: don't delete .sgml and -sections.txt as they're in CVS
+# company: don't delete .sgml and -sections.txt as they're in git
 # FIXME : thomas added all sgml files and some other things to make
 # make distcheck work
 distclean-local:
diff --git a/m4/gst-args.m4 b/m4/gst-args.m4
index 004363c..dcd914c 100644
--- a/m4/gst-args.m4
+++ b/m4/gst-args.m4
@@ -155,7 +155,7 @@ AC_DEFUN([AG_GST_ARG_WITH_PKG_CONFIG_PATH],
 ])
 
 
-dnl This macro requires that GST_CVS is set to yes or no (release)
+dnl This macro requires that GST_GIT or GST_CVS is set to yes or no (release)
 AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME],
 [
   dnl package name in plugins
@@ -177,10 +177,10 @@ AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME],
       fi
 
       dnl default value
-      if test "x$GST_CVS" = "xyes"
+      if test "x$GST_GIT" = "xyes" -o "x$GST_CVS" = "xyes"
       then
         dnl nano >= 1
-        GST_PACKAGE_NAME="$P CVS/prerelease"
+        GST_PACKAGE_NAME="$P git/prerelease"
       else
         GST_PACKAGE_NAME="$P source release"
       fi
diff --git a/m4/gst-dowhile.m4 b/m4/gst-dowhile.m4
index a5605d7..069808d 100644
--- a/m4/gst-dowhile.m4
+++ b/m4/gst-dowhile.m4
@@ -8,17 +8,17 @@ dnl
 AC_DEFUN([AG_GST_CHECK_DOWHILE_MACROS],[
 
 dnl *** check for working do while(0) macros ***
-AC_CACHE_CHECK([for working do while(0) macros], g_support_dowhile_macros, [
+AC_CACHE_CHECK([for working do while(0) macros], _cv_g_support_dowhile_macros, [
 	AC_TRY_COMPILE([],[
 	#define STMT_START do
 	#define STMT_END while(0)
 	#define STMT_TEST STMT_START { i = 0; } STMT_END
 	int main(void) { int i = 1; STMT_TEST; return i; }],
-	[g_support_dowhile_macros=yes],
-	[g_support_dowhile_macros=no],
-	[g_support_dowhile_macros=yes])
+	[_cv_g_support_dowhile_macros=yes],
+	[_cv_g_support_dowhile_macros=no],
+	[_cv_g_support_dowhile_macros=yes])
 ])
-if test x$g_support_dowhile_macros = xyes; then
+if test x$_cv_g_support_dowhile_macros = xyes; then
   AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros])
 fi
 ])
diff --git a/m4/gst-error.m4 b/m4/gst-error.m4
index 8cfe3a8..d9a302c 100644
--- a/m4/gst-error.m4
+++ b/m4/gst-error.m4
@@ -7,7 +7,7 @@ dnl Last modification: 2008-02-18
 
 dnl AG_GST_SET_ERROR_CFLAGS([ADD-WERROR])
 dnl AG_GST_SET_ERROR_CXXFLAGS([ADD-WERROR])
-dnl AG_GST_SET_LEVEL_DEFAULT([IS-CVS-VERSION])
+dnl AG_GST_SET_LEVEL_DEFAULT([IS-GIT-VERSION])
 
 
 dnl Sets ERROR_CFLAGS to something the compiler will accept.
diff --git a/m4/shave.m4 b/m4/shave.m4
index 01cb5c7..0dfde6c 100644
--- a/m4/shave.m4
+++ b/m4/shave.m4
@@ -32,8 +32,8 @@ AC_DEFUN([SHAVE_INIT],
   if test x"$enable_shave" = xyes; then
     dnl where can we find the shave scripts?
     m4_if([$1],,
-      [shavedir="$ac_pwd"],
-      [shavedir="$ac_pwd/$1"])
+      [shavedir=`pwd`],
+      [shavedir=`pwd`/$1])
     AC_SUBST(shavedir)
 
     dnl make is now quiet
diff --git a/upload-doc.mak b/upload-doc.mak
index c9251fb..a9e13c3 100644
--- a/upload-doc.mak
+++ b/upload-doc.mak
@@ -9,26 +9,37 @@
 # - FORMATS: the formats in which DOC is output
 #            (html ps pdf)
 
-# if you want to use it, make sure your ..sh/config file contains the
+# if you want to use it, make sure your $HOME/.ssh/config file contains the
 # correct User entry for the Host entry for the DOC_SERVER
 
 # these variables define the location of the online docs
-DOC_SERVER=gstreamer.freedesktop.org
-DOC_BASE=/srv/gstreamer.freedesktop.org/www/data/doc
-DOC_URL=$(DOC_SERVER):$(DOC_BASE)
-
+DOC_SERVER = gstreamer.freedesktop.org
+DOC_BASE = /srv/gstreamer.freedesktop.org/www/data/doc
+DOC_URL = $(DOC_SERVER):$(DOC_BASE)
 
 upload: $(FORMATS)
-	@if test "x$(GST_VERSION_NANO)" = x0; then \
+	@if test "x$(PACKAGE_VERSION_NANO)" = x0; then \
             export DOCVERSION=$(VERSION); \
         else export DOCVERSION=head; \
         fi; \
         export DIR=$(DOC_BASE)/gstreamer/$$DOCVERSION/$(DOC); \
 	ssh $(DOC_SERVER) mkdir -p $$DIR; \
-	if echo $(FORMATS) | grep html > /dev/null; then export SRC="$$SRC html"; fi; \
+	if echo $(FORMATS) | grep html > /dev/null; then \
+	  echo "Preparing docs for upload (rebasing cross-references) ..." ; \
+	  if test x$(builddir) != x$(srcdir); then \
+	    echo "make upload can only be used if srcdir == builddir"; \
+	    exit 1; \
+	  fi; \
+	  gtkdoc-rebase --online --html-dir=$(builddir)/html ; \
+	  export SRC="$$SRC html"; \
+	fi; \
 	if echo $(FORMATS) | grep ps > /dev/null; then export SRC="$$SRC $(DOC).ps"; fi; \
 	if echo $(FORMATS) | grep pdf > /dev/null; then export SRC="$$SRC $(DOC).pdf"; fi; \
 	echo Uploading $$SRC to $(DOC_SERVER):$$DIR; \
 	rsync -rv -e ssh --delete $$SRC $(DOC_SERVER):$$DIR; \
 	ssh $(DOC_SERVER) chmod -R g+w $$DIR; \
+	if echo $(FORMATS) | grep html > /dev/null; then \
+	  echo "Un-preparing docs for upload (rebasing cross-references) ..." ; \
+	  gtkdoc-rebase --html-dir=$(builddir)/html ; \
+	fi; \
 	echo Done
diff --git a/upload.mak b/upload.mak
deleted file mode 100644
index 60731e5..0000000
--- a/upload.mak
+++ /dev/null
@@ -1,33 +0,0 @@
-# this snippet is to be included by both our docbook manuals
-# and gtk-doc API references
-
-# it adds an upload target to each of these dir's Makefiles
-
-# each Makefile.am should define the following variables:
-# - DOC: the base name of the documentation
-#        (faq, manual, pwg, gstreamer, gstreamer-libs)
-# - FORMATS: the formats in which DOC is output
-#            (html ps pdf)
-
-# if you want to use it, make sure your $HOME/.ssh/config file contains the
-# correct User entry for the Host entry for the DOC_SERVER
-
-# these variables define the location of the online docs
-DOC_SERVER = gstreamer.freedesktop.org
-DOC_BASE = /srv/gstreamer.freedesktop.org/www/data/doc
-DOC_URL = $(DOC_SERVER):$(DOC_BASE)
-
-upload: $(FORMATS)
-	@if test "x$(PACKAGE_VERSION_NANO)" = x0; then \
-            export DOCVERSION=$(VERSION); \
-        else export DOCVERSION=head; \
-        fi; \
-        export DIR=$(DOC_BASE)/gstreamer/$$DOCVERSION/$(DOC); \
-	ssh $(DOC_SERVER) mkdir -p $$DIR; \
-	if echo $(FORMATS) | grep html > /dev/null; then export SRC="$$SRC html"; fi; \
-	if echo $(FORMATS) | grep ps > /dev/null; then export SRC="$$SRC $(DOC).ps"; fi; \
-	if echo $(FORMATS) | grep pdf > /dev/null; then export SRC="$$SRC $(DOC).pdf"; fi; \
-	echo Uploading $$SRC to $(DOC_SERVER):$$DIR; \
-	rsync -rv -e ssh --delete $$SRC $(DOC_SERVER):$$DIR; \
-	ssh $(DOC_SERVER) chmod -R g+w $$DIR; \
-	echo Done
diff --git a/win32.mak b/win32.mak
index e5192b9..d9964a3 100644
--- a/win32.mak
+++ b/win32.mak
@@ -24,7 +24,8 @@ win32-check-crlf:
 	@echo Checking win32 files for CR LF line endings ...; \
 	fail=0 ; \
 	for each in $(win32crlf) ; do \
-	  if ! (file $$each | grep CRLF >/dev/null) ; then \
+	  result=`perl -e 'print grep(/\r\n/,<>)' "$$each" | wc -l`; \
+	  if test "$$result" = 0 ; then \
 	    echo $$each must be fixed to have CRLF line endings ; \
 	    fail=1; \
 	  fi ; \
