33
33
AC_PATH_PROG($1,$2,,$PATH:$4)
35
35
AC_PATH_PROGS($1,$3,,$PATH:$4)
36
if test `expr "$$1" : '.*/\([[^/]]*\)$'` != "$2"; then
36
if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
37
37
COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
66
dnl Allow configure to specify a specific binary
67
dnl This variant is for optional binaries.
68
dnl 1: Environment variable
70
dnl 3: optional list of alternative binary names
71
dnl 4: optional list of additional search directories
72
AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
73
AC_ARG_WITH($2, AC_HELP_STRING(
74
[--with-$2], [name of the $2 executable to use]),
76
if test x"$withval" != xno; then
77
AC_MSG_CHECKING(for $2)
79
if test -e "$$1"; then
80
if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
81
AC_MSG_ERROR([$$1 is not an executable file])
85
if test ! -e "$$1"; then
86
AC_MSG_WARN([$$1 does not exist])
88
COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
92
AC_PATH_PROG($1,$2,,$PATH:$4)
94
AC_PATH_PROGS($1,$3,,$PATH:$4)
95
if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
96
COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
100
if test -n "$$1"; then
101
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
103
if test "`dirname $$1`" = "$dir"; then
104
COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
111
if test -z "$$1"; then
112
AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
115
if test -z "$$1"; then