From 33fc4a63071c03ad46636b345a814e7e6d8f4ae0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Feb 2022 18:07:38 +0000 Subject: patch 8.2.4457: the GPM library can only be linked statically Problem: The GPM library can only be linked statically. Solution: Make it possible to load the GPM library dynamically. (Damien) --- src/configure.ac | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/configure.ac') diff --git a/src/configure.ac b/src/configure.ac index 67b376a49e..4dd74fc2a8 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4096,13 +4096,13 @@ if test "x$GTK_CFLAGS" != "x"; then LIBS="$ac_save_LIBS" fi -AC_MSG_CHECKING(--disable-gpm argument) +AC_MSG_CHECKING(--enable-gpm argument) AC_ARG_ENABLE(gpm, - [ --disable-gpm Don't use gpm (Linux mouse daemon).], , + [ --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic], , [enable_gpm="yes"]) -if test "$enable_gpm" = "yes"; then - AC_MSG_RESULT(no) +if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then + AC_MSG_RESULT($enable_gpm) dnl Checking if gpm support can be compiled AC_CACHE_CHECK([for gpm], vi_cv_have_gpm, [olibs="$LIBS" ; LIBS="-lgpm"] @@ -4117,11 +4117,15 @@ if test "$enable_gpm" = "yes"; then [LIBS="$olibs"] ) if test $vi_cv_have_gpm = yes; then - LIBS="$LIBS -lgpm" + if test "$enable_gpm" = "yes"; then + LIBS="$LIBS -lgpm" + else + AC_DEFINE(DYNAMIC_GPM) + fi AC_DEFINE(HAVE_GPM) fi else - AC_MSG_RESULT(yes) + AC_MSG_RESULT(no) fi AC_MSG_CHECKING(--disable-sysmouse argument) -- cgit v1.2.3