2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

took out SUDO_PROG_INSTALL

1.x to 2.x changes
added echo and results to most SUDO_* macros
This commit is contained in:
Todd C. Miller
1995-03-28 05:44:10 +00:00
parent 2b322baa6d
commit 6b98875f8d

196
aclocal.m4 vendored
View File

@@ -2,55 +2,88 @@ dnl Local m4 macors for autoconf (used by sudo)
dnl dnl
dnl checks for programs dnl checks for programs
dnl dnl
define(SUDO_PROG_INSTALL, dnl
[# Make sure to not get the incompatible SysV /etc/install, /sbin/install dnl check for sendmail
# and /usr/sbin/install, which might be in PATH before a BSD-like install, dnl
# or the SunOS /usr/etc/install directory, or the AIX /bin/install, AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(checking for sendmail)
# or the AFS install, which mishandles nonexistent args, or if test -f "/usr/sbin/sendmail"; then
# /usr/ucb/install on SVR4, which tries to use the nonexistent group AC_MSG_RESULT(/usr/sbin/sendmail)
# `staff'. On most BSDish systems install is in /usr/bin, not /usr/ucb AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/sbin/sendmail")
# anyway. Sigh. We can always use the installbsd in $srcdir. elif test -f "/usr/lib/sendmail"; then
if test "z${INSTALL}" = "z" ; then AC_MSG_RESULT(/usr/lib/sendmail)
echo checking for BSD compatible install... AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/lib/sendmail")
savepath="$PATH" elif test -f "/usr/etc/sendmail"; then
PATH="${PATH}:${srcdir}" AC_MSG_RESULT(/usr/etc/sendmail)
IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/etc/sendmail")
for dir in $PATH; do elif test -f "/usr/local/lib/sendmail"; then
test -z "$dir" && dir=. AC_MSG_RESULT(/usr/local/lib/sendmail)
case $dir in AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/local/lib/sendmail")
/sbin|/etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; elif test -f "/usr/local/bin/sendmail"; then
*) AC_MSG_RESULT(/usr/local/bin/sendmail)
if test -f $dir/installbsd; then AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/local/bin/sendmail")
INSTALL="$dir/installbsd -c" # OSF1 else
INSTALL_PROGRAM='$(INSTALL)' AC_MSG_RESULT(not found)
INSTALL_DATA='$(INSTALL) -m 644' fi
break ])dnl
fi dnl
if test -f $dir/install; then dnl check for vi
if grep dspmsg $dir/install >/dev/null 2>&1; then dnl
: # AIX AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(checking for vi)
else if test -f "/usr/bin/vi"; then
INSTALL="$dir/install -c" AC_MSG_RESULT(/usr/bin/vi)
INSTALL_PROGRAM='$(INSTALL)' AC_DEFINE(_SUDO_PATH_VI, "/usr/bin/vi")
INSTALL_DATA='$(INSTALL) -m 644' elif test -f "/usr/ucb/vi"; then
break AC_MSG_RESULT(/usr/ucb/vi)
fi AC_DEFINE(_SUDO_PATH_VI, "/usr/ucb/vi")
fi elif test -f "/usr/bsd/vi"; then
;; AC_MSG_RESULT(/usr/bsd/vi)
esac AC_DEFINE(_SUDO_PATH_VI, "/usr/bsd/vi")
done elif test -f "/usr/local/bin/vi"; then
IFS="$saveifs" AC_MSG_RESULT(/usr/local/bin/vi)
PATH="$savepath" AC_DEFINE(_SUDO_PATH_VI, "/usr/local/bin/vi")
else
AC_MSG_RESULT(not found)
fi
])dnl
dnl
dnl check for pwd
dnl
AC_DEFUN(SUDO_PROG_PWD, [AC_MSG_CHECKING(checking for pwd)
if test -f "/usr/bin/pwd"; then
AC_MSG_RESULT(/usr/bin/pwd)
AC_DEFINE(_SUDO_PATH_PWD, "/usr/bin/pwd")
elif test -f "/bin/pwd"; then
AC_MSG_RESULT(/bin/pwd)
AC_DEFINE(_SUDO_PATH_PWD, "/bin/pwd")
elif test -f "/usr/ucb/pwd"; then
AC_MSG_RESULT(/usr/ucb/pwd)
AC_DEFINE(_SUDO_PATH_PWD, "/usr/ucb/pwd")
elif test -f "/usr/sbin/pwd"; then
AC_MSG_RESULT(/usr/sbin/pwd)
AC_DEFINE(_SUDO_PATH_PWD, "/usr/sbin/pwd")
else
AC_MSG_RESULT(not found)
fi
])dnl
dnl
dnl check for mv
dnl
AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(checking for mv)
if test -f "/usr/bin/mv"; then
AC_MSG_RESULT(/usr/bin/mv)
AC_DEFINE(_SUDO_PATH_MV, "/usr/bin/mv")
elif test -f "/bin/mv"; then
AC_MSG_RESULT(/bin/mv)
AC_DEFINE(_SUDO_PATH_MV, "/bin/mv")
elif test -f "/usr/ucb/mv"; then
AC_MSG_RESULT(/usr/ucb/mv)
AC_DEFINE(_SUDO_PATH_MV, "/usr/ucb/mv")
elif test -f "/usr/sbin/mv"; then
AC_MSG_RESULT(/usr/sbin/mv)
AC_DEFINE(_SUDO_PATH_MV, "/usr/sbin/mv")
else
AC_MSG_RESULT(not found)
fi fi
INSTALL=${INSTALL-cp}
AC_SUBST(INSTALL)dnl
test -n "$verbose" && echo " setting INSTALL to $INSTALL"
INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
AC_SUBST(INSTALL_PROGRAM)dnl
test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
AC_SUBST(INSTALL_DATA)dnl
test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA"
])dnl ])dnl
dnl dnl
dnl check for fullly working void dnl check for fullly working void
@@ -61,63 +94,8 @@ foo = 0;], AC_DEFINE(VOID, void)
AC_MSG_RESULT(yes), AC_DEFINE(VOID, char) AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
AC_MSG_RESULT(no))]) AC_MSG_RESULT(no))])
dnl dnl
dnl check for sendmail
dnl
define(SUDO_PROG_SENDMAIL,
[if test -f "/usr/sbin/sendmail"; then
AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/sbin/sendmail")
elif test -f "/usr/lib/sendmail"; then
AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/lib/sendmail")
elif test -f "/usr/etc/sendmail"; then
AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/etc/sendmail")
elif test -f "/usr/local/lib/sendmail"; then
AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/local/lib/sendmail")
elif test -f "/usr/local/bin/sendmail"; then
AC_DEFINE(_SUDO_PATH_SENDMAIL, "/usr/local/bin/sendmail")
fi
])dnl
dnl
dnl check for vi
dnl
define(SUDO_PROG_VI,
[if test -f "/usr/bin/vi"; then
AC_DEFINE(_SUDO_PATH_VI, "/usr/bin/vi")
elif test -f "/usr/ucb/vi"; then
AC_DEFINE(_SUDO_PATH_VI, "/usr/ucb/vi")
elif test -f "/usr/local/bin/vi"; then
AC_DEFINE(_SUDO_PATH_VI, "/usr/local/bin/vi")
fi
])dnl
dnl
dnl check for pwd
dnl
define(SUDO_PROG_PWD,
[if test -f "/usr/bin/pwd"; then
AC_DEFINE(_SUDO_PATH_PWD, "/usr/bin/pwd")
elif test -f "/bin/pwd"; then
AC_DEFINE(_SUDO_PATH_PWD, "/bin/pwd")
elif test -f "/usr/ucb/pwd"; then
AC_DEFINE(_SUDO_PATH_PWD, "/usr/ucb/pwd")
elif test -f "/usr/sbin/pwd"; then
AC_DEFINE(_SUDO_PATH_PWD, "/usr/sbin/pwd")
fi
])dnl
dnl
dnl check for mv
dnl
define(SUDO_PROG_MV,
[if test -f "/usr/bin/mv"; then
AC_DEFINE(_SUDO_PATH_MV, "/usr/bin/mv")
elif test -f "/bin/mv"; then
AC_DEFINE(_SUDO_PATH_MV, "/bin/mv")
elif test -f "/usr/ucb/mv"; then
AC_DEFINE(_SUDO_PATH_MV, "/usr/ucb/mv")
elif test -f "/usr/sbin/mv"; then
AC_DEFINE(_SUDO_PATH_MV, "/usr/sbin/mv")
fi
])dnl
dnl
dnl Check for ssize_t declation dnl Check for ssize_t declation
dnl XXX - check unistd.h too
dnl dnl
AC_DEFUN(SUDO_SSIZE_T, AC_DEFUN(SUDO_SSIZE_T,
[AC_CHECK_TYPE(ssize_t, int)]) [AC_CHECK_TYPE(ssize_t, int)])
@@ -125,7 +103,7 @@ dnl
dnl check for known UNIX variants dnl check for known UNIX variants
dnl XXX - check to see that uname was checked first dnl XXX - check to see that uname was checked first
dnl dnl
define(SUDO_OSTYPE, AC_DEFUN(SUDO_OSTYPE,
AC_BEFORE([$0], [AC_PROGRAM_CHECK]) AC_BEFORE([$0], [AC_PROGRAM_CHECK])
[echo trying to figure out what OS you are running... [echo trying to figure out what OS you are running...
OS="unknown" OS="unknown"
@@ -162,7 +140,7 @@ dnl checks for UNIX variants that lack uname
dnl dnl
dnl SUDO_CONVEX dnl SUDO_CONVEX
dnl dnl
define(SUDO_CONVEX, AC_DEFUN(SUDO_CONVEX,
[echo checking for ConvexOS [echo checking for ConvexOS
AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([ AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([
$0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes, $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
@@ -174,7 +152,7 @@ $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
dnl dnl
dnl SUDO_MTXINU dnl SUDO_MTXINU
dnl dnl
define(SUDO_MTXINU, AC_DEFUN(SUDO_MTXINU,
[echo checking for MORE/BSD [echo checking for MORE/BSD
AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([ AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([
$0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes, $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
@@ -187,7 +165,7 @@ $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
dnl dnl
dnl SUDO_NEXT dnl SUDO_NEXT
dnl dnl
define(SUDO_NEXT, AC_DEFUN(SUDO_NEXT,
[echo checking for NeXTstep [echo checking for NeXTstep
AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([ AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([
$0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes, $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
@@ -199,7 +177,7 @@ $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,
dnl dnl
dnl SUDO_BSD dnl SUDO_BSD
dnl dnl
define(SUDO_BSD, AC_DEFUN(SUDO_BSD,
[echo checking for BSD [echo checking for BSD
AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([ AC_BEFORE([$0], [AC_COMPILE_CHECK])AC_BEFORE([$0], [AC_TEST_PROGRAM])AC_BEFORE([
$0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes, $0], [AC_EGREP_HEADER])AC_BEFORE([$0], [AC_TEST_CPP])AC_PROGRAM_EGREP(yes,