}
#ifdef ENABLE_LTDL
-static void gvconfig_write_library_config(char *path, gvplugin_library_t *library, FILE *f)
+static void gvconfig_write_library_config(GVC_t *gvc, char *path, gvplugin_library_t *library, FILE *f)
{
gvplugin_api_t *apis;
gvplugin_installed_t *types;
for (apis = library->apis; (types = apis->types); apis++) {
fprintf(f, "\t%s {\n", gvplugin_api_name(apis->api));
for (i = 0; types[i].type; i++) {
+#if 0
+/* this was a good idea, but fails because we need a config to load
+ * by plugin name, and were still generating the config.
+ */
+ /* verify that dependencies are available */
+ if (! (gvplugin_load(gvc, apis->api, types[i].type)))
+ fprintf(f, "#FAILS");
+#endif
fprintf(f, "\t\t%s %d\n", types[i].type, types[i].quality);
}
fputs ("\t}\n", f);
path = strrchr(globbuf.gl_pathv[i],'/');
if (path)
path++;
- if (f && path) {
- gvconfig_write_library_config(path, library, f);
- }
+ if (f && path)
+ gvconfig_write_library_config(gvc, path, library, f);
}
}
}
if (strcmp(reqpkg, (*pnext)->packagename) == 0)
break; /* found with required matching packagname */
}
-
rv = *pnext;
+
+ if (dep && (apidep != api)) /* load dependency if needed */
+ if (! (gvplugin_load(gvc, apidep, dep)))
+ rv = NULL;
+
if (rv && rv->typeptr == NULL) {
library = gvplugin_library_load(gvc, rv->path);
if (library) {
}
}
- if (dep && (apidep != api)) /* load dependency if needed */
- if (! (gvplugin_load(gvc, apidep, dep)))
- rv = NULL;
-
/* one last check for successfull load */
if (rv && rv->typeptr == NULL)
rv = NULL;