diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6673c237b..518b53e0f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -386,11 +386,10 @@ freebsd-12-x86_64:
- bash .gitlab-ci/show-execution-environment.sh
script:
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
- # FreeBSD iconv doesn't handle transliteration, so we use (external) GNU libiconv here.
# FreeBSD supports xattr, but its API is different from Linux xattr.
# FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
# localstatedir is needed for access to /var/lib/dbus/machine-id
- - meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Diconv=external -Dxattr=false _build
+ - meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
- ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh
artifacts:
@@ -417,7 +416,7 @@ freebsd-13-x86_64:
before_script:
- bash .gitlab-ci/show-execution-environment.sh
script:
- - meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Diconv=external -Dxattr=false _build
+ - meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
- ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh
artifacts:
diff --git a/docs/reference/glib/building.xml b/docs/reference/glib/building.xml
index d165c5c23..62f1c3bc2 100644
--- a/docs/reference/glib/building.xml
+++ b/docs/reference/glib/building.xml
@@ -29,7 +29,7 @@
On FreeBSD:
- env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--disable-new-dtags" meson -Dxattr=false -Dinstalled_tests=true -Diconv=external -Db_lundef=false _build
+ env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--disable-new-dtags" meson -Dxattr=false -Dinstalled_tests=true -Db_lundef=false _buildninja -C _build
@@ -98,16 +98,12 @@
If your system has an iconv() implementation but
- you want to use libiconv instead, you can pass the
- option to meson. This
- forces libiconv to be used.
-
-
- Note that if you have libiconv installed in your default include
- search path (for instance, in /usr/local/), but
- don't enable it, you will get an error while compiling GLib because
- the iconv.h that libiconv installs hides the
- system iconv.
+ you want to use libiconv instead, make sure it is installed to the
+ default compiler header/library search path (for instance, in
+ /usr/local/). The iconv.h
+ that libiconv installs hides the system iconv. Meson then detects
+ this, recognizes that the system iconv is unusable and the external
+ one is mandatory, and automatically forces it to be used.
If you are using the native iconv implementation on Solaris
diff --git a/meson.build b/meson.build
index ee0a6234c..424aede80 100644
--- a/meson.build
+++ b/meson.build
@@ -1976,28 +1976,12 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
# We should never use the MinGW C library's iconv because it may not be
# available in the actual runtime environment. On Windows, we always use
# the built-in implementation
-iconv_opt = get_option('iconv')
if host_system == 'windows'
- libiconv = []
# We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
# any external library for it
- if iconv_opt != 'auto'
- warning('-Diconv was set to @0@, which was ignored')
- endif
+ libiconv = []
else
- found_iconv = false
- if ['auto', 'libc'].contains(iconv_opt) and cc.has_function('iconv_open')
- libiconv = []
- found_iconv = true
- endif
- if not found_iconv and ['auto', 'external'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open')
- libiconv = [cc.find_library('iconv')]
- found_iconv = true
- endif
-
- if not found_iconv
- error('iconv implementation "@0@" not found'.format(iconv_opt))
- endif
+ libiconv = dependency('iconv')
endif
pcre = dependency('libpcre', version: '>= 8.31', required : false) # Should check for Unicode support, too. FIXME
diff --git a/meson_options.txt b/meson_options.txt
index d1859e939..a52eed9d2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,7 +7,7 @@ option('iconv',
type : 'combo',
choices : ['auto', 'libc', 'external'],
value : 'auto',
- description : 'iconv implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libiconv\'; \'auto\' = \'Auto-detect which iconv is available\')')
+ deprecated: true,)
option('charsetalias_dir',
type : 'string',
@@ -116,4 +116,4 @@ option('glib_checks',
option('libelf',
type : 'feature',
value : 'auto',
- description : 'Enable support for listing and extracting from ELF resource files with gresource tool')
\ No newline at end of file
+ description : 'Enable support for listing and extracting from ELF resource files with gresource tool')