[svn] GPGol - r121 - in trunk: . m4 src
svn author marcus
cvs at cvs.gnupg.org
Fri Oct 21 15:24:48 CEST 2005
Author: marcus
Date: 2005-10-21 15:24:47 +0200 (Fri, 21 Oct 2005)
New Revision: 121
Added:
trunk/m4/gpg-error.m4
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/Makefile.am
Log:
2005-10-21 Marcus Brinkmann <marcus at g10code.de>
* m4/gpg-error.m4: New file.
* configure.ac: Also check for gpg-error.
src/
2005-10-21 Marcus Brinkmann <marcus at g10code.de>
* Makefile.am (libgpgme.a, libgpgme.a): New targets.
(gpgol_DEPENDENCIES): Add libgpgme.a and libgpg-error.a.
(clean-local): Likewise.
(gpgol_LDADD): Link to these local versions statically.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-10-20 13:15:59 UTC (rev 120)
+++ trunk/ChangeLog 2005-10-21 13:24:47 UTC (rev 121)
@@ -1,3 +1,8 @@
+2005-10-21 Marcus Brinkmann <marcus at g10code.de>
+
+ * m4/gpg-error.m4: New file.
+ * configure.ac: Also check for gpg-error.
+
2005-10-06 Marcus Brinkmann <marcus at g10code.de>
* configure.ac: Change AC_CONFIG_SRCDIR argument to src/gpgol.def.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-10-20 13:15:59 UTC (rev 120)
+++ trunk/configure.ac 2005-10-21 13:24:47 UTC (rev 121)
@@ -133,9 +133,9 @@
AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
have_gpgme=yes,have_gpgme=no)
+AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
-
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
Added: trunk/m4/gpg-error.m4
===================================================================
--- trunk/m4/gpg-error.m4 2005-10-20 13:15:59 UTC (rev 120)
+++ trunk/m4/gpg-error.m4 2005-10-21 13:24:47 UTC (rev 121)
@@ -0,0 +1,65 @@
+# gpg-error.m4 - autoconf macro to detect libgpg-error.
+# Copyright (C) 2002, 2003, 2004 g10 Code GmbH
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS
+dnl
+AC_DEFUN([AM_PATH_GPG_ERROR],
+[ AC_ARG_WITH(gpg-error-prefix,
+ AC_HELP_STRING([--with-gpg-error-prefix=PFX],
+ [prefix where GPG Error is installed (optional)]),
+ gpg_error_config_prefix="$withval", gpg_error_config_prefix="")
+ if test x$gpg_error_config_prefix != x ; then
+ if test x${GPG_ERROR_CONFIG+set} != xset ; then
+ GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+ fi
+ fi
+
+ AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
+ AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+ ok=no
+ if test "$GPG_ERROR_CONFIG" != "no" ; then
+ req_major=`echo $min_gpg_error_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_gpg_error_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+ gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
+ major=`echo $gpg_error_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ minor=`echo $gpg_error_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+ if test "$major" -gt "$req_major"; then
+ ok=yes
+ else
+ if test "$major" -eq "$req_major"; then
+ if test "$minor" -ge "$req_minor"; then
+ ok=yes
+ fi
+ fi
+ fi
+ fi
+ if test $ok = yes; then
+ GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
+ GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ GPG_ERROR_CFLAGS=""
+ GPG_ERROR_LIBS=""
+ AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GPG_ERROR_CFLAGS)
+ AC_SUBST(GPG_ERROR_LIBS)
+])
+
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2005-10-20 13:15:59 UTC (rev 120)
+++ trunk/src/ChangeLog 2005-10-21 13:24:47 UTC (rev 121)
@@ -1,3 +1,10 @@
+2005-10-21 Marcus Brinkmann <marcus at g10code.de>
+
+ * Makefile.am (libgpgme.a, libgpgme.a): New targets.
+ (gpgol_DEPENDENCIES): Add libgpgme.a and libgpg-error.a.
+ (clean-local): Likewise.
+ (gpgol_LDADD): Link to these local versions statically.
+
2005-10-20 Marcus Brinkmann <marcus at g10code.de>
* mapi32.def: New file.
@@ -8,6 +15,10 @@
2005-10-06 Marcus Brinkmann <marcus at g10code.de>
+ * Makefile.am (gpgol_DEPENDENCIES): New variable.
+ (libmapi32.a): New target.
+ (gpgol_LDADD): Replace mapi32.dll with "-L . -lmapi32".
+
* Makefile.am (gpgol_LDADD): Prefix gpgol.def and mapi32.dll with
$(srcdir).
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2005-10-20 13:15:59 UTC (rev 120)
+++ trunk/src/Makefile.am 2005-10-21 13:24:47 UTC (rev 121)
@@ -49,16 +49,22 @@
# W32API 3.2 comes with an unusable libmapi32.a. We build our own
# version. Note the omission of -k (--kill-at) from the DLLTOOL
# command line.
-gpgol_DEPENDENCIES = libmapi32.a
+gpgol_DEPENDENCIES = libmapi32.a libgpgme.a libgpg-error.a
libmapi32.a: mapi32.def
$(DLLTOOL) --output-lib $@ --def $<
+libgpgme.a:
+ ln -s $(shell $(GPGME_CONFIG) --prefix)/lib/libgpgme.a
+
+libgpg-error.a:
+ ln -s $(shell $(GPG_ERROR_CONFIG) --prefix)/lib/libgpg-error.a
+
clean-local:
- rm -f libmapi32.a
+ rm -f libmapi32.a libgpgme.a libgpg-error.a
gpgol_LDADD = $(srcdir)/gpgol.def \
- $(GPGME_LIBS) -L . -lmapi32 -lshell32 -lgdi32 -lcomdlg32
+ -L . -lgpgme -lgpg-error -lmapi32 -lshell32 -lgdi32 -lcomdlg32
resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc
More information about the Gnupg-commits
mailing list