- xbt_cfg_register(&_sg_cfg_set, "contexts/factory",
- "Context factory to use in SIMIX (ucontext, thread or raw)",
- xbt_cfgelm_string, NULL, 1, 1, _sg_cfg_cb_context_factory, NULL);
- xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", "ucontext");
+ sprintf(description,
+ "Context factory to use in SIMIX. Possible values: thread");
+ const char *dflt_ctx_fact = "thread";
+#ifdef CONTEXT_UCONTEXT
+ dflt_ctx_fact = "ucontext";
+ strcat(strcat(description, ", "), dflt_ctx_fact);
+#endif
+#ifdef HAVE_RAWCTX
+ dflt_ctx_fact = "raw";
+ strcat(strcat(description, ", "), dflt_ctx_fact);
+#endif
+ strcat(description, ".");
+ xbt_cfg_register(&_sg_cfg_set, "contexts/factory", description,
+ xbt_cfgelm_string, 1, 1, _sg_cfg_cb_context_factory, NULL);
+ xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", dflt_ctx_fact);