Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Date: Wed, 24 Nov 2010 14:49:47 -0800 From: Alan Coopersmith alan.coopersm...@oracle.com Mark Kettenis wrote: Date: Sun, 21 Nov 2010 23:59:20 +0100 From: =?ISO-8859-1?Q?R=E9mi_Cardona?= r...@gentoo.org Le 20/11/2010 07:04, Alan Coopersmith a �crit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. No. On OpenBSD, zlib is part of the base system and therefore there is no .pc file. Which sounds like another reason to use the approach Dan suggested, of checking pkg-config first, then falling back to the current header/lib checks if that fails. Yes, that'd be fine. Don't really see the added benefit of that though. Are there really systems out there that don't have zlib in the default search path? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Thu, 2010-11-25 at 14:55 +0100, Mark Kettenis wrote: Don't really see the added benefit of that though. Are there really systems out there that don't have zlib in the default search path? On Ubuntu Jaunty, zlib1g-dev contains zlib.h and is not installed by default. None of the zlib1g or zlib1g-dev packages have .pc files. I think the library is installed by default, though I cannot be 100% sure. http://wiki.x.org/wiki/RequiredPackages Gaetan signature.asc Description: This is a digitally signed message part ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Le 25/11/2010 14:55, Mark Kettenis a écrit : Yes, that'd be fine. Don't really see the added benefit of that though. Are there really systems out there that don't have zlib in the default search path? The same could be said of just about any lib. No-one except crazy devs install libs outside standard paths. Yet we're still using pkg-config for those too. Consistency is my main argument. Cheers, Rémi ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Date: Sun, 21 Nov 2010 23:59:20 +0100 From: =?ISO-8859-1?Q?R=E9mi_Cardona?= r...@gentoo.org Le 20/11/2010 07:04, Alan Coopersmith a écrit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. No. On OpenBSD, zlib is part of the base system and therefore there is no .pc file. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Mark Kettenis wrote: Date: Sun, 21 Nov 2010 23:59:20 +0100 From: =?ISO-8859-1?Q?R=E9mi_Cardona?= r...@gentoo.org Le 20/11/2010 07:04, Alan Coopersmith a �crit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. No. On OpenBSD, zlib is part of the base system and therefore there is no .pc file. Which sounds like another reason to use the approach Dan suggested, of checking pkg-config first, then falling back to the current header/lib checks if that fails. -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Sun, Nov 21, 2010 at 6:28 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: Dan Nicholson wrote: On Sun, Nov 21, 2010 at 2:59 PM, Rémi Cardona r...@gentoo.org wrote: Le 20/11/2010 07:04, Alan Coopersmith a écrit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. Yeah, looks like it's been there since 2006 in the 1.2.3.1 release. http://zlib.net/ChangeLog.txt I guess that's why I'd never noticed it, since we're still shipping 1.2.3. I'll poke our maintainers to update, and won't object if someone on a system that has the .pc file wants to work on that change for the next release. Weird, Fedora 13 is still shipping 1.2.3, too. It's probably safest to have the fallback for random old hosts anyway. Something like: PKG_CHECK_MODULES([ZLIB], [zlib], [], [AC_CHECK_HEADERS([zlib.h], [], [AC_MSG_FAILURE([zlib.h is required to compile libfontenc])]) AC_CHECK_LIB(z, gzclose, [ZLIB_LIBS=-lz], [AC_MSG_FAILURE([zlib.h is required to compile libfontenc])])]) -- Dan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Le 20/11/2010 07:04, Alan Coopersmith a écrit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. Cheers, Rémi ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Sun, Nov 21, 2010 at 2:59 PM, Rémi Cardona r...@gentoo.org wrote: Le 20/11/2010 07:04, Alan Coopersmith a écrit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. Yeah, looks like it's been there since 2006 in the 1.2.3.1 release. http://zlib.net/ChangeLog.txt -- Dan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Dan Nicholson wrote: On Sun, Nov 21, 2010 at 2:59 PM, Rémi Cardona r...@gentoo.org wrote: Le 20/11/2010 07:04, Alan Coopersmith a écrit : # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) Any chance we could start using pkg-config to pick up zlib libs/includes? If memory serves, the .pc file was included upstream 2 or 3 years ago. Yeah, looks like it's been there since 2006 in the 1.2.3.1 release. http://zlib.net/ChangeLog.txt I guess that's why I'd never noticed it, since we're still shipping 1.2.3. I'll poke our maintainers to update, and won't object if someone on a system that has the .pc file wants to work on that change for the next release. -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Fri, Nov 19, 2010 at 10:04 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31595 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac | 6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb0b1af..9419909 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,10 @@ XORG_FONT_MACROS_VERSION(1.1) XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) # Check for dependencies PKG_CHECK_MODULES(FONTENC, xproto) I think this breaks zlib linking. Normally if you use AC_CHECK_LIB with no third argument, it appends -l$1 to LIBS, and all objects get linked against $LIBS. Now since you're suppressing the default action by passing a third argument, I think you may not get -lz in $LIBS. Can you check? -- Dan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Sat, Nov 20, 2010 at 08:22:09 -0800, Dan Nicholson wrote: On Fri, Nov 19, 2010 at 10:04 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31595 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac | 6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb0b1af..9419909 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,10 @@ XORG_FONT_MACROS_VERSION(1.1) XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) # Check for dependencies PKG_CHECK_MODULES(FONTENC, xproto) I think this breaks zlib linking. Normally if you use AC_CHECK_LIB with no third argument, it appends -l$1 to LIBS, and all objects get linked against $LIBS. Now since you're suppressing the default action by passing a third argument, I think you may not get -lz in $LIBS. Can you check? Just tested, and from what I can tell passing an empty $3 is the same as not passing it, so this still defines HAVE_LIBZ and sets LIBS=-lz. Cheers, Julien ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
On Sat, Nov 20, 2010 at 8:46 AM, Julien Cristau jcris...@debian.org wrote: On Sat, Nov 20, 2010 at 08:22:09 -0800, Dan Nicholson wrote: On Fri, Nov 19, 2010 at 10:04 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31595 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac | 6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb0b1af..9419909 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,10 @@ XORG_FONT_MACROS_VERSION(1.1) XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], + AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) # Check for dependencies PKG_CHECK_MODULES(FONTENC, xproto) I think this breaks zlib linking. Normally if you use AC_CHECK_LIB with no third argument, it appends -l$1 to LIBS, and all objects get linked against $LIBS. Now since you're suppressing the default action by passing a third argument, I think you may not get -lz in $LIBS. Can you check? Just tested, and from what I can tell passing an empty $3 is the same as not passing it, so this still defines HAVE_LIBZ and sets LIBS=-lz. Thanks for checking. Reviewed-by: Dan Nicholson dbn.li...@gmail.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libfontenc] Fail configure if zlib.h -lz not found
Julien Cristau wrote: On Sat, Nov 20, 2010 at 08:22:09 -0800, Dan Nicholson wrote: I think this breaks zlib linking. Normally if you use AC_CHECK_LIB with no third argument, it appends -l$1 to LIBS, and all objects get linked against $LIBS. Now since you're suppressing the default action by passing a third argument, I think you may not get -lz in $LIBS. Can you check? Just tested, and from what I can tell passing an empty $3 is the same as not passing it, so this still defines HAVE_LIBZ and sets LIBS=-lz. That's what I saw when testing before submitting the patch as well, though the documentation was unclear as to whether that's intended or accidental. -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libfontenc] Fail configure if zlib.h -lz not found
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31595 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb0b1af..9419909 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,10 @@ XORG_FONT_MACROS_VERSION(1.1) XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) # zlib - -AC_CHECK_LIB(z, gzclose) +AC_CHECK_HEADER([zlib.h], [], +AC_MSG_FAILURE([zlib.h is required to compile libfontenc])) +AC_CHECK_LIB(z, gzclose, [], + AC_MSG_FAILURE([zlib is required to compile libfontenc])) # Check for dependencies PKG_CHECK_MODULES(FONTENC, xproto) -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel