Bugfix: pkg-config fails if using glib2

View: New views
7 Messages — Rating Filter:   Alert me  

Bugfix: pkg-config fails if using glib2

by Daniel Macks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

PKG_CHECK_MODULES needs to know the path to the 'pkg-config' program.
The first time the PKG_CHECK_MODULES macro is encountered, this path
is determined. All later times, that initially-deteremined path is
reused. The bug in gdome2-0.8.1 (at least when configure is
regenerated using recent versions of autoconf and other tools) is that
the first P_C_M is used is within a conditional. If --enable-glib-1 is
not passed, that conditional is false, so the code from that P_C_M is
not executed: we then wind up with P_C_M in the glib2 without a valid
path to pkg-config. Solution: pre-determine that path before going
into the glib1/glib2 conditionals:

diff -Nurd -x'*~' gdome2-0.8.1.orig/configure.in gdome2-0.8.1/configure.in
--- gdome2-0.8.1.orig/configure.in 2003-10-05 10:39:27.000000000 -0400
+++ gdome2-0.8.1/configure.in 2006-03-03 18:04:11.000000000 -0500
@@ -62,6 +62,7 @@
         [  --enable-glib-1=[no]            Specify if you want to use glib 1],
  GLIB_1=yes
 )
+PKG_PROG_PKG_CONFIG
 
 if test "x$GLIB_1" = "xyes"
 then


dan

--
Daniel Macks
dmacks@...
http://www.netspace.org/~dmacks

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Luca Padovani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 08/mar/06, at 18:05, Daniel Macks wrote:
> +PKG_PROG_PKG_CONFIG

I'm using fink and it appears like this macro is not supported, I have

        automake (GNU automake) 1.7.6
        autoconf (GNU Autoconf) 2.59

Any clues?

--luca

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Daniel Macks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Mar 16, 2006 at 04:42:38PM +0100, Luca Padovani wrote:
>
> On 08/mar/06, at 18:05, Daniel Macks wrote:
> >+PKG_PROG_PKG_CONFIG
>
> I'm using fink

Are youusing fink's packaging of gdome ("libgdome0") or are you
manually building libgdome but using fink to supply libraries and
other dependencies?

> and it appears like this macro is not supported, I have
>
> automake (GNU automake) 1.7.6
> autoconf (GNU Autoconf) 2.59
>
> Any clues?

That macro is defined in pkg.m4, which is part of pkg-config. I assume
you have pkg-config installed--without it, you won't get far in
building gdome. What version?

dan

--
Daniel Macks
dmacks@...
http://www.netspace.org/~dmacks

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Luca Padovani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 08/mar/06, at 18:05, Daniel Macks wrote:
> +PKG_PROG_PKG_CONFIG

with

        PKG_PROG_PKG_CONFIG()

it works. If it does on your machine as well I can commit this  
patched patch.

Cheers,
--luca
_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Daniel Macks :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Mar 17, 2006 at 01:55:16PM +0100, Luca Padovani wrote:

>
> On 08/mar/06, at 18:05, Daniel Macks wrote:
> >+PKG_PROG_PKG_CONFIG
>
> with
>
> PKG_PROG_PKG_CONFIG()
>
> it works. If it does on your machine as well I can commit this  
> patched patch.

That way works for me.

dan

--
Daniel Macks
dmacks@...
http://www.netspace.org/~dmacks

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Luca Padovani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 17/mar/06, at 16:20, Daniel Macks wrote:
>> PKG_PROG_PKG_CONFIG()
>>
>> it works. If it does on your machine as well I can commit this
>> patched patch.
>
> That way works for me.

Applied.

--luca

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome

Re: Bugfix: pkg-config fails if using glib2

by Luca Padovani-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

On 17/mar/06, at 16:20, Daniel Macks wrote:
>> PKG_PROG_PKG_CONFIG()

I don't know exactly why, but this suddenly stopped working.

I have rearranged the checks for GLIB so that PKG_CHECK_MODULE is  
called exactly once and outside the conditional. I'd be grateful if  
it still works on your machine and whether you notice any unpleasant  
side-effect (new configure.in committed)

Thanks,
--luca

_______________________________________________
gdome mailing list
gdome@...
http://mail.gnome.org/mailman/listinfo/gdome