(user_menu_cmd): refactoring.
[midnight-commander.git] / m4.include / mc-with-x.m4
blobfa269151dd5b13a936bda1d6b5da38e45a2ba4b9
2 dnl X11 support.
3 dnl Used to read keyboard modifiers when running under X11.
4 AC_DEFUN([mc_WITH_X], [
6     AC_PATH_XTRA
8     if test x"$no_x" = xyes; then
9         textmode_x11_support="no"
10     else
11         AC_DEFINE([HAVE_TEXTMODE_X11_SUPPORT], [1],
12                         [Define to enable getting events from X Window System])
13         textmode_x11_support="yes"
15         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17         if test x"$g_module_supported" = x; then
18             MCLIBS="$MCLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
19         fi
20     fi
22     AM_CONDITIONAL([HAVE_TEXTMODE_X11_SUPPORT], [test x"$textmode_x11_support" = x"yes"])