KDE Thai Word Break patch
Germain Garand
germain at ebooksfrance.org
Sat Nov 13 11:54:15 GMT 2004
Le Samedi 13 Novembre 2004 08:48, Otto Pattara a écrit :
> In this case I'm afraid I would ask to ask you for sending some
> autotool wizards to rescue me? :)
I don't have one at hand, but as a mere mortal, I'd simply suggest:
admin/acinclude.m4.in:
[...]
+ AC_DEFUN([KDE_CHECK_LIBTHAI_DLOPEN],
+ [
+ AC_MSG_CHECKING([for libthai shared object name or full path])
+ AC_ARG_WITH(libthai,
+ AC_HELP_STRING(
+ [--with-libthai=name_or_path],
+ [try to dlopen libthai using name_or_path at runtime, besides looking
for a libtool file]
+ ),
+ [ ac_libthai=$withval],
+ [ ac_libthai=default ]
+ )
+ if test "$ac_libthai" != "default"
+ AC_DEFINE(HAVE_LIBTHAI_DLOPEN, "$ac_libthai",
+ [Defined if a name or full path to libthai was provided at configure time
for dlopen use])
+ fi
+ AC_MSG_RESULT($ac_libthai)
+ ])
kdelibs/khtml/configure.in.in:
[...]
+KDE_CHECK_LIBTHAI_DLOPEN
in your patch, khtml/rendering/break_lines.cpp:
[...]
+#include <config.h>
[...]
+ KLibLoader *loader = KLibLoader::self();
+#ifdef HAVE_LIBTHAI_DLOPEN
+ lib = loader->library(HAVE_LIBTHAI_DLOPEN);
+ if (!lib || !lib->hasSymbol("th_brk"))
+#endif
+ lib = loader->library("libthai");
+ if (lib && lib->hasSymbol("th_brk")) {
+ th_brk = (th_brk_def) lib->symbol("th_brk");
[...]
isn't that enough?
Germain
More information about the kfm-devel
mailing list