changeset 12063:cb9d1a005aef

[gaim-migrate @ 14358] Handle the shared object filename suffix better. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sun, 13 Nov 2005 00:40:56 +0000
parents 4ccd528ffe6e
children 658623020748
files src/gtkutils.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}
 }