Use a loop when searching for mv, sendmail and sh
This commit is contained in:
109
aclocal.m4
vendored
109
aclocal.m4
vendored
@@ -8,29 +8,20 @@ dnl
|
||||
dnl checks for programs
|
||||
|
||||
dnl
|
||||
dnl check for sendmail
|
||||
dnl check for sendmail in well-known locations
|
||||
dnl
|
||||
AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
|
||||
if test -f "/usr/sbin/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/sbin/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
|
||||
elif test -f "/usr/lib/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/lib/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/lib/sendmail")
|
||||
elif test -f "/usr/etc/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/etc/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/etc/sendmail")
|
||||
elif test -f "/usr/ucblib/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/ucblib/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/ucblib/sendmail")
|
||||
elif test -f "/usr/local/lib/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/local/lib/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/local/lib/sendmail")
|
||||
elif test -f "/usr/local/bin/sendmail"; then
|
||||
AC_MSG_RESULT(/usr/local/bin/sendmail)
|
||||
SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/local/bin/sendmail")
|
||||
else
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING([for sendmail])
|
||||
found=no
|
||||
for p in "/usr/sbin/sendmail" "/usr/lib/sendmail" "/usr/etc/sendmail" "/usr/ucblib/sendmail" "/usr/local/lib/sendmail" "/usr/local/bin/sendmail"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
AC_MSG_RESULT([$p])
|
||||
SUDO_DEFINE_UNQUOTED(_PATH_SUDO_SENDMAIL, "$p")
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
@@ -47,62 +38,44 @@ for editor in "/usr/bin/vi" "/bin/vi" "/usr/ucb/vi" "/usr/bsd/vi" "/usr/local/bi
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"no"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
if test X"$found" != X"yes"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl check for mv
|
||||
dnl check for mv in well-known locations
|
||||
dnl
|
||||
AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
|
||||
if test -f "/usr/bin/mv"; then
|
||||
AC_MSG_RESULT(/usr/bin/mv)
|
||||
SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
|
||||
elif test -f "/bin/mv"; then
|
||||
AC_MSG_RESULT(/bin/mv)
|
||||
SUDO_DEFINE(_PATH_MV, "/bin/mv")
|
||||
elif test -f "/usr/ucb/mv"; then
|
||||
AC_MSG_RESULT(/usr/ucb/mv)
|
||||
SUDO_DEFINE(_PATH_MV, "/usr/ucb/mv")
|
||||
elif test -f "/usr/sbin/mv"; then
|
||||
AC_MSG_RESULT(/usr/sbin/mv)
|
||||
SUDO_DEFINE(_PATH_MV, "/usr/sbin/mv")
|
||||
else
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING([for mv])
|
||||
found=no
|
||||
for p in "/usr/bin/mv" "/bin/mv" "/usr/ucb/mv" "/usr/sbin/mv"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
AC_MSG_RESULT([$p])
|
||||
SUDO_DEFINE_UNQUOTED(_PATH_MV, "$p")
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl check for bourne shell
|
||||
dnl check for bourne shell in well-known locations
|
||||
dnl
|
||||
AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
|
||||
if test -f "/bin/sh"; then
|
||||
AC_MSG_RESULT(/bin/sh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
|
||||
elif test -f "/usr/bin/sh"; then
|
||||
AC_MSG_RESULT(/usr/bin/sh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/sh")
|
||||
elif test -f "/sbin/sh"; then
|
||||
AC_MSG_RESULT(/sbin/sh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/sbin/sh")
|
||||
elif test -f "/usr/sbin/sh"; then
|
||||
AC_MSG_RESULT(/usr/sbin/sh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/usr/sbin/sh")
|
||||
elif test -f "/bin/ksh"; then
|
||||
AC_MSG_RESULT(/bin/ksh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/bin/ksh")
|
||||
elif test -f "/usr/bin/ksh"; then
|
||||
AC_MSG_RESULT(/usr/bin/ksh)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/ksh")
|
||||
elif test -f "/bin/bash"; then
|
||||
AC_MSG_RESULT(/bin/bash)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/bin/bash")
|
||||
elif test -f "/usr/bin/bash"; then
|
||||
AC_MSG_RESULT(/usr/bin/bash)
|
||||
SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/bash")
|
||||
else
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING([for bourne shell])
|
||||
found=no
|
||||
for p in "/bin/sh" "/usr/bin/sh" "/sbin/sh" "/usr/sbin/sh" "/bin/ksh" "/usr/bin/ksh" "/bin/bash" "/usr/bin/bash"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
AC_MSG_RESULT([$p])
|
||||
SUDO_DEFINE_UNQUOTED(_PATH_BSHELL, "$p")
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
161
configure
vendored
161
configure
vendored
@@ -13645,98 +13645,40 @@ fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mv" >&5
|
||||
$as_echo_n "checking for mv... " >&6; }
|
||||
if test -f "/usr/bin/mv"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/bin/mv" >&5
|
||||
$as_echo "/usr/bin/mv" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_MV "/usr/bin/mv"
|
||||
found=no
|
||||
for p in "/usr/bin/mv" "/bin/mv" "/usr/ucb/mv" "/usr/sbin/mv"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $p" >&5
|
||||
$as_echo "$p" >&6; }
|
||||
cat >>confdefs.h <<EOF
|
||||
#define _PATH_MV "$p"
|
||||
EOF
|
||||
|
||||
elif test -f "/bin/mv"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /bin/mv" >&5
|
||||
$as_echo "/bin/mv" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_MV "/bin/mv"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/ucb/mv"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/ucb/mv" >&5
|
||||
$as_echo "/usr/ucb/mv" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_MV "/usr/ucb/mv"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/sbin/mv"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/sbin/mv" >&5
|
||||
$as_echo "/usr/sbin/mv" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_MV "/usr/sbin/mv"
|
||||
EOF
|
||||
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bourne shell" >&5
|
||||
$as_echo_n "checking for bourne shell... " >&6; }
|
||||
if test -f "/bin/sh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /bin/sh" >&5
|
||||
$as_echo "/bin/sh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/bin/sh"
|
||||
found=no
|
||||
for p in "/bin/sh" "/usr/bin/sh" "/sbin/sh" "/usr/sbin/sh" "/bin/ksh" "/usr/bin/ksh" "/bin/bash" "/usr/bin/bash"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $p" >&5
|
||||
$as_echo "$p" >&6; }
|
||||
cat >>confdefs.h <<EOF
|
||||
#define _PATH_BSHELL "$p"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/bin/sh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/bin/sh" >&5
|
||||
$as_echo "/usr/bin/sh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/usr/bin/sh"
|
||||
EOF
|
||||
|
||||
elif test -f "/sbin/sh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /sbin/sh" >&5
|
||||
$as_echo "/sbin/sh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/sbin/sh"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/sbin/sh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/sbin/sh" >&5
|
||||
$as_echo "/usr/sbin/sh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/usr/sbin/sh"
|
||||
EOF
|
||||
|
||||
elif test -f "/bin/ksh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /bin/ksh" >&5
|
||||
$as_echo "/bin/ksh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/bin/ksh"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/bin/ksh"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/bin/ksh" >&5
|
||||
$as_echo "/usr/bin/ksh" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/usr/bin/ksh"
|
||||
EOF
|
||||
|
||||
elif test -f "/bin/bash"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /bin/bash" >&5
|
||||
$as_echo "/bin/bash" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/bin/bash"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/bin/bash"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/bin/bash" >&5
|
||||
$as_echo "/usr/bin/bash" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_BSHELL "/usr/bin/bash"
|
||||
EOF
|
||||
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
fi
|
||||
@@ -13744,49 +13686,20 @@ fi
|
||||
if test -z "$with_sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendmail" >&5
|
||||
$as_echo_n "checking for sendmail... " >&6; }
|
||||
if test -f "/usr/sbin/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/sbin/sendmail" >&5
|
||||
$as_echo "/usr/sbin/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/sbin/sendmail"
|
||||
found=no
|
||||
for p in "/usr/sbin/sendmail" "/usr/lib/sendmail" "/usr/etc/sendmail" "/usr/ucblib/sendmail" "/usr/local/lib/sendmail" "/usr/local/bin/sendmail"; do
|
||||
if test -f "$p"; then
|
||||
found=yes
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $p" >&5
|
||||
$as_echo "$p" >&6; }
|
||||
cat >>confdefs.h <<EOF
|
||||
#define _PATH_SUDO_SENDMAIL "$p"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/lib/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/lib/sendmail" >&5
|
||||
$as_echo "/usr/lib/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/lib/sendmail"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/etc/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/etc/sendmail" >&5
|
||||
$as_echo "/usr/etc/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/etc/sendmail"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/ucblib/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/ucblib/sendmail" >&5
|
||||
$as_echo "/usr/ucblib/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/ucblib/sendmail"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/local/lib/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/lib/sendmail" >&5
|
||||
$as_echo "/usr/local/lib/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/local/lib/sendmail"
|
||||
EOF
|
||||
|
||||
elif test -f "/usr/local/bin/sendmail"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/bin/sendmail" >&5
|
||||
$as_echo "/usr/local/bin/sendmail" >&6; }
|
||||
cat >>confdefs.h <<\EOF
|
||||
#define _PATH_SUDO_SENDMAIL "/usr/local/bin/sendmail"
|
||||
EOF
|
||||
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
fi
|
||||
@@ -13808,7 +13721,7 @@ EOF
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test X"$found" != X"no"; then
|
||||
if test X"$found" != X"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
fi
|
||||
|
Reference in New Issue
Block a user