Make libmuaux installable shared library.
This commit converts libmuaux into installable shared library that includes selected modules from gnulib. Correspondingly, lubmu_argp is also converted into installable shared library, which is the main purpose of these changes. This should allow other packages which depend on Mailutils to link against libmu_argp even on systems that for some reason choose not to include static libraries in their distribution (vide Debian). Another side effect is that such packages won't need to bother about argp being present on the system, as it is now included in libmuaux.so. * bootstrap.conf: Don't create Makefile.am Build gnulib using libtool and use mu_am_flags custom module * lib/local/modules/mu_am_flags: New file. * configure.ac (MU_APP_LIBRARIES): Use libmu_argp.la (TCPWRAP_LIBRARIES): Add libmutcpwrap.a * lib/Makefile.am: Make libmuaux installable shared library New static library libmutcpwrap.a * libmu_argp/Makefile.am: Make libmu_argp installable shared library * examples/Makefile.am: Use libmu_argp.la * examples/cpp/Makefile.am: Likewise. * imap4d/Makefile.am: Likewise. * mapi/Makefile.am: Likewise. * mh/Makefile.am: Likewise, * pop3d/Makefile.am: Likewise.
Showing
11 changed files
with
43 additions
and
33 deletions
1 | # Bootstrap configuration for GNU Mailutils. | 1 | # Bootstrap configuration for GNU Mailutils. -*- shell-script -*- |
2 | # | 2 | # |
3 | # Copyright (C) 2006-2012, 2014-2015 Free Software Foundation, Inc. | 3 | # Copyright (C) 2006-2012, 2014-2015 Free Software Foundation, Inc. |
4 | # | 4 | # |
... | @@ -16,18 +16,11 @@ | ... | @@ -16,18 +16,11 @@ |
16 | # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. | 16 | # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
18 | test -d lib/gnu || mkdir lib/gnu | 18 | test -d lib/gnu || mkdir lib/gnu |
19 | test -f lib/gnu/Makefile.am || cat > lib/gnu/Makefile.am <<EOT | ||
20 | # THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. | ||
21 | include gnulib.mk | ||
22 | AM_CPPFLAGS += @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib/gnu -I${top_builddir}/lib/gnu | ||
23 | # Local Variables: | ||
24 | # buffer-read-only: t | ||
25 | # End: | ||
26 | # vi: set ro: | ||
27 | EOT | ||
28 | 19 | ||
29 | gnulib_name=libgnu | 20 | gnulib_name=libgnu |
21 | gnulib_mk=Makefile.am | ||
30 | source_base=lib/gnu | 22 | source_base=lib/gnu |
23 | gnulib_tool_option_extras="--libtool --local-dir=lib/local" | ||
31 | 24 | ||
32 | # We don't need these modules, even though gnulib-tool mistakenly | 25 | # We don't need these modules, even though gnulib-tool mistakenly |
33 | # includes them because of gettext dependencies. | 26 | # includes them because of gettext dependencies. |
... | @@ -37,6 +30,7 @@ avoided_gnulib_modules=' | ... | @@ -37,6 +30,7 @@ avoided_gnulib_modules=' |
37 | 30 | ||
38 | # gnulib modules used by this package. | 31 | # gnulib modules used by this package. |
39 | gnulib_modules="$avoided_gnulib_modules | 32 | gnulib_modules="$avoided_gnulib_modules |
33 | mu_am_flags | ||
40 | `grep '^[^#]' gnulib.modules` | 34 | `grep '^[^#]' gnulib.modules` |
41 | " | 35 | " |
42 | 36 | ... | ... |
... | @@ -56,7 +56,7 @@ AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux') | ... | @@ -56,7 +56,7 @@ AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux') |
56 | AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)') | 56 | AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)') |
57 | 57 | ||
58 | AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)') | 58 | AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)') |
59 | AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a ../libmu_cfg/libmu_cfg.la ../lib/libmuaux.a') | 59 | AC_SUBST(MU_APP_LIBRARIES,'${top_builddir}/libmu_argp/libmu_argp.la ${top_builddir}/libmu_cfg/libmu_cfg.la') |
60 | 60 | ||
61 | # There are two sets of include directories: MU_LIB_COMMON_INCLUDES, used | 61 | # There are two sets of include directories: MU_LIB_COMMON_INCLUDES, used |
62 | # by the libraries, and MU_APP_COMMON_INCLUDES, which is used by applications. | 62 | # by the libraries, and MU_APP_COMMON_INCLUDES, which is used by applications. |
... | @@ -220,7 +220,7 @@ esac | ... | @@ -220,7 +220,7 @@ esac |
220 | LIBS=$saved_LIBS | 220 | LIBS=$saved_LIBS |
221 | 221 | ||
222 | if test "$status_tcpwrap" = "yes"; then | 222 | if test "$status_tcpwrap" = "yes"; then |
223 | AC_SUBST(TCPWRAP_LIBRARIES, "$TCPWRAP_LIBRARIES -lwrap") | 223 | AC_SUBST(TCPWRAP_LIBRARIES, "\${top_builddir}/lib/libmutcpwrap.a $TCPWRAP_LIBRARIES -lwrap") |
224 | AC_DEFINE_UNQUOTED(WITH_LIBWRAP, 1, | 224 | AC_DEFINE_UNQUOTED(WITH_LIBWRAP, 1, |
225 | [Define to 1 to use tcp wrappers.]) | 225 | [Define to 1 to use tcp wrappers.]) |
226 | fi | 226 | fi |
... | @@ -1157,7 +1157,6 @@ GINT_INIT([gint],[1.8 with-guile], | ... | @@ -1157,7 +1157,6 @@ GINT_INIT([gint],[1.8 with-guile], |
1157 | LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR} ${MU_LIB_MAILER}' | 1157 | LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR} ${MU_LIB_MAILER}' |
1158 | MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/$(PACKAGE)/sieve-modules' | 1158 | MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/$(PACKAGE)/sieve-modules' |
1159 | GINT_INCLUDES='${MU_APP_COMMON_INCLUDES}' | 1159 | GINT_INCLUDES='${MU_APP_COMMON_INCLUDES}' |
1160 | GINT_LDADD=../lib/libmuaux.a | ||
1161 | ],[useguile=no]) | 1160 | ],[useguile=no]) |
1162 | 1161 | ||
1163 | AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"]) | 1162 | AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"]) | ... | ... |
... | @@ -59,7 +59,7 @@ mod_LTLIBRARIES = numaddr.la | ... | @@ -59,7 +59,7 @@ mod_LTLIBRARIES = numaddr.la |
59 | AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@ | 59 | AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@ |
60 | 60 | ||
61 | LDADD = \ | 61 | LDADD = \ |
62 | ../lib/libmuaux.a\ | 62 | ../lib/libmuaux.la\ |
63 | ${MU_LIB_MAILUTILS}\ | 63 | ${MU_LIB_MAILUTILS}\ |
64 | @MU_COMMON_LIBRARIES@ | 64 | @MU_COMMON_LIBRARIES@ |
65 | 65 | ||
... | @@ -68,20 +68,20 @@ numaddr_la_LIBADD = ${MU_LIB_SIEVE} | ... | @@ -68,20 +68,20 @@ numaddr_la_LIBADD = ${MU_LIB_SIEVE} |
68 | numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)' | 68 | numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)' |
69 | 69 | ||
70 | msg_send_LDADD =\ | 70 | msg_send_LDADD =\ |
71 | ../lib/libmuaux.a\ | 71 | ../lib/libmuaux.la\ |
72 | ${MU_LIB_MAILER}\ | 72 | ${MU_LIB_MAILER}\ |
73 | @MU_AUTHLIBS@\ | 73 | @MU_AUTHLIBS@\ |
74 | ${MU_LIB_MAILUTILS} | 74 | ${MU_LIB_MAILUTILS} |
75 | 75 | ||
76 | mta_CPPFLAGS=@MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib -I${top_builddir}/lib | 76 | mta_CPPFLAGS=@MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib -I${top_builddir}/lib |
77 | mta_LDADD =\ | 77 | mta_LDADD =\ |
78 | ../lib/libmuaux.a\ | 78 | ../lib/libmuaux.la\ |
79 | ${MU_LIB_MBOX}\ | 79 | ${MU_LIB_MBOX}\ |
80 | ${MU_LIB_MAILER}\ | 80 | ${MU_LIB_MAILER}\ |
81 | ${MU_LIB_MAILUTILS} | 81 | ${MU_LIB_MAILUTILS} |
82 | 82 | ||
83 | sfrom_LDADD =\ | 83 | sfrom_LDADD =\ |
84 | ../lib/libmuaux.a\ | 84 | ../lib/libmuaux.la\ |
85 | ${MU_LIB_MBOX}\ | 85 | ${MU_LIB_MBOX}\ |
86 | ${MU_LIB_IMAP}\ | 86 | ${MU_LIB_IMAP}\ |
87 | ${MU_LIB_POP}\ | 87 | ${MU_LIB_POP}\ |
... | @@ -93,7 +93,7 @@ sfrom_LDADD =\ | ... | @@ -93,7 +93,7 @@ sfrom_LDADD =\ |
93 | ${MU_LIB_MAILUTILS} | 93 | ${MU_LIB_MAILUTILS} |
94 | 94 | ||
95 | nntpclient_LDADD = \ | 95 | nntpclient_LDADD = \ |
96 | ../lib/libmuaux.a\ | 96 | ../lib/libmuaux.la\ |
97 | ${MU_LIB_NNTP}\ | 97 | ${MU_LIB_NNTP}\ |
98 | ${MU_LIB_AUTH}\ | 98 | ${MU_LIB_AUTH}\ |
99 | @MU_AUTHLIBS@\ | 99 | @MU_AUTHLIBS@\ |
... | @@ -125,7 +125,7 @@ muemail_LDADD = \ | ... | @@ -125,7 +125,7 @@ muemail_LDADD = \ |
125 | 125 | ||
126 | mboxidx_CPPFLAGS = @MU_APP_COMMON_INCLUDES@ | 126 | mboxidx_CPPFLAGS = @MU_APP_COMMON_INCLUDES@ |
127 | mboxidx_LDADD=\ | 127 | mboxidx_LDADD=\ |
128 | ../lib/libmuaux.a\ | 128 | ../lib/libmuaux.la\ |
129 | ${MU_LIB_MBOX}\ | 129 | ${MU_LIB_MBOX}\ |
130 | ${MU_LIB_IMAP}\ | 130 | ${MU_LIB_IMAP}\ |
131 | ${MU_LIB_POP}\ | 131 | ${MU_LIB_POP}\ | ... | ... |
... | @@ -34,7 +34,7 @@ noinst_PROGRAMS = @MU_CXX_EXAMPLES_BUILD@ | ... | @@ -34,7 +34,7 @@ noinst_PROGRAMS = @MU_CXX_EXAMPLES_BUILD@ |
34 | AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@ | 34 | AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@ |
35 | 35 | ||
36 | AM_LDFLAGS = \ | 36 | AM_LDFLAGS = \ |
37 | ../../lib/libmuaux.a\ | 37 | ../../lib/libmuaux.la\ |
38 | ../../libmu_cpp/libmu_cpp.la\ | 38 | ../../libmu_cpp/libmu_cpp.la\ |
39 | ${MU_LIB_MAILUTILS}\ | 39 | ${MU_LIB_MAILUTILS}\ |
40 | @MU_COMMON_LIBRARIES@ | 40 | @MU_COMMON_LIBRARIES@ |
... | @@ -52,7 +52,7 @@ sfrom_SOURCES = sfrom.cc | ... | @@ -52,7 +52,7 @@ sfrom_SOURCES = sfrom.cc |
52 | url_parse_SOURCES = url-parse.cc | 52 | url_parse_SOURCES = url-parse.cc |
53 | 53 | ||
54 | LDADD =\ | 54 | LDADD =\ |
55 | ../../lib/libmuaux.a\ | 55 | ../../lib/libmuaux.la\ |
56 | ../../libmu_cpp/libmu_cpp.la\ | 56 | ../../libmu_cpp/libmu_cpp.la\ |
57 | ${MU_LIB_MBOX}\ | 57 | ${MU_LIB_MBOX}\ |
58 | ${MU_LIB_IMAP}\ | 58 | ${MU_LIB_IMAP}\ | ... | ... |
... | @@ -87,6 +87,6 @@ imap4d_LDADD = \ | ... | @@ -87,6 +87,6 @@ imap4d_LDADD = \ |
87 | ## Think about better approach --gray | 87 | ## Think about better approach --gray |
88 | imap4d_DEPENDENCIES = \ | 88 | imap4d_DEPENDENCIES = \ |
89 | @MU_AUTHLIBS_DEPENDENCY@\ | 89 | @MU_AUTHLIBS_DEPENDENCY@\ |
90 | ../lib/libmuaux.a\ | 90 | ../lib/libmuaux.la\ |
91 | ${MU_LIB_MBOX}\ | 91 | ${MU_LIB_MBOX}\ |
92 | ${MU_LIB_MAILUTILS} | 92 | ${MU_LIB_MAILUTILS} | ... | ... |
... | @@ -24,19 +24,21 @@ AM_CPPFLAGS = \ | ... | @@ -24,19 +24,21 @@ AM_CPPFLAGS = \ |
24 | @GUILE_INCLUDES@\ | 24 | @GUILE_INCLUDES@\ |
25 | @PYTHON_INCLUDES@ | 25 | @PYTHON_INCLUDES@ |
26 | 26 | ||
27 | noinst_LIBRARIES = libmuaux.a libmuscript.a | 27 | lib_LTLIBRARIES = libmuaux.la |
28 | libmuaux_a_SOURCES = \ | 28 | noinst_LIBRARIES = libmuscript.a libmutcpwrap.a |
29 | |||
30 | libmuaux_la_SOURCES = \ | ||
29 | argp_base.c\ | 31 | argp_base.c\ |
30 | daemon.c\ | 32 | daemon.c\ |
31 | mailcap.c\ | 33 | mailcap.c\ |
32 | manlock.c\ | 34 | manlock.c\ |
33 | signal.c\ | 35 | signal.c\ |
34 | strexit.c\ | 36 | strexit.c\ |
35 | tcpwrap.c\ | ||
36 | mu_umaxtostr.c\ | 37 | mu_umaxtostr.c\ |
37 | mu_umaxtostr.h | 38 | mu_umaxtostr.h |
38 | libmuaux_a_LIBADD=gnu/*.o | 39 | libmuaux_la_LIBADD=gnu/libgnu.la |
39 | #libmuaux_a_LIBADD=`$(AR) t gnu/libgnu.a | sed s.^.gnu/.` | 40 | |
41 | libmutcpwrap_a_SOURCES = tcpwrap.c | ||
40 | 42 | ||
41 | noinst_HEADERS =\ | 43 | noinst_HEADERS =\ |
42 | mailcap.h\ | 44 | mailcap.h\ | ... | ... |
lib/local/modules/mu_am_flags
0 → 100644
... | @@ -23,9 +23,9 @@ AM_CPPFLAGS = \ | ... | @@ -23,9 +23,9 @@ AM_CPPFLAGS = \ |
23 | -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"\ | 23 | -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"\ |
24 | -DSITE_CRAM_MD5_PWD=\"@SITE_CRAM_MD5_PWD@\" | 24 | -DSITE_CRAM_MD5_PWD=\"@SITE_CRAM_MD5_PWD@\" |
25 | 25 | ||
26 | lib_LIBRARIES = libmu_argp.a | 26 | lib_LTLIBRARIES = libmu_argp.la |
27 | 27 | ||
28 | libmu_argp_a_SOURCES =\ | 28 | libmu_argp_la_SOURCES =\ |
29 | cmdline.c\ | 29 | cmdline.c\ |
30 | cmdline.h\ | 30 | cmdline.h\ |
31 | common.c\ | 31 | common.c\ |
... | @@ -33,3 +33,4 @@ libmu_argp_a_SOURCES =\ | ... | @@ -33,3 +33,4 @@ libmu_argp_a_SOURCES =\ |
33 | muinit.c\ | 33 | muinit.c\ |
34 | sieve.c | 34 | sieve.c |
35 | 35 | ||
36 | libmu_argp_la_LDFLAGS=-L${top_builddir}/lib -lmuaux | ... | ... |
... | @@ -24,7 +24,7 @@ lib_LTLIBRARIES = libmapi.la | ... | @@ -24,7 +24,7 @@ lib_LTLIBRARIES = libmapi.la |
24 | /* FIXME: This should be part of the default includes. */ | 24 | /* FIXME: This should be part of the default includes. */ |
25 | EXTRA_DIST = mapi.h | 25 | EXTRA_DIST = mapi.h |
26 | 26 | ||
27 | libmapi_LDADD = ../lib/libmuaux.a ${MU_LIB_MAILUTILS} | 27 | libmapi_LDADD = ../lib/libmuaux.la ${MU_LIB_MAILUTILS} |
28 | 28 | ||
29 | libmapi_la_SOURCES = \ | 29 | libmapi_la_SOURCES = \ |
30 | MAPIAddress.c \ | 30 | MAPIAddress.c \ | ... | ... |
... | @@ -106,7 +106,7 @@ AM_CPPFLAGS =\ | ... | @@ -106,7 +106,7 @@ AM_CPPFLAGS =\ |
106 | 106 | ||
107 | mh_LIBS = \ | 107 | mh_LIBS = \ |
108 | ./libmh.a\ | 108 | ./libmh.a\ |
109 | ../lib/libmuaux.a\ | 109 | ../lib/libmuaux.la\ |
110 | ${MU_LIB_MBOX}\ | 110 | ${MU_LIB_MBOX}\ |
111 | ${MU_LIB_IMAP}\ | 111 | ${MU_LIB_IMAP}\ |
112 | ${MU_LIB_POP}\ | 112 | ${MU_LIB_POP}\ |
... | @@ -127,7 +127,7 @@ AM_YFLAGS=-vt | ... | @@ -127,7 +127,7 @@ AM_YFLAGS=-vt |
127 | 127 | ||
128 | inc_LDADD = \ | 128 | inc_LDADD = \ |
129 | ./libmh.a\ | 129 | ./libmh.a\ |
130 | ../lib/libmuaux.a\ | 130 | ../lib/libmuaux.la\ |
131 | ../lib/libmuscript.a\ | 131 | ../lib/libmuscript.a\ |
132 | @LIBMU_SCM@ @GUILE_LIBS@\ | 132 | @LIBMU_SCM@ @GUILE_LIBS@\ |
133 | @LIBMU_SCM_DEPS@\ | 133 | @LIBMU_SCM_DEPS@\ | ... | ... |
... | @@ -73,7 +73,7 @@ popauth_LDADD = \ | ... | @@ -73,7 +73,7 @@ popauth_LDADD = \ |
73 | 73 | ||
74 | pop3d_DEPENDENCIES = \ | 74 | pop3d_DEPENDENCIES = \ |
75 | @MU_AUTHLIBS_DEPENDENCY@ \ | 75 | @MU_AUTHLIBS_DEPENDENCY@ \ |
76 | ../lib/libmuaux.a \ | 76 | ../lib/libmuaux.la \ |
77 | ${MU_LIB_MBOX}\ | 77 | ${MU_LIB_MBOX}\ |
78 | ${MU_LIB_MH}\ | 78 | ${MU_LIB_MH}\ |
79 | ${MU_LIB_MAILDIR}\ | 79 | ${MU_LIB_MAILDIR}\ | ... | ... |
-
Please register or sign in to post a comment