$NetBSD: patch-aa,v 1.1 2006/02/26 12:50:03 rillig Exp $

This patch makes "xmlto txt" usable on pkgsrc systems, which usually do
not have these binaries in /usr/bin.

--- format/docbook/txt.orig	2003-11-30 17:56:45.000000000 +0100
+++ format/docbook/txt	2006-02-26 13:40:54.000000000 +0100
@@ -1,14 +1,14 @@
-if [ -x /usr/bin/w3m ]
+if (type w3m 1>/dev/null 2>&1)
 then
-  CONVERT=/usr/bin/w3m
+  CONVERT=w3m
   ARGS="-T text/html -dump"
-elif [ -x /usr/bin/lynx ]
+elif (type lynx 1>/dev/null 2>&1)
 then
-  CONVERT=/usr/bin/lynx
+  CONVERT=lynx
   ARGS="-force_html -dump -nolist -width=72"
-elif [ -x /usr/bin/links ]
+elif (type links 1>/dev/null 2>&1)
 then
-  CONVERT=/usr/bin/links
+  CONVERT=links
   ARGS="-dump"
 else
   echo >&2 "No way to convert HTML to text found."
