dnl Local m4 macors for autoconf (used by sudo)
dnl
dnl checks for programs
-dnl
+
dnl
dnl check for sendmail
dnl
AC_MSG_RESULT(not found)
fi
])dnl
+
dnl
dnl check for vi
dnl
AC_MSG_RESULT(not found)
fi
])dnl
+
dnl
dnl check for pwd
dnl
AC_MSG_RESULT(not found)
fi
])dnl
+
dnl
dnl check for mv
dnl
AC_MSG_RESULT(not found)
fi
])dnl
+
dnl
dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
dnl
AC_MSG_RESULT(unknown, you will have to set _PATH_SUDO_LOGFILE by hand)
fi
])dnl
+
dnl
dnl check for fullly working void
dnl
AC_DEFINE($1, $2)
fi
])
+
dnl
dnl Check for size_t declation
dnl
AC_DEFUN(SUDO_TYPE_SIZE_T,
[SUDO_CHECK_TYPE(size_t, int)])
+
dnl
dnl Check for ssize_t declation
dnl
AC_DEFUN(SUDO_TYPE_SSIZE_T,
[SUDO_CHECK_TYPE(ssize_t, int)])
+
+dnl
+dnl Check to see if POSIX utime() takes a null arg
+dnl (only change from AC_FUNC_UTIME_NULL is an added sleep(1)
+dnl
+AC_DEFUN(SUDO_FUNC_UTIME_NULL,
+[AC_MSG_CHECKING(whether utime accepts a null argument)
+AC_CACHE_VAL(ac_cv_func_utime_null,
+[rm -f conftestdata; > conftestdata
+# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
+AC_TRY_RUN([#include <sys/types.h>
+#include <sys/stat.h>
+main() {
+struct stat s, t;
+exit(!(stat ("conftestdata", &s) == 0 && !sleep(1) && utime("conftestdata", (long *)0) == 0
+&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
+&& t.st_mtime - s.st_mtime < 120));
+}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
+ ac_cv_func_utime_null=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($ac_cv_func_utime_null)
+if test $ac_cv_func_utime_null = yes; then
+ AC_DEFINE(HAVE_UTIME_NULL)
+fi
+])
+
+dnl check for POSIX utime() using struct utimbuf
+dnl
+AC_DEFUN(SUDO_FUNC_UTIME_POSIX,
+[AC_MSG_CHECKING(for POSIX utime)
+AC_CACHE_VAL(sudo_cv_func_utime_posix,
+[rm -f conftestdata; > conftestdata
+AC_TRY_RUN([#include <utime.h>
+#include <sys/types.h>
+#include <sys/time.h>
+main() {
+struct utimbuf ut;
+ut.actime = ut.modtime = time(0);
+utime("conftestdata", &ut);
+exit(0);
+}], sudo_cv_func_utime_posix=yes, sudo_cv_func_utime_posix=no,
+ sudo_cv_func_utime_posix=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($sudo_cv_func_utime_posix)
+if test $sudo_cv_func_utime_posix = yes; then
+ AC_DEFINE(HAVE_UTIME_POSIX)
+fi
+])
+
dnl
dnl check for known UNIX variants
dnl XXX - check to see that uname was checked first
fi
fi
])dnl
+
dnl
dnl checks for UNIX variants that lack uname
+dnl
+
dnl
dnl SUDO_CONVEX
dnl
#endif
], [$1], [$2])
])dnl
+
dnl
dnl SUDO_MTXINU
dnl
#endif
], [$1], [$2])
])dnl
+
dnl
dnl SUDO_NEXT
dnl
OSREV=`$SEDPROG -e 's/^[[ \.0A-z]]*//' -e 's/\..*//' -e 1q < /usr/lib/NextStep/software_version`
fi
])dnl
+
dnl
dnl SUDO_BSD
dnl