autogen-5.18.16-no-which.patch 6.0 KB

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