1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[meson] libidn2

This commit is contained in:
Witold Filipczyk 2023-01-02 17:09:24 +01:00
parent 1cf5593928
commit 8cb69b3832
4 changed files with 14 additions and 14 deletions

View File

@ -117,7 +117,7 @@
#mesondefine CONFIG_HTML_HIGHLIGHT #mesondefine CONFIG_HTML_HIGHLIGHT
/* Define if you want: idn support */ /* Define if you want: idn support */
#mesondefine CONFIG_IDN #mesondefine CONFIG_IDN2
/* Define if you want: interlinking support */ /* Define if you want: interlinking support */
#mesondefine CONFIG_INTERLINK #mesondefine CONFIG_INTERLINK
@ -461,8 +461,8 @@
/* Define if you have the iconv() function. */ /* Define if you have the iconv() function. */
#mesondefine HAVE_ICONV #mesondefine HAVE_ICONV
/* Define to 1 if you have the <idna.h> header file. */ /* Define to 1 if you have the <idn2.h> header file. */
#mesondefine HAVE_IDNA_H #mesondefine HAVE_IDN2_H
/* Define to 1 if you have the <ifaddrs.h> header file. */ /* Define to 1 if you have the <ifaddrs.h> header file. */
#mesondefine HAVE_IFADDRS_H #mesondefine HAVE_IFADDRS_H

View File

@ -67,7 +67,7 @@ conf_data.set('CONFIG_BZIP2', get_option('bzlib'))
conf_data.set('CONFIG_BROTLI', get_option('brotli')) conf_data.set('CONFIG_BROTLI', get_option('brotli'))
conf_data.set('CONFIG_ZSTD', get_option('zstd')) conf_data.set('CONFIG_ZSTD', get_option('zstd'))
conf_data.set('CONFIG_IDN', get_option('idn')) conf_data.set('CONFIG_IDN2', get_option('idn'))
conf_data.set('CONFIG_LZMA', get_option('lzma')) conf_data.set('CONFIG_LZMA', get_option('lzma'))
conf_data.set('CONFIG_GSSAPI', get_option('gssapi')) conf_data.set('CONFIG_GSSAPI', get_option('gssapi'))
conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey')) conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey'))
@ -283,8 +283,8 @@ if compiler.has_header('gpm.h')
conf_data.set('HAVE_GPM_H', 1) conf_data.set('HAVE_GPM_H', 1)
endif endif
if compiler.has_header('idna.h') if compiler.has_header('idn2.h')
conf_data.set('HAVE_IDNA_H', 1) conf_data.set('HAVE_IDN2_H', 1)
endif endif
if compiler.has_header('event.h') if compiler.has_header('event.h')
@ -368,8 +368,8 @@ if conf_data.get('CONFIG_LZMA')
deps += lzmadeps deps += lzmadeps
endif endif
if conf_data.get('CONFIG_IDN') if conf_data.get('CONFIG_IDN2')
idndeps = dependency('libidn', static: st) idndeps = dependency('libidn2', static: st)
deps += idndeps deps += idndeps
endif endif

View File

@ -16,8 +16,8 @@
#include <netdb.h> #include <netdb.h>
#endif #endif
#ifdef HAVE_IDNA_H #ifdef HAVE_IDN2_H
#include <idna.h> #include <idn2.h>
#endif #endif
/* We need to have it here. Stupid BSD. */ /* We need to have it here. Stupid BSD. */
@ -168,11 +168,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
idname = *(*argv - 1); idname = *(*argv - 1);
#ifdef CONFIG_IDN #ifdef CONFIG_IDN2
if (idname) { if (idname) {
int code = idna_to_ascii_lz(idname, &idname2, 0); int code = idn2_to_ascii_lz(idname, &idname2, 0);
if (code == IDNA_SUCCESS) { if (code == IDN2_OK) {
idname = idname2; idname = idname2;
allocated = 1; allocated = 1;
} }

View File

@ -1,4 +1,4 @@
idna_dep = dependency('libidn') idna_dep = dependency('libidn2')
uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c') uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c')