2004-09-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.m4: Implement the --api-version check.
This commit is contained in:
parent
1819293208
commit
5c4008a176
@ -1,5 +1,7 @@
|
|||||||
2004-09-30 Marcus Brinkmann <marcus@g10code.de>
|
2004-09-30 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* gpgme.m4: Implement the --api-version check.
|
||||||
|
|
||||||
* rungpg.c (read_status): Move the polling of the output data pipe
|
* rungpg.c (read_status): Move the polling of the output data pipe
|
||||||
to just before removing the command fd, from just before adding
|
to just before removing the command fd, from just before adding
|
||||||
it. This avoids buffering problems.
|
it. This avoids buffering problems.
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([_AM_PATH_GPGME_CONFIG],
|
AC_DEFUN([_AM_PATH_GPGME_CONFIG],
|
||||||
[ AC_ARG_WITH(gpgme-prefix,
|
[ AC_ARG_WITH(gpgme-prefix,
|
||||||
AC_HELP_STRING([--with-gpgme-prefix=PFX],
|
AC_HELP_STRING([--with-gpgme-prefix=PFX],
|
||||||
@ -34,7 +35,15 @@ dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
|
|||||||
dnl
|
dnl
|
||||||
AC_DEFUN([AM_PATH_GPGME],
|
AC_DEFUN([AM_PATH_GPGME],
|
||||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||||
min_gpgme_version=ifelse([$1], ,0.4.2,$1)
|
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||||
|
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||||
|
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||||
|
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||||
|
else
|
||||||
|
req_gpgme_api=0
|
||||||
|
min_gpgme_version="$tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
|
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
|
||||||
ok=no
|
ok=no
|
||||||
if test "$GPGME_CONFIG" != "no" ; then
|
if test "$GPGME_CONFIG" != "no" ; then
|
||||||
@ -60,6 +69,18 @@ AC_DEFUN([AM_PATH_GPGME],
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
# If we have a recent GPGME, we should also check that the
|
||||||
|
# API is compatible.
|
||||||
|
if test "$req_gpgme_api" -gt 0 ; then
|
||||||
|
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||||
|
if test "$tmp" -gt 0 ; then
|
||||||
|
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||||
|
ok=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test $ok = yes; then
|
if test $ok = yes; then
|
||||||
GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
|
GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
|
||||||
GPGME_LIBS=`$GPGME_CONFIG --libs`
|
GPGME_LIBS=`$GPGME_CONFIG --libs`
|
||||||
@ -81,7 +102,15 @@ dnl Test for libgpgme and define GPGME_PTH_CFLAGS and GPGME_PTH_LIBS.
|
|||||||
dnl
|
dnl
|
||||||
AC_DEFUN([AM_PATH_GPGME_PTH],
|
AC_DEFUN([AM_PATH_GPGME_PTH],
|
||||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||||
min_gpgme_version=ifelse([$1], ,0.4.2,$1)
|
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||||
|
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||||
|
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||||
|
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||||
|
else
|
||||||
|
req_gpgme_api=0
|
||||||
|
min_gpgme_version="$tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version)
|
AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version)
|
||||||
ok=no
|
ok=no
|
||||||
if test "$GPGME_CONFIG" != "no" ; then
|
if test "$GPGME_CONFIG" != "no" ; then
|
||||||
@ -109,6 +138,18 @@ AC_DEFUN([AM_PATH_GPGME_PTH],
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
# If we have a recent GPGME, we should also check that the
|
||||||
|
# API is compatible.
|
||||||
|
if test "$req_gpgme_api" -gt 0 ; then
|
||||||
|
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||||
|
if test "$tmp" -gt 0 ; then
|
||||||
|
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||||
|
ok=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test $ok = yes; then
|
if test $ok = yes; then
|
||||||
GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags`
|
GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags`
|
||||||
GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs`
|
GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs`
|
||||||
@ -131,7 +172,15 @@ dnl and GPGME_PTHREAD_LIBS.
|
|||||||
dnl
|
dnl
|
||||||
AC_DEFUN([AM_PATH_GPGME_PTHREAD],
|
AC_DEFUN([AM_PATH_GPGME_PTHREAD],
|
||||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||||
min_gpgme_version=ifelse([$1], ,0.4.2,$1)
|
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||||
|
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||||
|
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||||
|
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||||
|
else
|
||||||
|
req_gpgme_api=0
|
||||||
|
min_gpgme_version="$tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
|
AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
|
||||||
ok=no
|
ok=no
|
||||||
if test "$GPGME_CONFIG" != "no" ; then
|
if test "$GPGME_CONFIG" != "no" ; then
|
||||||
@ -159,6 +208,18 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test $ok = yes; then
|
||||||
|
# If we have a recent GPGME, we should also check that the
|
||||||
|
# API is compatible.
|
||||||
|
if test "$req_gpgme_api" -gt 0 ; then
|
||||||
|
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||||
|
if test "$tmp" -gt 0 ; then
|
||||||
|
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||||
|
ok=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test $ok = yes; then
|
if test $ok = yes; then
|
||||||
GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
|
GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
|
||||||
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
|
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
|
||||||
|
Loading…
Reference in New Issue
Block a user