aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2017-11-11 11:10:49 +0200
committerSergey Poznyakoff <gray@gnu.org>2017-11-11 11:10:49 +0200
commit499992bf3bbf7e7d3e1203563f856f6db229d73c (patch)
treee34d7f1c16bef5ce978fe40a35f41abea5a3f49f
parentba1c15e2290246d272037404c46f44abd9d98c0e (diff)
downloadwydawca-499992bf3bbf7e7d3e1203563f856f6db229d73c.tar.gz
wydawca-499992bf3bbf7e7d3e1203563f856f6db229d73c.tar.bz2
Fix build with mailutils 3.4
* Makefile.am (ACLOCAL_AMFLAGS): Add am. * NEWS: Update. * am/mailutils.m4: New file. A fixed version of upstream mailutils.m4 * configure.ac: Require mailutils 3.3. Raise patchlevel. * tests/nullmail.c: New file. * tests/.gitignore: Add nullmail * tests/Makefile.am: Build nullmail * tests/etc/nullmail: Remove * tests/etc/Makefile.am: Remove nullmail script. * tests/atlocal.in (WY_TESTDIR): New variable. * tests/check-notify.at: Use new nullmail tool. Update expected output. * tests/mailstats.at: Likewise. * tests/notify-upl.at: Likewise. * tests/etc/mailstats.rcin: Fix mailer command line. * tests/etc/notify.rcin: Likewise.
-rw-r--r--Makefile.am2
-rw-r--r--NEWS4
-rw-r--r--am/mailutils.m489
-rw-r--r--configure.ac4
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/atlocal.in2
-rw-r--r--tests/check-notify.at4
-rw-r--r--tests/etc/Makefile.am1
-rw-r--r--tests/etc/mailstats.rcin2
-rw-r--r--tests/etc/notify.rcin2
-rwxr-xr-xtests/etc/nullmail11
-rw-r--r--tests/mailstats.at4
-rw-r--r--tests/notify-upl.at8
-rw-r--r--tests/nullmail.c84
15 files changed, 192 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am
index 831bc79..897c567 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with wydawca. If not, see <http://www.gnu.org/licenses/>. 15# along with wydawca. If not, see <http://www.gnu.org/licenses/>.
16 16
17ACLOCAL_AMFLAGS = -I m4 -I grecs/am -I imprimatur 17ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I imprimatur
18 18
19SUBDIRS=grecs libltdl include src modules imprimatur doc etc tests 19SUBDIRS=grecs libltdl include src modules imprimatur doc etc tests
20 20
diff --git a/NEWS b/NEWS
index c841c35..789a0ad 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,11 @@
1Wydawca NEWS -- history of user-visible changes. 2013-03-12 1Wydawca NEWS -- history of user-visible changes. 2017-11-11
2Copyright (C) 2007-2013, 2017 Sergey Poznyakoff 2Copyright (C) 2007-2013, 2017 Sergey Poznyakoff
3See the end of file for copying conditions. 3See the end of file for copying conditions.
4 4
5Please send Wydawca bug reports to <bug-wydawca@gnu.org.ua>. 5Please send Wydawca bug reports to <bug-wydawca@gnu.org.ua>.
6 6
7 7
8Version 2.99.90 8Version 2.99.91 (git)
9 9
10Version 2.2 "HGY", 2013-01-01 10Version 2.2 "HGY", 2013-01-01
11 11
diff --git a/am/mailutils.m4 b/am/mailutils.m4
new file mode 100644
index 0000000..9bb79a0
--- /dev/null
+++ b/am/mailutils.m4
@@ -0,0 +1,89 @@
1dnl A fixed version of AM_MAILUTILS macro.
2dnl The macro shipped with mailutils 3.3 mishandles the "mailer"
3dnl link requirement. Until it is fixed upstream, wydawca will be
4dnl using this version.
5
6dnl Copyright (C) 2006-2007, 2010-2012, 2014-2017 Free Software
7dnl Foundation, Inc.
8dnl
9dnl GNU Mailutils is free software; you can redistribute it and/or
10dnl modify it under the terms of the GNU General Public License as
11dnl published by the Free Software Foundation; either version 3, or (at
12dnl your option) any later version.
13dnl
14dnl GNU Mailutils is distributed in the hope that it will be useful, but
15dnl WITHOUT ANY WARRANTY; without even the implied warranty of
16dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17dnl General Public License for more details.
18dnl
19dnl You should have received a copy of the GNU General Public License
20dnl along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
21
22m4_define([am_mu_vercmp],[
23m4_pushdef([_ver_A_],m4_car($1))dnl
24m4_pushdef([_ver_B_],m4_car($2))dnl
25m4_if(_ver_B_,,:,[if test m4_if(_ver_A_,,0,_ver_A_) -lt _ver_B_; then
26 $3
27elif test m4_if(_ver_A_,,0,_ver_A_) -eq _ver_B_; then
28am_mu_vercmp(m4_cdr($1),m4_cdr($2),[$3])
29fi
30m4_popdef([_ver_A_])dnl
31m4_popdef([_ver_B_])dnl])])
32
33dnl AM_GNU_MAILUTILS(minversion, link-req, [act-if-found], [ac-if-not-found])
34dnl $1 $2 $3 $4
35dnl Verify if GNU Mailutils is installed and if its version is `minversion'
36dnl or newer. If not installed, execute `ac-if-not-found' or, if it is not
37dnl given, spit out an error message.
38dnl
39dnl If Mailutils is found, set:
40dnl MAILUTILS_CONFIG to the full name of the mailutils-config program;
41dnl MAILUTILS_VERSION to the Mailutils version (string);
42dnl MAILUTILS_VERSION_MAJOR Mailutils version: major number
43dnl MAILUTILS_VERSION_MINOR Mailutils version: minor number
44dnl MAILUTILS_VERSION_PATCH Mailutils version: patchlevel number (or 0,
45dnl if not defined)
46dnl MAILUTILS_LIBS to the list of cc(1) flags needed to link in the
47dnl libraries requested by `link-req';
48dnl MAILUTILS_INCLUDES to the list of cc(1) flags needed to set include
49dnl paths to the Mailutils headers.
50dnl
51dnl Finally, if `act-if-found' is given, execute it. Otherwise, append the
52dnl value of $MAILUTILS_LIBS to LIBS.
53dnl
54AC_DEFUN([AM_GNU_MAILUTILS],
55 [AC_PATH_PROG(MAILUTILS_CONFIG, mailutils-config, none, $PATH)
56 if test "$MAILUTILS_CONFIG" = "none"; then
57 m4_if($4,,[AC_MSG_ERROR(cannot find GNU Mailutils)], [$4])
58 fi
59 AC_SUBST(MAILUTILS_CONFIG)
60 AC_SUBST(MAILUTILS_VERSION)
61 AC_SUBST(MAILUTILS_INCLUDES)
62 AC_SUBST(MAILUTILS_LIBS)
63
64 m4_ifndef([MU_VERSION_PARSE_DEFINED],[[
65mu_version_parse() {
66 set -- `echo "@S|@1" | sed 's/^\([0-9\.][0-9\.]*\).*/\1/;s/\./ /g'`
67 major=@S|@{1:-0}
68 minor=@S|@{2:-0}
69 patch=@S|@{3:-0}
70}]
71 m4_pushdef([MU_VERSION_PARSE_DEFINED])])
72
73 MAILUTILS_VERSION=`$MAILUTILS_CONFIG --info version|sed 's/VERSION=//'`
74 mu_version_parse $MAILUTILS_VERSION
75 AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_MAJOR], $major, [Mailutils version major number])
76 AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_MINOR], $minor, [Mailutils version minor number])
77 AC_DEFINE_UNQUOTED([MAILUTILS_VERSION_PATCH], $patch, [Mailutils version patchlevel number])
78
79 AC_DEFINE_UNQUOTED(MAILUTILS_VERSION, "$MAILUTILS_VERSION", [Mailutils version number])
80 m4_if($1,,,[
81 am_mu_vercmp(m4_quote($major, $minor, $patch),
82 m4_dquote(m4_bpatsubst($1, [\.],[,])),
83 [AC_MSG_ERROR([Mailutils v. $MAILUTILS_VERSION is too old; required is at least ]$1)])
84 ])
85 MAILUTILS_LIBS=`$MAILUTILS_CONFIG --link $2`
86 MAILUTILS_INCLUDES=`$MAILUTILS_CONFIG --compile`
87 m4_if($3,,[LIBS="$LIBS $MAILUTILS_LIBS"], [$3])
88])
89
diff --git a/configure.ac b/configure.ac
index 85dce1a..3e18a57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
15# along with wydawca. If not, see <http://www.gnu.org/licenses/>. 15# along with wydawca. If not, see <http://www.gnu.org/licenses/>.
16 16
17AC_PREREQ(2.63) 17AC_PREREQ(2.63)
18AC_INIT([wydawca], 2.99.90, [bug-wydawca@gnu.org.ua], [wydawca], 18AC_INIT([wydawca], 2.99.91, [bug-wydawca@gnu.org.ua], [wydawca],
19 [http://www.gnu.org.ua/software/wydawca]) 19 [http://www.gnu.org.ua/software/wydawca])
20AC_CONFIG_SRCDIR([src/wydawca.c]) 20AC_CONFIG_SRCDIR([src/wydawca.c])
21AC_CONFIG_AUX_DIR([build-aux]) 21AC_CONFIG_AUX_DIR([build-aux])
@@ -68,7 +68,7 @@ AC_CHECK_FUNCS([fchdir memset strchr strdup strerror strrchr setegid setregid\
68# Mailutils 68# Mailutils
69# ********************** 69# **********************
70 70
71AM_GNU_MAILUTILS(2.0, [mailer], [status_mailutils=yes], [status_mailutils=no]) 71AM_GNU_MAILUTILS(3.3, [mailer], [status_mailutils=yes], [status_mailutils=no])
72AM_CONDITIONAL([COND_MAILUTILS],[test $status_mailutils = yes]) 72AM_CONDITIONAL([COND_MAILUTILS],[test $status_mailutils = yes])
73AC_SUBST(WY_MAILUTILS,[$status_mailutils]) 73AC_SUBST(WY_MAILUTILS,[$status_mailutils])
74 74
diff --git a/tests/.gitignore b/tests/.gitignore
index 1df6b71..461469e 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -10,3 +10,4 @@ wstest
10wsbatch 10wsbatch
11pushck 11pushck
12bkupname 12bkupname
13nullmail
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3f7a491..ebd86ff 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -80,7 +80,7 @@ check-local: atconfig atlocal $(TESTSUITE)
80#installcheck-local: 80#installcheck-local:
81# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin 81# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
82 82
83check_PROGRAMS = wstest wsbatch pushck bkupname 83check_PROGRAMS = wstest wsbatch pushck bkupname
84AM_CPPFLAGS = \ 84AM_CPPFLAGS = \
85 -I$(top_srcdir)/grecs/src\ 85 -I$(top_srcdir)/grecs/src\
86 -I$(top_srcdir)/include\ 86 -I$(top_srcdir)/include\
@@ -90,3 +90,7 @@ LDADD=@GRECS_LDADD@
90pushck_LDADD=../src/pushd.o 90pushck_LDADD=../src/pushd.o
91bkupname_LDADD=../src/backup.o @GRECS_LDADD@ 91bkupname_LDADD=../src/backup.o @GRECS_LDADD@
92 92
93if COND_MAILUTILS
94 check_PROGRAMS += nullmail
95 nullmail_LDADD = @MAILUTILS_LIBS@
96endif
diff --git a/tests/atlocal.in b/tests/atlocal.in
index af69a75..083c968 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -12,6 +12,7 @@ WY_CONFSRC=@abs_top_srcdir@/tests/etc
12WY_DISTDIR=@abs_top_srcdir@/tests/dist 12WY_DISTDIR=@abs_top_srcdir@/tests/dist
13WY_SRC=@abs_top_builddir@/tests/source 13WY_SRC=@abs_top_builddir@/tests/source
14WY_DST=@abs_top_builddir@/tests/dest 14WY_DST=@abs_top_builddir@/tests/dest
15WY_TESTDIR=@abs_top_builddir@/tests
15WY_MAILUTILS=@WY_MAILUTILS@ 16WY_MAILUTILS=@WY_MAILUTILS@
16MKDIR_P="@MKDIR_P@" 17MKDIR_P="@MKDIR_P@"
17 18
@@ -35,6 +36,7 @@ wydawca_expandmeta() {
35 s,@WY_SRC@,$WY_SRC,g; 36 s,@WY_SRC@,$WY_SRC,g;
36 s,@WY_DST@,$WY_DST,g; 37 s,@WY_DST@,$WY_DST,g;
37 s,@WY_CONFSRC@,$WY_CONFSRC,g; 38 s,@WY_CONFSRC@,$WY_CONFSRC,g;
39 s,@WY_TESTDIR@,$WY_TESTDIR,g;
38 s,@WY_MODDIR@,@abs_top_builddir@/modules/mailutils,g" $1 > $2 40 s,@WY_MODDIR@,@abs_top_builddir@/modules/mailutils,g" $1 > $2
39} 41}
40 42
diff --git a/tests/check-notify.at b/tests/check-notify.at
index 65aa8b7..fa5cbeb 100644
--- a/tests/check-notify.at
+++ b/tests/check-notify.at
@@ -43,12 +43,10 @@ wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) fini
43]) 43])
44 44
45AT_DATA([outtmpl], 45AT_DATA([outtmpl],
46[-F wydawca-noreply@localhost @USER@@localhost 46[From wydawca-noreply@localhost
47=========
48From: wydawca-noreply@localhost 47From: wydawca-noreply@localhost
49To: "Wydawca Test User" <@USER@@localhost> 48To: "Wydawca Test User" <@USER@@localhost>
50Subject: file rejected 49Subject: file rejected