diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/Makefile.am | 18 | ||||
-rw-r--r-- | src/assuan-io-pth.c | 147 | ||||
-rw-r--r-- | src/assuan-io.c | 136 | ||||
-rw-r--r-- | src/libassuan-config.in | 42 | ||||
-rw-r--r-- | src/libassuan.m4 | 140 |
6 files changed, 325 insertions, 167 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9b0cb74..bd91192 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2006-10-09 Werner Koch <wk@g10code.com> + + * assuan-io.c: Removed Pth support. + * assuan-io-pth.c: New. Based on assuan-io.c + +2006-10-06 Werner Koch <wk@g10code.com> + + * libassuan-config.in: New options --api-version and --thread. + 2006-10-04 Werner Koch <wk@g10code.com> * assuan-client.c (assuan_transact): Need to map old assuan status diff --git a/src/Makefile.am b/src/Makefile.am index e90b7af..52980ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,15 +24,20 @@ INCLUDES = -I.. -I$(top_srcdir)/include BUILT_SOURCES = assuan-errors.c MOSTLYCLEANFILES = assuan-errors.c +if HAVE_PTH +libassuan_pth = libassuan-pth.a +else +libassuan_pth = +endif + bin_SCRIPTS = libassuan-config m4datadir = $(datadir)/aclocal m4data_DATA = libassuan.m4 -lib_LIBRARIES = libassuan.a +lib_LIBRARIES = libassuan.a $(libassuan_pth) include_HEADERS = assuan.h -#libassuan_a_LDFLAGS = -libassuan_a_SOURCES = \ +common_sources = \ assuan-defs.h \ assuan-util.c \ assuan-errors.c \ @@ -47,11 +52,16 @@ libassuan_a_SOURCES = \ assuan-pipe-connect.c \ assuan-socket-connect.c \ assuan-uds.c \ - assuan-io.c \ assuan-logging.c \ assuan-socket.c +libassuan_a_SOURCES = $(common_sources) assuan-io.c libassuan_a_LIBADD = @LIBOBJS@ +if HAVE_PTH +libassuan_pth_a_SOURCES = $(common_sources) assuan-io-pth.c +libassuan_pth_a_LIBADD = @LIBOBJS@ +endif + assuan-errors.c : assuan.h mkerrors $(srcdir)/mkerrors < $(srcdir)/assuan.h > assuan-errors.c diff --git a/src/assuan-io-pth.c b/src/assuan-io-pth.c new file mode 100644 index 0000000..13f8794 --- /dev/null +++ b/src/assuan-io-pth.c @@ -0,0 +1,147 @@ +/* assuan-io-pth.c - Pth version of assua-io.c. + * Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. + * + * This file is part of Assuan. + * + * Assuan is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * Assuan is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <sys/time.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/wait.h> +#if HAVE_SYS_UIO_H +# include <sys/uio.h> +#endif +#include <unistd.h> +#include <errno.h> +#ifdef HAVE_W32_SYSTEM +# include <windows.h> +#else +# include <sys/wait.h> +#endif +#include <pth.h> + +#include "assuan-defs.h" + + + +#ifndef HAVE_W32_SYSTEM +pid_t +_assuan_waitpid (pid_t pid, int *status, int options) +{ + return pth_waitpid (pid, status, options); +} +#endif + + +ssize_t +_assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size) +{ +#ifndef HAVE_W32_SYSTEM + return pth_read (ctx->inbound.fd, buffer, size); +#else + return recv (ctx->inbound.fd, buffer, size, 0); +#endif +} + +ssize_t +_assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size) +{ +#ifndef HAVE_W32_SYSTEM + return pth_write (ctx->outbound.fd, buffer, size); +#else + return send (ctx->outbound.fd, buffer, size, 0); +#endif +} + + +ssize_t +_assuan_simple_sendmsg (assuan_context_t ctx, struct msghdr *msg) +{ +#if defined(HAVE_W32_SYSTEM) + return _assuan_error (ASSUAN_Not_Implemented); +#else + /* Pth does not provide a sendmsg function. Thus we implement it here. */ + int ret; + int fd = ctx->outbound.fd; + int fdmode; + + fdmode = pth_fdmode (fd, PTH_FDMODE_POLL); + if (fdmode == PTH_FDMODE_ERROR) + { + errno = EBADF; + return -1; + } + if (fdmode == PTH_FDMODE_BLOCK) + { + fd_set fds; + + FD_ZERO (&fds); + FD_SET (fd, &fds); + while ( (ret = pth_select (fd+1, NULL, &fds, NULL, NULL)) < 0 + && errno == EINTR) + ; + if (ret < 0) + return -1; + } + + while ((ret = sendmsg (fd, msg, 0)) == -1 && errno == EINTR) + ; + return ret; +#endif +} + + +ssize_t +_assuan_simple_recvmsg (assuan_context_t ctx, struct msghdr *msg) +{ +#if defined(HAVE_W32_SYSTEM) + return _assuan_error (ASSUAN_Not_Implemented); +#else + /* Pth does not provide a recvmsg function. Thus we implement it here. */ + int ret; + int fd = ctx->inbound.fd; + int fdmode; + + fdmode = pth_fdmode (fd, PTH_FDMODE_POLL); + if (fdmode == PTH_FDMODE_ERROR) + { + errno = EBADF; + return -1; + } + if (fdmode == PTH_FDMODE_BLOCK) + { + fd_set fds; + + FD_ZERO (&fds); + FD_SET (fd, &fds); + while ( (ret = pth_select (fd+1, &fds, NULL, NULL, NULL)) < 0 + && errno == EINTR) + ; + if (ret < 0) + return -1; + } + + while ((ret = recvmsg (fd, msg, 0)) == -1 && errno == EINTR) + ; + return ret; +#endif +} diff --git a/src/assuan-io.c b/src/assuan-io.c index 0fe48b7..a1be67d 100644 --- a/src/assuan-io.c +++ b/src/assuan-io.c @@ -23,6 +23,7 @@ #include <config.h> #endif +#include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/wait.h> @@ -39,65 +40,12 @@ #include "assuan-defs.h" -/* We can't include pth.h and we are not sure whether other headers - already included it. This we define macros with the same - values. */ -#define MY_PTH_FDMODE_ERROR (-1) -#define MY_PTH_FDMODE_POLL 0 -#define MY_PTH_FDMODE_BLOCK 1 -#define MY_PTH_FDMODE_NONBLOCK 2 - - -#ifndef _ASSUAN_NO_PTH -extern pid_t pth_waitpid (pid_t pid, int *status, int options); -extern ssize_t pth_read (int fd, void *buffer, size_t size); -extern ssize_t pth_write (int fd, const void *buffer, size_t size); -extern int pth_fdmode (int, int); -extern int pth_select(int, fd_set*, fd_set*, fd_set*, struct timeval*); - -#ifndef HAVE_W32_SYSTEM -#pragma weak pth_waitpid -#pragma weak pth_read -#pragma weak pth_write -#pragma weak pth_fdmode -#pragma weak pth_select -#endif -#endif /*!_ASSUAN_NO_PTH*/ - -#ifndef _ASSUAN_NO_PTH -/* Wrapper around pth_fdmode. */ -static int -my_pth_fdmode (int fd, int mode) -{ - if (pth_fdmode) - return pth_fdmode (fd, mode); - else - return MY_PTH_FDMODE_NONBLOCK; /* This is okay, given the way we use it. */ -} -#endif /*_ASSUAN_NO_PTH*/ - -#ifndef _ASSUAN_NO_PTH -/* Wrapper around pth_select. */ -static int -my_pth_select (int nfd, fd_set *rfds, fd_set *wfds, fd_set *efds, - struct timeval *timeout) -{ - if (pth_select) - return pth_select (nfd, rfds, wfds, efds, timeout); - else - return 1; /* Fake one fd ready; this is okay, given the way we use it. */ -} -#endif /*_ASSUAN_NO_PTH*/ #ifndef HAVE_W32_SYSTEM pid_t _assuan_waitpid (pid_t pid, int *status, int options) { -#ifdef _ASSUAN_NO_PTH return waitpid (pid, status, options); -#else - return (pth_waitpid ? pth_waitpid : waitpid) (pid, status, options); -#endif } #endif @@ -105,70 +53,24 @@ _assuan_waitpid (pid_t pid, int *status, int options) ssize_t _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size) { -#ifdef _ASSUAN_NO_PTH return read (ctx->inbound.fd, buffer, size); -#else -# ifndef HAVE_W32_SYSTEM - return (pth_read ? pth_read : read) (ctx->inbound.fd, buffer, size); -# else - return pth_read ? pth_read (ctx->inbound.fd, buffer, size) - : recv (ctx->inbound.fd, buffer, size, 0); -# endif -#endif } ssize_t _assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size) { -#ifdef _ASSUAN_NO_PTH return write (ctx->outbound.fd, buffer, size); -#else -# ifndef HAVE_W32_SYSTEM - return (pth_write ? pth_write : write) (ctx->outbound.fd, buffer, size); -# else - return pth_write ? pth_write (ctx->outbound.fd, buffer, size) - : send (ctx->outbound.fd, buffer, size, 0); -# endif -#endif } ssize_t _assuan_simple_sendmsg (assuan_context_t ctx, struct msghdr *msg) { -#if defined(HAVE_W32_SYSTEM) +#ifdef HAVE_W32_SYSTEM return _assuan_error (ASSUAN_Not_Implemented); -#elif defined(_ASSUAN_NO_PTH) - int ret; - while ( (ret = sendmsg (ctx->outbound.fd, msg, 0)) == -1 && errno == EINTR) - ; - return ret; #else - /* Pth does not provide a sendmsg function. Thus we implement it here. */ int ret; - int fd = ctx->outbound.fd; - int fdmode; - - fdmode = my_pth_fdmode (fd, MY_PTH_FDMODE_POLL); - if (fdmode == MY_PTH_FDMODE_ERROR) - { - errno = EBADF; - return -1; - } - if (fdmode == MY_PTH_FDMODE_BLOCK) - { - fd_set fds; - - FD_ZERO (&fds); - FD_SET (fd, &fds); - while ( (ret = my_pth_select (fd+1, NULL, &fds, NULL, NULL)) < 0 - && errno == EINTR) - ; - if (ret < 0) - return -1; - } - - while ((ret = sendmsg (fd, msg, 0)) == -1 && errno == EINTR) + while ( (ret = sendmsg (ctx->outbound.fd, msg, 0)) == -1 && errno == EINTR) ; return ret; #endif @@ -178,39 +80,11 @@ _assuan_simple_sendmsg (assuan_context_t ctx, struct msghdr *msg) ssize_t _assuan_simple_recvmsg (assuan_context_t ctx, struct msghdr *msg) { -#if defined(HAVE_W32_SYSTEM) +#ifdef HAVE_W32_SYSTEM return _assuan_error (ASSUAN_Not_Implemented); -#elif defined(_ASSUAN_NO_PTH) - int ret; - while ( (ret = recvmsg (ctx->inbound.fd, msg, 0)) == -1 && errno == EINTR) - ; - return ret; #else - /* Pth does not provide a recvmsg function. Thus we implement it here. */ int ret; - int fd = ctx->inbound.fd; - int fdmode; - - fdmode = my_pth_fdmode (fd, MY_PTH_FDMODE_POLL); - if (fdmode == MY_PTH_FDMODE_ERROR) - { - errno = EBADF; - return -1; - } - if (fdmode == MY_PTH_FDMODE_BLOCK) - { - fd_set fds; - - FD_ZERO (&fds); - FD_SET (fd, &fds); - while ( (ret = my_pth_select (fd+1, &fds, NULL, NULL, NULL)) < 0 - && errno == EINTR) - ; - if (ret < 0) - return -1; - } - - while ((ret = recvmsg (fd, msg, 0)) == -1 && errno == EINTR) + while ( (ret = recvmsg (ctx->inbound.fd, msg, 0)) == -1 && errno == EINTR) ; return ret; #endif diff --git a/src/libassuan-config.in b/src/libassuan-config.in index a50ffba..60f4aa2 100644 --- a/src/libassuan-config.in +++ b/src/libassuan-config.in @@ -10,8 +10,12 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. PGM=libassuan-config -libs="@LIBASSUAN_CONFIG_LIBS@" +lib="@LIBASSUAN_CONFIG_LIB@" +extralibs="@LIBASSUAN_CONFIG_EXTRA_LIBS@" cflags="@LIBASSUAN_CONFIG_CFLAGS@" +api_version="@LIBASSUAN_CONFIG_API_VERSION@" +all_thread_modules="@LIBASSUAN_CONFIG_THREAD_MODULES@" +thread_module= prefix=@prefix@ exec_prefix=@exec_prefix@ includes="" @@ -22,12 +26,18 @@ echo_cflags=no echo_prefix=no echo_exec_prefix=no +if test x"$all_thread_modules" = x; then + all_thread_modules="none pthread" +else + all_thread_modules="none pthread $all_thread_modules" +fi usage() { cat <<EOF Usage: $PGM [OPTIONS] Options: + [--thread={`echo "${all_thread_modules}" | sed 's/ /|/g'`}] [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] @@ -38,7 +48,7 @@ EOF } if test $# -eq 0; then - usage 1 1>&2 + usage 1 1>&2 fi while test $# -gt 0; do @@ -64,6 +74,25 @@ while test $# -gt 0; do echo "@VERSION@" exit 0 ;; + --api-version) + echo_api_version=yes + ;; + --thread=*) + for mod in $all_thread_modules; do + if test "$mod" = "$optarg"; then + thread_module="-$mod" + fi + done + if test "x$thread_module" = "x"; then + usage 1 1>&2 + fi + if test "$thread_module" = "-none"; then + thread_module="" + fi + if test "$thread_module" = "-pthread"; then + thread_module="" + fi + ;; --cflags) echo_cflags=yes ;; @@ -85,6 +114,11 @@ if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi +if test "$echo_api_version" = "yes"; then + echo $api_version +fi + + if test "$echo_cflags" = "yes"; then if test "@includedir@" != "/usr/include" ; then includes="-I@includedir@" @@ -100,11 +134,11 @@ fi if test "$echo_libs" = "yes"; then if test "@libdir@" != "/usr/lib" ; then libdirs="-L@libdir@" - for i in $libs ; do + for i in $lib $extralibs ; do if test "$i" = "-L@libdir@" ; then libdirs="" fi done fi - echo $libdirs $libs + echo $libdirs $lib${thread_module} $extralibs fi diff --git a/src/libassuan.m4 b/src/libassuan.m4 index 16b664c..680f93b 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -9,68 +9,152 @@ dnl This file is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -dnl AM_PATH_LIBASSUAN([MINIMUM-VERSION, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS dnl -AC_DEFUN([AM_PATH_LIBASSUAN], +dnl Common code used for libassuan detection [internal] +dnl Returns ok set to yes or no. +dnl +AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], [ AC_ARG_WITH(libassuan-prefix, - AC_HELP_STRING([--with-libassuan-prefix=PFX], - [prefix where LIBASSUAN is installed (optional)]), + AC_HELP_STRING([--with-libassuan-prefix=PFX], + [prefix where LIBASSUAN is installed (optional)]), libassuan_config_prefix="$withval", libassuan_config_prefix="") if test x$libassuan_config_prefix != x ; then - libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" - if test x${LIBASSUAN_CONFIG+set} != xset ; then - LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config - fi + libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" + if test x${LIBASSUAN_CONFIG+set} != xset ; then + LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config + fi fi - AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no) - min_libassuan_version=ifelse([$1], ,0.0.1,$1) - AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version) + + tmp=ifelse([$1], ,1:0.9.2,$1) + if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then + req_libassuan_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` + min_libassuan_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` + else + req_libassuan_api=0 + min_libassuan_version="$tmp" + fi + + if test "$LIBASSUAN_CONFIG" != "no" ; then + libassuan_version=`$LIBASSUAN_CONFIG --version` + fi + libassuan_version_major=`echo $libassuan_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + libassuan_version_minor=`echo $libassuan_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + libassuan_version_micro=`echo $libassuan_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` + + AC_MSG_CHECKING(for LIBASSUAN ifelse([$2], ,,[$2 ])- version >= $min_libassuan_version) ok=no if test "$LIBASSUAN_CONFIG" != "no" ; then + ifelse([$2], ,,[if `$LIBASSUAN_CONFIG --thread=$2 2> /dev/null` ; then]) req_major=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libassuan_config_version=`$LIBASSUAN_CONFIG $libassuan_config_args --version` - major=`echo $libassuan_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - minor=`echo $libassuan_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - micro=`echo $libassuan_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - if test "$major" -gt "$req_major"; then + if test "$libassuan_version_major" -gt "$req_major"; then ok=yes else - if test "$major" -eq "$req_major"; then - if test "$minor" -gt "$req_minor"; then + if test "$libassuan_version_major" -eq "$req_major"; then + if test "$libassuan_version_minor" -gt "$req_minor"; then ok=yes else - if test "$minor" -eq "$req_minor"; then - if test "$micro" -ge "$req_micro"; then + if test "$libassuan_version_minor" -eq "$req_minor"; then + if test "$libassuan_version_micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi + ifelse([$2], ,,[fi]) + fi + + if test $ok = yes; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) fi + + if test $ok = yes; then + if test "$req_libassuan_api" -gt 0 ; then + tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + if test "$tmp" -gt 0 ; then + AC_MSG_CHECKING([LIBASSUAN ifelse([$2], ,,[$2 ])API version]) + if test "$req_libassuan_api" -eq "$tmp" ; then + AC_MSG_RESULT(okay) + else + ok=no + AC_MSG_RESULT([does not match. want=$req_libassuan_api got=$tmp.]) + fi + fi + fi + fi + +]) + + + +dnl AM_PATH_LIBASSUAN([MINIMUM-VERSION, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS +dnl +AC_DEFUN([AM_PATH_LIBASSUAN], +[ _AM_PATH_LIBASSUAN_COMMON($1) if test $ok = yes; then LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` - AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else LIBASSUAN_CFLAGS="" LIBASSUAN_LIBS="" - AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(LIBASSUAN_CFLAGS) AC_SUBST(LIBASSUAN_LIBS) ]) + + +dnl AM_PATH_LIBASSUAN_PTH([MINIMUM-VERSION, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +dnl Test for libassuan and define LIBASSUAN_PTH_CFLAGSand LIBASSUAN_PTH_LIBS +dnl +AC_DEFUN([AM_PATH_LIBASSUAN_PTH], +[ _AM_PATH_LIBASSUAN_COMMON($1,pth) + if test $ok = yes; then + LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` + LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` + ifelse([$2], , :, [$2]) + else + LIBASSUAN_PTH_CFLAGS="" + LIBASSUAN_PTH_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(LIBASSUAN_PTH_CFLAGS) + AC_SUBST(LIBASSUAN_PTH_LIBS) +]) + + +dnl AM_PATH_LIBASSUAN_PTHREAD([MINIMUM-VERSION, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +dnl Test for libassuan and define LIBASSUAN_PTHREAD_CFLAGS +dnl and LIBASSUAN_PTHREAD_LIBS +dnl +AC_DEFUN([AM_PATH_LIBASSUAN_PTHREAD], +[ _AM_PATH_LIBASSUAN_COMMON($1,pth) + if test $ok = yes; then + LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` + LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` + ifelse([$2], , :, [$2]) + else + LIBASSUAN_PTHREAD_CFLAGS="" + LIBASSUAN_PTHREAD_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(LIBASSUAN_PTHREAD_CFLAGS) + AC_SUBST(LIBASSUAN_PTHREAD_LIBS) +]) + |