From e04a078de4ddc569613d8eaf0f54cc4988296687 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 14 Dec 2009 18:54:32 +0100 Subject: [PATCH] Check for libnotify.so.1 and libenchant.so.1 explicitly Some distributions only install versioned libraries by default while the generic files reside in development packages. This is because later versions may break ABI, so we explicitly use the supported version. --- midori/midori-app.c | 8 +------- midori/midori-preferences.c | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/midori/midori-app.c b/midori/midori-app.c index b981c251..c354c916 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -1150,13 +1150,7 @@ static void midori_app_init_libnotify (MidoriApp* app) { #if !HAVE_HILDON - gint i; - const gchar* sonames[] = { "libnotify.so", "libnotify.so.1", NULL }; - - for (i = 0; sonames[i] != NULL && app->libnotify_module == NULL; i++ ) - { - app->libnotify_module = g_module_open (sonames[i], G_MODULE_BIND_LOCAL); - } + app->libnotify_module = g_module_open ("libnotify.so.1", G_MODULE_BIND_LOCAL); if (app->libnotify_module != NULL) { diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c index c818f9d1..2236e1b8 100644 --- a/midori/midori-preferences.c +++ b/midori/midori-preferences.c @@ -242,7 +242,7 @@ midori_preferences_get_spell_languages (void) if (!enchant_broker_list_dicts && g_module_supported ()) { GModule* module; - if (!(module = g_module_open ("libenchant.so", G_MODULE_BIND_LOCAL))) + if (!(module = g_module_open ("libenchant.so.1", G_MODULE_BIND_LOCAL))) return NULL; if (!g_module_symbol (module, "enchant_broker_init", (void*) &enchant_broker_init))