]> git.ozlabs.org Git - ccan/blobdiff - tools/read_config_header.h
tools: move config.h reading to its own file
[ccan] / tools / read_config_header.h
diff --git a/tools/read_config_header.h b/tools/read_config_header.h
new file mode 100644 (file)
index 0000000..62eb152
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef CCAN_TOOLS_READ_CONFIG_HEADER_H
+#define CCAN_TOOLS_READ_CONFIG_HEADER_H
+#include <stdbool.h>
+
+/* Get token if it's equal to token. */
+bool get_token(const char **line, const char *token);
+
+/* Get an identifier token. */
+char *get_symbol_token(void *ctx, const char **line);
+
+/* Read config header from config_dir/config.h: set compiler/cflags. */
+char *read_config_header(const char *config_dir,
+                        const char **compiler, const char **cflags,
+                        bool verbose);
+
+#endif /* CCAN_TOOLS_READ_CONFIG_HEADER_H */