[PATCH v2] Add libgcrypt as an option for sha1

Julien Cristau jcristau at debian.org
Sun Oct 4 05:45:04 PDT 2009


On Sun, Oct  4, 2009 at 14:36:34 +0200, Rémi Cardona wrote:

> Le dimanche 04 octobre 2009 à 13:51 +0200, Julien Cristau a écrit :
> > +# SHA1 hashing in render/glyph.c
> > +AC_ARG_WITH([sha1],
> > +            [AS_HELP_STRING([--with-sha1=[libmd|libgcrypt|libcrypto]],
> > +                            [choose SHA1 implementation])])
> > +
> > +AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
> > +if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
> > +	with_sha1=libmd
> > +fi
> 
> How about this instead (put the default implemenation in AC_ARG_WITH) :
> 
> # SHA1 hashing in render/glyph.c
> AC_ARG_WITH([sha1],
>             [AS_HELP_STRING([--with-sha1=[libmd|libgcrypt|libcrypto]],
>                             [choose SHA1 implementation
> (default=libmd)])],
>             [], [with_sha1=libmd])
> 
That changes the behaviour, it forces libmd if you don't explicitly tell
configure to use something else.  With my patch, the first
implementation found is used (and I think that's better).

Thanks for the review!

Cheers,
Julien


More information about the xorg-devel mailing list