1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
|
|
|
dnl Configure.in file for the Midnight Commander
|
|
|
|
dnl
|
2000-09-16 03:57:10 +04:00
|
|
|
|
2009-01-29 12:12:29 +03:00
|
|
|
AC_PREREQ(2.60)
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
|
2005-11-11 05:03:55 +03:00
|
|
|
m4_pattern_forbid(MC_)
|
2009-07-30 17:48:40 +04:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2002-08-21 19:22:06 +04:00
|
|
|
AC_CONFIG_AUX_DIR(config)
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_CONFIG_SRCDIR(src/main.c)
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_VERSION
|
2009-06-02 17:36:58 +04:00
|
|
|
AM_INIT_AUTOMAKE(mc, ${VERSION} )
|
2010-04-07 12:04:26 +04:00
|
|
|
dnl Enable silent rules by default (if yes)
|
2010-04-06 21:45:07 +04:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2000-09-12 23:31:56 +04:00
|
|
|
AM_MAINTAINER_MODE
|
2012-08-10 13:09:07 +04:00
|
|
|
|
2001-09-12 23:18:38 +04:00
|
|
|
AC_CANONICAL_HOST
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2009-01-09 03:20:50 +03:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2009-04-25 12:09:47 +04:00
|
|
|
|
2011-03-24 15:40:18 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for compiler
|
|
|
|
dnl ############################################################################
|
2001-08-25 07:14:20 +04:00
|
|
|
|
2001-09-07 08:25:02 +04:00
|
|
|
AC_PROG_CC_STDC
|
2010-01-26 23:26:49 +03:00
|
|
|
AM_PROG_CC_C_O
|
2001-08-25 07:14:20 +04:00
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_CHECK_CFLAGS
|
2009-02-03 18:24:53 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
CFLAGS_OPTS=""
|
|
|
|
if test "x$CFLAGS" = "x"; then
|
|
|
|
CFLAGS_OPTS=" -O2 "
|
|
|
|
fi
|
|
|
|
if test x$USE_MAINTAINER_MODE = xyes; then
|
|
|
|
CFLAGS_OPTS="-g3 -O -ggdb"
|
|
|
|
AC_DEFINE(USE_MAINTAINER_MODE, 1, [Use maintainer mode])
|
|
|
|
fi
|
2009-02-03 18:24:53 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_ARG_ENABLE([werror],
|
|
|
|
AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors]))
|
|
|
|
if test "x$enable_werror" = xyes; then
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_CHECK_ONE_CFLAG([-Werror])
|
2012-08-10 13:09:07 +04:00
|
|
|
fi
|
2002-08-23 19:56:51 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_PROG_LIBTOOL
|
2011-03-04 19:07:30 +03:00
|
|
|
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for programs
|
|
|
|
dnl ############################################################################
|
2001-06-26 03:52:47 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
PKG_PROG_PKG_CONFIG
|
|
|
|
AC_PROG_INSTALL
|
2002-08-23 19:56:51 +04:00
|
|
|
AC_PROG_LN_S
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
|
2012-10-08 17:19:42 +04:00
|
|
|
AC_PATH_PROG([PYTHON], [python], [/usr/bin/python])
|
|
|
|
AC_PATH_PROG([RUBY], [ruby], [/usr/bin/ruby])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl Check nroff and the options it supports
|
|
|
|
AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
|
|
|
|
dnl Default values
|
|
|
|
MANDOC=-man
|
|
|
|
MAN_FLAGS=
|
|
|
|
if $HAVE_nroff; then
|
|
|
|
AC_MSG_CHECKING([for manual formatting macros])
|
|
|
|
AC_CACHE_VAL(mc_cv_mandoc, [
|
|
|
|
nroff -mandoc < /dev/null > /dev/null 2>&1
|
|
|
|
if test $? = 0; then
|
|
|
|
mc_cv_mandoc=-mandoc
|
2003-10-29 22:23:16 +03:00
|
|
|
else
|
2012-08-10 13:09:07 +04:00
|
|
|
mc_cv_mandoc=-man
|
2003-10-29 22:23:16 +03:00
|
|
|
fi
|
2012-08-10 13:09:07 +04:00
|
|
|
])
|
|
|
|
MANDOC=$mc_cv_mandoc
|
|
|
|
AC_MSG_RESULT([$MANDOC])
|
2001-10-25 07:46:59 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_MSG_CHECKING([for option to disable ANSI color in manuals])
|
|
|
|
AC_CACHE_VAL(mc_cv_man_nocolor, [
|
|
|
|
nroff -c < /dev/null > /dev/null 2>&1
|
|
|
|
if test $? = 0; then
|
|
|
|
mc_cv_man_nocolor=-c
|
|
|
|
else
|
|
|
|
mc_cv_man_nocolor=
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
MAN_FLAGS=$mc_cv_man_nocolor
|
|
|
|
AC_MSG_RESULT([${MAN_NOCOLOR-none}])
|
2002-09-14 03:09:22 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
|
|
|
|
AC_CACHE_VAL(mc_cv_nroff_tascii, [
|
|
|
|
mc_cv_nroff_tascii=
|
|
|
|
nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
|
|
|
|
if test $? = 0; then
|
|
|
|
mc_cv_nroff_tascii=-Tlatin1
|
|
|
|
else
|
|
|
|
nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
|
|
|
|
if test $? = 0; then
|
|
|
|
mc_cv_nroff_tascii=-Tascii
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT([${mc_cv_nroff_tascii-no}])
|
|
|
|
MAN_FLAGS="$MAN_FLAGS $mc_cv_nroff_tascii"
|
2001-06-29 12:09:37 +04:00
|
|
|
fi
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_SUBST(MANDOC)
|
|
|
|
AC_SUBST(MAN_FLAGS)
|
2002-11-29 03:46:09 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl Check for -L option to file
|
|
|
|
AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
|
|
|
|
if $HAVE_FILECMD; then
|
|
|
|
AC_MSG_CHECKING([for -L option to file command])
|
|
|
|
AC_CACHE_VAL(mc_cv_filel, [
|
|
|
|
file -L . > /dev/null 2>&1
|
|
|
|
if test $? = 0; then
|
|
|
|
mc_cv_filel=yes
|
2003-02-20 21:35:32 +03:00
|
|
|
else
|
2012-08-10 13:09:07 +04:00
|
|
|
mc_cv_filel=no
|
2003-02-20 21:35:32 +03:00
|
|
|
fi
|
2012-08-10 13:09:07 +04:00
|
|
|
])
|
|
|
|
if test x$mc_cv_filel = xyes; then
|
|
|
|
AC_DEFINE(FILE_L, 1, [Define if the file command accepts the -L option])
|
|
|
|
fi
|
|
|
|
filel=$mc_cv_filel
|
|
|
|
AC_MSG_RESULT([$filel])
|
2002-11-29 03:46:09 +03:00
|
|
|
fi
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl Only list browsers here that can be run in background (i.e. with `&')
|
|
|
|
AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla firefox konqueror opera])
|
2002-11-29 03:46:09 +03:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for other tools
|
|
|
|
dnl ############################################################################
|
|
|
|
|
|
|
|
AC_CHECK_TOOL(AR, ar, ar)
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_UNIT_TESTS
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for main libraies
|
|
|
|
dnl ############################################################################
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_CHECK_GLIB
|
|
|
|
mc_G_MODULE_SUPPORTED
|
|
|
|
mc_WITH_SCREEN
|
|
|
|
mc_CHECK_SEARCH_TYPE
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl X11 support. Used to read keyboard modifiers when running under X11.
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_WITH_X
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for header files
|
|
|
|
dnl ############################################################################
|
|
|
|
|
2013-04-07 13:32:28 +04:00
|
|
|
AC_CHECK_HEADERS([string.h memory.h limits.h malloc.h \
|
|
|
|
utime.h sys/statfs.h sys/vfs.h \
|
2012-01-02 11:41:37 +04:00
|
|
|
sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
|
2013-11-24 09:39:16 +04:00
|
|
|
sys/socket.h])
|
2018-01-04 09:23:59 +03:00
|
|
|
dnl This macro is redefined in m4.include/sys_types_h.m4
|
|
|
|
dnl to work around a buggy version in autoconf <= 2.69.
|
2013-11-24 09:39:16 +04:00
|
|
|
AC_HEADER_MAJOR
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for types
|
|
|
|
dnl ############################################################################
|
|
|
|
|
|
|
|
dnl Check largefile before type sizeof checks
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(long)
|
|
|
|
AC_TYPE_UINTMAX_T
|
|
|
|
AC_CHECK_SIZEOF(uintmax_t)
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_CHECK_SIZEOF(off_t)
|
|
|
|
AC_TYPE_MODE_T
|
2016-03-16 18:10:48 +03:00
|
|
|
gl_PROMOTED_TYPE_MODE_T
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_STRUCT_ST_BLOCKS
|
2017-04-19 02:59:24 +03:00
|
|
|
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev, struct stat.st_mtim])
|
2016-04-06 13:19:59 +03:00
|
|
|
gl_STAT_SIZE
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-10-31 11:33:50 +04:00
|
|
|
AH_TEMPLATE([sig_atomic_t],
|
|
|
|
[/* Define to `int' if <signal.h> doesn't define.])
|
|
|
|
AH_TEMPLATE([SIG_ATOMIC_VOLATILE_T],
|
|
|
|
[Some systems declare sig_atomic_t as volatile, some others -- no.
|
|
|
|
This define will have value `sig_atomic_t' or
|
|
|
|
`volatile sig_atomic_t' accordingly.])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for sig_atomic_t in signal.h)
|
|
|
|
AC_EGREP_HEADER(sig_atomic_t,signal.h,
|
|
|
|
[
|
|
|
|
ac_cv_type_sig_atomic_t=yes;
|
|
|
|
AC_EGREP_HEADER(volatile.*sig_atomic_t,
|
|
|
|
signal.h,
|
|
|
|
[
|
|
|
|
is_sig_atomic_t_volatile=yes;
|
|
|
|
AC_MSG_RESULT([yes, volatile])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
is_sig_atomic_t_volatile=no;
|
|
|
|
AC_MSG_RESULT([yes, non volatile])
|
|
|
|
])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_CHECK_TYPE(sig_atomic_t, int)
|
|
|
|
is_sig_atomic_t_volatile=no
|
|
|
|
])
|
|
|
|
if test $is_sig_atomic_t_volatile = 'yes'
|
|
|
|
then
|
|
|
|
AC_DEFINE(SIG_ATOMIC_VOLATILE_T, sig_atomic_t)
|
|
|
|
else
|
|
|
|
AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t])
|
|
|
|
fi
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Check for functions
|
|
|
|
dnl ############################################################################
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2005-08-16 00:59:13 +04:00
|
|
|
AC_CHECK_FUNCS([\
|
2010-05-13 21:28:12 +04:00
|
|
|
strverscmp \
|
2010-05-22 11:42:26 +04:00
|
|
|
strncasecmp \
|
2010-05-13 21:28:12 +04:00
|
|
|
realpath
|
2005-08-16 00:59:13 +04:00
|
|
|
])
|
2003-10-29 11:15:32 +03:00
|
|
|
|
2015-12-07 02:39:05 +03:00
|
|
|
dnl utimensat is supported since glibc 2.6 and specified in POSIX.1-2008
|
|
|
|
AC_CHECK_FUNCS([utimensat])
|
|
|
|
|
1999-05-17 09:51:44 +04:00
|
|
|
dnl getpt is a GNU Extension (glibc 2.1.x)
|
2003-07-22 03:29:29 +04:00
|
|
|
AC_CHECK_FUNCS(posix_openpt, , [AC_CHECK_FUNCS(getpt)])
|
2000-09-16 03:57:10 +04:00
|
|
|
AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
dnl replacing lstat with statlstat on sco makes it more portable between
|
|
|
|
dnl sco clones
|
|
|
|
AC_CHECK_FUNCS(statlstat)
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
|
|
|
|
dnl We use only part of the functionality of mmap, so on AIX,
|
|
|
|
dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
|
|
|
|
AC_ARG_WITH([mmap],
|
|
|
|
AS_HELP_STRING([--with-mmap], [Use the mmap call @<:@yes if found@:>@]))
|
|
|
|
if test x$with_mmap != xno; then
|
|
|
|
if test x$with_mmap = x; then
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_MMAP, 1)
|
|
|
|
fi
|
|
|
|
fi
|
1999-04-21 23:18:31 +04:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
dnl Sequent wants getprocessstats
|
|
|
|
AC_CHECK_LIB(seq, get_process_stats, [
|
|
|
|
LIBS="$LIBS -lseq"
|
2001-09-11 04:27:03 +04:00
|
|
|
AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
|
|
|
|
[Define if you have function `get_process_stats' and
|
|
|
|
have to use that instead of gettimeofday])])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
mc_AC_GET_FS_INFO
|
|
|
|
|
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Internationalization
|
|
|
|
dnl ############################################################################
|
|
|
|
|
2016-04-25 11:35:06 +03:00
|
|
|
AM_GNU_GETTEXT([no-libtool], [need-ngettext])
|
|
|
|
AM_GNU_GETTEXT_VERSION([0.18.1])
|
2012-08-10 13:09:07 +04:00
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_I18N
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl OS specific flags
|
|
|
|
dnl ############################################################################
|
|
|
|
|
|
|
|
case $host_os in
|
|
|
|
aux*)
|
|
|
|
# A/UX
|
|
|
|
LIBS="$LIBS -lposix"
|
|
|
|
AC_DEFINE(_POSIX_SOURCE)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl If running under AIX, AC_AIX does not tell us that
|
|
|
|
AC_MSG_CHECKING([for AIX defines])
|
|
|
|
AC_EGREP_CPP([yes],
|
|
|
|
[
|
|
|
|
#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
|
|
|
|
yes
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check if the OS is supported by the console saver.
|
|
|
|
cons_saver=""
|
|
|
|
case $host_os in
|
|
|
|
linux*)
|
|
|
|
cons_saver=yes
|
|
|
|
esac
|
2001-04-20 03:20:06 +04:00
|
|
|
|
2002-09-30 05:25:58 +04:00
|
|
|
dnl Check for gpm mouse support (Linux only)
|
1998-02-27 07:54:42 +03:00
|
|
|
mouse_lib="xterm only"
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_ARG_WITH([gpm-mouse],
|
|
|
|
AS_HELP_STRING([--with-gpm-mouse], [Compile with gpm mouse support (Linux only) @<:@yes if found@:>@]))
|
2002-09-30 05:25:58 +04:00
|
|
|
|
2001-01-13 09:55:24 +03:00
|
|
|
case $host_os in
|
|
|
|
linux*)
|
2002-09-30 05:25:58 +04:00
|
|
|
if test x$with_gpm_mouse != xno; then
|
|
|
|
AC_CHECK_LIB(gpm, Gpm_Repeat,
|
|
|
|
[AC_DEFINE(HAVE_LIBGPM, 1,
|
|
|
|
[Define to enable gpm mouse support on Linux])
|
|
|
|
mouse_lib="gpm and xterm"
|
|
|
|
MCLIBS="$MCLIBS -lgpm"],
|
2009-09-23 19:56:02 +04:00
|
|
|
if test "x$with_gpm_mouse" = "xyes"; then
|
|
|
|
[AC_MSG_ERROR([libgpm is missing or older than 0.18])]
|
|
|
|
else
|
|
|
|
[AC_MSG_WARN([libgpm is missing or older than 0.18])]
|
|
|
|
fi
|
|
|
|
)
|
2002-09-30 05:25:58 +04:00
|
|
|
fi
|
2001-01-13 09:55:24 +03:00
|
|
|
;;
|
|
|
|
esac
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2009-05-05 17:19:32 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl libmc
|
|
|
|
dnl ############################################################################
|
2002-10-30 05:37:48 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
LIBMC_VERSION="0.0.1"
|
|
|
|
LIBMC_RELEASE="1"
|
|
|
|
AC_SUBST(LIBMC_VERSION)
|
|
|
|
AC_SUBST(LIBMC_RELEASE)
|
2002-10-30 05:37:48 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_ARG_ENABLE([mclib],
|
|
|
|
[AS_HELP_STRING([--enable-mclib], [Compile shared library libmc.so @<:@no@:>@])],
|
|
|
|
[
|
|
|
|
if test "x$enableval" = "xno" ; then
|
|
|
|
enable_mclib=no
|
|
|
|
else
|
|
|
|
if test "x$enable_shared" = "xno" ; then
|
|
|
|
AC_MSG_WARN([Build of shared library is disabled. Specify --enable-shared first])
|
|
|
|
enable_mclib=no
|
|
|
|
else
|
|
|
|
enable_mclib=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[enable_mclib=no])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AM_CONDITIONAL([ENABLE_MCLIB], [test x$enable_mclib = xyes])
|
2002-10-30 05:37:48 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl Where config files should be placed
|
|
|
|
dnl ############################################################################
|
|
|
|
|
|
|
|
AC_ARG_WITH([homedir],
|
|
|
|
AS_HELP_STRING([--with-homedir],
|
|
|
|
[Choose any place of user settings relative to home dir, or XDG for respect XDG standards @<:@XDG@:>@]),
|
|
|
|
[
|
2017-07-08 13:54:57 +03:00
|
|
|
dnl Unfortunately, there is no way to tell AC_ARG_WITH that the
|
|
|
|
dnl argument value is required, so we can't differentiate
|
|
|
|
dnl between `--with-homedir` and `--with-homedir=yes`, because
|
|
|
|
dnl `with_homedir` is set to `yes` in both cases.
|
|
|
|
dnl
|
|
|
|
dnl We opt to set `with_homedir` to `.mc` if the value is `yes`
|
|
|
|
dnl in order to avoid the surprise for users using
|
|
|
|
dnl `--with-homedir` w/o any value and then getting mc to store
|
|
|
|
dnl settings in the `yes` directory.
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
if test "x$withval" = "xXDG"; then
|
|
|
|
with_homedir=XDG
|
2017-07-08 13:54:57 +03:00
|
|
|
elif test "x$withval" = "xyes"; then
|
|
|
|
with_homedir=.mc
|
2012-08-10 13:09:07 +04:00
|
|
|
else
|
|
|
|
with_homedir=$withval
|
1999-09-20 03:09:07 +04:00
|
|
|
fi
|
2012-08-10 13:09:07 +04:00
|
|
|
],
|
|
|
|
[with_homedir=XDG])
|
|
|
|
|
|
|
|
|
|
|
|
if test x$with_homedir = xXDG; then
|
2015-04-05 08:50:45 +03:00
|
|
|
AC_DEFINE(MC_HOMEDIR_XDG, 1, [Define to enable XDG standard support])
|
2012-08-10 13:09:07 +04:00
|
|
|
else
|
2016-08-10 09:54:04 +03:00
|
|
|
AC_DEFINE(MC_HOMEDIR_XDG, 0, [Define to disable XDG standard support])
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_DEFINE_UNQUOTED([MC_USERCONF_DIR], ["$with_homedir"], [Where configs will be placed relative to $HOME])
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
2002-10-30 05:37:48 +03:00
|
|
|
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl MC options
|
|
|
|
dnl ############################################################################
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2016-11-03 10:46:11 +03:00
|
|
|
mc_ASSERT
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_WITH_INTERNAL_EDIT
|
2012-08-10 13:09:07 +04:00
|
|
|
|
|
|
|
dnl Diff viewer support.
|
|
|
|
AC_ARG_WITH([diff_viewer],
|
|
|
|
AS_HELP_STRING([--with-diff-viewer], [Compile with diff viewer @<:@yes@:>@]))
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
if test x$with_diff_viewer != xno; then
|
|
|
|
AC_DEFINE(USE_DIFF_VIEW, 1, [Define to enable diff viewer])
|
|
|
|
use_diff=yes
|
|
|
|
diff_msg="yes"
|
|
|
|
AC_MSG_NOTICE([using diff viewer])
|
|
|
|
else
|
|
|
|
diff_msg="no"
|
|
|
|
fi
|
2002-08-04 10:49:03 +04:00
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_SUBSHELL
|
|
|
|
mc_BACKGROUND
|
|
|
|
mc_VFS_CHECKS
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Directories
|
|
|
|
dnl ############################################################################
|
2011-11-07 17:34:20 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ${prefix} and ${exec_prefix} are undefined here if --prefix is not used in command line
|
|
|
|
dnl Let define ${prefix} and ${exec_prefix}
|
2012-09-25 17:07:03 +04:00
|
|
|
test "x$prefix" = "xNONE" && prefix="$ac_default_prefix"
|
|
|
|
test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
|
2011-11-07 17:34:20 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
if test x${libexecdir} = x'${exec_prefix}/libexec'; then
|
|
|
|
EXTHELPERSDIR=${prefix}/libexec/${PACKAGE}/ext.d
|
2012-09-25 17:07:03 +04:00
|
|
|
elif test x${libexecdir} = x'${exec_prefix}/lib'; then
|
|
|
|
EXTHELPERSDIR=${prefix}/lib/${PACKAGE}/ext.d
|
2011-11-07 17:34:20 +04:00
|
|
|
else
|
2012-08-10 13:09:07 +04:00
|
|
|
EXTHELPERSDIR=${libexecdir}/${PACKAGE}/ext.d
|
2011-11-07 17:34:20 +04:00
|
|
|
fi
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_SUBST(EXTHELPERSDIR)
|
2011-11-07 17:34:20 +04:00
|
|
|
|
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Documentation
|
|
|
|
dnl ############################################################################
|
2003-10-26 02:25:51 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
MAN_DATE="$(LC_ALL=C date "+%B %Y")"
|
|
|
|
AC_SUBST(MAN_DATE)
|
2003-10-26 02:25:51 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl Determine which help translations we want to install.
|
|
|
|
ALL_DOC_LINGUAS="es hu it pl ru sr"
|
2001-05-31 04:53:06 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
DOC_LINGUAS=
|
|
|
|
if test "x$USE_NLS" = xyes; then
|
|
|
|
if test -z "$LINGUAS"; then
|
|
|
|
langs="`grep -v '^#' $srcdir/po/LINGUAS`"
|
|
|
|
else
|
|
|
|
langs="$LINGUAS"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
langs=
|
2002-03-26 16:55:42 +03:00
|
|
|
fi
|
2001-05-31 04:53:06 +04:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
for h_lang in $ALL_DOC_LINGUAS; do
|
|
|
|
for lang in $langs; do
|
|
|
|
if test "$lang" = "$h_lang"; then
|
|
|
|
DOC_LINGUAS="$DOC_LINGUAS $lang"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
AC_SUBST(DOC_LINGUAS)
|
2009-11-26 14:18:14 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
DX_HTML_FEATURE(ON)
|
|
|
|
DX_CHM_FEATURE(OFF)
|
|
|
|
DX_CHI_FEATURE(OFF)
|
|
|
|
DX_MAN_FEATURE(OFF)
|
|
|
|
DX_RTF_FEATURE(OFF)
|
|
|
|
DX_XML_FEATURE(OFF)
|
|
|
|
DX_PDF_FEATURE(OFF)
|
|
|
|
DX_PS_FEATURE(OFF)
|
|
|
|
DX_INIT_DOXYGEN(mc,doxygen.cfg,devel)
|
2004-08-17 12:53:30 +04:00
|
|
|
|
2009-10-27 14:43:46 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl Configure results
|
|
|
|
dnl ############################################################################
|
2009-10-30 00:57:40 +03:00
|
|
|
|
2009-11-26 14:18:14 +03:00
|
|
|
CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS"
|
2009-10-30 00:29:32 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_SUBST(MCLIBS)
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(CPPFLAGS)
|
|
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
|
2011-03-24 13:38:22 +03:00
|
|
|
AM_CONDITIONAL(USE_NLS, [test x"$USE_NLS" = xyes])
|
2009-10-30 00:57:40 +03:00
|
|
|
AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
|
2009-05-10 19:01:15 +04:00
|
|
|
AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
|
2013-06-15 12:55:16 +04:00
|
|
|
AM_CONDITIONAL(USE_INTERNAL_EDIT, [test x"$use_internal_edit" = xyes ])
|
2012-04-26 14:05:48 +04:00
|
|
|
AM_CONDITIONAL(USE_ASPELL, [test x"$enable_aspell" = xyes ])
|
2010-03-03 16:09:15 +03:00
|
|
|
AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
|
2001-08-26 21:15:02 +04:00
|
|
|
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
|
|
|
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
2013-07-24 09:59:55 +04:00
|
|
|
dnl Clarify do we really need GModule
|
|
|
|
AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \
|
|
|
|
test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"])
|
2001-03-15 04:18:14 +03:00
|
|
|
|
2012-08-10 13:09:07 +04:00
|
|
|
AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
|
|
|
|
|
2010-05-11 18:24:25 +04:00
|
|
|
AC_CONFIG_FILES(
|
|
|
|
[
|
|
|
|
src/man2hlp/man2hlp
|
|
|
|
],
|
|
|
|
[
|
|
|
|
chmod +x src/man2hlp/man2hlp
|
|
|
|
])
|
|
|
|
|
2001-09-13 00:45:46 +04:00
|
|
|
AC_CONFIG_FILES([
|
2009-01-10 18:26:14 +03:00
|
|
|
Makefile
|
|
|
|
|
|
|
|
contrib/Makefile
|
2009-02-13 23:09:16 +03:00
|
|
|
contrib/dist/Makefile
|
|
|
|
contrib/dist/gentoo/Makefile
|
|
|
|
contrib/dist/redhat/Makefile
|
|
|
|
contrib/dist/redhat/mc.spec
|
2009-01-10 18:26:14 +03:00
|
|
|
contrib/dist/pkginfo
|
|
|
|
contrib/dist/prototype
|
2009-05-08 17:56:02 +04:00
|
|
|
|
|
|
|
misc/Makefile
|
2014-09-04 13:32:09 +04:00
|
|
|
misc/mc.menu
|
|
|
|
misc/mcedit.menu
|
2009-09-04 18:22:49 +04:00
|
|
|
misc/skins/Makefile
|
2012-03-07 04:20:30 +04:00
|
|
|
misc/ext.d/Makefile
|
|
|
|
misc/ext.d/doc.sh
|
2012-05-18 17:32:48 +04:00
|
|
|
misc/ext.d/misc.sh
|
2012-03-07 04:20:30 +04:00
|
|
|
misc/ext.d/text.sh
|
|
|
|
misc/ext.d/web.sh
|
2011-02-04 13:15:43 +03:00
|
|
|
misc/macros.d/Makefile
|
2009-05-08 17:56:02 +04:00
|
|
|
misc/mc.ext
|
2009-04-25 12:09:47 +04:00
|
|
|
|
1998-03-25 08:16:00 +03:00
|
|
|
src/Makefile
|
2010-01-21 17:20:11 +03:00
|
|
|
src/consaver/Makefile
|
2010-01-07 01:20:56 +03:00
|
|
|
src/editor/Makefile
|
2010-04-07 12:54:16 +04:00
|
|
|
src/man2hlp/Makefile
|
2015-11-10 15:54:40 +03:00
|
|
|
src/subshell/Makefile
|
2009-07-26 11:31:24 +04:00
|
|
|
src/viewer/Makefile
|
2010-03-03 16:09:15 +03:00
|
|
|
src/diffviewer/Makefile
|
2010-11-22 17:15:28 +03:00
|
|
|
src/filemanager/Makefile
|
2009-04-25 12:09:47 +04:00
|
|
|
|
2011-02-15 16:44:17 +03:00
|
|
|
src/vfs/Makefile
|
|
|
|
|
|
|
|
src/vfs/cpio/Makefile
|
|
|
|
|
|
|
|
src/vfs/extfs/Makefile
|
|
|
|
src/vfs/extfs/helpers/Makefile
|
|
|
|
src/vfs/extfs/helpers/a+
|
|
|
|
src/vfs/extfs/helpers/apt+
|
|
|
|
src/vfs/extfs/helpers/audio
|
|
|
|
src/vfs/extfs/helpers/deb
|
|
|
|
src/vfs/extfs/helpers/deba
|
|
|
|
src/vfs/extfs/helpers/debd
|
|
|
|
src/vfs/extfs/helpers/dpkg+
|
|
|
|
src/vfs/extfs/helpers/iso9660
|
|
|
|
src/vfs/extfs/helpers/hp48+
|
|
|
|
src/vfs/extfs/helpers/lslR
|
|
|
|
src/vfs/extfs/helpers/mailfs
|
|
|
|
src/vfs/extfs/helpers/patchfs
|
|
|
|
src/vfs/extfs/helpers/rpms+
|
|
|
|
src/vfs/extfs/helpers/s3+
|
|
|
|
src/vfs/extfs/helpers/uace
|
|
|
|
src/vfs/extfs/helpers/ualz
|
|
|
|
src/vfs/extfs/helpers/uar
|
|
|
|
src/vfs/extfs/helpers/uarc
|
|
|
|
src/vfs/extfs/helpers/uarj
|
2012-10-08 17:19:42 +04:00
|
|
|
src/vfs/extfs/helpers/uc1541
|
2011-07-05 21:45:38 +04:00
|
|
|
src/vfs/extfs/helpers/ucab
|
2011-02-15 16:44:17 +03:00
|
|
|
src/vfs/extfs/helpers/uha
|
|
|
|
src/vfs/extfs/helpers/ulha
|
2012-05-18 17:32:48 +04:00
|
|
|
src/vfs/extfs/helpers/ulib
|
2011-02-15 16:44:17 +03:00
|
|
|
src/vfs/extfs/helpers/urar
|
|
|
|
src/vfs/extfs/helpers/uzip
|
|
|
|
src/vfs/extfs/helpers/uzoo
|
|
|
|
|
|
|
|
src/vfs/fish/Makefile
|
|
|
|
src/vfs/fish/helpers/Makefile
|
|
|
|
|
|
|
|
src/vfs/ftpfs/Makefile
|
|
|
|
|
2012-04-13 14:40:53 +04:00
|
|
|
src/vfs/sftpfs/Makefile
|
|
|
|
|
2011-02-15 16:44:17 +03:00
|
|
|
src/vfs/local/Makefile
|
|
|
|
|
|
|
|
src/vfs/sfs/Makefile
|
|
|
|
|
|
|
|
src/vfs/smbfs/Makefile
|
|
|
|
|
|
|
|
src/vfs/tar/Makefile
|
|
|
|
|
|
|
|
src/vfs/undelfs/Makefile
|
|
|
|
|
2010-01-07 01:45:27 +03:00
|
|
|
lib/Makefile
|
Added new engine for universal event system.
Example:
gboolean mkdir_callback(const gchar *event_group, const gchar *event_name, gpointer init_data, gpointer event_data)
{
... /* some action for handle event */
return TRUE; /* got chance to run other callbacks for this event or */
return FALSE; /* break execution for other callbacks */
}
mc_event_add ("filesystem", "mkdir", mkdir_callback, "some init data", NULL);
mc_event_add ("filesystem", "mkdir", mkdir_log_callback, "some init data", NULL);
mc_event_add ("filesystem", "mkdir", third_callback, NULL, NULL);
/*
Last add - first run. In this case execution order is
* third_callback
* mkdir_log_callback
* mkdir_callback
if third_callback fuctions will return FALSE, then other callbacks
(mkdir_log_callback and mkdir_callback) never run!
*/
... /* some code */
/* for example, after pressing F7 */
mc_event_raise("filesystem", "mkdir", "some event_data... path to directory");
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-17 01:01:38 +03:00
|
|
|
lib/event/Makefile
|
2010-01-07 02:31:17 +03:00
|
|
|
lib/filehighlight/Makefile
|
|
|
|
lib/mcconfig/Makefile
|
|
|
|
lib/search/Makefile
|
|
|
|
lib/skin/Makefile
|
2010-01-21 15:17:26 +03:00
|
|
|
lib/strutil/Makefile
|
2010-01-07 02:31:17 +03:00
|
|
|
lib/tty/Makefile
|
2011-02-15 16:44:17 +03:00
|
|
|
|
2010-01-07 01:45:27 +03:00
|
|
|
lib/vfs/Makefile
|
2011-02-15 16:44:17 +03:00
|
|
|
|
2010-11-10 22:45:56 +03:00
|
|
|
lib/widget/Makefile
|
2010-06-23 17:10:05 +04:00
|
|
|
|
2010-01-07 02:20:14 +03:00
|
|
|
misc/syntax/Makefile
|
2012-10-08 17:19:42 +04:00
|
|
|
misc/syntax/Syntax
|
1998-03-25 08:16:00 +03:00
|
|
|
|
2009-08-04 23:34:32 +04:00
|
|
|
doc/Makefile
|
2013-03-27 01:57:29 +04:00
|
|
|
|
2009-01-13 15:36:26 +03:00
|
|
|
doc/hints/Makefile
|
2013-03-27 01:57:29 +04:00
|
|
|
doc/hints/l10n/Makefile
|
|
|
|
|
2012-03-22 21:14:52 +04:00
|
|
|
doc/man/Makefile
|
|
|
|
doc/man/es/Makefile
|
|
|
|
doc/man/hu/Makefile
|
|
|
|
doc/man/it/Makefile
|
|
|
|
doc/man/pl/Makefile
|
|
|
|
doc/man/ru/Makefile
|
|
|
|
doc/man/sr/Makefile
|
2009-05-12 11:48:37 +04:00
|
|
|
|
|
|
|
doc/hlp/Makefile
|
|
|
|
doc/hlp/es/Makefile
|
|
|
|
doc/hlp/hu/Makefile
|
|
|
|
doc/hlp/it/Makefile
|
|
|
|
doc/hlp/pl/Makefile
|
|
|
|
doc/hlp/ru/Makefile
|
|
|
|
doc/hlp/sr/Makefile
|
1998-03-25 08:16:00 +03:00
|
|
|
|
2002-09-17 20:13:25 +04:00
|
|
|
intl/Makefile
|
|
|
|
po/Makefile.in
|
2001-09-13 00:45:46 +04:00
|
|
|
])
|
|
|
|
|
2016-10-31 19:03:41 +03:00
|
|
|
AC_CONFIG_FILES([
|
2011-07-11 12:22:46 +04:00
|
|
|
tests/Makefile
|
|
|
|
tests/lib/Makefile
|
|
|
|
tests/lib/mcconfig/Makefile
|
|
|
|
tests/lib/search/Makefile
|
2013-01-10 23:44:14 +04:00
|
|
|
tests/lib/strutil/Makefile
|
2011-07-11 12:22:46 +04:00
|
|
|
tests/lib/vfs/Makefile
|
2013-01-25 15:30:17 +04:00
|
|
|
tests/lib/widget/Makefile
|
2011-10-12 17:08:50 +04:00
|
|
|
tests/src/Makefile
|
|
|
|
tests/src/filemanager/Makefile
|
2013-03-15 19:59:54 +04:00
|
|
|
tests/src/editor/Makefile
|
|
|
|
tests/src/editor/test-data.txt
|
2016-12-16 10:01:16 +03:00
|
|
|
tests/src/vfs/Makefile
|
|
|
|
tests/src/vfs/extfs/Makefile
|
|
|
|
tests/src/vfs/extfs/helpers-list/Makefile
|
2017-01-08 14:28:39 +03:00
|
|
|
tests/src/vfs/extfs/helpers-list/data/config.sh
|
2017-01-02 07:07:34 +03:00
|
|
|
tests/src/vfs/extfs/helpers-list/misc/Makefile
|
2011-03-09 12:33:46 +03:00
|
|
|
])
|
|
|
|
|
2001-09-13 00:45:46 +04:00
|
|
|
AC_OUTPUT
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2012-10-09 15:45:13 +04:00
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
Configuration:
|
|
|
|
|
|
|
|
Source code location: ${srcdir}
|
2001-08-25 07:14:20 +04:00
|
|
|
Compiler: ${CC}
|
1998-02-27 07:54:42 +03:00
|
|
|
Compiler flags: ${CFLAGS}
|
2016-11-03 10:46:11 +03:00
|
|
|
Assertions: ${enable_assert}
|
2016-10-31 19:03:41 +03:00
|
|
|
Unit tests: ${tests_msg}
|
1998-02-27 07:54:42 +03:00
|
|
|
File system: ${vfs_type}
|
2001-08-25 07:14:20 +04:00
|
|
|
${vfs_flags}
|
2002-09-30 05:02:02 +04:00
|
|
|
Screen library: ${screen_msg}
|
2001-08-25 07:14:20 +04:00
|
|
|
Mouse support: ${mouse_lib}
|
|
|
|
X11 events support: ${textmode_x11_support}
|
1998-02-27 07:54:42 +03:00
|
|
|
With subshell support: ${subshell}
|
2012-01-09 15:48:39 +04:00
|
|
|
With background operations: ${enable_background}
|
2002-10-01 02:10:29 +04:00
|
|
|
Internal editor: ${edit_msg}
|
2010-03-03 16:09:15 +03:00
|
|
|
Diff viewer: ${diff_msg}
|
2004-11-03 23:10:54 +03:00
|
|
|
Support for charset: ${charset_msg}
|
2009-06-19 17:34:34 +04:00
|
|
|
Search type: ${SEARCH_TYPE}
|
2012-10-09 15:45:13 +04:00
|
|
|
])
|
2013-07-03 11:21:36 +04:00
|
|
|
|
|
|
|
dnl option checking is disable by default due to AC_CONFIG_SUBDIRS
|
|
|
|
dnl we enable it back for top-level ./configure
|
|
|
|
if test -n "$ac_unrecognized_opts"; then
|
|
|
|
case $enable_option_checking in
|
|
|
|
fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
|
|
|
|
*) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
|
|
|
|
esac
|
|
|
|
fi
|