diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index affc7019..6c1b7cf4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -69,7 +69,6 @@ jobs: sudo apt-get -q -y update sudo apt-get -q -y upgrade sudo apt-get -y install build-essential automake autoconf libtool pkg-config icu-devtools libicu-dev libxml2-dev uuid-dev fuse libfuse-dev libsnmp-dev - sudo cp .github/workflows/icu-config /usr/bin/icu-config ./autogen.sh ./configure make diff --git a/.github/workflows/icu-config b/.github/workflows/icu-config deleted file mode 100755 index d5aed413..00000000 --- a/.github/workflows/icu-config +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -opts=$1 - -case $opts in - '--cppflags') - echo '' ;; - '--ldflags') - echo '-licuuc -licudata' ;; - *) - echo '/usr/lib/x86_64-linux-gnu/icu/pkgdata.inc' ;; -esac diff --git a/README.md b/README.md index 8d393ba8..a1843f4b 100644 --- a/README.md +++ b/README.md @@ -289,16 +289,14 @@ You need to add `--enable-lintape` as an argument of ./configure script if you w | Ubuntu 16.04 LTS | ppc64le | OK - Not checked automatically | | Ubuntu 18.04 LTS | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-ubuntu-bionic.yml/badge.svg) | | Ubuntu 18.04 LTS | ppc64le | OK - Not checked automatically | - | Ubuntu 20.04 LTS (Need icu-config) | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-ubuntu-focal.yml/badge.svg) | + | Ubuntu 20.04 LTS | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-ubuntu-focal.yml/badge.svg) | | Debian 9 | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-debian9.yml/badge.svg) | - | Debian 10 (Need icu-config) | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-debian10.yml/badge.svg) | + | Debian 10 | x86\_64 | ![GH Action status](https://github.com/LinearTapeFileSystem/ltfs/actions/workflows/build-debian10.yml/badge.svg) | | ArchLinux 2018.08.01 | x86\_64 | OK - Not checked automatically | | ArchLinux 2018.12.31 (rolling) | x86\_64 | OK - Not checked automatically | Currently, automatic build checking is working on GitHub Actions and Travis CI. -For Ubuntu20.04 and Debian10, dummy `icu-config` is needed in the build machine. See Issue [#153](https://github.com/LinearTapeFileSystem/ltfs/issues/153). - ### Build and install on OSX (macOS) #### Recent Homedrew system setup diff --git a/build.sh b/build.sh index 8875035a..2d1a162b 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,6 @@ sudo apt-get -q -y update sudo apt-get -q -y upgrade sudo apt-get -y install build-essential automake autoconf libtool pkg-config libicu66 icu-devtools libicu-dev libxml2-dev uuid-dev fuse libfuse-dev libsnmp-dev -sudo cp .github/workflows/icu-config /usr/bin/icu-config ./autogen.sh ./configure make diff --git a/configure.ac b/configure.ac index faf4a937..044ed3dc 100644 --- a/configure.ac +++ b/configure.ac @@ -339,12 +339,16 @@ fi dnl dnl Check for ICU +dnl Prefer icu-config for legacy distros; fall back to pkg-config icu-uc/icu-i18n +dnl (icu-config was removed in ICU 63+ and is absent on modern Debian/Ubuntu). dnl ICU_MODULE_CFLAGS="`icu-config --cppflags 2> /dev/null`"; ICU_MODULE_LIBS="`icu-config --ldflags 2> /dev/null`"; if test -z "$ICU_MODULE_LIBS" then - PKG_CHECK_MODULES([ICU_MODULE], [icu >= 0.21]) + PKG_CHECK_MODULES([ICU_MODULE], [icu-uc >= 0.21 icu-i18n >= 0.21], + [], + [PKG_CHECK_MODULES([ICU_MODULE], [icu >= 0.21])]) fi AC_MSG_CHECKING([use latest ICU]) @@ -359,6 +363,10 @@ if test "x${icu_6x}" = "xyes" then AC_MSG_CHECKING(for ICU version) ICU_MODULE_VERSION="`icu-config --version 2> /dev/null`"; + if test -z "$ICU_MODULE_VERSION" + then + ICU_MODULE_VERSION="`$PKG_CONFIG --modversion icu-uc 2> /dev/null`"; + fi if test "${ICU_MODULE_VERSION%%.*}" -ge "60" then AM_EXTRA_CPPFLAGS="${AM_EXTRA_CPPFLAGS} -D ICU6x"