summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-09-11 18:53:59 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2010-09-11 18:53:59 +0200
commit9d7bbc6b52602933dda5f4e6d56939a8a9e9adc4 (patch)
tree2d27cbd09dcaaf5f37d90960f65d8c72bf2e83bc /configure.ac
parent2b5f0bec982e57f322ee0c78df1d63092ab48f75 (diff)
If compiled with "./configure --enable-mouse", most PhotoRec screens can be driven by mouse.
gpm library is dynamicaly loaded by ncurses, so this option isn't compatible with static binaries.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1dbfdab..b0cbd71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,6 +188,15 @@ AC_ARG_ENABLE([qt],
esac],
[use_qt=false])
+AC_ARG_ENABLE([ncmouse],
+ AS_HELP_STRING(--enable-ncmouse,enable use of mouse in ncurses(default is NO)),
+ [case "${enableval}" in
+ yes) use_ncmouse=true ;;
+ no) use_ncmouse=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-mouse]) ;;
+ esac],
+ [use_ncmouse=false])
+
use_icon=no
case "$target" in
@@ -457,6 +466,17 @@ if test -z "${use_ncurses}"; then
photorec_LDADD="$photorec_LDADD -ltinfo"
fi
])
+ if test "$use_ncmouse" = "true";
+ then
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $photorec_LDADD"
+ AC_CHECK_FUNCS(mousemask)
+ LIBS="$ac_save_LIBS"
+ if test "$ac_cv_func_mousemask" = "yes";
+ then
+ AC_DEFINE([ENABLE_MOUSE],1,[Define to 1 if the ncurses mouse interface is enabled])
+ fi
+ fi
else
AC_MSG_WARN(Use of ncurses library disabled)
fi