summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2018-10-24 11:17:58 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2018-10-24 11:31:11 +0900
commitf69f4c893f29c1a359cc60f8a87a79d05d9a6c15 (patch)
tree80d4cab840ee8afc4df8f803314ef48b5b821654
parent9c74661d6f8028c616932b02eb5360a2e3587e81 (diff)
downloadlibassuan-f69f4c893f29c1a359cc60f8a87a79d05d9a6c15.tar.gz
build: Make libassuan.m4 use gpg-error-config.
* src/libassuan.m4: Use gpg-error-config. -- The option --with-libassuan-prefix let it use libassuan-config. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r--src/libassuan.m420
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libassuan.m4 b/src/libassuan.m4
index fe45b06..ab1e855 100644
--- a/src/libassuan.m4
+++ b/src/libassuan.m4
@@ -16,19 +16,19 @@ dnl Returns ok set to yes or no.
dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_PATH_GPG_ERROR])
AC_ARG_WITH(libassuan-prefix,
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
+ else
+ LIBASSUAN_CONFIG="$GPG_ERROR_CONFIG libassuan"
fi
- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
-
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/'`
@@ -41,7 +41,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
ok=no
if test "$LIBASSUAN_CONFIG" != "no" \
- && test -f "$LIBASSUAN_CONFIG" ; then
+ && test -f "${LIBASSUAN_CONFIG% *}" ; then
req_major=`echo $min_libassuan_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_libassuan_version | \
@@ -49,7 +49,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
req_micro=`echo $min_libassuan_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+ libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --modversion`
major=`echo $libassuan_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $libassuan_config_version | \
@@ -82,7 +82,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test "$req_libassuan_api" -gt 0 ; then
- tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
+ tmp=`CC=$CC $LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0`
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBASSUAN API version])
if test "$req_libassuan_api" -eq "$tmp" ; then
@@ -97,12 +97,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test x"$host" != x ; then
- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
+ libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none`
if test x"$libassuan_config_host" != xnone ; then
if test x"$libassuan_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
-*** The config script $LIBASSUAN_CONFIG was
+*** The config script "$LIBASSUAN_CONFIG" was
*** built for $libassuan_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-libassuan-prefix
@@ -138,8 +138,8 @@ 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`
+ LIBASSUAN_CFLAGS=`CC=$CC $LIBASSUAN_CONFIG --cflags`
+ LIBASSUAN_LIBS=`CC=$CC $LIBASSUAN_CONFIG --libs`
ifelse([$2], , :, [$2])
else
LIBASSUAN_CFLAGS=""