]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/mailnotify (func_sendmail): Look for sendmail in a
authorScott James Remnant <scott@netsplit.com>
Thu, 12 Feb 2004 19:03:52 +0000 (19:03 +0000)
committerScott James Remnant <scott@netsplit.com>
Thu, 12 Feb 2004 19:03:52 +0000 (19:03 +0000)
couple of common non-PATH locations as well.

ChangeLog
mailnotify

index 50daf2dc3f6e47062a9f288e1a1dd5ff2d7de923..2ebe500e56b0973252c745f7b5523d33101da02f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-12  Scott James Remnant  <scott@netsplit.com>
+
+       * config/mailnotify (func_sendmail): Look for sendmail in a
+       couple of common non-PATH locations as well.
+
 2004-02-12  Gary V. Vaughan  <gary@gnu.org>
 
        * commit, mailnotify: Use $progpath as for ltmain.in to work
index d3221ebc6a8ccbc564ae6b8b4f7ce8468e7182f8..a9b07d90818dd3c3c21419459d1130a4cbb7a4f3 100755 (executable)
@@ -370,13 +370,21 @@ func_sendmail ()
     from_name=`echo "$my_from" | sed 's, *<.*> *$,,;s,",,g'`
     from_addr=`echo "$my_from" | sed "$sed_mail_address"`
 
+    SENDMAIL=sendmail
+    for try_sendmail in sendmail /usr/lib/sendmail /usr/sbin/sendmail; do
+       if which $try_sendmail >/dev/null; then
+           SENDMAIL=$try_sendmail
+           break
+       fi
+    done
+
     func_verbose "Delivering mail, please wait..."
     if test -n "$from_name"; then
-        sendmail -F "$from_name" -f "$from_addr" $my_destination < "$my_infile"
+        $SENDMAIL -F "$from_name" -f "$from_addr" $my_destination < "$my_infile"
     elif test -n "$from_addr"; then
-        sendmail -f "$from_addr" $my_destination < "$my_infile"
+        $SENDMAIL -f "$from_addr" $my_destination < "$my_infile"
     else
-        sendmail $my_destination < "$my_infile"
+        $SENDMAIL $my_destination < "$my_infile"
     fi
     if test $? -eq 0; then
         func_verbose "...succeeded."