From f67537fba4e2fab8c949bb2a25d357630aeed37b Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Thu, 22 Dec 2016 12:27:11 +0100 Subject: [PATCH] Correct gpm detection in configure script --- ChangeLog | 1 + configure | 11 +++++------ configure.ac | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9062fa38..9c91fa54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2016-12-22 Markus Gans * VTerm marks printed characters for a correct determination of unchanged characters + * Correct gpm detection in configure script 2016-12-18 Markus Gans * Only perform VTerm updates on terminal updates diff --git a/configure b/configure index f4ffc9a4..3b404023 100755 --- a/configure +++ b/configure @@ -16973,13 +16973,12 @@ ac_config_files="$ac_config_files Makefile src/Makefile src/fonts/Makefile doc/M # Check whether --with-gpm was given. if test "${with_gpm+set}" = set; then : - withval=$with_gpm; + withval=$with_gpm; with_gpm=no else with_gpm=yes fi - -if test "x$with_gpm" != "xno" +if test "x$with_gpm" = "xyes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgpm" >&5 $as_echo_n "checking for main in -lgpm... " >&6; } @@ -17012,12 +17011,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_main" >&5 $as_echo "$ac_cv_lib_gpm_main" >&6; } if test "x$ac_cv_lib_gpm_main" = xyes; then : - LIBS="$LIBS -lgpm" -fi - $as_echo "#define HAVE_LIBGPM 1" >>confdefs.h + LIBS="$LIBS -lgpm" +fi + fi # profiling diff --git a/configure.ac b/configure.ac index 87c65f40..f385528b 100644 --- a/configure.ac +++ b/configure.ac @@ -59,15 +59,14 @@ AC_CONFIG_FILES([Makefile src/Makefile src/fonts/Makefile doc/Makefile test/Make # use GPM (General Purpose Mouse) AC_ARG_WITH([gpm], [AS_HELP_STRING([--without-gpm], [Disable GPM mouse support])], - [], + [with_gpm=no], [with_gpm=yes]) - -if test "x$with_gpm" != "xno" +if test "x$with_gpm" = "xyes" then AC_CHECK_LIB([gpm], [main], - [LIBS="$LIBS -lgpm"]) - AC_DEFINE([HAVE_LIBGPM], 1, [Define to 1 if GPM mouse is enabled]) + [AC_DEFINE([HAVE_LIBGPM], 1, [Define to 1 if GPM mouse is enabled]) + LIBS="$LIBS -lgpm"]) fi # profiling