blob: 37d0f8a08c409ff293a4438b4537780a4754490c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
dnl AM_PATH_ICU([MINIMUM-VERSION])
dnl Adds support for ICU
AC_DEFUN([AM_PATH_ICU],
[
rast_lib_icu_major="$1"
rast_lib_icu_minor="$2"
rast_lib_icu_version="$1.$2"
AC_ARG_WITH(icu-config,
AC_HELP_STRING([--with-icu-config=PATH],[path to icu-config]),
[
AC_MSG_RESULT(using $withval for icu-config)
ICU_CONFIG="$withval"
], [
AC_PATH_PROG(ICU_CONFIG, icu-config, no)
])
HAVE_ICU="no"
if test "$ICU_CONFIG" != "no"; then
AC_MSG_CHECKING([ICU version])
ICU_VERSION="`$ICU_CONFIG --version`"
if test $? -eq 0; then
changequote(<<, >>)
ICU_MAJOR=`expr "$ICU_VERSION" : '\(.*\)\..*'`
ICU_MINOR=`expr "$ICU_VERSION" : '.*\.\(.*\)'`
changequote([, ])
if expr "$ICU_MAJOR" '>' "$rast_lib_icu_major" > /dev/null ||
( expr "$ICU_MAJOR" '=' "$rast_lib_icu_major" > /dev/null &&
expr "$ICU_MINOR" '>=' "$rast_lib_icu_minor" > /dev/null ); then
AC_MSG_RESULT([$ICU_VERSION])
ICU_CPPFLAGS=`$ICU_CONFIG --cppflags`
ICU_LIBS=`$ICU_CONFIG --ldflags-libsonly`
ICU_LDFLAGS=`$ICU_CONFIG --ldflags-searchpath`
AC_SUBST(ICU_CPPFLAGS)
AC_SUBST(ICU_LIBS)
AC_SUBST(ICU_LDFLAGS)
HAVE_ICU="yes"
else
AC_MSG_WARN([$ICU_VERSION is too old; $rast_lib_icu_version is required])
fi
else
AC_MSG_WARN([icu-config --version failed])
fi
fi
AC_SUBST(HAVE_ICU)
])
|