diff --git a/configure.ac b/configure.ac index 593bc088d5..2bda3f44d1 100644 --- a/configure.ac +++ b/configure.ac @@ -1529,8 +1529,9 @@ else CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'` CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'` - if test $CUPS_API_MAJOR -lt 2; then - AC_MSG_ERROR([CUPS >= 2.0 not found]) + if test $CUPS_API_MAJOR -lt 1 -o \ + $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 7; then + AC_MSG_ERROR([CUPS >= 1.7 not found]) fi AC_SUBST(CUPS_API_MAJOR) diff --git a/modules/printbackends/meson.build b/modules/printbackends/meson.build index 930b9012a8..a83dbe0561 100644 --- a/modules/printbackends/meson.build +++ b/modules/printbackends/meson.build @@ -73,9 +73,10 @@ if enabled_print_backends.contains('cups') if cc.has_header('cups/cups.h') cups_major_version = cc.compute_int('CUPS_VERSION_MAJOR', prefix : '#include ') cups_minor_version = cc.compute_int('CUPS_VERSION_MINOR', prefix : '#include ') - message('Found CUPS version: @0@.@1@'.format(cups_major_version, cups_minor_version)) - if cups_major_version < 2 - cups_error = 'Need CUPS version >= 2.0' + cups_version = '@0@.@1@'.format(cups_major_version, cups_minor_version) + message('Found CUPS version: @0@'.format(cups_version)) + if cups_version.version_compare('<1.7') + cups_error = 'Need CUPS version >= 1.7' else libcups = cc.find_library('cups', required : true) endif