Commit a41e62b9 a41e62b9eb33c46ec0897c6c956057d8b797883d by Sergey Poznyakoff

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.
1 parent f572e5ac
# Bootstrap configuration for GNU Mailutils.
# Bootstrap configuration for GNU Mailutils. -*- shell-script -*-
#
# Copyright (C) 2006-2012, 2014-2015 Free Software Foundation, Inc.
#
......@@ -16,18 +16,11 @@
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
test -d lib/gnu || mkdir lib/gnu
test -f lib/gnu/Makefile.am || cat > lib/gnu/Makefile.am <<EOT
# THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT.
include gnulib.mk
AM_CPPFLAGS += @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib/gnu -I${top_builddir}/lib/gnu
# Local Variables:
# buffer-read-only: t
# End:
# vi: set ro:
EOT
gnulib_name=libgnu
gnulib_mk=Makefile.am
source_base=lib/gnu
gnulib_tool_option_extras="--libtool --local-dir=lib/local"
# We don't need these modules, even though gnulib-tool mistakenly
# includes them because of gettext dependencies.
......@@ -37,6 +30,7 @@ avoided_gnulib_modules='
# gnulib modules used by this package.
gnulib_modules="$avoided_gnulib_modules
mu_am_flags
`grep '^[^#]' gnulib.modules`
"
......
......@@ -56,7 +56,7 @@ AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux')
AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)')
AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)')
AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a ../libmu_cfg/libmu_cfg.la ../lib/libmuaux.a')
AC_SUBST(MU_APP_LIBRARIES,'${top_builddir}/libmu_argp/libmu_argp.la ${top_builddir}/libmu_cfg/libmu_cfg.la')
# There are two sets of include directories: MU_LIB_COMMON_INCLUDES, used
# by the libraries, and MU_APP_COMMON_INCLUDES, which is used by applications.
......@@ -220,7 +220,7 @@ esac
LIBS=$saved_LIBS
if test "$status_tcpwrap" = "yes"; then
AC_SUBST(TCPWRAP_LIBRARIES, "$TCPWRAP_LIBRARIES -lwrap")
AC_SUBST(TCPWRAP_LIBRARIES, "\${top_builddir}/lib/libmutcpwrap.a $TCPWRAP_LIBRARIES -lwrap")
AC_DEFINE_UNQUOTED(WITH_LIBWRAP, 1,
[Define to 1 to use tcp wrappers.])
fi
......@@ -1157,7 +1157,6 @@ GINT_INIT([gint],[1.8 with-guile],
LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR} ${MU_LIB_MAILER}'
MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/$(PACKAGE)/sieve-modules'
GINT_INCLUDES='${MU_APP_COMMON_INCLUDES}'
GINT_LDADD=../lib/libmuaux.a
],[useguile=no])
AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"])
......
......@@ -59,7 +59,7 @@ mod_LTLIBRARIES = numaddr.la
AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@
LDADD = \
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MAILUTILS}\
@MU_COMMON_LIBRARIES@
......@@ -68,20 +68,20 @@ numaddr_la_LIBADD = ${MU_LIB_SIEVE}
numaddr_la_LDFLAGS = -module -avoid-version -no-undefined -rpath '$(moddir)'
msg_send_LDADD =\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MAILER}\
@MU_AUTHLIBS@\
${MU_LIB_MAILUTILS}
mta_CPPFLAGS=@MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib -I${top_builddir}/lib
mta_LDADD =\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_MAILER}\
${MU_LIB_MAILUTILS}
sfrom_LDADD =\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
${MU_LIB_POP}\
......@@ -93,7 +93,7 @@ sfrom_LDADD =\
${MU_LIB_MAILUTILS}
nntpclient_LDADD = \
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_NNTP}\
${MU_LIB_AUTH}\
@MU_AUTHLIBS@\
......@@ -125,7 +125,7 @@ muemail_LDADD = \
mboxidx_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
mboxidx_LDADD=\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
${MU_LIB_POP}\
......
......@@ -34,7 +34,7 @@ noinst_PROGRAMS = @MU_CXX_EXAMPLES_BUILD@
AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@
AM_LDFLAGS = \
../../lib/libmuaux.a\
../../lib/libmuaux.la\
../../libmu_cpp/libmu_cpp.la\
${MU_LIB_MAILUTILS}\
@MU_COMMON_LIBRARIES@
......@@ -52,7 +52,7 @@ sfrom_SOURCES = sfrom.cc
url_parse_SOURCES = url-parse.cc
LDADD =\
../../lib/libmuaux.a\
../../lib/libmuaux.la\
../../libmu_cpp/libmu_cpp.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
......
......@@ -87,6 +87,6 @@ imap4d_LDADD = \
## Think about better approach --gray
imap4d_DEPENDENCIES = \
@MU_AUTHLIBS_DEPENDENCY@\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_MAILUTILS}
......
......@@ -24,19 +24,21 @@ AM_CPPFLAGS = \
@GUILE_INCLUDES@\
@PYTHON_INCLUDES@
noinst_LIBRARIES = libmuaux.a libmuscript.a
libmuaux_a_SOURCES = \
lib_LTLIBRARIES = libmuaux.la
noinst_LIBRARIES = libmuscript.a libmutcpwrap.a
libmuaux_la_SOURCES = \
argp_base.c\
daemon.c\
mailcap.c\
manlock.c\
signal.c\
strexit.c\
tcpwrap.c\
mu_umaxtostr.c\
mu_umaxtostr.h
libmuaux_a_LIBADD=gnu/*.o
#libmuaux_a_LIBADD=`$(AR) t gnu/libgnu.a | sed s.^.gnu/.`
libmuaux_la_LIBADD=gnu/libgnu.la
libmutcpwrap_a_SOURCES = tcpwrap.c
noinst_HEADERS =\
mailcap.h\
......
Description:
This file provides additional Makefile statements for building gnulib as part
of libmuaux.
Files:
Makefile.am:
AM_CPPFLAGS += @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/lib/gnu -I${top_builddir}/lib/gnu
License:
LGPL
Maintainer:
Sergey Poznyakoff
......@@ -23,9 +23,9 @@ AM_CPPFLAGS = \
-DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"\
-DSITE_CRAM_MD5_PWD=\"@SITE_CRAM_MD5_PWD@\"
lib_LIBRARIES = libmu_argp.a
lib_LTLIBRARIES = libmu_argp.la
libmu_argp_a_SOURCES =\
libmu_argp_la_SOURCES =\
cmdline.c\
cmdline.h\
common.c\
......@@ -33,3 +33,4 @@ libmu_argp_a_SOURCES =\
muinit.c\
sieve.c
libmu_argp_la_LDFLAGS=-L${top_builddir}/lib -lmuaux
......
......@@ -24,7 +24,7 @@ lib_LTLIBRARIES = libmapi.la
/* FIXME: This should be part of the default includes. */
EXTRA_DIST = mapi.h
libmapi_LDADD = ../lib/libmuaux.a ${MU_LIB_MAILUTILS}
libmapi_LDADD = ../lib/libmuaux.la ${MU_LIB_MAILUTILS}
libmapi_la_SOURCES = \
MAPIAddress.c \
......
......@@ -106,7 +106,7 @@ AM_CPPFLAGS =\
mh_LIBS = \
./libmh.a\
../lib/libmuaux.a\
../lib/libmuaux.la\
${MU_LIB_MBOX}\
${MU_LIB_IMAP}\
${MU_LIB_POP}\
......@@ -127,7 +127,7 @@ AM_YFLAGS=-vt
inc_LDADD = \
./libmh.a\
../lib/libmuaux.a\
../lib/libmuaux.la\
../lib/libmuscript.a\
@LIBMU_SCM@ @GUILE_LIBS@\
@LIBMU_SCM_DEPS@\
......
......@@ -73,7 +73,7 @@ popauth_LDADD = \
pop3d_DEPENDENCIES = \
@MU_AUTHLIBS_DEPENDENCY@ \
../lib/libmuaux.a \
../lib/libmuaux.la \
${MU_LIB_MBOX}\
${MU_LIB_MH}\
${MU_LIB_MAILDIR}\
......