$NetBSD: patch-configure,v 1.8 2023/02/18 01:52:50 schmonz Exp $

Ignore result of broken pkg-config version test.

Fix various searches for executables: "type -p" no longer works in
NetBSD's /bin/sh, nor does it work as expected on some other OSes
(e.g. DragonFly). As discussed in NetBSD PR bin/54803.

--- configure.orig	2023-02-10 17:44:03.000000000 +0000
+++ configure
@@ -3070,7 +3070,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -3124,7 +3124,7 @@ printf %s "checking $r version... " >&6;
 `
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ver" >&5
 printf "%s\n" "$ver" >&6; }
-    if test "$num" -lt "$min"; then
+    if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r >=  (installed: $ver)"\"`\"
 
@@ -3138,7 +3138,7 @@ printf "%s\n" "$ver" >&6; }
     }
     {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
 `
-        if test "$num" -gt "$max"; then
+        if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r <=  (installed: $ver)"\"`\"
 
@@ -3234,7 +3234,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -3288,7 +3288,7 @@ printf %s "checking $r version... " >&6;
 `
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ver" >&5
 printf "%s\n" "$ver" >&6; }
-    if test "$num" -lt "$min"; then
+    if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r >=  (installed: $ver)"\"`\"
 
@@ -3302,7 +3302,7 @@ printf "%s\n" "$ver" >&6; }
     }
     {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
 `
-        if test "$num" -gt "$max"; then
+        if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r <=  (installed: $ver)"\"`\"
 
@@ -3399,7 +3399,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -3453,7 +3453,7 @@ printf %s "checking $r version... " >&6;
 `
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ver" >&5
 printf "%s\n" "$ver" >&6; }
-    if test "$num" -lt "$min"; then
+    if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r >=  (installed: $ver)"\"`\"
 
@@ -3467,7 +3467,7 @@ printf "%s\n" "$ver" >&6; }
     }
     {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
 `
-        if test "$num" -gt "$max"; then
+        if false; then
 
     eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r <=  (installed: $ver)"\"`\"
 
@@ -3498,7 +3498,7 @@ printf %s "checking for python... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
         if ! $exe -V > /dev/null 2>&1 ; then
             continue
@@ -5101,7 +5101,7 @@ printf %s "checking for python... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
         if ! $exe -V > /dev/null 2>&1 ; then
             continue
@@ -5727,7 +5727,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6017,7 +6017,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6111,7 +6111,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6277,7 +6277,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6590,7 +6590,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6756,7 +6756,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -6920,7 +6920,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -7153,7 +7153,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -7876,7 +7876,7 @@ fi
   test -n "$FONTFORGE" && break
 done
 
-        if test -n "20110222"; then
+        if false; then
 
     r="`eval echo '$'"FONTFORGE"`"
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $r version" >&5
@@ -7887,7 +7887,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -8121,7 +8121,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -9024,7 +9024,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -9243,7 +9243,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -9467,7 +9467,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -9713,7 +9713,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -9878,7 +9878,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10074,7 +10074,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10243,7 +10243,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10407,7 +10407,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10571,7 +10571,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10735,7 +10735,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -10900,7 +10900,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11070,7 +11070,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11235,7 +11235,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11399,7 +11399,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11578,7 +11578,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11784,7 +11784,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
@@ -11948,7 +11948,7 @@ printf %s "checking $r version... " >&6;
     ## command -v doesn't work in zsh
     ## command -v "$r" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+    command -v $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
 `
     ver=`
     ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
