FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 08-15-2011, 09:32 PM
Allan McRae
 
Default configure.ac: use upstream supplied configure check and flags

On 16/08/11 06:35, Rémy Oudompheng wrote:

The homemade check for libgpgme is kept because it is not included
in gpgme.m4. Additionnally, GPGME_CFLAGS (containing the include dirs)
is added to be CPPFLAGS variable, and GPGME_LIBS is added to the LIBADD
variable.

Signed-off-by: Rémy Oudompheng<remy@archlinux.org>
---
configure.ac | 15 ++-
lib/libalpm/Makefile.am | 4 +-
m4/gpgme.m4 | 307 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 319 insertions(+), 7 deletions(-)
create mode 100644 m4/gpgme.m4

diff --git a/configure.ac b/configure.ac
index 2d52d6a..3a5cacc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,12 +160,15 @@ AM_CONDITIONAL([HAVE_LIBSSL], [test "x$with_openssl" = "xyes"])
AC_MSG_CHECKING(whether to link with libgpgme)
AS_IF([test "x$with_gpgme" != "xno"],
[AC_MSG_RESULT(yes)
- AC_CHECK_LIB([gpgme], [gpgme_check_version], ,
- [if test "x$with_gpgme" != "xcheck"; then
- AC_MSG_FAILURE([--with-ggpme was given, but -lgpgme was not found])
- fi],
- [-lgpgme])
- with_gpgme=$ac_cv_lib_gpgme_gpgme_check_version],
+ AM_PATH_GPGME([],
+ [AC_CHECK_LIB([gpgme], [gpgme_check_version],
+ [with_gpgme=yes],
+ [AC_MSG_FAILURE([gpgme-config was found, but -lgpgme was not found, check your GPGME install])]
+ [-lgpgme])],


This won't work. You check for the path to -lgpgme using AM_PATH_GPGME
and then ignore it completely when checking for -lgpgme... We also
need to test for gpgme.h.


The patch in the bug report (https://bugs.archlinux.org/task/24612) does
this correctly but just needed adjusted to use AM_PATH_GPGME to get the
initial path.




+ [if test "x$with_gpgme" != "xcheck"; then
+ AC_MSG_FAILURE([--with-gpgme was given, but -lgpgme was not found])
+ fi
+ with_gpgme=no])],
AC_MSG_RESULT(no))
AM_CONDITIONAL([HAVE_LIBGPGME], [test "x$with_gpgme" = "xyes"])
 
Old 08-17-2011, 12:48 AM
Dan McGee
 
Default configure.ac: use upstream supplied configure check and flags

On Mon, Aug 15, 2011 at 3:35 PM, Rémy Oudompheng <remy@archlinux.org> wrote:
> The homemade check for libgpgme is kept because it is not included
> in gpgme.m4. Additionnally, GPGME_CFLAGS (containing the include dirs)
> is added to be CPPFLAGS variable, and GPGME_LIBS is added to the LIBADD
> variable.
>
> Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
> ---
> *configure.ac * * * * * *| * 15 ++-
> *lib/libalpm/Makefile.am | * *4 +-
> *m4/gpgme.m4 * * * * * * | *307 +++++++++++++++++++++++++++++++++++++++++++++++
> *3 files changed, 319 insertions(+), 7 deletions(-)
> *create mode 100644 m4/gpgme.m4
>
> diff --git a/configure.ac b/configure.ac
> index 2d52d6a..3a5cacc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -160,12 +160,15 @@ AM_CONDITIONAL([HAVE_LIBSSL], [test "x$with_openssl" = "xyes"])
> *AC_MSG_CHECKING(whether to link with libgpgme)
> *AS_IF([test "x$with_gpgme" != "xno"],
> * * * *[AC_MSG_RESULT(yes)
> - * * * AC_CHECK_LIB([gpgme], [gpgme_check_version], ,
> - * * * [if test "x$with_gpgme" != "xcheck"; then
> - * * * * * * * AC_MSG_FAILURE([--with-ggpme was given, but -lgpgme was not found])
> - * * * fi],
> - * * * [-lgpgme])
> - * * * with_gpgme=$ac_cv_lib_gpgme_gpgme_check_version],
This didn't work for me. I think you deleted a crucial line here- we
no longer get HAVE_LIBGPGME at all anymore in config.h, which is a
huge problem, as it built my dev pacman version without gpgme support.
Whatever you replaced it with didn't work for me and thus no define in
config.h (it wasn't even commented out).

> + * * * AM_PATH_GPGME([],
> + * * * * * * * [AC_CHECK_LIB([gpgme], [gpgme_check_version],
> + * * * * * * * * * * * [with_gpgme=yes],
> + * * * * * * * * * * * [AC_MSG_FAILURE([gpgme-config was found, but -lgpgme was not found, check your GPGME install])]
> + * * * * * * * * * * * [-lgpgme])],
> + * * * * * * * [if test "x$with_gpgme" != "xcheck"; then
> + * * * * * * * * * * * AC_MSG_FAILURE([--with-gpgme was given, but -lgpgme was not found])
> + * * * * * * * fi
> + * * * * * * * with_gpgme=no])],
 

Thread Tools




All times are GMT. The time now is 06:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org