aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2005-10-20 13:05:04 +0000
committerMarcus Brinkmann <[email protected]>2005-10-20 13:05:04 +0000
commit4cfced2ce8dff0602518dbe64804bb8aaac3e12a (patch)
treed7d94e50c3d0a70063b0913af90314b9cdd40363
parentAdd a test for expired subkeys (diff)
downloadgpgme-4cfced2ce8dff0602518dbe64804bb8aaac3e12a.tar.gz
gpgme-4cfced2ce8dff0602518dbe64804bb8aaac3e12a.zip
2005-10-20 Marcus Brinkmann <[email protected]>
* configure.ac: Instead checking for windres and dlltool, invoke AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies the rules.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac5
-rw-r--r--gpgme/Makefile.am69
3 files changed, 47 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index d7fa95df..0314602e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-20 Marcus Brinkmann <[email protected]>
+
+ * configure.ac: Instead checking for windres and dlltool, invoke
+ AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC.
+ * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies
+ the rules.
+
2005-10-01 Marcus Brinkmann <[email protected]>
Released 1.1.0.
diff --git a/configure.ac b/configure.ac
index 9288b260..831ca31d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,9 +69,6 @@ AH_VERBATIM([_REENTRANT],
#endif])
AC_PROG_CC
-AC_CHECK_TOOL(DLLTOOL, dlltool, :)
-AC_CHECK_TOOL(WINDRES, windres, :)
-
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
@@ -88,6 +85,8 @@ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
# Don't default to build static libs.
AC_DISABLE_STATIC
+AC_LIBTOOL_WIN32_DLL
+AC_LIBTOOL_RC
AC_PROG_LIBTOOL
# For now we hardcode the use of version scripts. It would be better
diff --git a/gpgme/Makefile.am b/gpgme/Makefile.am
index ef12d460..94b46aa6 100644
--- a/gpgme/Makefile.am
+++ b/gpgme/Makefile.am
@@ -89,7 +89,41 @@ libgpgme_pth_la_SOURCES = ath.h ath-pth.c
AM_CPPFLAGS = $(assuan_cppflags) @GPG_ERROR_CFLAGS@
-libgpgme_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \
+
+if HAVE_W32_SYSTEM
+
+LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
+ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
+ sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+
+%.o : %.rc
+ $(LTRCCOMPILE) -i $< -o $@
+
+gpgme_res = versioninfo.o
+gpgme_res_ldflag = -Wl,$(gpgme_res)
+no_undefined = -no-undefined
+export_symbols = -export-symbols $(srcdir)/gpgme.def
+
+install-def-file:
+ $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpgme.def
+
+uninstall-def-file:
+ -rm $(DESTDIR)$(libdir)/gpgme.def
+
+libgpgme_la_DEPENDENCIES = $(gpgme_res) gpgme.def
+
+else
+gpgme_res =
+gpgme_res_ldflag =
+no_undefined =
+export_symbols =
+install-def-file:
+uninstall-def-file:
+
+endif
+
+libgpgme_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) $(export_symbols) \
+ $(libgpgme_version_script_cmd) -version-info \
@LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
libgpgme_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \
@LTLIBOBJS@ $(srcdir)/libgpgme.vers
@@ -116,33 +150,6 @@ libgpgme_pth_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \
status-table.h : gpgme.h
$(srcdir)/mkstatus < $(srcdir)/gpgme.h > status-table.h
-# Special code to build a DLL. The current libtool (1.5.6) is not
-# able to do this properly; we better use gcc's built in magic.
-if HAVE_W32_SYSTEM
-
-w32_o_files = ath.o conversion.o data-compat.o data-fd.o \
- data-mem.o data-stream.o data-user.o data.o debug.o \
- decrypt-verify.o decrypt.o delete.o edit.o encrypt-sign.o \
- encrypt.o engine-gpgsm.o engine.o error.o export.o genkey.o \
- get-env.o gpgme.o import.o key.o keylist.o memrchr.o \
- op-support.o passphrase.o progress.o putc_unlocked.o \
- rungpg.o sign.o signers.o trust-item.o trustlist.o \
- ttyname_r.o vasprintf.o verify.o version.o \
- w32-io.o w32-sema.o w32-util.o \
- wait-global.o wait-private.o wait-user.o wait.o
-
-all-local: gpgme.dll gpgme.dll.a
-
-install-exec-hook:
- cp gpgme.dll gpgme.dll.a $(DESTDIR)$(libdir)/
- $(STRIP) $(DESTDIR)$(libdir)/gpgme.dll
-
-gpgme.dll gpgme.dll.a: gpgme.def $(w32_o_files) versioninfo.o
- $(CC) -shared -o gpgme.dll $(srcdir)/gpgme.def $(w32_o_files) \
- versioninfo.o @GPG_ERROR_LIBS@ -Wl,--out-implib,gpgme.dll.a
-
-
-.rc.o:
- $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@
-
-endif
+install-data-local: install-def-file
+
+uninstall-local: uninstall-def-file