[Zlib-devel] zlib-1.2.5 configure script issues

Fabian Groffen grobian at gentoo.org
Fri Apr 23 15:49:43 EDT 2010


Hi,

I had to deal with a number of issues with the configure script of
zlib-1.2.5.  Reading a bit on recent posts on the list some may be fixed
already, but as I can't seem to find a link to some dev-repo, I can't
really check if they are.

Here are the issues I ran into:
1) Solaris /bin/sh doesn't grok $(...), this causes e.g. uname to be set
   to the string "$(sed ......)" when CHOST is set, causing an
   non-optimal build for shared libraries.
   I haven't tried to fix this, but switched the script to bash instead,
   with which it works fine on Solaris 10 x86 and sparc.
2) Solaris support is only for Sun's SunStudio compiler, not GCC.  I
   simply added SunOS* and solaris* to case switch for Linux* and
   linux*.  This works great for me.  I'm using GNU ld though.
3) Under Gentoo we have CHOST set, this causes uname var to be set
   according to some sed statement. (The one from 1) actually.)  I don't
   know what's the rationale behind this, but it results in things like
   freebsd7.2, darwin8, solaris2.10, etc.  Output from uname would be
   FreeBSD, Darwin, SunOS respectively.  In any case, the case switch
   that selects on $uname now contains entries like SunOS*, which given
   the previous doesn't make much sense.  I'd expect SunOS | solaris*
   and alike for other platforms, e.g. Darwin | darwin*.
4) Because of 3), Solaris, FreeBSD and Darwin get non-optimal builds
   (missing soname or install_name).

In short, from our ebuild:
	# also set soname and stuff on Solaris (with CHOST compensation fix
	# as below)
    sed -i -e 's:Linux\* | linux\*:Linux\* | linux\* | SunOS\* | solaris\*:'    configure || die
    # and compensate for our ebuild env having CHOST set
    sed -i -e 's:Darwin\*):Darwin\* | darwin\*):' configure || die
    # configure script isn't really /bin/sh, breaks on Solaris
    sed -i -e '1c\#!/usr/bin/env bash' configure || die

Hope this is the right place and the right information.

Regards,

-- 
Fabian Groffen
Gentoo on a different level



More information about the Zlib-devel mailing list