#define _d2s_(x) #x
#define d2s(x) _d2s_(x)
-#if !defined(BINDING_INSTALL_DIR)
-#error "you should define BINDING_INSTALL_DIR"
-#endif
#if !defined(AFB_VERSION)
#error "you should define AFB_VERSION"
#endif
#define SET_NAME 'n'
#define SET_OUTPUT 'o'
#define SET_PORT 'p'
+#define JS_API 'j'
#define SET_QUIET 'q'
#define SET_RANDOM_TOKEN 'r'
#define ADD_SET 's'
{SET_ROOT_DIR, 1, "rootdir", "Root Directory of the application [default: workdir] relative to workdir"},
#if WITH_DYNAMIC_BINDING
- {ADD_LDPATH, 1, "ldpaths", "Load bindings from dir1:dir2:... [default = " BINDING_INSTALL_DIR "]"},
+
+ {ADD_LDPATH, 1, "ldpaths", "Load bindings from dir1:dir2:..."
+#if defined(INTRINSIC_BINDING_DIR)
+ "[default = " INTRINSIC_BINDING_DIR "]"
+#endif
+ },
{ADD_BINDING, 1, "binding", "Load the binding of path"},
{ADD_WEAK_LDPATH, 1, "weak-ldpaths","Same as --ldpaths but ignore errors"},
{SET_NO_LDPATH, 0, "no-ldpaths", "Discard default ldpaths loading"},
#endif
+ {JS_API, 1, "jsapi", "Load the javascript api of path"},
+
{SET_TOKEN, 1, "token", "Initial Secret [default=random, use --token="" to allow any token]"},
{SET_RANDOM_TOKEN, 0, "random-token","Enforce a random token"},
};
#if defined(WITH_MONITORING_OPTION)
-static const char MONITORING_ALIAS[] = "/monitoring:"BINDING_INSTALL_DIR"/monitoring";
+static const char MONITORING_ALIAS[] = "/monitoring:"INTRINSIC_BINDING_DIR"/monitoring";
#endif
static const struct {
#endif
"HOOK "
-#if WITH_TRACE
+#if WITH_AFB_TRACE
"+"
#else
"-"
"["
#if WITH_DYNAMIC_BINDING
- "BINDINGS "
"+"
#else
"-"
#endif
+ "BINDINGS "
#if WITH_LEGACY_BINDING_V1
- "+"
-#else
- "-"
+ "+V1 "
#endif
- "V1 "
#if WITH_LEGACY_BINDING_VDYN
- "+"
-#else
- "-"
+ "+VDYN "
#endif
- "VDYN "
#if WITH_LEGACY_BINDING_V2
- "+"
-#else
- "-"
+ "+V2 "
#endif
- "V2 +V3]\n"
+ "+V3]\n"
"\n",
AFB_VERSION
);
case ADD_WS_CLIENT:
case ADD_WS_SERVICE:
case ADD_AUTO_API:
+ case JS_API:
config_add_optstr(config, optid);
break;
if (config_has_bool(config, SET_RANDOM_TOKEN))
config_del(config, SET_TOKEN);
-#if WITH_DYNAMIC_BINDING
+#if WITH_DYNAMIC_BINDING && defined(INTRINSIC_BINDING_DIR)
if (!config_has(config, ADD_LDPATH) && !config_has(config, ADD_WEAK_LDPATH) && !config_has_bool(config, SET_NO_LDPATH))
- config_add_str(config, ADD_LDPATH, BINDING_INSTALL_DIR);
+ config_add_str(config, ADD_LDPATH, INTRINSIC_BINDING_DIR);
#endif
#if defined(WITH_MONITORING_OPTION)