How about something like this:
const gchar *sonames[] = { "libvte.so", "libvte.so.4","libvte.so.8","libvte.so.9", NULL }; const gchar **modname;
for (module=NULL,modname=sonames; *modname && !module; modname++ ) { module = g_module_open(*modname, G_MODULE_BIND_LAZY); } }
Then it's easy to add more names.
- Jeff