From: Werner Koch Date: Mon, 8 Jan 2007 12:05:07 +0000 (+0000) Subject: Fixes for building without gpgsm and for W32 X-Git-Tag: gpgme-1.2.0@1385~183 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=909b27e1232c60ce8f4c059fbc0068bcc426ae6a;p=gpgme.git Fixes for building without gpgsm and for W32 --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 56eb778..290d1f7 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,9 @@ +2007-01-08 Werner Koch + + * configure.ac: Require gpg-error 1.4 due to the use of + gpg_error_from_syserror. + (HAVE_ASSUAN_H): New. + 2007-01-05 Marcus Brinkmann * configure.ac: Add options --with-gpg-version and diff --git a/trunk/complus/Makefile.am b/trunk/complus/Makefile.am index 1965b9f..f893d28 100644 --- a/trunk/complus/Makefile.am +++ b/trunk/complus/Makefile.am @@ -19,11 +19,11 @@ ## Process this file with automake to produce Makefile.in -# Because there is no free IDL compiler for OLE, we have to distribute -# a binary typelibrary. To generate a new one, copy the idl file to a -# system with an install MIDL and run the command -# midl /nocpp gpgcom.idl -# Sorry, there is no other way yet. +# Because WIDL does not yet fully support generation of typelibs, we +# have to distribute a binary type library. To generate a new one, +# copy the idl file to a system with an install MIDL and run the +# command "midl /nocpp gpgcom.idl". Sorry, there is no other way yet. + EXTRA_DIST = gpgcom.idl gpgcom.tlb gpgcom.rc vbtest.html vbtest.vbs README # No need to install this because we are cross-compiling anyway. diff --git a/trunk/configure.ac b/trunk/configure.ac index 8ba90c8..2e3c4e7 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -243,7 +243,7 @@ if test "$ac_cv_func_timegm" != yes; then fi # Checking for libgpg-error. -AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found])) +AM_PATH_GPG_ERROR(1.4,, AC_MSG_ERROR([libgpg-error was not found])) AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME, [The default error source for GPGME.]) @@ -458,7 +458,9 @@ AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$ok" = "yes") # FIXME: Only build if supported. AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no") - +if test "$GPGSM" != "no"; then + AC_DEFINE(HAVE_ASSUAN_H, ,[Defined if we are building with assuan support.]) +fi # The assuan code uses funopen but it will also build without it. So # test for it. Frankly, this is not required in gpgme, but thats the diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 6e6749d..a60a169 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,15 @@ +2007-01-08 Werner Koch + + * version.c (do_subsystem_inits): Do assuan init only if building + with Assuan. + * setenv.c: Include assuan-def.h only if building with Assuan + support. + + * op-support.c (_gpgme_op_reset): Set LC_MESSAGES only if + if defined. + * engine-gpgsm.c (gpgsm_set_locale): Ditto. + * rungpg.c (gpg_set_locale): Ditto. + 2006-12-17 Marcus Brinkmann * gpgme.c (gpgme_set_protocol): Shut down the engine when diff --git a/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index 23e49a6..b170180 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/gpgme/engine-gpgsm.c @@ -548,6 +548,7 @@ gpgsm_set_locale (void *engine, int category, const char *value) if (value) gpgsm->lc_ctype_set = 1; } +#ifdef LC_MESSAGES else if (category == LC_MESSAGES) { catstr = "lc-messages"; @@ -556,6 +557,7 @@ gpgsm_set_locale (void *engine, int category, const char *value) if (value) gpgsm->lc_messages_set = 1; } +#endif /* LC_MESSAGES */ else return gpg_error (GPG_ERR_INV_VALUE); diff --git a/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index bf69d87..3e64d47 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/gpgme/gpgme.h @@ -72,7 +72,7 @@ extern "C" { AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.3-cvs1196" +#define GPGME_VERSION "1.1.3-cvs1200" diff --git a/trunk/gpgme/op-support.c b/trunk/gpgme/op-support.c index 4be7a01..b7df3f1 100644 --- a/trunk/gpgme/op-support.c +++ b/trunk/gpgme/op-support.c @@ -101,9 +101,12 @@ _gpgme_op_reset (gpgme_ctx_t ctx, int type) } err = _gpgme_engine_set_locale (ctx->engine, LC_CTYPE, ctx->lc_ctype); +#ifdef LC_MESSAGES if (!err) err = _gpgme_engine_set_locale (ctx->engine, LC_MESSAGES, ctx->lc_messages); +#endif + if (err) { _gpgme_engine_release (ctx->engine); diff --git a/trunk/gpgme/rungpg.c b/trunk/gpgme/rungpg.c index b81aca3..243d0b5 100644 --- a/trunk/gpgme/rungpg.c +++ b/trunk/gpgme/rungpg.c @@ -525,6 +525,7 @@ gpg_set_locale (void *engine, int category, const char *value) return gpg_error_from_syserror (); } } +#ifdef LC_MESSAGES else if (category == LC_MESSAGES) { if (gpg->lc_messages) @@ -536,6 +537,7 @@ gpg_set_locale (void *engine, int category, const char *value) return gpg_error_from_syserror (); } } +#endif /* LC_MESSAGES */ else return gpg_error (GPG_ERR_INV_VALUE); diff --git a/trunk/gpgme/setenv.c b/trunk/gpgme/setenv.c index 3c803b0..d3a54c1 100644 --- a/trunk/gpgme/setenv.c +++ b/trunk/gpgme/setenv.c @@ -20,7 +20,11 @@ # include #endif +#if HAVE_ASSUAN_H +/* Fixme: Why do we need to include the assuan header and why the + internal ones? */ #include "assuan-defs.h" +#endif /*HAVE_ASSUAN_H*/ #define __builtin_expect(cond,val) (cond) diff --git a/trunk/gpgme/version.c b/trunk/gpgme/version.c index 2fec05d..a54c0d4 100644 --- a/trunk/gpgme/version.c +++ b/trunk/gpgme/version.c @@ -32,7 +32,9 @@ /* For _gpgme_sema_subsystem_init (). */ #include "sema.h" +#ifdef HAVE_ASSUAN_H #include "assuan.h" +#endif /* Bootstrap the subsystems needed for concurrent operation. This @@ -50,7 +52,9 @@ do_subsystem_inits (void) _gpgme_sema_subsystem_init (); _gpgme_io_subsystem_init (); +#ifdef HAVE_ASSUAN_H assuan_set_assuan_err_source (GPG_ERR_SOURCE_GPGME); +#endif done = 1; }