[Libreoffice] [PATCH] Enable CUPS unconditionally

Rene Engelhard rene at debian.org
Mon Aug 22 10:20:24 PDT 2011


On Mon, Aug 22, 2011 at 08:29:12AM +0200, Francois Tigeot wrote:
> On Sun, Aug 21, 2011 at 10:50:43PM +0200, Rene Engelhard wrote:
> > On Sun, Aug 21, 2011 at 08:53:14PM +0200, Francois Tigeot wrote:
> > > -dnl check for cups support
> > > -dnl ===================================================================
> > > -AC_MSG_CHECKING([whether to enable native cups support])
> > > -if test "$test_cups" = "yes" -a "z$enable_cups" != "zno"; then
> > > -    ENABLE_CUPS="TRUE"
> > > -    AC_MSG_RESULT([yes])
> > > -    AC_CHECK_LIB(cups, cupsPrintFiles)
> > > -    AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
> > > -    if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
> > > -        AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.])
> > > -    fi
> > > -else
> > > -    ENABLE_CUPS=""
> > > -    AC_MSG_RESULT([no])
> > > -fi
> > > -AC_SUBST(ENABLE_CUPS)
> > 
> > You at least should keep the AC_CHECK_LIB/AC_CHECK_HEADER and the if so that we correctly
> > check for pre-requisites...
> 
> Right, I may have been too enthusiastic about this. Would a reduced test like
> this be acceptable ?:
> 
> dnl check for cups support
> dnl ===================================================================
> AC_MSG_CHECKING([whether native cups support is present])

Just "for cups" is enough.

> AC_CHECK_LIB(cups, cupsPrintFiles)

I noticed that in your initial patch, too. Do we link against cups now? Did that change?
TTBOMK it's only dlopen()'ed so it's not needed for the build -> configure doesn't need
to check for it since it's for *build* requirements. Whether it's needed at runtime for
CUPS support to work is out of ./configures businness.

> AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))

Unlike this, which *is* needed in the build, so we also could just AC_ERROR out here directly
in the not-found case, Saves us the if.

Grüße/Regards,

René
-- 
 .''`.  René Engelhard -- Debian GNU/Linux Developer
 : :' : http://www.debian.org | http://people.debian.org/~rene/
 `. `'  rene at debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70


More information about the LibreOffice mailing list