--- xserver-server-1.6-branch.orig/configure.ac 2009-03-03 19:05:16.000000000 +0000 +++ xserver-server-1.6-branch/configure.ac 2009-03-12 22:02:27.000000000 +0000 @@ -1103,6 +1103,11 @@ AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], [Use libmd SHA1 functions instead of OpenSSL libcrypto])]) fi +if test "x$SHA1_LIB" = "x" ; then + AC_CHECK_LIB([md], [SHAInit], [SHA1_LIB="-lmd" + AC_DEFINE([HAVE_SHA_IN_LIBMD], [1], + [Use libmd SHA functions instead of OpenSSL libcrypto])]) +fi if test "x$SHA1_LIB" = "x" ; then PKG_CHECK_EXISTS([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], --- xserver-server-1.6-branch.orig/include/dix-config.h.in 2009-03-03 19:05:16.000000000 +0000 +++ xserver-server-1.6-branch/include/dix-config.h.in 2009-03-12 22:02:45.000000000 +0000 @@ -156,6 +156,7 @@ /* Define to use libmd SHA1 functions instead of OpenSSL libcrypto */ #undef HAVE_SHA1_IN_LIBMD +#undef HAVE_SHA_IN_LIBMD /* Define to 1 if you have the `shmctl64' function. */ #undef HAVE_SHMCTL64 --- xserver-server-1.6-branch.orig/render/glyph.c 2009-03-03 19:05:16.000000000 +0000 +++ xserver-server-1.6-branch/render/glyph.c 2009-03-12 22:17:30.000000000 +0000 @@ -28,6 +28,8 @@ #ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ # include +#elif defined HAVE_SHA_IN_LIBMD /* Martin Hinner's libmd */ +# include #else /* Use OpenSSL's libcrypto */ # include /* buggy openssl/sha.h wants size_t */ # include @@ -205,6 +207,13 @@ SHA1Update (&ctx, gi, sizeof (xGlyphInfo)); SHA1Update (&ctx, bits, size); SHA1Final (sha1, &ctx); +#elif defined HAVE_SHA_IN_LIBMD + SHA_CTX ctx; + + SHAInit (&ctx); + SHAUpdate (&ctx, gi, sizeof (xGlyphInfo)); + SHAUpdate (&ctx, bits, size); + SHAFinal (sha1, &ctx); #else /* Use OpenSSL's libcrypto */ SHA_CTX ctx; int success;