--- configure.ac.orig 2025-02-12 21:16:22 UTC +++ configure.ac @@ -105,7 +105,7 @@ dnl Checks if dlopen exists, and if it's in libc or li dnl Checks if dlopen exists, and if it's in libc or libdl. -AC_SEARCH_LIBS(dlopen, dl, +AC_SEARCH_LIBS(dlopen, , AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have the function dlopen.])) @@ -331,6 +331,10 @@ dnl Check for Anthy usability. AC_SUBST(XML2_LD_FLAGS) dnl Check for Anthy usability. +AC_ARG_WITH(anthy, + AC_HELP_STRING([--with-anthy], + [with Anthy library (default is YES)])) +if test "x$with_anthy" != "xno"; then ANTHY_CFLAGS="" ANTHY_LIBS="" @@ -354,6 +358,7 @@ fi ANTHY_LD_FLAGS="$ANTHY_LIBS" CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ANTHY" fi +fi AC_SUBST(ANTHY_LD_CFLAGS) AC_SUBST(ANTHY_LD_FLAGS) @@ -370,6 +375,10 @@ dnl In addition, set THAI_WORDSEG_LD_FLAGS to a proper dnl If we have one, define HAVE_THAI_WORDSEG and one of these: dnl HAVE_LIBTHAI, HAVE_WORDCUT, or HAVE_WORDCUT_OLD dnl In addition, set THAI_WORDSEG_LD_FLAGS to a proper value. +AC_ARG_WITH(libthai, + AC_HELP_STRING([--with-libthai], + [with libThai library (default is YES)])) +if test "x$with_libthai" != "xno"; then PKG_CHECK_MODULES(LIBTHAI, libthai, HAVE_LIBTHAI=yes, HAVE_LIBTHAI=no) PKG_CHECK_MODULES(WORDCUT, wordcut, HAVE_WORDCUT=yes, HAVE_WORDCUT=no) @@ -429,6 +438,8 @@ if test "x$HAVE_THAI_WORDSEG" = "xyes"; then if test "x$HAVE_THAI_WORDSEG" = "xyes"; then AC_DEFINE(HAVE_THAI_WORDSEG, 1, [Define if you have some Thai word-segmentation library]) +fi + fi AC_SUBST(THAI_WORDSEG_LD_FLAGS)