#include <stdio.h>
#include <string.h>
+#include <system.h>
+
+/* TODO: Make optional through configury. The #ifdefs are included
+ already so we don't miss any code that needs to be controlled with
+ this option. */
+#define HAVE_SYSPROF_4_HEADERS
+#ifdef HAVE_SYSPROF_4_HEADERS
+#include <sysprof-4/sysprof-capture-types.h>
+#endif
+
static char *input_path = NULL;
static char *output_path = NULL;
#define FORMAT_SYSPROF 0x2
static int input_format;
+/* Program exit codes. All samples processed without any errors is
+ GOOD. Some non-fatal errors during processing is an ERROR. A fatal
+ error or no samples processed at all is BAD. A command line USAGE
+ exit is generated by argp_error. */
+#define EXIT_OK 0
+#define EXIT_ERROR 1
+#define EXIT_BAD 2
+#define EXIT_USAGE 64
+
static error_t
parse_opt (int key, char *arg __attribute__ ((unused)),
struct argp_state *state)
argp_parse(&argp, argc, argv, 0, NULL, NULL);
/* hello world */
+#ifdef HAVE_SYSPROF_4_HEADERS
+ printf("hello sysprof: %x\n", SYSPROF_CAPTURE_MAGIC);
+#else
+ /* TODO: Should hide corresponding command line options when this is the case. */
+ error (EXIT_BAD, 0, N_("Sysprof support is not available in this version."));
+#endif
}