Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-23 Thread Caolán McNamara
On Mon, 2011-08-22 at 20:25 +0200, Francois Tigeot wrote:
> However, it is my intention to make the print code link with cups normally,

Probably a good thing.

As an aside see
http://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg03549.html
for the horrors of cups+libgcrypt+neon

C.



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Francois Tigeot
On Mon, Aug 22, 2011 at 04:58:37PM -0400, Kohei Yoshida wrote:
> On Mon, 2011-08-22 at 22:47 +0200, Francois Tigeot wrote:
> 
> > > Are we sure that all supported *ixes have CUPS available nowadays?
> > 
> > Pretty much. CUPS runs on AIX, the five *BSDs and Linux.
> 
> What about Windows?
> I just got the configure failure not finding CUPS on Windows.

That was just the configure check beeing too zealous. I've fixed it.

-- 
Francois Tigeot
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Kohei Yoshida
On Mon, 2011-08-22 at 22:47 +0200, Francois Tigeot wrote:

> > Are we sure that all supported *ixes have CUPS available nowadays?
> 
> Pretty much. CUPS runs on AIX, the five *BSDs and Linux.

What about Windows?

I just got the configure failure not finding CUPS on Windows.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Francois Tigeot
Hi Eike,

On Mon, Aug 22, 2011 at 09:50:13PM +0200, Eike Rathke wrote:
> 
> On Sunday, 2011-08-21 20:53:14 +0200, Francois Tigeot wrote:
> 
> > There is still some old (and broken) code to try to print with something
> > else than CUPS on Unix systems.
> 
> Are we sure that all supported *ixes have CUPS available nowadays?

Pretty much. CUPS runs on AIX, the five *BSDs and Linux.

Besides, the non-CUPS code uses a completely brain damaged logic; I can't
believe it can still print anything without serious rework.

-- 
Francois Tigeot
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Eike Rathke
Hi Francois,

On Sunday, 2011-08-21 20:53:14 +0200, Francois Tigeot wrote:

> There is still some old (and broken) code to try to print with something
> else than CUPS on Unix systems.

Are we sure that all supported *ixes have CUPS available nowadays?

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Francois Tigeot
On Mon, Aug 22, 2011 at 07:20:24PM +0200, Rene Engelhard wrote:
> 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:
> > 
> > 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.

I've removed the "native" bit in the new attached patch.
This code was already there; I've no idea what the original author meant by
"native" cups.

> > AC_CHECK_LIB(cups, cupsPrintFiles)
> 
> I noticed that in your initial patch, too.
> Do we link against cups now? Did that change?

This is also what is currently in the tree.
AFAIK, libcups is not linked at build time and I have no idea why the check
was there in the first place.
Howewer, it is my intention to make the print code link with cups normally,
in which case it is better for this check to stay.

If nobody objects, I'll push the patch in a short while.

-- 
Francois Tigeot
>From 9fdf9445ca579f5a4c28e7f461a91edaea1a2860 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Tigeot?= 
Date: Sun, 21 Aug 2011 20:36:09 +0200
Subject: [PATCH] Enable CUPS unconditionally

It doesn't make sense to try to use anything else to print on *nix
systems these days
---
 configure.in   |   30 
 distro-configs/LibreOfficeAndroid.conf |1 -
 distro-configs/LibreOfficeiOS.conf |1 -
 distro-configs/OxygenOfficeLinux.conf  |1 -
 set_soenv.in   |1 -
 vcl/Library_vcl.mk |3 --
 vcl/unx/generic/printer/cupsmgr.cxx|   40 +---
 7 files changed, 6 insertions(+), 71 deletions(-)

diff --git a/configure.in b/configure.in
index 536ca8b..8069174 100755
--- a/configure.in
+++ b/configure.in
@@ -180,10 +180,6 @@ AC_ARG_ENABLE(evolution2,
 [Allows the built-in evolution 2 addressbook connectivity build to be
  enabled.]))
 
