[Zlib-devel] making zlib sysroot-aware
Enrico Weigelt
weigelt at metux.de
Sat Jan 2 21:46:13 EST 2010
glennrp at comcast.net wrote:
> Mark,
>
> If you've been watching png-mng-implement you know that
> we've been requested to make libpng sysroot-aware, for
> cross-building.
>
> I think zlib could do this with the following change:
>
> Change
>
> prefix =/usr/local
> exec_prefix =${prefix}
> libdir =${prefix}/lib
> includedir =${prefix}/include
> mandir =${prefix}/share/man
>
> to
>
> prefix =/usr/local
> sysroot =""
> zlib_prefix =${sysroot}${prefix}
> exec_prefix =${zlib_prefix}
> libdir =${exec_prefix}/lib
> includedir =${zlib_prefix}/include
> mandir =${zlib_prefix}/share/man
Totally wrong approach. pkg-config directly supports SYSROOT for
a long time (I did the initial patch for this years ago ;-p).
Leave the .pc alone and simply pass the proper $SYSROOT variable,
it will prepend the prefix automatically where it's needed.
DONT put any sysroot-related complexity in your packages, since
that's exactly the wrong way - let the toolchain handle it all.
Just make sure not to do such screwed things like absolute
include/lib pathes, AC_TRY_RUN(), etc.
Just had a quick look at your code - master seems perfectly fine
for sysroot, leave it as it is.
cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/
cellphone: +49 174 7066481 email: info at metux.de skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
More information about the Zlib-devel
mailing list