Bundled libintl did not support linking to internal static
libraries (libmc in our case): directly specified static
libraries are not pulled by libtool and are not usable for
dynamic libraries as PIC-related flags are not passed for
compilation.
This renders bundled libintl library unusable.
The change drops libintl bundling support and always relies
on external libintl (or falls back to disabled NLS).
On a related note gettext-0.20 drops support for bundling
or libintl and this change will ease migration to newer version.
The change is tested on x86_64-gentoo-linux-musl: mc builds
and links all tests successfully. A few tests fail for lack
of NLS support.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Mininum requirement is autoconf 2.60
This file is only needed for autoconf <= 2.59
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fsusage, mountlist: Remove support for Dynix/ptx.
* m4.include/gnulib/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* m4.include/gnulib/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for
libseq.
(gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
* lib/stat-size.h: Don't mention the Sequent bug.
* src/filemanager/mountlist.c: Don't test for MNTTABNAME. Remove
_SEQUENT_ case
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mountlist: Improve support for Solaris in 64-bit mode.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On
Solaris 8 or newer, define MOUNTED_GETEXTMNTENT instead of
MOUNTED_GETMNTENT2.
* src/filemanager/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mountlist: Add support for Minix.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
use AC_CHECK_FUNCS to check for 'getmntinfo'.
* src/filemanager/mountlist.c: Update comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Make better use of Autoconf.
* m4.include/gnulib/fsusage.m4: Use AC_CACHE_CHECK where possible.
Modernize indentation.
* m4.include/gnulib/ls-mntd-fs.m4: Likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mountlist: Modernize platform lists.
* m4.include/gnulib/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol
applies to which platforms, deemphasizing the obsolete ones.
* src/filemanager/filegui.c: Likewise.
* src/filemanager/mountlist.c: Likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove SVR2 support
SVR2 was obsolete by 1986 and is no longer supported by anybody, and its
code was getting in the way of use of this module by Emacs, which has
its own 'read' function anyway.
* src/filemanager/mountlist.c: remove SVR2-specific code.
* m4.include/fsusage.m4: do not test for sys/filsys.h or set
STAT_READ_FILSYS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
See gnulib a512e041120e9012e69afa2f5c3adc196ec4999a:
glibc 2.25 is deprecating the namespace pollution of <sys/types.h>
injecting major(), minor(), and makedev() into the compilation
environment, with a warning that insists that users include
<sys/sysmacros.h> instead. However, because the expansion of
AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until after
probing whether sys/types.h pollutes the namespace, it was not defining
MAJOR_IN_SYSMACROS, with the result that code compiled with -Werror
chokes on the deprecation warnings because it was not including
sysmacros.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
https://bugs.gentoo.org/527118
When ncurses library is built with --with-termlib option
the resulting installation contains two libraries:
/lib64/libncurses.so.6
/lib64/libncursesw.so.6
/lib64/libtinfo.so.6
/lib64/libtinfow.so.6
As a result mc build fails as:
$ ./configure --with-screen=ncurses
$ make
CCLD mc
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
./.libs/libinternal.a(tty-ncurses.o): undefined reference to symbol 'meta'
/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line
Patch: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-misc/mc/files/mc-4.8.13-tinfo.patch
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Simplify "configure: checking ..." messages.
* m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update copyright
years. Use AC_MSG_CHECKING instead of AC_MSG_NOTICE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
When using slang, 'configure' prints blank in the "Screen library" name:
...
File system: Midnight Commander Virtual Filesystem
cpio, extfs, fish, ftp, sfs, sftp, smb, tar
Screen library:
Mouse support: gpm and xterm
X11 events support: yes
...
This occurs when slang is found using pkg-config (as opposed to explicit path
search). The patch fixes this by moving the 'screen_msg' assignment one level
up, to the controlling function (mc_WITH_SLANG) so that it's effective for
however method the library was found.
The problem was mentioned on our mailing list:
https://mail.gnome.org/archives/mc-devel/2016-March/msg00021.html
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
m4.include/stat-size.m4, lib/stat-size.h: get these files from Gnulib.
src/filemanager/ioblksize.h: get this file from Coreutils.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
On systems where 'mode_t' is smaller than 'int', doing 'va_arg (ap, mode_t)' is
wrong because of C's "default argument promotions". GCC 4 creates crashing code
in this case.
The "va_arg" page of Gnulib's manual describes the problem and a simple solution:
https://www.gnu.org/software/gnulib/manual/html_node/va_005farg.html
However, since that solution reportedly (see thread at next link) still causes
GCC to print warnings (for no good reason; perhaps this was fixed in newer
GCCs), we pick a solution that defines a PROMOTED_MODE_T at the configuration
stage:
https://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00231.html
(We take our 'mode_t.m4' from the most recent Gnulib source.)
(If any of the URLs above no longer works, simply search the web for the
mentioned words.)
Macros get from other projects keep their original names:
gl_FSTYPENAME, AX_PATH_LIB_PCRE, etc.
Macros initially writtem for MC have original names with prefix mc_:
mc_VERSION, mc_CHECK_GLIB, etc
Macros get from other projects and modified for MC keep their
original names with prefix mc_:
mc_cu_PREREQ_STAT_PROG, mc_AC_GET_FS_INFO.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
With clang invalid cflags usage result in exit 0, we expect exit 1.
$ clang -c -Wmaybe-uninitialized conftest.c ; echo $?
warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
1 warning generated.
0
solution with -Werror on cflags check
$ clang -c -Werror -Wmaybe-uninitialized conftest.c ; echo $?
error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
1
(Tested with clang 3.6.)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>