use pkg-config to detect libicu
This commit is contained in:
parent
06785d7f3f
commit
666e61659d
|
@ -55,6 +55,7 @@ AS_IF([ test "$enable_man" != no ], [
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
# Define these substitions here to keep all version information in one place.
|
# Define these substitions here to keep all version information in one place.
|
||||||
# For information on how to properly maintain the library version information,
|
# For information on how to properly maintain the library version information,
|
||||||
|
@ -134,6 +135,11 @@ if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu"; then
|
||||||
# Check for libicu
|
# Check for libicu
|
||||||
# using pkg-config won't work on older systems like Ubuntu 12.04 LTS Server Edition 64bit
|
# using pkg-config won't work on older systems like Ubuntu 12.04 LTS Server Edition 64bit
|
||||||
# using AC_SEARCH_LIBS also don't work since functions have the library version appended
|
# using AC_SEARCH_LIBS also don't work since functions have the library version appended
|
||||||
|
PKG_CHECK_MODULES([ICUUC], [icu-uc], [
|
||||||
|
HAVE_LIBICU=yes
|
||||||
|
LIBS="$ICUUC_LIBS $LIBS"
|
||||||
|
CFLAGS="$ICUUC_CFLAGS $CFLAGS"
|
||||||
|
], [
|
||||||
OLDLIBS=$LIBS
|
OLDLIBS=$LIBS
|
||||||
LIBS="-licuuc $LIBS"
|
LIBS="-licuuc $LIBS"
|
||||||
AC_MSG_CHECKING([for ICU unicode library])
|
AC_MSG_CHECKING([for ICU unicode library])
|
||||||
|
@ -144,6 +150,7 @@ if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu"; then
|
||||||
[HAVE_LIBICU=yes; AC_MSG_RESULT([yes])],
|
[HAVE_LIBICU=yes; AC_MSG_RESULT([yes])],
|
||||||
[AC_MSG_RESULT([no]); AC_MSG_ERROR(You requested libicu but it is not installed.)])
|
[AC_MSG_RESULT([no]); AC_MSG_ERROR(You requested libicu but it is not installed.)])
|
||||||
LIBS=$OLDLIBS
|
LIBS=$OLDLIBS
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$enable_runtime" = "libidn2" -o "$enable_builtin" = "libidn2"; then
|
if test "$enable_runtime" = "libidn2" -o "$enable_builtin" = "libidn2"; then
|
||||||
|
|
Loading…
Reference in New Issue