[systemd-devel] [PATCH] configure.ac: check if AM_PATH_LIBGCRYPT is a defined macro

Michael Biebl mbiebl at gmail.com
Mon May 6 10:35:18 PDT 2013


Say Lennart prepares a new upstream release and forgot to install
libgcrypt-devel, then he silently produces a dist tarball which will
be broken.
I'm not sure I like that behaviour.

Michael

2013/5/6 Elia Pinto <gitter.spiros at gmail.com>:
> To search the libgcrypt support the developer are advised
> to use the automake macro AM_PATH_LIBGCRYPT. But if libgcrypt-devel
> is not installed the macro does not exist yet and so
> configure goes wrong. This patch test first whether the macro is defined,
> and if not it set  have_lgcrypt to false.
>
> Signed-off-by: Elia Pinto <gitter.spiros at gmail.com>
> ---
>  configure.ac |   11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 285fc44..688e393 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -454,12 +454,13 @@ AC_ARG_ENABLE([gcrypt],
>                  [have_gcrypt=auto])
>
>  if test "x${have_gcrypt}" != xno ; then
> -        AM_PATH_LIBGCRYPT(
> -                [1.4.5],
> -                [have_gcrypt=yes],
> -                [if test "x$have_gcrypt" = xyes ; then
> +        m4_ifdef([AM_PATH_LIBGCRYPT],
> +                  [AM_PATH_LIBGCRYPT(
> +                  [1.4.5],
> +                  [have_gcrypt=yes],
> +                  [if test "x$have_gcrypt" = xyes ; then
>                          AC_MSG_ERROR([*** GCRYPT headers not found.])
> -                fi])
> +                  fi]],[have_gcrypt=no])
>
>          if test "x$have_gcrypt" = xyes ; then
>                  GCRYPT_LIBS="$LIBGCRYPT_LIBS"
> --
> 1.7.9.5
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list