84 #ifdef GNUNET_EXPERIMENTAL
98 fprintf (stdout,
"-I%sinclude\n", prefixdir);
102 fprintf (stdout,
"-L%s -lgnunetutil\n", libdir);
106 fprintf (stdout,
"%s\n", prefixdir);
118 "libgnunet_plugin_%s",
145 .global_ret = EXIT_SUCCESS
154 "test if the current installation supports the specified BACKEND"),
160 "Provide an appropriate value for CFLAGS to applications building on top of GNUnet"),
165 gettext_noop (
"Is this an experimental build of GNUnet"),
171 "Provide an appropriate value for LIBS to applications building on top of GNUnet"),
177 "Provide the path under which GNUnet was installed"),
191 "gnunet-config [OPTIONS]",
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
struct GNUNET_GETOPT_CommandLineOption options[]
#define gettext_noop(String)
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static int ret
Return value of the commandline.
static int libs
If printing the value of LIBS has been requested.
static char * backend_check
Backend to check if the respective plugin is loadable.
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Print each option in a given section.
static int cflags
If printing the value of CFLAGS has been requested.
static int is_experimental
Check if this is an experimental build.
int main(int argc, char *const *argv)
Program to manipulate configuration files.
static int prefix
If printing the value of PREFIX has been requested.
#define GNUNET_CONFIGURATION_CONFIG_OPTIONS(cs)
Macro that expands to a set of GNUNET-getopt directives to initialize a struct GNUNET_CONFIGURATION_C...
void GNUNET_CONFIGURATION_config_settings_free(struct GNUNET_CONFIGURATION_ConfigSettings *cs)
Free resources associated with cs.
void GNUNET_CONFIGURATION_config_tool_run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main task to run to perform operations typical for gnunet-config as per the configuration settings gi...
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_exclusive(struct GNUNET_GETOPT_CommandLineOption opt)
Make the given option mutually exclusive with other options.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
#define GNUNET_UTIL_VERSION
Version of the API (for entire gnunetutil.so library).
GNUNET_GenericReturnValue
Named constants for return values.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_free(ptr)
Wrapper around free.
#define GNUNET_free_nz(ptr)
Wrapper around free.
char * GNUNET_OS_installation_get_path(enum GNUNET_OS_InstallationPathKind dirkind)
Get the path to a specific GNUnet installation directory or, with GNUNET_OS_IPK_SELF_PREFIX,...
@ GNUNET_OS_IPK_LIBDIR
Return the directory where libraries are installed.
@ GNUNET_OS_IPK_PREFIX
Return the "PREFIX" directory given to configure.
enum GNUNET_GenericReturnValue GNUNET_PLUGIN_test(const char *library_name)
Test if a plugin exists.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
enum GNUNET_GenericReturnValue GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Closure for GNUNET_CONFIGURATION_config_tool_run() with settings for what should be done with the con...
int global_ret
Return value from the operation, to be returned from 'main'.
unsigned int api_version
Must be set to the API version, i.e.
Definition of a command line option.