--- a/configure	2012-01-26 23:28:43.741451136 -0500
+++ b/configure	2012-01-26 23:34:43.551764485 -0500
@@ -336,17 +336,17 @@
 }
 
 c_escape(){
-    echo "$*" | sed 's/["\\]/\\\0/g'
+    echo "$*" | /usr/gnu/bin/sed 's/["\\]/\\\0/g'
 }
 
 sh_quote(){
-    v=$(echo "$1" | sed "s/'/'\\\\''/g")
+    v=$(echo "$1" | /usr/gnu/bin/sed "s/'/'\\\\''/g")
     test "x$v" = "x${v#*[!A-Za-z0-9_/.+-]}" || v="'$v'"
     echo "$v"
 }
 
 cleanws(){
-    echo "$@" | sed 's/^ *//;s/  */ /g;s/ *$//'
+    echo "$@" | /usr/gnu/bin/sed 's/^ *//;s/  */ /g;s/ *$//'
 }
 
 filter(){
@@ -390,11 +390,11 @@
 set_safe(){
     var=$1
     shift
-    eval $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g')='$*'
+    eval $(echo "$var" | /usr/gnu/bin/sed 's/[^A-Za-z0-9_]/_/g')='$*'
 }
 
 get_safe(){
-    eval echo \$$(echo "$1" | sed 's/[^A-Za-z0-9_]/_/g')
+    eval echo \$$(echo "$1" | /usr/gnu/bin/sed 's/[^A-Za-z0-9_]/_/g')
 }
 
 pushvar(){
@@ -434,13 +434,13 @@
 
 enable_safe(){
     for var; do
-        enable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g')
+        enable $(echo "$var" | /usr/gnu/bin/sed 's/[^A-Za-z0-9_]/_/g')
     done
 }
 
 disable_safe(){
     for var; do
-        disable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g')
+        disable $(echo "$var" | /usr/gnu/bin/sed 's/[^A-Za-z0-9_]/_/g')
     done
 }
 
@@ -1679,7 +1679,7 @@
 ffmpeg_deps="avcodec avformat swscale swresample"
 ffmpeg_select="buffersink_filter"
 
-doc_deps="texi2html"
+doc_deps="texi2html pod2man"
 
 # tests
 
@@ -1873,7 +1873,7 @@
 
 # since the object filename is not given with the -MM flag, the compiler
 # is only able to print the basename, and we must add the path ourselves
-DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
+DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | /usr/gnu/bin/sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
 DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
 
 # find source path
@@ -1881,7 +1881,7 @@
     source_path=.
 else
     source_path=$(cd $(dirname "$0"); pwd)
-    echo "$source_path" | grep -q '[[:blank:]]' &&
+    echo "$source_path" | /usr/gnu/bin/grep -q '[[:blank:]]' &&
         die "Out of tree builds are impossible with whitespace in source path."
     test -e "$source_path/config.h" &&
         die "Out of tree builds are impossible with config.h in source dir."
@@ -1898,7 +1898,7 @@
     thing=$1
     pattern=$2
     file=$source_path/$3
-    sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
+    /usr/gnu/bin/sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
 }
 
 ENCODER_LIST=$(find_things  encoder  ENC      libavcodec/allcodecs.c)
@@ -1928,7 +1928,7 @@
 "
 
 find_tests(){
-    map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
+    map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | /usr/gnu/bin/grep -v '[^-a-z0-9_]')
 }
 
 ACODEC_TESTS=$(find_tests acodec)
@@ -1958,7 +1958,7 @@
 show_list() {
     suffix=_$1
     shift
-    echo $* | sed s/$suffix//g | tr ' ' '\n' | sort | pr -3 -t
+    echo $* | /usr/gnu/bin/sed s/$suffix//g | tr ' ' '\n' | sort | pr -3 -t
     exit 0
 }
 
@@ -1977,14 +1977,14 @@
     map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
     ;;
     --enable-*=*|--disable-*=*)
-    eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
+    eval $(echo "${opt%%=*}" | /usr/gnu/bin/sed 's/--/action=/;s/-/ thing=/')
     is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
     eval list=\$$(toupper $thing)_LIST
