comparison src/gtkutils.c @ 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 29dc8fc0dd6c
children e859c1663a27
comparison
equal deleted inserted replaced
12062:4ccd528ffe6e 12063:cb9d1a005aef
901 static GtkSpell* (*gtkspell_get_from_text_view_ptr)(GtkTextView *view); 901 static GtkSpell* (*gtkspell_get_from_text_view_ptr)(GtkTextView *view);
902 static void (*gtkspell_detach_ptr)(GtkSpell *spell); 902 static void (*gtkspell_detach_ptr)(GtkSpell *spell);
903 static GtkSpell* (*gtkspell_new_attach_ptr)(GtkTextView *view, const gchar *lang, GError **error); 903 static GtkSpell* (*gtkspell_new_attach_ptr)(GtkTextView *view, const gchar *lang, GError **error);
904 static int gtkspell_available = -1; /* -1 unknown, 0 false, 1 true */ 904 static int gtkspell_available = -1; /* -1 unknown, 0 false, 1 true */
905 905
906 #define GTKSPELL_SONAME "libgtkspell." G_MODULE_SUFFIX ".0"
907
906 static void 908 static void
907 setup_gtkspell() 909 setup_gtkspell()
908 { 910 {
909 #if GLIB_CHECK_VERSION(2,3,3) 911 #if GLIB_CHECK_VERSION(2,3,3)
910 GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); 912 GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
911 #else 913 #else
912 GModule *handle = g_module_open("libgtkspell", G_MODULE_BIND_LAZY); 914 GModule *handle = g_module_open(GTKSPELL_SONAME, G_MODULE_BIND_LAZY);
913 #endif 915 #endif
916
914 if (handle != NULL) 917 if (handle != NULL)
915 { 918 {
916 gpointer ptr; /* squash GCC strict aliasing warnings */ 919 gpointer ptr; /* squash GCC strict aliasing warnings */
917 920
918 g_module_symbol(handle, "gtkspell_new_attach", &ptr); 921 g_module_symbol(handle, "gtkspell_new_attach", &ptr);
926 929
927 gtkspell_available = TRUE; 930 gtkspell_available = TRUE;
928 } 931 }
929 else 932 else
930 { 933 {
931 gaim_debug_warning("gtkspell", "Failed to load libgtkspell.so.0: %s\n", dlerror()); 934 gaim_debug_warning("gtkspell", "Failed to load %s: %s\n", GTKSPELL_SONAME, g_module_error());
932 gtkspell_available = FALSE; 935 gtkspell_available = FALSE;
933 } 936 }
934 } 937 }
935 938
936 gboolean 939 gboolean