Re: Building libpng16 from source with zlib v1.2.10
Guillaume Rossolini <[email protected]>
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Message-ID | <CAE=Fn_64bFSwQXeYBy5ovFNem89bFnERoDYNB=FMQPryd-qaTQ@mail.gmail.com> |
Hi John, So, are you saying the project should be amended, or my configure line? I've ran into these kinds of things before, but I'm not sure how to go best about solving this. Is it like this? CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local --with-zlib-prefix=/usr/local --disable-static Or rather this? ./configure 'CPPFLAGS=-I/usr/local/include' 'LDFLAGS=-L/usr/local/lib' --prefix=/usr/local --with-zlib-prefix=/usr/local --disable-static (the latter seemed to work) Thanks, On 6 January 2017 at 17:21, John Bowler <[email protected]> wrote: > On Fri, Jan 6, 2017 at 7:59 AM, GLENN PEHRSON <[email protected]> wrote: > > I think you may be misusing zlib_prefix which is just a string that gets > > prefixed to exported symbols. > > True, but it never gets used. This is the relevant pair of lines from > configure.ac: > > AC_CHECK_LIB(z, zlibVersion, , > AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not > installed))) > > So, regardless of ZPREFIX, the first check is for 'zlibVersion' (no > prefix) in 'libz.a' and, apparently, that succeeds because the one > using ZPREFIX certainly won't. > > Notice that using --prefix does not change the search paths (-I or > -L), here's the actual compile line for pngrutil.c: > > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../code -g -O2 -MT pngrutil.lo -MD -MP -MF $depbase.Tpo -c -o > pngrutil.lo ../code/pngrutil.c &&\ > mv -f $depbase.Tpo $depbase.Plo > > All --prefix does is change where the stuff gets installed, and > --prefix=/usr/local is the default. To control where the include > files are it is necessary to set CPPFLAGS and to control where the > libraries are it is necessary to set LDFLAGS. It is necessary to get > them both correct. > > John Bowler > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > png-mng-misc mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/png-mng-misc > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ png-mng-misc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/png-mng-misc