[svn] gpg-error - r146 - in trunk: . src

svn author marcus cvs at cvs.gnupg.org
Thu Oct 20 14:52:40 CEST 2005


Author: marcus
Date: 2005-10-20 14:52:39 +0200 (Thu, 20 Oct 2005)
New Revision: 146

Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/src/Makefile.am
Log:
2005-10-20  Marcus Brinkmann  <marcus at g10code.de>

	* 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.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-10-02 19:41:37 UTC (rev 145)
+++ trunk/ChangeLog	2005-10-20 12:52:39 UTC (rev 146)
@@ -1,3 +1,10 @@
+2005-10-20  Marcus Brinkmann  <marcus at g10code.de>
+
+	* 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-02  Marcus Brinkmann  <marcus at g10code.de>
 
 	* configure.ac: Escape arguments in AC_INIT invocation.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-10-02 19:41:37 UTC (rev 145)
+++ trunk/configure.ac	2005-10-20 12:52:39 UTC (rev 146)
@@ -51,8 +51,8 @@
 AC_PROG_CPP
 AC_PROG_AWK
 AC_CHECK_TOOL(AR, ar, :)
-AC_CHECK_TOOL(DLLTOOL, dlltool, :)
-AC_CHECK_TOOL(WINDRES, windres, :)
+AC_LIBTOOL_WIN32_DLL
+AC_LIBTOOL_RC
 AC_PROG_LIBTOOL
 
 # We need to compile and run a program on the build machine.

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2005-10-02 19:41:37 UTC (rev 145)
+++ trunk/src/Makefile.am	2005-10-20 12:52:39 UTC (rev 146)
@@ -46,11 +46,46 @@
 	gpg-error.h mkerrcodes mkerrcodes.h \
 	err-sources-sym.h err-codes-sym.h errnos-sym.h $(tmp_files)
 
-libgpg_error_la_LDFLAGS = -version-info \
-  @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@
 
+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 $@
+
+gpg_error_res = versioninfo.o
+gpg_error_res_ldflag = -Wl,$(gpg_error_res)
+no_undefined = -no-undefined
+export_symbols = -export-symbols $(srcdir)/gpg-error.def
+
+install-def-file:
+	$(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpg-error-.def
+
+uninstall-def-file:
+	-rm $(DESTDIR)$(libdir)/gpg-error.def
+
+libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def
+
+else
+gpg_error_res =
+gpg_error_res_ldflag =
+no_undefined =
+export_symbols =
+install-def-file:
+uninstall-def-file:
+
+endif
+
+
+libgpg_error_la_LDFLAGS = $(gpg_error_res_ldflag) -version-info \
+  @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \
+  $(no_undefined) $(export_symbols)
+
 libgpg_error_la_SOURCES = gpg-error.h gettext.h \
-	strsource.c strerror.c code-to-errno.c code-from-errno.c 
+	strsource.c strerror.c code-to-errno.c code-from-errno.c
 
 libgpg_error_la_LIBADD = @LTLIBINTL@
 
@@ -103,31 +138,3 @@
 		$(srcdir)/err-codes.h.in \
 		$(srcdir)/errnos.in \
 		$(srcdir)/gpg-error.h.in > $@
-
-
-# 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
-all-local: libgpg-error.dll libgpg-error.dll.a
-
-install-exec-hook:
-	cp libgpg-error.dll libgpg-error.dll.a $(DESTDIR)$(libdir)/
-	cp gpg-error.exe $(DESTDIR)$(bindir)/
-	$(STRIP) $(DESTDIR)$(libdir)/libgpg-error.dll
-	$(STRIP) $(DESTDIR)$(bindir)/gpg-error.exe
-
-libgpg-error.dll libgpg-error.dll.a: gpg-error.def \
-             code-from-errno.o code-to-errno.o strerror.o strsource.o \
-             gpg_error-strsource-sym.o gpg_error-strerror-sym.o \
-             gpg_error-gpg-error.o versioninfo.o
-	$(CC) -shared -o libgpg-error.dll gpg-error.def \
-           code-from-errno.o code-to-errno.o strerror.o strsource.o \
-	   versioninfo.o -Wl,--out-implib,libgpg-error.dll.a
-	$(CC) -o gpg-error.exe gpg_error-strsource-sym.o \
-              gpg_error-strerror-sym.o gpg_error-gpg-error.o \
-	      libgpg-error.dll.a
-
-.rc.o:
-	$(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@
-
-endif




More information about the Gnupg-commits mailing list