Bug 30989

Summary: PKG_CHECK_MODULES not defined when building LO on Windows 7 64-bit, rather than message about needing to add pkg-config
Product: LibreOffice Reporter: Martin Gallwey <martin>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: caolanm
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed fix
Better patch

Description Martin Gallwey 2010-10-19 12:55:54 UTC
The message received is this:

[20:09] Behemoth:tty0:~/libreoffice> ./autogen.sh --with-git --with-num-cpus=4
configure.in:9: installing `./install-sh'
configure.in:9: installing `./missing'
Makefile.am: installing `./INSTALL'
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for perl... /bin/perl
./configure: line 3598: syntax error near unexpected token `MINIMUM_REQS,'
./configure: line 3598: `PKG_CHECK_MODULES( MINIMUM_REQS,'

I'm not sure if the problem is that I haven't installed libxml2, but couldn't find an instruction to do so anywhere. I've commented out that check in the hope that it is not essential. 

Any assistance would be great :)
Comment 1 Martin Gallwey 2010-10-19 14:42:17 UTC
Sorry, running autogen.sh again with pkg-config installed did fix my problem, but ideally autogen.sh would show an error message complaining about pkg-config not being installed rather than the current somewhat arcane problem.
Comment 2 Caolán McNamara 2010-10-20 01:15:34 UTC
Hmm...

checking whether to enable maintainer-specific portions of Makefiles... yes
checking for perl... /usr/bin/perl
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MINIMUM_REQS... yes

and my configure.in has...

PKG_PROG_PKG_CONFIG()

if test ! -x "$PKG_CONFIG" -a "z`uname -s`" != "zDarwin"; then
   AC_MSG_ERROR([
*** You need the pkg-config to build LibreOffice.
*** Get the latest version of pkg-config from
*** <http://www.freedesktop.org/software/pkgconfig/>.])
fi

so it should spit that out if pkg-config isn't available since 2010-10-08. Do you have that latest configure.in ?
Comment 3 Martin Gallwey 2010-10-26 03:56:14 UTC
Created attachment 39782 [details] [review]
Proposed fix

Proposed fix attached.
Comment 4 Martin Gallwey 2010-10-26 04:38:25 UTC
Created attachment 39783 [details] [review]
Better patch
Comment 5 Michael Meeks 2010-10-26 07:37:14 UTC
Pushed - thank you :-) I notice the inner configure has a platform conditional for win32 that we might want to duplicate in the outer configure but ... this should be an improvement whatever.

Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.