diff --git a/autogen.sh b/autogen.sh
index cf357cd668b1130a16f27a02e72777d290ef6085..9cedbf1644feee04b96c227c30874547d5599e4a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,6 +22,7 @@ if test -f /opt/local/bin/glibtoolize ; then
 else
         LIBTOOLIZE=libtoolize
 fi
+
 if test -d /opt/local/share/aclocal ; then
         ACLOCAL_ARGS="-I /opt/local/share/aclocal"
 fi
@@ -30,13 +31,7 @@ if test -d /share/aclocal ; then
         ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
 fi
 
-if test -f /opt/local/bin/intltoolize ; then
-	#darwin
-	INTLTOOLIZE=/opt/local/bin/intltoolize
-else
-	#on mingw, it is important to invoke intltoolize with an absolute path to avoid a bug
-	INTLTOOLIZE=/usr/bin/intltoolize
-fi
+INTLTOOLIZE=$(which intltoolize)
 
 echo "Generating build scripts in linphone..."
 set -x
diff --git a/mediastreamer2 b/mediastreamer2
index aacb46a5dc5c7c9c40844ea52a182c14c08df9fa..5f9a266adb16fc981ed06ce5d21865a38f47a935 160000
--- a/mediastreamer2
+++ b/mediastreamer2
@@ -1 +1 @@
-Subproject commit aacb46a5dc5c7c9c40844ea52a182c14c08df9fa
+Subproject commit 5f9a266adb16fc981ed06ce5d21865a38f47a935