path: root/configure.ac
diff options
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-30 08:02:05 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-30 09:08:54 -0300
commit0bc8d673a1731cdd2d137302d99b9473e36da437 (patch)
tree44fee9658d43d899a3ae5fa93087a3e4345d0815 /configure.ac
parent0642995c630efc4ed4297da0983715098146daa7 (diff)
configure.ac: check gconv on Debian/Ubuntu-specific directories
Unfortunately, Debian/Ubuntu stores gconv files on random arch-specific directories. Auto-detecting those locations is not that easy, as the directories are hardcoded into a series of files. So, looking at glibc debian package files at: https://packages.debian.org/source/sid/glibc Inside the glibc_*.debian.tar.xz tarball, there is a directory called sysdeps/ with lots of per-arch *.mk files. Those specify the target dirs. On x86, for example, it would be possible to have it located on 4 directories: sysdeps/amd64.mk:i386_configure_target = i686-linux-gnu sysdeps/amd64.mk:x32_configure_target = x86_64-linux-gnux32 sysdeps/i386.mk:amd64_configure_target = x86_64-linux-gnu sysdeps/i386.mk:x32_configure_target = x86_64-linux-gnux32 and the actual gconv directory is: /usr/lib/<configure_target>/gconv Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'configure.ac')
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6ca1a699..fe4af798 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,10 +358,16 @@ AC_ARG_WITH(udevdir,
[with_udevdir=`$PKG_CONFIG --variable=udevdir udev || echo /lib/udev`])
-def_gconv_dir=`for i in /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib; do if @<:@ -d \$i/gconv @:>@; then echo \$i/gconv; break; fi; done || echo /usr/lib/gconv`
+# Generic check: works with most distributions
+def_gconv_dir=`for i in /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib; do if @<:@ -d \$i/gconv @:>@; then echo \$i/gconv; break; fi; done`
+# Debian/Ubuntu-specific check: should be aligned with the debian package
+AS_IF([test "x${def_gconv_dir}" = "x" ],
+ def_gconv_dir=`for i in mips64el-linux-gnuabi64 mips64el-linux-gnuabin32 mips64-linux-gnuabi64 mips64-linux-gnuabin32 mipsisa64r6el-linux-gnuabi64 mipsisa64r6el-linux-gnuabin32 mipsisa64r6-linux-gnuabi64 mipsisa64r6-linux-gnuabin32 powerpc64-linux-gnu sparc64-linux-gnu x86_64-linux-gnu x86_64-linux-gnux32 alphaev67-linux-gnu arm-linux-gnueabi arm-linux-gnueabihf i686-kfreebsd-gnu i686-linux-gnu mipsel-linux-gnu mipsisa32r6el-linux-gnu mipsisa32r6-linux-gnu mips-linux-gnu powerpc-linux-gnu s390-linux-gnu sparcv9-linux-gnu; do if @<:@ -d /usr/lib/\$i/gconv @:>@; then echo /usr/lib/\$i/gconv; break; fi; done`)
- [set system's gconv directory (default=/usr/lib/gconv)]),
+ [set system's gconv directory (default is to autodetect)]),

Privacy Policy