if Options.options.with_cups:
conf.find_program('cups-config', var='CUPS_CONFIG')
if conf.env.CUPS_CONFIG:
- conf.check_cfg(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags --libs",
+ # we would normally use --libs here, but cups-config incorrectly adds
+ # gssapi_krb5 and other libraries to its --libs output. That breaks the use
+ # of an in-tree heimdal kerberos
+ conf.check_cfg(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags",
package="", uselib_store="cups")
conf.CHECK_HEADERS('cups/cups.h cups/language.h', lib='cups')
- conf.CHECK_FUNCS_IN('httpConnect httpConnectEncrypt', conf.env.LIB_cups)
+ conf.CHECK_FUNCS_IN('httpConnect httpConnectEncrypt', 'cups')
if conf.CONFIG_SET('HAVE_CUPS_CUPS_H') and conf.CONFIG_SET('HAVE_CUPS_LANGUAGE_H'):
conf.DEFINE('HAVE_CUPS', '1')
else: