xserver: Branch 'server-21.1-branch'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 17:58:55 UTC 2025


 configure.ac |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a651eefc9e525072d99413c1aeabd01858c50819
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Jan 3 14:41:59 2025 -0500

    autotools: enable static use of Nettle for SHA1
    
    Debian builds xserver 21 using autotools.
    
    When debian builds xserver-xorg for constrained environments like the
    installer, it wants to build against the static library of libnettle
    for SHA1, see debian/patches/03_static-nettle.diff in the debian
    repository at
    https://salsa.debian.org/xorg-team/xserver/xorg-server.git
    
    This modification of configure.ac makes it possible to build static
    nettle when needed, while preserving the build to use nettle with a
    dynamic library when passing a different configuration option.
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1756>

diff --git a/configure.ac b/configure.ac
index a5c426a84..7607d2497 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1493,7 +1493,7 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
 
 # SHA1 hashing
 AC_ARG_WITH([sha1],
-            [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
+            [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|nettlestatic|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
                             [choose SHA1 implementation])])
 AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
 if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
@@ -1568,6 +1568,14 @@ if test "x$with_sha1" = xlibnettle; then
 	          [Use libnettle SHA1 functions])
 	SHA1_LIBS=-lnettle
 fi
+if test "x$with_sha1" = xnettlestatic && test "x$HAVE_LIBNETTLE" != xyes; then
+	AC_MSG_ERROR([nettlestatic requested but libnettle not found])
+fi
+if test "x$with_sha1" = xnettlestatic; then
+	AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1],
+	          [Use static libnettle SHA1 functions])
+	SHA1_LIBS=-l:libnettle.a
+fi
 AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes])
 if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
 	with_sha1=libgcrypt


More information about the xorg-commit mailing list