-    name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
+    name=$(echo "${optval}" | /usr/gnu/bin/sed "s/,/_${thing}|/g")_${thing}
     $action $(filter "$name" $list)
     ;;
     --enable-?*|--disable-?*)
-    eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
+    eval $(echo "$opt" | /usr/gnu/bin/sed 's/--/action=/;s/-/ option=/;s/-/_/g')
     if is_in $option $COMPONENT_LIST; then
         test $action = disable && action=unset
         eval $action \$$(toupper ${option%s})_LIST
@@ -2005,7 +2005,7 @@
     *)
     optname="${opt%%=*}"
     optname="${optname#--}"
-    optname=$(echo "$optname" | sed 's/-/_/g')
+    optname=$(echo "$optname" | /usr/gnu/bin/sed 's/-/_/g')
     if is_in $optname $CMDLINE_SET; then
         eval $optname='$optval'
     elif is_in $optname $CMDLINE_APPEND; then
@@ -2123,7 +2123,7 @@
 filter_cflags=echo
 filter_cppflags=echo
 
-if   $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
+if   $cc -v 2>&1 | /usr/gnu/bin/grep -q '^gcc.*LLVM'; then
     cc_type=llvm_gcc
     cc_version=__VERSION__
     gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
@@ -2132,7 +2132,7 @@
     AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
     speed_cflags='-O3'
     size_cflags='-Os'
-elif $cc -v 2>&1 | grep -qi ^gcc; then
+elif $cc -v 2>&1 | /usr/gnu/bin/grep -qi ^gcc; then
     cc_type=gcc
     cc_version=__VERSION__
     gcc_version=$($cc --version | head -n1)
@@ -2140,13 +2140,13 @@
     gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
     gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
     cc_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
-    if ! $cc -dumpversion | grep -q '^2\.'; then
+    if ! $cc -dumpversion | /usr/gnu/bin/grep -q '^2\.'; then
         CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
         AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
     fi
     speed_cflags='-O3'
     size_cflags='-Os'
-elif $cc --version 2>/dev/null | grep -q Intel; then
+elif $cc --version 2>/dev/null | /usr/gnu/bin/grep -q Intel; then
     cc_type=icc
     cc_version="AV_STRINGIFY(__INTEL_COMPILER)"
     cc_ident=$($cc --version | head -n1)
@@ -2156,13 +2156,13 @@
     speed_cflags='-O3'
     size_cflags='-Os'
     noopt_cflags='-O1'
-elif $cc -v 2>&1 | grep -q xlc; then
+elif $cc -v 2>&1 | /usr/gnu/bin/grep -q xlc; then
     cc_type=xlc
     cc_version="AV_STRINGIFY(__IBMC__)"
     cc_ident=$($cc -qversion 2>/dev/null | head -n1)
     speed_cflags='-O5'
     size_cflags='-O5 -qcompact'
-elif $cc -V 2>/dev/null | grep -q Compaq; then
+elif $cc -V 2>/dev/null | /usr/gnu/bin/grep -q Compaq; then
     cc_type=ccc
     cc_version="AV_STRINGIFY(__DECC_VER)"
     cc_ident=$($cc -V | head -n1 | cut -d' ' -f1-3)
@@ -2171,7 +2171,7 @@
     add_ldflags -Wl,-z,now # calls to libots crash without this
     speed_cflags='-fast'
     size_cflags='-O1'
-elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
+elif $cc --vsn 2>/dev/null | /usr/gnu/bin/grep -q "ARM C/C++ Compiler"; then
     test -d "$sysroot" || die "No valid sysroot specified."
     cc_type=armcc
     cc_version="AV_STRINGIFY(__ARMCC_VERSION)"
@@ -2182,7 +2182,7 @@
         --configure_sysroot="$sysroot"        \
         --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
         die "Error creating armcc configuration file."
-    $cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
+    $cc --vsn | /usr/gnu/bin/grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
     cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
     as_default="${cross_prefix}gcc"
     CC_DEPFLAGS='-MMD'
@@ -2190,7 +2190,7 @@
     speed_cflags='-O3'
     size_cflags='-Os'
     filter_asflags="filter_out -W${armcc_opt}*"
