From 0e1e9e33f2e17f23f3fdb8c213f5d088194b157a Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 31 Oct 2024 12:43:01 +0000 Subject: [PATCH] do not source /etc/os-release, it clobbers key configure variables --- configure.ac | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index e7d89c70af9..99ac9ec822c 100644 --- a/configure.ac +++ b/configure.ac @@ -50,18 +50,17 @@ 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],[ - . /etc/os-release - printed_os_name="no" - AS_IF([test "x$PRETTY_NAME" != "x"],[ - AC_MSG_NOTICE([Building on $PRETTY_NAME]) - printed_os_name="yes" + squid_cv_linux_distro_name=`grep '^PRETTY_NAME=' /etc/os-release | sed 's/^[[^"]]*"//;s/".*$//'` + AS_IF([test "x$squid_cv_linux_distro_name" = "x"],[ + squid_cv_linux_distro_name=`grep '^NAME=' /etc/os-release | sed 's/^[[^"]]*"//;s/".*$//'` ]) - AS_IF([test "x$printed_os_name" = "xno" -a "x$NAME" != "x"],[ - AC_MSG_NOTICE([Building on $NAME]) - printed_os_name="yes" + AS_IF([test "x$squid_cv_linux_distro_name" != "x"],[ + AC_MSG_NOTICE([Building on $squid_cv_linux_distro_name]) ]) ]) + + AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX