1################################################################################
2#
3# mc
4#
5################################################################################
6
7MC_VERSION = 4.8.31
8MC_SOURCE = mc-$(MC_VERSION).tar.xz
9MC_SITE = http://ftp.midnight-commander.org
10MC_LICENSE = GPL-3.0+
11MC_LICENSE_FILES = COPYING
12MC_DEPENDENCIES = libglib2 host-pkgconf $(TARGET_NLS_DEPENDENCIES)
13MC_CONF_ENV = \
14	CFLAGS="$(TARGET_CFLAGS) -std=c99" \
15	LIBS=$(TARGET_NLS_LIBS)
16
17ifeq ($(BR2_PACKAGE_GPM),y)
18MC_CONF_OPTS += --with-gpm-mouse
19MC_DEPENDENCIES += gpm
20else
21MC_CONF_OPTS += --without-gpm-mouse
22endif
23
24ifeq ($(BR2_PACKAGE_LIBSSH2),y)
25MC_CONF_OPTS += --enable-vfs-sftp
26MC_DEPENDENCIES += libssh2
27else
28MC_CONF_OPTS += --disable-vfs-sftp
29endif
30
31# mc prefers slang, so use that if enabled, otherwise
32# fallback to using ncurses.
33# Either or both will be enabled, but we prefer slang.
34ifeq ($(BR2_PACKAGE_SLANG),y)
35MC_DEPENDENCIES += slang
36MC_CONF_OPTS += --with-screen=slang
37else
38MC_DEPENDENCIES += ncurses
39MC_CONF_OPTS += --with-screen=ncurses
40endif
41
42ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
43MC_CONF_OPTS += --with-x
44MC_DEPENDENCIES += xlib_libX11
45else
46MC_CONF_OPTS += --without-x
47endif
48
49$(eval $(autotools-package))
50