unexpected token `ZLIB,zlib,'

Hi, I am trying to build libraw 0.20.2 on ubuntu 18.04. Running ./configure results in this error

./configure: line 16405: syntax error near unexpected token `ZLIB,zlib,'
./configure: line 16405: ` PKG_CHECK_MODULES(ZLIB,zlib,'

Anyone have experience with this?

Thanks,
Tom

Forums: 

Line 16405 in ./configure

Line 16405 in ./configure provided with 0.20.2 (downloaded from this site) is empty.
Around this line are libjasper checks.

Also, there are no 'ZLIB,zlib' strings in provided configure script.

Have you re-generated ./configure (using, for example, autoreconf)?

-- Alex Tutubalin @LibRaw LLC

This happens when pkg-config

This happens when pkg-config has not been installed when running autoreconf prior to executing configure script.

Same problem

Hi, same problem here, but different line:

checking for jas_init in -ljasper... no
configure: WARNING: libjasper not found
./configure: line 12807: syntax error near unexpected token `ZLIB,zlib,'
./configure: line 12807: ` PKG_CHECK_MODULES(ZLIB,zlib,'

any ideas? Thanks very much, Jan

Do you use ./configure

Do you use ./configure provided with LibRaw distiibution or generate own configure script?

-- Alex Tutubalin @LibRaw LLC

I do not see the PKG_CHECK

I do not see the PKG_CHECK_MODULES substring in the provided ./configure script

-- Alex Tutubalin @LibRaw LLC

Sorry, I was confused.

Sorry, I was confused. Repeated it so many times that I got a bit lost. Here is what happens:

./configure seems to work

make produces some warnings and errors:

configure.ac:16: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:41: error: possibly undefined macro: AC_MSG_WARN
make: *** [Makefile:651: configure] Fehler 1

ignoring these, sudo make install produces the aforementioned error:

configure: WARNING: libjasper not found
./configure: line 12807: syntax error near unexpected token `ZLIB,zlib,'
./configure: line 12807: ` PKG_CHECK_MODULES(ZLIB,zlib,'
make: *** [Makefile:648: config.status] Fehler 2

Thanks! Jan

It looks like you have

It looks like you have incomplete automake/pkg-config suite installed, see comments above.

You may use make -f Makefile.dist

-- Alex Tutubalin @LibRaw LLC

Yes, I checked that: automake

Yes, I checked that: automake-1.15

I will try to reinstall.

Thank you anyway for your quick reply!

FYI: I did not really solve

FYI: I did not really solve it, but the 0.19 version works without problems!

Thanks again, Jan

To get working autotools

To get working autotools suite you need autoconf, automake, libtool and pkg-config installed.

Based on error message you provided, pkg-config is probably missing on your system

-- Alex Tutubalin @LibRaw LLC

Check your version of

Check your version of autoconf and compare to AC_PREREQ in aclocal.m4. Try re-installing autotools if something doesn't work.
On my focal 20.04 LTS, following https://www.libraw.org/docs/Install-LibRaw.html

$ apt-cache policy pkg-config
pkg-config:
  Installed: 0.29.1-0ubuntu4...
$ apt-cache policy automake
automake:
  Installed: 1:1.16.1-4ubuntu6...
$apt-cache policy libtool
libtool:
  Installed: 2.4.6-14...
$ autoconf -V
autoconf (GNU Autoconf) 2.69....
$ cd
$ git clone https://github.com/LibRaw/LibRaw.git
$ cd LibRaw
$ autoreconf --install
$ ./configure
$ make
$ bin/raw-identify 
Usage: /home/ib/LibRaw/bin/.libs/raw-identify [options] inputfiles
Options:
	-v	verbose output
	-w	print white balance
	-u	print unpack function
	-f	print frame size (only w/ -u)
	-s	print output image size
	-h	force half-size mode (only for -s)
	-M	disable use of raw-embedded color data
	+M	force use of raw-embedded color data
	-L filename	read input files list from filename
	-o filename	output to filename

--
Iliah Borg