From: Michael R Sweet Date: Thu, 1 Jun 2017 18:07:52 +0000 (-0400) Subject: Fix configure script issue on Linux - no host_os_version. X-Git-Tag: v2.2.4~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb719eb39ae5bedc9121be13acca44f6df620644;p=thirdparty%2Fcups.git Fix configure script issue on Linux - no host_os_version. Add help on building CUPS on Ubuntu - commands to get base dev packages. --- diff --git a/INSTALL.md b/INSTALL.md index 6acd9710c3..c21cd85f5b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -30,6 +30,13 @@ Windows, and either MIT (1.6.3 or higher) or Heimdal Kerberos for Kerberos support. CUPS will compile and run without these, however you'll miss out on many of the features provided by CUPS. +On a stock Ubuntu install, the following command will install the required +prerequisites: + + sudo apt-get install autoconf build-essential libavahi-client-dev \ + libgnutls28-dev libkrb5-dev libnss-mdns libpam-dev \ + libsystemd-dev libusb-1.0-0-dev zlib1g-dev + Also, please note that CUPS does not include print filters to support PDF or raster printing. You *must* download GPL Ghostscript and/or the Open Printing CUPS filters package separately to print on operating systems other than macOS. diff --git a/config-scripts/cups-opsys.m4 b/config-scripts/cups-opsys.m4 index 42fbe801b6..d85454783e 100644 --- a/config-scripts/cups-opsys.m4 +++ b/config-scripts/cups-opsys.m4 @@ -17,6 +17,10 @@ AC_CANONICAL_HOST [host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`] [host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`] +# Linux often does not yield an OS version we can use... +if test "x$host_os_version" = x; then + host_os_version="0" +fi if test "$host_os_name" = darwin -a $host_os_version -lt 120; then AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.]) diff --git a/configure b/configure index 5ebc81e7e4..74f67a5871 100755 --- a/configure +++ b/configure @@ -2637,6 +2637,12 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'` host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'` +if test "x$host_os_version" = x; then + host_os_version="0" +fi +echo "host_os=$host_os" +echo "host_os_name=$host_os_name" +echo "host_os_version=$host_os_version" if test "$host_os_name" = darwin -a $host_os_version -lt 120; then as_fn_error $? "Sorry, this version of CUPS requires macOS 10.8 or higher." "$LINENO" 5 @@ -9491,6 +9497,7 @@ fi if test "${with_bundledir+set}" = set; then : withval=$with_bundledir; CUPS_BUNDLEDIR="$withval" else + echo "host_os_version=$host_os_version" if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A" LANGUAGES=""