[Ffmpeg-devel] [PATCH] Fix for non-GNU sed.

demo-n demo-n
Tue Oct 31 14:10:51 CET 2006


Hi

"--disable-decoder=NAME" option of ./configure doesn't work with
non-GNU sed programs.
Takashi Mochizuki aka MyCometG3 known as an author of mp4vEncoder
pointed out it.
He concluded that as a result of the investigation, there was a
problem in the following function in ./configure script.

filter_out(){
    pattern="$1"
    shift
    echo "$@" | sed "s%\\<$pattern\\>%%g"
}

According to the info page, \< and \> are a GNU extension.
Because Mac OS X uses non-GNU sed, this function doesn't work correctly.
Therefore, I made the attached patch.
This patch removes the GNU sed dependency on ./configure.
filter_out() with it can disregard "oggvorbis_encoder" when the
$pattern is "vorbis_encoder".

--
demo-n
-------------- next part --------------
--- ffmpeg.orig/configure	2006-10-30 21:23:47.000000000 +0900
+++ ffmpeg/configure	2006-10-31 21:50:41.000000000 +0900
@@ -308,7 +308,7 @@
 filter_out(){
     pattern="$1"
     shift
-    echo "$@" | sed "s%\\<$pattern\\>%%g"
+    echo "$@" | sed -e "s%\\([a-z0-9][a-z0-9_]*\\)%#\\1#%g;s%#$pattern#%%g;s%#%%g;"
 }
 
 # set temporary file name



More information about the ffmpeg-devel mailing list