mc/tests/lib/vfs/Makefile.am
Yury V. Zaytsev 1e0e6b5e1e charset: rename IBM866 to CP866 for iconv and adjust charset names for codeset
```
linux $ iconv -l | grep 866
866//
866NAV//
CP866//
CP866NAV//
CSIBM866//
IBM866//
IBM866NAV//

solaris $ iconv -l | grep 866
    CP866 (CP866, CP-866, CP_866, 866),
    IBM-866,

macos % iconv -l | grep 866
CP866 866 CSIBM866 IBM866 MSCP866

musl/src/locale/codepages.h: "cp866\0"
```

On glibc-based systems, codeset will be set to charmap name, on most other systems it seems to be taken from locale name.

## Linux

```
zaytsev@fedora:~$ locale -a | grep ru
ru_RU
ru_RU.cp866
ru_RU.ibm866
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

zaytsev@fedora:~/src$ LC_ALL=ru_RU.cp866 LANG=ru_RU.cp866 ./a.out
IBM866

zaytsev@fedora:~/src$ LC_ALL=ru_RU.koi8r LANG=ru_RU.koi8r ./a.out
KOI8-R

zaytsev@fedora:~/src$ LC_ALL=ru_RU.iso88595 LANG=ru_RU.iso88595 ./a.out
ISO-8859-5
```

## macOS

```
ru_RU.ISO8859-5
ru_RU.CP866
ru_RU.CP1251
ru_RU.UTF-8
ru_RU.KOI8-R
ru_RU

zaytsev@Yurys-MBP mc % LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866

zaytsev@Yurys-MBP mc % LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5
```

## FreeBSD

```
ru_RU.CP1251
ru_RU.CP866
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@cfarm240:~ $ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5

zaytsev@cfarm240:~ $ LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866
```

## Solaris

```
ru
ru.UTF-8
ru.koi8-r
ru_RU
ru_RU.ANSI1251
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@gcc-solaris10:~/src$ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.o>
ISO8859-5

zaytsev@gcc-solaris10:~/src$ LANG=ru.koi8-r LC_ALL=ru.koi8-r ./a.out
KOI8-R
```

## AIX

```
zaytsev@gcc111:[/home/zaytsev]locale -a
C
POSIX
en_US.8859-15
en_US.IBM-858
en_US.ISO8859-1
en_US

-bash-5.1$ LANG=en_US.ISO8859-1 LC_ALL=en_US.ISO8859-1 ./a.out
ISO8859-1
```

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-10-05 11:49:26 +02:00

104 lines
1.6 KiB
Makefile

PACKAGE_STRING = "/lib/vfs"
AM_CPPFLAGS = \
-DTEST_SHARE_DIR=\"$(abs_builddir)\" \
$(GLIB_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/lib/vfs \
@CHECK_CFLAGS@
AM_LDFLAGS = @TESTS_LDFLAGS@
EXTRA_DIST = mc.charsets.in
if CHARSET
CLEANFILES = mc.charsets
endif
LIBS = @CHECK_LIBS@ \
$(top_builddir)/lib/libmc.la
if ENABLE_MCLIB
LIBS += $(GLIB_LIBS) \
@E2P_LIBS@
endif
TESTS = \
canonicalize_pathname \
current_dir \
path_cmp \
path_len \
path_manipulations \
path_serialize \
relative_cd \
tempdir \
vfs_adjust_stat \
vfs_parse_ls_lga \
vfs_path_from_str_flags \
vfs_path_string_convert \
vfs_prefix_to_class \
vfs_setup_cwd \
vfs_split \
vfs_s_get_path
if CHARSET
TESTS += path_recode \
vfs_get_encoding
endif
check_PROGRAMS = $(TESTS)
canonicalize_pathname_SOURCES = \
canonicalize_pathname.c
current_dir_SOURCES = \
current_dir.c
path_cmp_SOURCES = \
path_cmp.c
path_len_SOURCES = \
path_len.c
path_manipulations_SOURCES = \
path_manipulations.c
path_recode_SOURCES = \
path_recode.c
path_serialize_SOURCES = \
path_serialize.c
relative_cd_SOURCES = \
relative_cd.c
tempdir_SOURCES = \
tempdir.c
vfs_adjust_stat_SOURCES = \
vfs_adjust_stat.c
vfs_get_encoding_SOURCES = \
vfs_get_encoding.c
vfs_setup_cwd_SOURCES = \
vfs_setup_cwd.c
vfs_split_SOURCES = \
vfs_split.c
vfs_parse_ls_lga_SOURCES = \
vfs_parse_ls_lga.c
vfs_prefix_to_class_SOURCES = \
vfs_prefix_to_class.c
vfs_path_from_str_flags_SOURCES = \
vfs_path_from_str_flags.c
vfs_path_string_convert_SOURCES = \
vfs_path_string_convert.c
vfs_s_get_path_SOURCES = \
vfs_s_get_path.c