Re: Automake issues on pngnq

2022-03-07 Thread Andreas Tille
Am Mon, Mar 07, 2022 at 11:08:11PM +0100 schrieb Filip Hroch:
> 
> PKG_CHECK_MODULES macro defines set of [lib]png_* variables,
> specially [lib]png_CFLAGS and [lib]png_LIBS, which can be used
> in Makefile[.am] by this way:
> 
> pngnq_CFLAGS = ... $(png_CFLAGS) ..
> pngnq_LDADD = ... $(png_LIBS) ..
> 
> (I'm unsure if ones are png_* or libpng_*, please
> consult `config.log').

Its $(PNG_LIBS) and the build works that way.
 
Thanks for your helpful hint

  Andreas. 

-- 
http://fam-tille.de



Re: Automake issues on pngnq

2022-03-07 Thread Filip Hroch

Dear Andreas,

Andreas Tille  writes:

...


I was checking this as well - seems here is something broken:


# checks for libraries
AC_SEARCH_LIBS([zlibVersion],[z])
AC_SEARCH_LIBS([sqrt],[m])
PKG_CHECK_MODULES([PNG], [libpng >= 1.2.0])



PKG_CHECK_MODULES macro defines set of [lib]png_* variables,
specially [lib]png_CFLAGS and [lib]png_LIBS, which can be used
in Makefile[.am] by this way:

pngnq_CFLAGS = ... $(png_CFLAGS) ..
pngnq_LDADD = ... $(png_LIBS) ..

(I'm unsure if ones are png_* or libpng_*, please
consult `config.log').

As an alternative, the command:

 $ libpng-config --libs
   -lpng16

can be added to the command line; linked libraries should
be the last argument.

I believe it makes a sense,
FH
--
F. Hroch , Masaryk University,
Dept. of theor. physics and astrophysics, Brno, Moravia, CZ



Re: Automake issues on pngnq

2022-03-07 Thread Andreas Tille
Am Tue, Mar 08, 2022 at 01:07:05AM +0500 schrieb Andrey Rahmatullin:
> On Mon, Mar 07, 2022 at 08:59:38PM +0100, Andreas Tille wrote:
> > For whatever reason automake puts LDFLAGS before "-o pngcomp"
> This is correct.
> 
> > instead of after and the last options are obtained from the LIBS variable. 
> This is correct.
> 
> > I have no idea how to tweak this sequence.
> You don't need to tweak the sequence. You need to put libs into LIBS.

I was checking this as well - seems here is something broken:


# checks for libraries
AC_SEARCH_LIBS([zlibVersion],[z])
AC_SEARCH_LIBS([sqrt],[m])
PKG_CHECK_MODULES([PNG], [libpng >= 1.2.0])


Any idea how to make sure the correct -lpng expression is added here?


Kind regards

  Andreas.


-- 
http://fam-tille.de



Re: Automake issues on pngnq

2022-03-07 Thread Andrey Rahmatullin
On Mon, Mar 07, 2022 at 08:59:38PM +0100, Andreas Tille wrote:
> For whatever reason automake puts LDFLAGS before "-o pngcomp"
This is correct.

> instead of after and the last options are obtained from the LIBS variable. 
This is correct.

> I have no idea how to tweak this sequence.
You don't need to tweak the sequence. You need to put libs into LIBS.

-- 
WBR, wRAR


signature.asc
Description: PGP signature