Skip to content

Commit

Permalink
Display Linux variant at ./configure time (#1928)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kinkie authored and yadij committed Nov 2, 2024
1 parent 081f031 commit d07c5d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d07c5d9

Please sign in to comment.