From 8bb216676b4f9cc0392c443575b5e8f3138ea559 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Fri, 12 Dec 2008 20:44:09 -0500 Subject: [PATCH] Make libassuan a convenience library to fix libtool complaining about portability issues. --- Makefile.am | 4 ++-- assuan/Makefile.am | 16 ++++++++-------- assuan/configure.ac | 6 +++++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 30983216..f9167565 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ libpwmd_la_LDFLAGS = -version-info @VER_MAJOR@:@VER_PATCH@:@VER_COMPAT@ \ @GPG_ERROR_LIBS@ @LIBGNUTLS_LIBS@ libpwmd_la_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\" @GPG_ERROR_CFLAGS@ \ @LIBGNUTLS_CFLAGS@ -libpwmd_la_LIBADD = ${srcdir}/assuan/libassuan.a +libpwmd_la_LIBADD = ${srcdir}/assuan/libassuan.la if WITH_LIBPTH lib_LTLIBRARIES += libpwmd-pth.la @@ -24,7 +24,7 @@ libpwmd_pth_la_LDFLAGS = -version-info @VER_MAJOR@:@VER_PATCH@:@VER_COMPAT@ \ libpwmd_pth_la_CFLAGS = -DLOCALEDIR=\"${prefix}/share/locale\" \ @GPG_ERROR_CFLAGS@ @PTH_CFLAGS@ \ -DWITH_LIBPTH @LIBGNUTLS_CFLAGS@ -libpwmd_pth_la_LIBADD = ${srcdir}/assuan/libassuan-pth.a +libpwmd_pth_la_LIBADD = ${srcdir}/assuan/libassuan-pth.la endif if WITH_TCP diff --git a/assuan/Makefile.am b/assuan/Makefile.am index 9d645788..278d8790 100644 --- a/assuan/Makefile.am +++ b/assuan/Makefile.am @@ -22,7 +22,7 @@ BUILT_SOURCES = assuan-errors.c MOSTLYCLEANFILES = assuan-errors.c if HAVE_PTH -libassuan_pth = libassuan-pth.a +libassuan_pth = libassuan-pth.la else libassuan_pth = endif @@ -44,15 +44,15 @@ common_sources = \ assuan-listen.c \ assuan-socket.c -noinst_LIBRARIES = libassuan.a $(libassuan_pth) -libassuan_a_SOURCES = $(common_sources) assuan-io.c -libassuan_a_CFLAGS = $(AM_CFLAGS) -libassuan_a_LIBADD = @LIBOBJS@ +noinst_LTLIBRARIES = libassuan.la $(libassuan_pth) +libassuan_la_SOURCES = $(common_sources) assuan-io.c +libassuan_la_CFLAGS = $(AM_CFLAGS) +libassuan_la_LIBADD = @LTLIBOBJS@ if HAVE_PTH -libassuan_pth_a_SOURCES = $(common_sources) assuan-io-pth.c -libassuan_pth_a_CFLAGS = $(AM_CFLAGS) $(PTH_CFLAGS) -libassuan_pth_a_LIBADD = @LIBOBJS@ +libassuan_pth_la_SOURCES = $(common_sources) assuan-io-pth.c +libassuan_pth_la_CFLAGS = $(AM_CFLAGS) $(PTH_CFLAGS) +libassuan_pth_la_LIBADD = @LTLIBOBJS@ endif assuan-errors.c : assuan.h mkerrors diff --git a/assuan/configure.ac b/assuan/configure.ac index ac4be32a..719d79de 100644 --- a/assuan/configure.ac +++ b/assuan/configure.ac @@ -219,7 +219,7 @@ if test $ac_cv_func_funopen != yes; then # No funopen but we can implement that in terms of fopencookie. AC_CHECK_FUNCS(fopencookie) if test $ac_cv_func_fopencookie = yes; then - AC_LIBOBJ(funopen) + LIBOBJS="$LIBOBJS funopen" else AC_MSG_WARN([ *** @@ -264,4 +264,8 @@ fi # Create the config files. AC_CONFIG_FILES([Makefile]) +Xsed="sed -e s/^X//" +LTLIBOBJS=`echo X"$LIBOBJS"| [$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]` +AC_SUBST(LTLIBOBJS) + AC_OUTPUT -- 2.11.4.GIT