--- cygport.orig	2006-10-16 22:16:59.953125000 -0400
+++ cygport	2006-10-16 22:13:52.078125000 -0400
@@ -216,13 +216,46 @@
 }
 
 # check for mandatory program, else error
+# Two forms:
+#   (1) check_prog_req progran_name package
+#       search for program_name in path. error if not found
+#
+#   (2) check_prog_req progran_name package [alt_prog1 [alt_prog2 [ ...]]]
+#       search in order for progran_name, alt_prog1, alt_prog2, ...
+#       in path. If none found, error. Otherwise, echo name of
+#       program found.  Only call this variant inside shell escape
+#       (backticks or $())
 check_prog_req() {
 	local prog=${1};
-	local pkg=${2:-${1}};
+	shift
+	local pkg=${1:-${prog}};
+	shift
 
 	if ! check_prog ${prog}
 	then
-		error "${pkg} is required to build this package";
+		local found;
+		found="no"
+		while [ $(( $# > 0 )) ]
+		do
+			prog=${1}
+			if check_prog ${prog}
+			then
+				found="yes"
+				break
+			fi
+			shift
+		done
+		if [ "x${found}" != "xyes" ]
+		then		
+			error "${pkg} is required to build this package";
+		else
+			echo "${prog}"
+		fi
+	else
+		if [ $(( $# > 0 )) ]
+		then
+			echo "${prog}"
+		fi
 	fi
 
 	return 0;
@@ -604,7 +637,10 @@
 		export WANT_AUTOMAKE;
 		/usr/bin/autoreconf-2.13 --force -i --verbose || error "autoreconf-2.13 failed"
 	else
-		check_prog_req autoconf-2.5x autoconf2.5
+		local found_autoconf_prog;
+		local found_autoconf_ver;
+		found_autoconf_prog=$( check_prog_req autoconf-2.5x autoconf2.5 autoconf-2.60 )
+		found_autoconf_ver=${found_autoconf_prog##autoconf-}
 
 		export WANT_AUTOCONF=2.5;
 		export WANT_AUTOMAKE;
@@ -618,7 +654,8 @@
 			fi
 		done
 
-		/usr/bin/autoreconf-2.5x --install --force --verbose || error "autoreconf-2.5x failed"
+		/usr/bin/autoreconf-${found_autoconf_ver} --install --force --verbose || \
+			error "autoreconf-${found_autoconf_ver} failed"
 	fi	
 
 	if [ -f config.h.in ]
