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
/* Define if you want: idn support */
#mesondefine CONFIG_IDN
#mesondefine CONFIG_IDN2
/* Define if you want: interlinking support */
#mesondefine CONFIG_INTERLINK
@ -461,8 +461,8 @@
/* Define if you have the iconv() function. */
#mesondefine HAVE_ICONV
/* Define to 1 if you have the <idna.h> header file. */
#mesondefine HAVE_IDNA_H
/* Define to 1 if you have the <idn2.h> header file. */
#mesondefine HAVE_IDN2_H
/* Define to 1 if you have the <ifaddrs.h> header file. */
#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_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_GSSAPI', get_option('gssapi'))
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)
endif
if compiler.has_header('idna.h')
conf_data.set('HAVE_IDNA_H', 1)
if compiler.has_header('idn2.h')
conf_data.set('HAVE_IDN2_H', 1)
endif
if compiler.has_header('event.h')
@ -368,8 +368,8 @@ if conf_data.get('CONFIG_LZMA')
deps += lzmadeps
endif
if conf_data.get('CONFIG_IDN')
idndeps = dependency('libidn', static: st)
if conf_data.get('CONFIG_IDN2')
idndeps = dependency('libidn2', static: st)
deps += idndeps
endif

View File

@ -16,8 +16,8 @@
#include <netdb.h>
#endif
#ifdef HAVE_IDNA_H
#include <idna.h>
#ifdef HAVE_IDN2_H
#include <idn2.h>
#endif
/* We need to have it here. Stupid BSD. */
@ -168,11 +168,11 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
idname = *(*argv - 1);
#ifdef CONFIG_IDN
#ifdef CONFIG_IDN2
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;
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')