summaryrefslogtreecommitdiff
blob: ce53c271843e41faeeece7624d4111f7f8e79170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
--- a/autoopts/mk-tpl-config.sh
+++ b/autoopts/mk-tpl-config.sh
@@ -98,7 +98,7 @@ fix_scripts() {
         st=`sed 1q $f`
 
         case "$st" in
-        *perl ) echo '#!' `which perl`
+        *perl ) echo '#!' `command -v perl`
                  sed 1d $f
                  ;;
 
@@ -124,7 +124,7 @@ find_shell_prog() {
     case `uname -s` in
     SunOS )
       while : ; do
-        POSIX_SHELL=`which bash`
+        POSIX_SHELL=`command -v bash`
         test -x "${POSIX_SHELL}" && break
         POSIX_SHELL=/usr/xpg4/bin/sh
         test -x "${POSIX_SHELL}" && break
@@ -139,7 +139,7 @@ find_cat_prog() {
     do
         \unalias -a
         unset -f command cat which
-        POSIX_CAT=`which cat`
+        POSIX_CAT=`command -v cat`
         test -x "$POSIX_CAT" && break
         POSIX_CAT=`
             PATH=\`command -p getconf CS_PATH\`
--- a/autoopts/test/defs.in
+++ b/autoopts/test/defs.in
@@ -40,7 +40,7 @@ cfg_vals()
     if test "X$BASH_VERSION" = X
     then
       # On Solaris, make certain we do not use /bin/sh
-      sh=`which bash`
+      sh=`command -v bash`
       test "X$sh" = X && sh=/usr/xpg4/bin/sh
       BASH_VERSION=not-good-enough
       export BASH_VERSION
--- a/autoopts/tpl/agtexi-cmd.tpl
+++ b/autoopts/tpl/agtexi-cmd.tpl
@@ -779,7 +779,7 @@ DEFINE initialization                   =][=
 =][= # END-BUILDTREE-ISMS
 
 (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
-       test -x \"${CLexe}\" || CLexe=`which columns`")
+       test -x \"${CLexe}\" || CLexe=`command -v columns`")
 
 # END-INSTALL-ONLY-CODE =][=
 
--- a/autoopts/tpl/cmd-doc.tlib
+++ b/autoopts/tpl/cmd-doc.tlib
@@ -42,7 +42,7 @@
 :+][+: # END-BUILDTREE-ISMS
 
 (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
-       test -x \"${CLexe}\" || CLexe=`which columns`")
+       test -x \"${CLexe}\" || CLexe=`command -v columns`")
 
 # END-INSTALL-ONLY-CODE :+][+:
 
--- a/autoopts/tpl/def2pot.tpl
+++ b/autoopts/tpl/def2pot.tpl
@@ -68,7 +68,7 @@ ENDDEF                                                       =][=
 =][= # END-BUILDTREE-ISMS
 
 (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
-       test -x \"${CLexe}\" || CLexe=`which columns`")
+       test -x \"${CLexe}\" || CLexe=`command -v columns`")
 
 # END-INSTALL-ONLY-CODE =][= #
 
--- a/autoopts/tpl/getopt.tpl
+++ b/autoopts/tpl/getopt.tpl
@@ -81,7 +81,7 @@ CASE (suffix) +][+
 # END-BUILDTREE-ISMS the following code is for installed version:
     agopts=
     aocfg=`echo ${AGexe} | sed 's@/[^/]*$@@'`/autoopts-config
-    test -x "${aocfg}" || aocfg=`which autoopts-config`
+    test -x "${aocfg}" || aocfg=`command -v autoopts-config`
     tarfile=`${aocfg} libsrc`
 
 # END-INSTALL-ONLY-CODE +]
--- a/autoopts/tpl/options.tpl
+++ b/autoopts/tpl/options.tpl
@@ -39,7 +39,7 @@ c
 =][= # END-BUILDTREE-ISMS
 
 (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
-       test -x \"${CLexe}\" || CLexe=`which columns`")
+       test -x \"${CLexe}\" || CLexe=`command -v columns`")
 
 # END-INSTALL-ONLY-CODE     =][=
 
--- a/autoopts/tpl/usage.tlib
+++ b/autoopts/tpl/usage.tlib
@@ -34,7 +34,7 @@
 =][= # END-BUILDTREE-ISMS
 
 (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
-       test -x \"${CLexe}\" || CLexe=`which columns`")
+       test -x \"${CLexe}\" || CLexe=`command -v columns`")
 
 # END-INSTALL-ONLY-CODE =][=
 
--- a/config/ag_macros.m4
+++ b/config/ag_macros.m4
@@ -505,7 +505,7 @@ AC_DEFUN([AG_ENABLE_DEBUG],[
         [Define this if wanting autogen debugging])
     AC_DEFINE([DEBUG_ENABLED], [1],
           [Define this if debugging is enabled])
-    [f=`which dmalloc 2>/dev/null`
+    [f=`command -v dmalloc 2>/dev/null`
     test -n "$f" && LIBS="${LIBS} -ldmalloc"]
   fi
 
--- a/config/bootstrap.shlib
+++ b/config/bootstrap.shlib
@@ -47,16 +47,16 @@ case "${SHELL}" in
 *[akz]sh) : ;;
 *)
   while : ; do
-    SHELL=`which bash 2>/dev/null`
+    SHELL=`command -v bash 2>/dev/null`
     test -x "${SHELL}" && break
 
-    SHELL=`which ksh 2>/dev/null`
+    SHELL=`command -v ksh 2>/dev/null`
     test -x "${SHELL}" && break
 
     SHELL=/usr/xpg4/bin/sh
     test -x "${SHELL}" && break
 
-    SHELL=`which sh 2>/dev/null`
+    SHELL=`command -v sh 2>/dev/null`
     test -x "${SHELL}" && break
 
     die "unable to determine which shell to use"
--- a/config/libopts.m4
+++ b/config/libopts.m4
@@ -108,9 +108,9 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
   [while :
   do
       test -x "$POSIX_SHELL" && break
-      POSIX_SHELL=`which bash`
+      POSIX_SHELL=`command -v bash`
       test -x "$POSIX_SHELL" && break
-      POSIX_SHELL=`which dash`
+      POSIX_SHELL=`command -v dash`
       test -x "$POSIX_SHELL" && break
       POSIX_SHELL=/usr/xpg4/bin/sh
       test -x "$POSIX_SHELL" && break
--- a/config/mk-shdefs.in
+++ b/config/mk-shdefs.in
@@ -109,7 +109,7 @@ configure() {
     {
         cmd='`set -o | '${AWK}" '/^allexport/ {print \$2}'"\`
         cat <<- _EOF_
-		#! `which echo` this-file-should-be-sourced,-not-executed
+		#! `command -v echo` this-file-should-be-sourced,-not-executed
 		# -*- Mode: shell-script -*-
 
 		case "$cmd" in
--- a/configure.ac
+++ b/configure.ac
@@ -149,9 +149,9 @@ GDnam=getdefs${ac_exeext}
 CLnam=columns${ac_exeext}
 if test "X$cross_compiling" = Xyes
 then
-  AGexe=`which ${AGnam}`
-  GDexe=`which ${GDnam}`
-  CLexe=`which ${CLnam}`
+  AGexe=`command -v ${AGnam}`
+  GDexe=`command -v ${GDnam}`
+  CLexe=`command -v ${CLnam}`
 else
   AGexe=${ag_top_builddir}/agen5/${AGnam}
   GDexe=${ag_top_builddir}/getdefs/${GDnam}
--- a/doc/mk-agen-texi.sh
+++ b/doc/mk-agen-texi.sh
@@ -65,7 +65,7 @@ set_config_values()
   nl='
 ' ht='	'
   . ${top_builddir}/config/shdefs
-  : ${MAKE=`which make`}
+  : ${MAKE=`command -v make`}
   : ${srcdir=`pwd`}
   srcdir=`cd ${srcdir} >/dev/null ; pwd`
   INCLUDES="${DEFS} "`
--- a/getdefs/test/defs
+++ b/getdefs/test/defs
@@ -40,7 +40,7 @@ cfg_vals()
     if test "X$BASH_VERSION" = X
     then
       # On Solaris, make certain we do not use /bin/sh
-      sh=`which bash`
+      sh=`command -v bash`
       test "X$sh" = X && sh=/usr/xpg4/bin/sh
       BASH_VERSION=not-good-enough
       export BASH_VERSION