From f209d163a8167caa6910cd367aba923f703ac69e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 9 Jan 2014 19:14:09 +0100 Subject: Make multi-threading flags available via gpg-error-config. * m4/threadlib.m4: Set THREADLIB_CPPFLAGS. * src/gpg-error-config.in: Add option --mt. * configure.ac: Add support for the --mt option. * src/gpg-error.m4: Add ac_subst GPG_ERROR_MT_CFLAGS and GPG_ERROR_MT_LIBS. -- Although, libgpg-error does not yet provide an API for multi-thread support, it is useful to add the already available detection to the config script. This allows the latest Libgcrypt to take advantage of this in its regression tests. In particular for the regression tests a gpgrt_thread functions would be useful and eventually added to libgpg-error. The new gpg-error.m4 script should already be used by other packages to be prepared for future updates. --- src/gpg-error-config.in | 11 +++++++++++ src/gpg-error.m4 | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gpg-error-config.in b/src/gpg-error-config.in index b132314..bc1c583 100644 --- a/src/gpg-error-config.in +++ b/src/gpg-error-config.in @@ -17,12 +17,14 @@ libdir=@libdir@ isubdirafter="@GPG_ERROR_CONFIG_ISUBDIRAFTER@" output="" +mt=no usage() { cat </dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` @@ -82,9 +90,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], else GPG_ERROR_CFLAGS="" GPG_ERROR_LIBS="" + GPG_ERROR_MT_CFLAGS="" + GPG_ERROR_MT_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPG_ERROR_CFLAGS) AC_SUBST(GPG_ERROR_LIBS) + AC_SUBST(GPG_ERROR_MT_CFLAGS) + AC_SUBST(GPG_ERROR_MT_LIBS) ]) -- cgit v1.2.3