Using automake to check for cups version, etc

Michael Sweet mike at easysw.com
Wed Sep 13 07:42:39 PDT 2006


Josh Mathis wrote:
> I would like to use automake, etc. in my filter distribution. What would 
> be the preferred (most portable) way of checking for a specific CUPS 
> version (I am requiring >=1.2), verifying that CUPS dev libraries are 
> installed, and obtaining my ppd and filter paths? Would any of the 
> config scripts included with the CUPS source be suitable for including 
> in my acinclude?

You want to look for the "cups-config" script, which is simply:

     AC_PATH_PROG(CUPSCONFIG, cups-config)

You can then verify that the version is not 1.1.x with:

     if test `cups-config --api-version` = 1.1; then
	AC_MSG_ERROR(CUPS 1.1.x is too old!)
     fi

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list