Skip to content

Commit 05297d7

Browse files
committed
Use 'command -v' instead of 'which' which is more portable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906387 13f79535-47bb-0310-9956-ffa450edef68
1 parent 47a3f23 commit 05297d7

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

build/aix/buildaix.ksh

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ export CFLAGS='-O2 -qlanglvl=extc99'
2626
lslpp -L bos.adt.insttools >/dev/null
2727
[[ $? -ne 0 ]] && echo "must have bos.adt.insttools installed" && exit -1
2828

29-
apr_config=`which apr-1-config`
30-
apu_config=`which apu-1-config`
29+
apr_config=`command -v apr-1-config`
30+
apu_config=`command -v apu-1-config`
3131

3232
if [[ -z ${apr_config} && -z ${apu_config} ]]
3333
then
3434
export PATH=/opt/bin:${PATH}
35-
apr_config=`which apr-1-config`
36-
apu_config=`which apu-1-config`
35+
apr_config=`command -v apr-1-config`
36+
apu_config=`command -v apu-1-config`
3737
fi
3838

3939
while test $# -gt 0

build/pkg/buildpkg.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ PREFIX=/usr/local/apache2
2424
TEMPDIR=/var/tmp/$USER/httpd-root
2525
rm -rf $TEMPDIR
2626

27-
apr_config=`which apr-1-config`
28-
apu_config=`which apu-1-config`
27+
apr_config=`command -v apr-1-config`
28+
apu_config=`command -v apu-1-config`
2929

3030
while test $# -gt 0
3131
do

changes-entries/pr66130.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*) build: Use 'command -v' instead of 'which' which is more portable.
2+
PR 66130 [Sam James <sam@gentoo.org>]

configure.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ AC_ARG_WITH(pcre,
224224
APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
225225
if test "x$with_pcre" = "x" || test "$with_pcre" = "yes"; then
226226
with_pcre="$PATH"
227-
else if which $with_pcre 2>/dev/null; then :; else
227+
else if command -v $with_pcre 2>/dev/null; then :; else
228228
with_pcre="$with_pcre/bin:$with_pcre"
229229
fi
230230
fi
231231

232232
AC_CHECK_TARGET_TOOLS(PCRE_CONFIG, [pcre2-config pcre-config],
233-
[`which $with_pcre 2>/dev/null`], $with_pcre)
233+
[`command -v $with_pcre 2>/dev/null`], $with_pcre)
234234

235235
if test "x$PCRE_CONFIG" != "x"; then
236236
if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else

0 commit comments

Comments
 (0)