-AC_ARG_ENABLE(cups,
-AS_HELP_STRING([--disable-cups],
-[Disable cups support in the psprint project.]))
-
 AC_ARG_ENABLE(directx,
 AS_HELP_STRING([--disable-directx],
 [Remove DirectX implementation for the new XCanvas interface.
@@ -1454,7 +1450,6 @@ dnl These values may be checked and reset later.
 dnl ===
 #defaults unless the os test overrides this:
 test_randr=yes
-test_cups=yes
 test_fontconfig=yes
 
 case "$host_os" in
@@ -1504,7 +1499,6 @@ linux-gnu*|k*bsd*-gnu*)
 
 gnu)
 test_randr=no
-test_cups=no
 _os=GNU
  ;;
 
@@ -1525,7 +1519,6 @@ cygwin*|interix*|mingw32*)
 # is "mingw32" (because in that case it is the MinGW
 # tool-chain that is used).
 
-test_cups=no
 test_randr=no
 test_freetype=no
 test_fontconfig=no
@@ -1601,7 +1594,6 @@ freebsd*)
 ;;
 
 aix*)
-test_cups=no
 test_randr=no
 test_freetype=yes
 PTHREAD_LIBS=-pthread
@@ -1629,7 +1621,6 @@ dragonfly*)
 
 androideabi*)
 build_gstreamer=no
-test_cups=no
 test_fontconfig=no
 test_freetype=no
 test_gtk=no
@@ -2260,20 +2251,12 @@ AC_SUBST(DISABLE_STRIP)
 
 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])
