From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:11:41 +0000 (+0000) Subject: Display Linux variant at ./configure time (#1928) X-Git-Tag: SQUID_6_13~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07c5d9e60d26552214437e722e16622561684a9;p=thirdparty%2Fsquid.git Display Linux variant at ./configure time (#1928) Linux standards offer an /etc/os-release file containing information about the operating system. Parse that file and print an identifier of the Linux version at configure time. --- diff --git a/configure.ac b/configure.ac index e14964d66f..53cc2a02f4 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,16 @@ AS_IF([test -n "$squid_host_os_version"],[ AC_MSG_RESULT($squid_host_os (version $squid_host_os_version)) # on windows squid_host_os is either mingw or cygwin, version is 32 +AS_IF([test -e /etc/os-release],[ + squid_build_os_release_name=`grep '^PRETTY_NAME=' /etc/os-release | sed 's/^[[^"]]*"//;s/".*$//'` + AS_IF([test "x$squid_build_os_release_name" = "x"],[ + squid_build_os_release_name=`grep '^NAME=' /etc/os-release | sed 's/^[[^"]]*"//;s/".*$//'` + ]) + AS_IF([test "x$squid_build_os_release_name" != "x"],[ + AC_MSG_NOTICE([Building on $squid_build_os_release_name]) + ]) +]) + AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX