[Libreoffice] [PATCH] Enable CUPS unconditionally

Francois Tigeot ftigeot at wolfpond.org
Sun Aug 21 23:29:12 PDT 2011


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])
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

-- 
Francois Tigeot


More information about the LibreOffice mailing list