diff --git a/webtools/bonsai/Makefile.in b/webtools/bonsai/Makefile.in index 4e46a8c8fa97..f9b42cd689c1 100644 --- a/webtools/bonsai/Makefile.in +++ b/webtools/bonsai/Makefile.in @@ -37,6 +37,7 @@ CVS=@CVS@ RLOG=@RLOG@ CO=@CO@ RCSDIFF=@RCSDIFF@ +SENDMAIL=@SENDMAIL@ FILES = CGI.tcl \ SourceChecker.cgi \ @@ -115,6 +116,7 @@ configdata: configdata.in -e s#_RLOG_#$(RLOG)#g \ -e s#_CO_#$(CO)#g \ -e s#_RCSDIFF_#$(RCSDIFF)#g \ + -e s#_SENDMAIL_#$(SENDMAIL)#g \ $< >$@ install: trapdoor configdata @@ -123,6 +125,7 @@ install: trapdoor configdata echo Installing $$I && \ sed -e s#/usr/bonsaitools/bin/perl#$(PERL)#g \ -e s#/usr/bonsaitools/bin/mysqltcl#$(MYSQLTCL)#g \ + -e s#/usr/lib/sendmail#$(SENDMAIL)#g \ -e s#/tools/ns/bin/perl5#$(PERL)#g \ $$I > $(PREFIX)/$$I && \ chmod 755 $(PREFIX)/$$I; done diff --git a/webtools/bonsai/aclocal.m4 b/webtools/bonsai/aclocal.m4 index 3e1071fa09b8..4c4b5c517d38 100644 --- a/webtools/bonsai/aclocal.m4 +++ b/webtools/bonsai/aclocal.m4 @@ -64,7 +64,7 @@ dnl check if Date::Parse is installed dnl AC_DEFUN(AC_PERL_DATEPARSE, [ - AC_MSG_CHECKING(for perl Date::parse module) + AC_MSG_CHECKING(for perl Date::Parse module) $PERL -w -c -e 'use Date::Parse' 2>/dev/null; has_dateparse=$? if test "x$has_dateparse" = "x0" ; then AC_MSG_RESULT(yes) diff --git a/webtools/bonsai/addcheckin.tcl b/webtools/bonsai/addcheckin.tcl index d47ac877b241..97a3c4e9bc3f 100755 --- a/webtools/bonsai/addcheckin.tcl +++ b/webtools/bonsai/addcheckin.tcl @@ -217,7 +217,8 @@ foreach key [array names group] { foreach k {name dir files log profile nextclose} { regsub -all -- "%$k%" $text [set $k] text } - exec /usr/lib/sendmail -t << $text + global sendmailcommand + exec $sendmailcommand -t << $text Log "Mailed file $filename to $name" } } diff --git a/webtools/bonsai/adminfuncs.tcl b/webtools/bonsai/adminfuncs.tcl index 9c4224eaa39b..3cf7e8327895 100755 --- a/webtools/bonsai/adminfuncs.tcl +++ b/webtools/bonsai/adminfuncs.tcl @@ -85,5 +85,6 @@ proc SendMail {filename} { regsub -all -- "%$k%" $text [set $k] text } - exec /usr/lib/sendmail -t << $text + global sendmailcommand + exec $sendmailcommand -t << $text } diff --git a/webtools/bonsai/configdata.in b/webtools/bonsai/configdata.in index f4b50a68e0d0..8b52316c35bc 100644 --- a/webtools/bonsai/configdata.in +++ b/webtools/bonsai/configdata.in @@ -20,6 +20,7 @@ set cvscommand _CVS_ set rlogcommand _RLOG_ set rcsdiffcommand _RCSDIFF_ set cocommand _CO_ +set sendmailcommand _SENDMAIL_ # URL to your copy of LXR set lxr_base http://localhost/webtools/lxr/source diff --git a/webtools/bonsai/configure b/webtools/bonsai/configure index 5e12f3bbb6c6..c710f10fd909 100755 --- a/webtools/bonsai/configure +++ b/webtools/bonsai/configure @@ -801,8 +801,8 @@ echo "configure:793: checking for perl DBD::mysql module" >&5 fi - echo $ac_n "checking for perl Date::parse module""... $ac_c" 1>&6 -echo "configure:806: checking for perl Date::parse module" >&5 + echo $ac_n "checking for perl Date::Parse module""... $ac_c" 1>&6 +echo "configure:806: checking for perl Date::Parse module" >&5 $PERL -w -c -e 'use Date::Parse' 2>/dev/null; has_dateparse=$? if test "x$has_dateparse" = "x0" ; then echo "$ac_t""yes" 1>&6 @@ -938,10 +938,41 @@ else echo "$ac_t""no" 1>&6 fi +# Extract the first word of "sendmail", so it can be a program name with args. +set dummy sendmail; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:945: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SENDMAIL" in + /*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_SENDMAIL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +SENDMAIL="$ac_cv_path_SENDMAIL" +if test -n "$SENDMAIL"; then + echo "$ac_t""$SENDMAIL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:945: checking for crypt in -lcrypt" >&5 +echo "configure:976: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -949,7 +980,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1140,6 +1171,7 @@ s%@CO@%$CO%g s%@CVS@%$CVS%g s%@RLOG@%$RLOG%g s%@RCSDIFF@%$RCSDIFF%g +s%@SENDMAIL@%$SENDMAIL%g CEOF EOF diff --git a/webtools/bonsai/configure.in b/webtools/bonsai/configure.in index 7fed2b6f970a..eea48ae49940 100644 --- a/webtools/bonsai/configure.in +++ b/webtools/bonsai/configure.in @@ -12,6 +12,7 @@ AC_PATH_PROG(CO,co) AC_PATH_PROG(CVS,cvs) AC_PATH_PROG(RLOG,rlog) AC_PATH_PROG(RCSDIFF,rcsdiff) +AC_PATH_PROG(SENDMAIL,sendmail) dnl Checks for libraries. diff --git a/webtools/bonsai/globals.tcl b/webtools/bonsai/globals.tcl index e0d132926ab2..2c7dc9f4dcb3 100755 --- a/webtools/bonsai/globals.tcl +++ b/webtools/bonsai/globals.tcl @@ -25,6 +25,7 @@ set cvscommand /tools/ns/bin/cvs set rlogcommand /tools/ns/bin/rlog set rcsdiffcommand /tools/ns/bin/rcsdiff set cocommand /tools/ns/bin/co +set sendmailcommand /usr/lib/sendmail set lxr_base http://cvs-mirror.mozilla.org/webtools/lxr/source set mozilla_lxr_kludge TRUE @@ -607,7 +608,8 @@ Content-Type: text/plain $difftext " - exec /usr/lib/sendmail -t << $text + global sendmailcommand + exec $sendmailcommand -t << $text } unlink $old unlink $new diff --git a/webtools/bonsai/maketables.sh b/webtools/bonsai/maketables.sh index 10d80fd60353..f2fded9a88de 100755 --- a/webtools/bonsai/maketables.sh +++ b/webtools/bonsai/maketables.sh @@ -30,7 +30,7 @@ echo "Will use user=\"$USER\" and password=\"$PASSWORD\" for bonsai database." echo "If you have a previous bonsai install, this script will drop all" echo "bonsai tables. Press ctrl-c to bail out now or return to continue." -read +read dummy echo Dropping old tables diff --git a/webtools/bonsai/trapdoor.c b/webtools/bonsai/trapdoor.c index c3f70ad8da9a..4402773b266a 100644 --- a/webtools/bonsai/trapdoor.c +++ b/webtools/bonsai/trapdoor.c @@ -1,5 +1,7 @@ #include +#ifndef __bsdi__ #include +#endif main(int argc, char** argv) { printf("%s\n", crypt(argv[1], "aa"));