-elif $cc -version 2>/dev/null | grep -q TMS470; then
+elif $cc -version 2>/dev/null | /usr/gnu/bin/grep -q TMS470; then
     cc_type=tms470
     cc_version="AV_STRINGIFY(__TI_COMPILER_VERSION__)"
     cc_ident=$($cc -version | head -n1 | tr -s ' ')
@@ -2230,20 +2230,20 @@
             esac
         done
     }
-elif $cc -v 2>&1 | grep -q clang; then
+elif $cc -v 2>&1 | /usr/gnu/bin/grep -q clang; then
     cc_type=clang
-    $cc -dM -E $TMPC | grep -q __clang_version__ &&
+    $cc -dM -E $TMPC | /usr/gnu/bin/grep -q __clang_version__ &&
         cc_version=__clang_version__ || cc_version=__VERSION__
     cc_ident=$($cc --version | head -n1)
     CC_DEPFLAGS='-MMD'
     AS_DEPFLAGS='-MMD'
     speed_cflags='-O3'
     size_cflags='-Os'
-elif $cc -V 2>&1 | grep -q Sun; then
+elif $cc -V 2>&1 | /usr/gnu/bin/grep -q Sun; then
     cc_type=suncc
     cc_version="AV_STRINGIFY(__SUNPRO_C)"
     cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
-    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | /usr/gnu/bin/sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
     DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
     add_ldflags -xc99
     speed_cflags='-O5'
@@ -2282,7 +2282,7 @@
             esac
         done
     }
-elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
+elif $cc -v 2>&1 | /usr/gnu/bin/grep -q 'PathScale\|Path64'; then
     cc_type=pathscale
     cc_version=__PATHSCALE__
     cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
@@ -2291,7 +2291,7 @@
     speed_cflags='-O2'
     size_cflags='-Os'
     filter_cflags='filter_out -Wdisabled-optimization'
-elif $cc -v 2>&1 | grep -q Open64; then
+elif $cc -v 2>&1 | /usr/gnu/bin/grep -q Open64; then
     cc_type=open64
     cc_version=__OPEN64__
     cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :)
@@ -2338,7 +2338,7 @@
         gcc|llvm_gcc)
             check_native(){
                 $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
-                sed -n "/cc1.*$1=/{
+                /usr/gnu/bin/sed -n "/cc1.*$1=/{
                             s/.*$1=\\([^ ]*\\).*/\\1/
                             p
                             q
@@ -2479,7 +2479,7 @@
     case $cpu in
         armv*)
             cpuflags="-march=$cpu"
-            subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
+            subarch=$(echo $cpu | /usr/gnu/bin/sed 's/[^a-z0-9]//g')
         ;;
         *)
             cpuflags="-mcpu=$cpu"
@@ -2813,7 +2813,7 @@
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF
-sym=$($nm $nm_opts $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
+sym=$($nm $nm_opts $TMPO | gawk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
 extern_prefix=${sym%%ff_extern*}
 
 check_cc <<EOF && enable inline_asm
@@ -2838,7 +2838,7 @@
 check_cc <<EOF || die "endian test failed"
 unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+od -t x1 $TMPO | /usr/gnu/bin/grep -q '42 *49 *47 *45' && enable bigendian
 
 if enabled alpha; then
 
@@ -3195,7 +3195,9 @@
 fi
 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
 
-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
+#texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
+(texi2html -version > /dev/null 2>&1 || texi2html /dev/null > /dev/null 2>&1) && enable texi2html || disable texi2html
+/usr/perl5/bin/pod2man /dev/null >/dev/null 2>&1 && enable pod2man || disable pod2man
 makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
 
 check_header linux/fb.h
@@ -3610,7 +3612,7 @@
     file=$source_path/$2
 # This condition will be removed when we stop supporting old libpostproc versions
 if ! test "$name" = LIBPOSTPROC || test "$postproc_version" = current; then
-    eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
+    eval $(grep "#define ${name}_VERSION_M" "$file" | gawk '{ print $2"="$3 }')
     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
 fi
     lcname=$(tolower $name)