+AC_MSG_CHECKING([whether 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
-AC_SUBST(ENABLE_CUPS)
 
 
 # check for fontconfig support
@@ -5920,9 +5903,6 @@ if test  "$_os" = "Darwin"; then
 x_libraries="no_x_libraries"
 dnl disable some things used on other Unix versions but not on the 
aqua build
 enable_gtk=no
-enable_cups=no
-ENABLE_CUPS=""
-AC_SUBST(ENABLE_CUPS)
 else
 AC_MSG_ERROR([No AppKit.framewrok found])
 fi
diff --git a/distro-configs/LibreOfficeAndroid.conf 
b/distro-configs/LibreOfficeAndroid.conf
index 90d710b..e8d9da4 100644
--- a/distro-configs/LibreOfficeAndroid.conf
+

Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-22 Thread Rene Engelhard
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/
 `. `'  r...@debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-21 Thread Francois Tigeot
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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-21 Thread Rene Engelhard
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)
> -
> -

Huh? No, that won't work.

You at least should keep the AC_CHECK_LIB/AC_CHECK_HEADER and the if so that we 
correctly
check for pre-requisites...

Otherwise, +1.

Grüße/Regards,

René
-- 
 .''`.  René Engelhard -- Debian GNU/Linux Developer
 : :' : http://www.debian.org | http://people.debian.org/~rene/
 `. `'  r...@debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] Enable CUPS unconditionally

2011-08-21 Thread Francois Tigeot
Hi,

There is still some old (and broken) code to try to print with something
else than CUPS on Unix systems.

As a first step to clean it, this patch enable CUPS unconditionally

-- 
Francois Tigeot
>From aed4e0988b1734ec6390665e57441ea3e4257bd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Tigeot?= 
Date: Sun, 21 Aug 2011 20:36:09 +0200
Subject: [PATCH] Enable CUPS unconditionally

It doesn't make sense to try to use anything else to print on *nix
systems these days
---
 configure.in   |   30 
 distro-configs/LibreOfficeAndroid.conf |1 -
 distro-configs/LibreOfficeiOS.conf |1 -
 distro-configs/OxygenOfficeLinux.conf  |1 -
 set_soenv.in   |1 -
 vcl/Library_vcl.mk |3 --
 vcl/unx/generic/printer/cupsmgr.cxx|   40 +---
 7 files changed, 1 insertions(+), 76 deletions(-)

diff --git a/configure.in b/configure.in
index 536ca8b..ced6db1 100755
--- a/configure.in
+++ b/configure.in
@@ -180,10 +180,6 @@ AC_ARG_ENABLE(evolution2,
 [Allows the built-in evolution 2 addressbook connectivity build to be
  enabled.]))
 
-AC_ARG_ENABLE(cups,
-AS_HELP_STRING([--disable-cups],
-[Disable cups support in the psprint project.]))
-
 AC_ARG_ENABLE(directx,
 AS_HELP_STRING([--disable-directx],
 [Remove DirectX implementation for the new XCanvas interface.
@@ -1454,7 +1450,6 @@ dnl These values may be checked and reset later.
 dnl ===
 #defaults unless the os test overrides this:
 test_randr=yes
-test_cups=yes
 test_fontconfig=yes
 
 case "$host_os" in
@@ -1504,7 +1499,6 @@ linux-gnu*|k*bsd*-gnu*)
 
 gnu)
 test_randr=no
-test_cups=no
 _os=GNU
  ;;
 
@@ -1525,7 +1519,6 @@ cygwin*|interix*|mingw32*)
 # is "mingw32" (because in that case it is the MinGW
 # tool-chain that is used).
 
-test_cups=no
 test_randr=no
 test_freetype=no
 test_fontconfig=no
@@ -1601,7 +1594,6 @@ freebsd*)
 ;;
 
 aix*)
-test_cups=no
 test_randr=no
 test_freetype=yes
 PTHREAD_LIBS=-pthread
@@ -1629,7 +1621,6 @@ dragonfly*)
 
 androideabi*)
 build_gstreamer=no
-test_cups=no
 test_fontconfig=no
 test_freetype=no
 test_gtk=no
@@ -2258,24 +2249,6 @@ else
 fi
 AC_SUBST(DISABLE_STRIP)
 
-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)
-
-
 # check for fontconfig support
 AC_MSG_CHECKING([whether we need fontconfig])
 if test "z$test_fontconfig" = "zyes"; then
@@ -5920,9 +5893,6 @@ if test  "$_os" = "Darwin"; then
 x_libraries="no_x_libraries"
 dnl disable some things used on other Unix versions but not on the 
aqua build
 enable_gtk=no
-enable_cups=no
-ENABLE_CUPS=""
-AC_SUBST(ENABLE_CUPS)
 else
 AC_MSG_ERROR([No AppKit.framewrok found])
 fi
diff --git a/distro-configs/LibreOfficeAndroid.conf 
b/distro-configs/LibreOfficeAndroid.conf
index 90d710b..e8d9da4 100644
--- a/distro-configs/LibreOfficeAndroid.conf
+++ b/distro-configs/LibreOfficeAndroid.conf
@@ -1,5 +1,4 @@
 --host=arm-linux-androideabi
---disable-cups
 --disable-gconf
 --disable-gnome-vfs
 --disable-gstreamer
diff --git a/distro-configs/LibreOfficeiOS.conf 
b/distro-configs/LibreOfficeiOS.conf
index bd2b60c..fbc60f9 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -1,7 +1,6 @@
 --build=i386-apple-darwin10.7.0
 --host=arm-apple-darwin10
 --disable-cairo
---disable-cups
 --disable-fontconfig
 --disable-gconf
 --disable-gnome-vfs
diff --git a/distro-configs/OxygenOfficeLinux.conf 
b/distro-configs/OxygenOfficeLinux.conf
index 7cb36c9..73c1d76 100644
--- a/distro-configs/OxygenOfficeLinux.conf
+++ b/distro-configs/OxygenOfficeLinux.conf
@@ -8,7 +8,6 @@
 --without-system-mozilla
 --with-package-format=rpm deb
 --enable-epm
---enable-cups
 --disable-symbols
 --enable-systray
 --with-epm=internal
diff --git a/set_soenv.in b/set_soenv.in
index 76681f3..0618410 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1846,7 +1846,6 @@ ToFile( "ENABLE_SYMBOLS","@ENABLE_SYMBOLS@","e" );
 ToFile( "DISABLE_STRIP", "@DISABLE_STRIP@", "e" );
 ToFile( "LFS_CFLAGS","@LFS_CFLAGS@", "e" );
 ToFile( "ENABLE_CRASHDUMP",  "@ENABLE_CRASHDUMP@",