1dnl sendmail.m4 -- Checks for the path to sendmail.
2dnl $Id: sendmail.m4 9749 2014-11-23 21:45:56Z iulius $
3dnl
4dnl We have a custom probe for sendmail since we want to look in non-standard
5dnl locations for it, and another custom macro to allow users to override the
6dnl path to sendmail picked up by the script.
7
8dnl Allow the user to specify the path to sendmail.
9AC_DEFUN([INN_ARG_SENDMAIL],
10[AC_ARG_VAR([SENDMAIL], [Location of sendmail binary to use])
11AC_ARG_WITH([sendmail],
12    [AS_HELP_STRING([--with-sendmail=PATH], [Path to sendmail])],
13    SENDMAIL=$with_sendmail)])
14
15dnl Search for sendmail, honoring the path set by the user if they've done so
16dnl and otherwise looking only in /usr/sbin and /usr/lib.
17AC_DEFUN([INN_PATH_SENDMAIL],
18[if test "${with_sendmail+set}" = set ; then
19    AC_MSG_CHECKING([for sendmail])
20    AC_MSG_RESULT([$SENDMAIL])
21else
22    AC_PATH_PROG([SENDMAIL], [sendmail], [], [/usr/sbin:/usr/lib])
23    if test -z "$SENDMAIL" ; then
24        AC_MSG_ERROR([sendmail not found, re-run with --with-sendmail])
25    fi
26fi])
27