Commit e2201397 e2201397391e6db8145935bcb4371adf8f12d7d1 by Sergey Poznyakoff

* config/mailutils.m4: New file

* config/Makefile.am: Install mailutils.m4 to $(datadir)/aclocal
1 parent 652afe9a
1 2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua> 1 2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
2 2
3 * config/mailutils.m4: New file
4 * config/Makefile.am: Install mailutils.m4 to $(datadir)/aclocal
5
3 * configure.ac (VI_CURRENT): Raise to 3; 6 * configure.ac (VI_CURRENT): Raise to 3;
4 (MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a 7 (MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a
5 * NEWS: Update. 8 * NEWS: Update.
......
...@@ -35,3 +35,6 @@ mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" \ ...@@ -35,3 +35,6 @@ mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" \
35 -DAUTHLIBS="\"$(MU_AUTHLIBS)\"" \ 35 -DAUTHLIBS="\"$(MU_AUTHLIBS)\"" \
36 -DGUILE_LIBS="\"$(GUILE_LIBS)\"" \ 36 -DGUILE_LIBS="\"$(GUILE_LIBS)\"" \
37 -DI18NLIBS="\"$(LIBINTL)\"" 37 -DI18NLIBS="\"$(LIBINTL)\""
38
39 m4datadir = $(datadir)/aclocal
40 dist_m4data_DATA = mailutils.m4
......
1 dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
2 dnl
3 dnl GNU Mailutils is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU General Public License as
5 dnl published by the Free Software Foundation; either version 3, or (at
6 dnl your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful, but
9 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 dnl AM_GNU_MAILUTILS(minversion, link-req, [act-if-found], [ac-if-not-found])
17 dnl $1 $2 $3 $4
18 dnl Verify if GNU Mailutils is installed and if its version is `minversion'
19 dnl or newer. If not installed, execute `ac-if-not-found' or, if it is not
20 dnl given, spit out an error message.
21 dnl
22 dnl If Mailutils is found, set:
23 dnl MAILUTILS_CONFIG to the full name of the mailutils-config program;
24 dnl MAILUTILS_VERSION to the Mailutils version (string);
25 dnl MAILUTILS_VERSION_NUMBER to the packed numeric representation of the
26 dnl GNU Mailutils version (major * 1000 + minor * 100 + patch);
27 dnl MAILUTILS_LIBS to the list of cc(1) flags needed to link in the
28 dnl libraries requested by `link-req';
29 dnl MAILUTILS_INCLUDES to the list of cc(1) flags needed to set include
30 dnl paths to the Mailutils headers.
31 dnl
32 dnl Finally, if `act-if-found' is given, execute it. Otherwise, append the
33 dnl value of $MAILUTILS_LIBS to LIBS.
34 dnl
35 AC_DEFUN([AM_GNU_MAILUTILS],
36 [AC_PATH_PROG(MAILUTILS_CONFIG, mailutils-config, none, $PATH)
37 if test "$MAILUTILS_CONFIG" = "none"; then
38 ifelse($4,,[AC_MSG_ERROR(cannot find GNU Mailutils)], [$4])
39 fi
40 AC_SUBST(MAILUTILS_CONFIG)
41 AC_SUBST(MAILUTILS_VERSION)
42 AC_SUBST(MAILUTILS_INCLUDES)
43 AC_SUBST(MAILUTILS_LIBS)
44 MAILUTILS_VERSION=`$MAILUTILS_CONFIG --info version|sed 's/VERSION=//'`
45 VEX=`echo $MAILUTILS_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'`
46 MAILUTILS_VERSION_NUMBER=`eval expr "$VEX"`
47 AC_SUBST(MAILUTILS_VERSION_NUMBER)
48 AC_DEFINE_UNQUOTED(MAILUTILS_VERSION, "$MAILUTILS_VERSION", [Mailutils version number])
49 AC_DEFINE_UNQUOTED(MAILUTILS_VERSION_NUMBER, $MAILUTILS_VERSION_NUMBER,
50 [Packed Mailutils version number])
51 ifelse($1,,,[
52 VEX=`echo $1 | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'`
53 min=`eval expr "$VEX"`
54 if test $MAILUTILS_VERSION_NUMBER -lt $min; then
55 AC_MSG_ERROR([Mailutils version too old; required is at least ]$1)
56 fi])
57 req=""
58 for x in $2
59 do
60 case $x in
61 mailer) test $MAILUTILS_VERSION_NUMBER -ge 1200 && req="$req $x";;
62 cfg|argp) test $MAILUTILS_VERSION_NUMBER -ge 1290 && req="$req $x";;
63 *) req="$req $x"
64 esac
65 done
66 MAILUTILS_LIBS=`$MAILUTILS_CONFIG --link $req`
67 MAILUTILS_INCLUDES=`$MAILUTILS_CONFIG --compile`
68 ifelse($3,,[LIBS="$LIBS $MAILUTILS_LIBS"], [$3])
69 ])
70