From 00e955558c66f80acad9225d2eae82459d87dc54 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 23 Oct 2018 15:36:15 +0900 Subject: build: Fix detecting build on multiarch environment. * configure.ac: Rough match by shell pattern. -- Since libdir is i386-linux-gnu on Debian i686-linux-gnu machine, exact match to host_alias didn't work. Signed-off-by: NIIBE Yutaka --- configure.ac | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 25719d4..b735fa6 100644 --- a/configure.ac +++ b/configure.ac @@ -651,13 +651,16 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -if expr $libdir : ".*/$host_alias\$" >/dev/null; then - # Looks like it's multiarch, then, - # let the script detect host architecture at runtime - pkg_config_libdir=auto -else - pkg_config_libdir=$libdir/pkgconfig -fi +case "$libdir" in + */*-*-*) + # Looks like it's multiarch, then, + # let the script detect host architecture at runtime + pkg_config_libdir=auto + ;; + *) + pkg_config_libdir=$libdir/pkgconfig + ;; +esac AC_SUBST(pkg_config_libdir) # # Substitution -- cgit v1.2.3