aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2017-03-04 22:02:47 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org> 2017-03-04 22:02:47 +0100
commit321385b5bb7f230d3b18aaef82e45a0450475766 (patch)
tree8b4c195642b78ce84b36c5aa15a4d5269121907f /colorize.c
parente2557f57e0b36c61f81f12fa3e5eb42b07de91ac (diff)
downloadcolorize-321385b5bb7f230d3b18aaef82e45a0450475766.tar.gz
colorize-321385b5bb7f230d3b18aaef82e45a0450475766.tar.bz2
Include all flags in version output
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/colorize.c b/colorize.c
index 06f448b..7faeb80 100644
--- a/colorize.c
+++ b/colorize.c
@@ -473,7 +473,7 @@ print_version (void)
const char *version = NULL;
#endif
const char *version_prefix, *version_string;
- const char *c_flags;
+ const char *c_flags, *ld_flags, *cpp_flags;
struct bytes_size bytes_size;
bool debug;
#ifdef CFLAGS
@@ -481,6 +481,16 @@ print_version (void)
#else
c_flags = "unknown";
#endif
+#ifdef LDFLAGS
+ ld_flags = to_str (LDFLAGS);
+#else
+ ld_flags = "unknown";
+#endif
+#ifdef CPPFLAGS
+ cpp_flags = to_str (CPPFLAGS);
+#else
+ cpp_flags = "unknown";
+#endif
#if DEBUG
debug = true;
#else
@@ -491,6 +501,8 @@ print_version (void)
printf ("colorize %s%s (compiled at %s, %s)\n", version_prefix, version_string, __DATE__, __TIME__);
printf ("Compiler flags: %s\n", c_flags);
+ printf ("Linker flags: %s\n", ld_flags);
+ printf ("Preprocessor flags: %s\n", cpp_flags);
if (get_bytes_size (BUF_SIZE, &bytes_size))
{
if (BUF_SIZE % 1024 == 0)