diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
commit | 0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch) | |
tree | 3f3789daa2f6db22da6e55e92bee0062a7d613fe /m4/want_textcat.m4 | |
parent | Initial commit. (diff) | |
download | dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip |
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/want_textcat.m4')
-rw-r--r-- | m4/want_textcat.m4 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/m4/want_textcat.m4 b/m4/want_textcat.m4 new file mode 100644 index 0000000..8bf7774 --- /dev/null +++ b/m4/want_textcat.m4 @@ -0,0 +1,36 @@ +AC_DEFUN([DOVECOT_WANT_TEXTCAT], [ + if test $want_textcat != no; then + if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists libexttextcat 2>/dev/null; then + PKG_CHECK_MODULES(LIBEXTTEXTCAT, libexttextcat) + TEXTCAT_DATADIR=`$PKG_CONFIG --variable=pkgdatadir libexttextcat` + AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS]) + have_fts_exttextcat=yes + # Debian Wheezy workaround - LIBEXTTEXTCAT_CFLAGS include path is wrong: + AC_CHECK_HEADERS(libexttextcat/textcat.h) + else + AC_CHECK_LIB(exttextcat, special_textcat_Init, [ + have_fts_exttextcat=yes + AC_CHECK_HEADERS(libexttextcat/textcat.h) + LIBEXTTEXTCAT_LIBS=-lexttextcat + AC_DEFINE(HAVE_FTS_EXTTEXTCAT,, [Define if you want exttextcat support for FTS]) + TEXTCAT_DATADIR="/usr/share/libexttextcat" + AC_SUBST(LIBEXTTEXTCAT_LIBS) + ], [ + AC_CHECK_LIB(textcat, special_textcat_Init, [ + have_fts_textcat=yes + TEXTCAT_DATADIR="/usr/share/libtextcat" + AC_CHECK_HEADERS(libtextcat/textcat.h) + ]) + ]) + if test $want_textcat = yes && test "$have_fts_exttextcat" != yes && test "$have_fts_textcat" != yes; then + AC_ERROR([Can't build with textcat support: libtextcat or libexttextcat not found]) + fi + fi + if test "$have_fts_exttextcat" = yes || test "$have_fts_textcat" = yes; then + AC_DEFINE(HAVE_FTS_TEXTCAT,, [Define if you want textcat support for FTS]) + AC_DEFINE_UNQUOTED(TEXTCAT_DATADIR, "$TEXTCAT_DATADIR", [Points to textcat pkgdatadir containing the language files]) + fi + fi + AM_CONDITIONAL(BUILD_FTS_TEXTCAT, test "$have_fts_textcat" = "yes") + AM_CONDITIONAL(BUILD_FTS_EXTTEXTCAT, test "$have_fts_exttextcat" = "yes") +]) |