# HG changeset patch # User Richard Laager # Date 1131842456 0 # Node ID cb9d1a005aef563b2d13341612a507f9d0b37478 # Parent 4ccd528ffe6ea28184a22ba120f71dd6b81335ee [gaim-migrate @ 14358] Handle the shared object filename suffix better. committer: Tailor Script diff -r 4ccd528ffe6e -r cb9d1a005aef src/gtkutils.c --- a/src/gtkutils.c Sun Nov 13 00:20:53 2005 +0000 +++ b/src/gtkutils.c Sun Nov 13 00:40:56 2005 +0000 @@ -903,14 +903,17 @@ static GtkSpell* (*gtkspell_new_attach_ptr)(GtkTextView *view, const gchar *lang, GError **error); static int gtkspell_available = -1; /* -1 unknown, 0 false, 1 true */ +#define GTKSPELL_SONAME "libgtkspell." G_MODULE_SUFFIX ".0" + static void setup_gtkspell() { #if GLIB_CHECK_VERSION(2,3,3) - GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); + GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); #else - GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY); + GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY); #endif + if (handle != NULL) { gpointer ptr; /* squash GCC strict aliasing warnings */ @@ -928,7 +931,7 @@ } else { - gaim_debug_warning("gtkspell", "Failed to load libgtkspell.so.0: %s\n", dlerror()); + gaim_debug_warning("gtkspell", "Failed to load %s: %s\n", GTKSPELL_SONAME, g_module_error()); gtkspell_available = FALSE; } }