diff options
author | Guinness <guinness@crans.org> | 2020-11-17 10:43:00 +0100 |
---|---|---|
committer | Guinness <guinness@crans.org> | 2020-11-17 10:43:00 +0100 |
commit | 4382e977f74e41f65170b4d9292678859c9e521f (patch) | |
tree | d6aa15a35af22b1829bfe69ae507156519711e06 /configure.ac | |
parent | 46ccde66a97d7985388eb54bc74a025402fb0a19 (diff) | |
download | tor-4382e977f74e41f65170b4d9292678859c9e521f.tar.gz tor-4382e977f74e41f65170b4d9292678859c9e521f.zip |
Add the compiler name, version and libs used to compile
This changes the behaviour of `tor --version` in such a way.
```console
src/app/tor --version
Tor version 0.4.5.1-alpha-dev (git-46ccde66a97d7985).
Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1h, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.5 and Glibc 2.31 as libc.
Tor compiled with GCC version 10.2.0
```
Fixes #32102
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c880375988..0a1e7b9e02 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,8 @@ AC_CONFIG_SRCDIR([src/app/main/tor_main.c]) AC_CONFIG_MACRO_DIR([m4]) configure_flags="$*" +AC_DEFINE_UNQUOTED([CONFIG_FLAGS], ["$configure_flags"], [Flags passed to configure]) + # DO NOT EDIT THIS DEFINITION BY HAND UNLESS YOU KNOW WHAT YOU'RE DOING. # @@ -421,6 +423,17 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_SED +AX_COMPILER_VERSION +AX_COMPILER_VENDOR + +AC_DEFINE_UNQUOTED([COMPILER_VERSION],["$ax_cv_c_compiler_version"], [Compiler version]) +AC_DEFINE_UNQUOTED([COMPILER_VENDOR],["$ax_cv_c_compiler_vendor"], [Compiler vendor]) + +AS_CASE($ax_cv_c_compiler_vendor, + [gnu], AC_DEFINE([COMPILER],["GCC"],[Compiler name]), + AC_DEFINE([COMPILER],[],[Compiler name]) +) + AC_ARG_VAR([PERL], [path to Perl binary]) AC_CHECK_PROGS([PERL], [perl]) AM_CONDITIONAL(USE_PERL, [test "x$ac_cv_prog_PERL" != "x"]) |