GTKDOC_DEPS in recent gtk-doc.m4

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GTKDOC_DEPS in recent gtk-doc.m4

Simon Josefsson-2
Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
to the latest gtk-doc.m4 from your git repo, which contains this new
piece of code:

    dnl don't check for glib if we build glib
    if test "x$PACKAGE_NAME" != "xglib"; then
      dnl don't fail if someone does not have glib
      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
    fi

This causes ./configure failures for me, see output below.  I don't
understand the intention of the code above.  For what does gtk-doc need
glib-2.0 and gobject-2.0?  GTK-DOC has worked fine for me and produced
good output even without those dependencies.

If possible, I don't want GNU Libtasn1 users to have to install glib and
gobject to be able to build documentation.

/Simon

checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gtkdoc-check... /usr/bin/gtkdoc-check
checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
checking for GTKDOC_DEPS... configure: error: Package requirements (glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0) were not met:

No package 'glib-2.0' found
No package 'gobject-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS
and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Nicola Fontana-3
On Sun, 20 Nov 2011 22:13:34 +0100
Simon Josefsson <[hidden email]> wrote:

> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
> to the latest gtk-doc.m4 from your git repo, which contains this new
> piece of code:
>
>     dnl don't check for glib if we build glib
>     if test "x$PACKAGE_NAME" != "xglib"; then
>       dnl don't fail if someone does not have glib
>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>     fi

It should be:
       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])

glib is needed to get additional information if your library is based on
GObject, such as type inheritance.

Ciao.
--
Nicola
_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Simon Josefsson-2
Nicola Fontana <[hidden email]> writes:

> On Sun, 20 Nov 2011 22:13:34 +0100
> Simon Josefsson <[hidden email]> wrote:
>
>> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
>> to the latest gtk-doc.m4 from your git repo, which contains this new
>> piece of code:
>>
>>     dnl don't check for glib if we build glib
>>     if test "x$PACKAGE_NAME" != "xglib"; then
>>       dnl don't fail if someone does not have glib
>>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>>     fi
>
> It should be:
>        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0
>>= 2.10.0,,[:])
>
> glib is needed to get additional information if your library is based on
> GObject, such as type inheritance.

Thank you, I can confirm that this works for Libtasn1 and that the
GTK-DOC output looks fine.  During ./configure it now prints

checking for GTKDOC_DEPS... no

but instead of failing with the error message I quoted earlier, it will
now proceed.

Could the fix be pushed?  If a git-format-patch makes anything easier,
it is included below.

/Simon

From 469308546237e3b592e7d53943824482ef862252 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <[hidden email]>
Date: Thu, 1 Dec 2011 20:51:26 +0100
Subject: [PATCH] gtk-doc.m4: Don't fail if glib is not available.

---
 gtk-doc.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gtk-doc.m4 b/gtk-doc.m4
index 0ada151..a2d5932 100644
--- a/gtk-doc.m4
+++ b/gtk-doc.m4
@@ -37,7 +37,7 @@ AC_DEFUN([GTK_DOC_CHECK],
     dnl don't check for glib if we build glib
     if test "x$PACKAGE_NAME" != "xglib"; then
       dnl don't fail if someone does not have glib
-      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
+      PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
     fi
   fi
 
--
1.7.2.5

_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Stefan Sauer-4
In reply to this post by Nicola Fontana-3
On 12/01/2011 08:30 PM, Nicola Fontana wrote:

> On Sun, 20 Nov 2011 22:13:34 +0100
> Simon Josefsson <[hidden email]> wrote:
>
>> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
>> to the latest gtk-doc.m4 from your git repo, which contains this new
>> piece of code:
>>
>>     dnl don't check for glib if we build glib
>>     if test "x$PACKAGE_NAME" != "xglib"; then
>>       dnl don't fail if someone does not have glib
>>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>>     fi
> It should be:
>        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
what is the semantics for [:] ? It works for me and the point of this
check is that we only check for glib if we don't build glib.

Stefan
> glib is needed to get additional information if your library is based on
> GObject, such as type inheritance.
>
> Ciao.

_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

David Nečas (Yeti)-2
On Sat, Dec 03, 2011 at 07:25:33PM +0100, Stefan Sauer wrote:
> > It should be:
> >        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
> what is the semantics for [:] ? It works for me and the point of this
> check is that we only check for glib if we don't build glib.

: is the null command in shell
[] is quoting in m4

It is passed as the fourth argument of PKG_CHECK_MODULES(), i.e. it
overrides the action-if-not-found (which is normally an error) to
no-op.

If that's what you asked.

Yeti

_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Simon Josefsson-2
In reply to this post by Stefan Sauer-4
Stefan Sauer <[hidden email]> writes:

> On 12/01/2011 08:30 PM, Nicola Fontana wrote:
>> On Sun, 20 Nov 2011 22:13:34 +0100
>> Simon Josefsson <[hidden email]> wrote:
>>
>>> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
>>> to the latest gtk-doc.m4 from your git repo, which contains this new
>>> piece of code:
>>>
>>>     dnl don't check for glib if we build glib
>>>     if test "x$PACKAGE_NAME" != "xglib"; then
>>>       dnl don't fail if someone does not have glib
>>>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>>>     fi
>> It should be:
>>        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0
>> >= 2.10.0,,[:])
> what is the semantics for [:] ?

David already answered that.

> It works for me and the point of this check is that we only check for
> glib if we don't build glib.

Why is a developer environment for glib required when building
documentation?

I'm assuming it works for you because you have glib header files etc
installed, but that is not always the case.

I'm using gtk-doc in several projects (GNU Libtasn1, GnuTLS, Shishi,
GSS, GNU SASL, GNU Libidn, Libidn2, and maybe others) which do not have
any dependency on glib otherwise, and it has worked fine so far before
this change was introduced in gtk-doc.m4 recently.

The generated documentation looks fine if I apply the patch here to let
building proceed even when glib is unavailable.

I'm sure gtk-doc-tools are used in many other projects that doesn't
require glib as well, so I believe it would be quite unfortunate for
gtk-doc to require a glib development environment.

/Simon
_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Stefan Sauer-4
On 12/04/2011 12:49 PM, Simon Josefsson wrote:

> Stefan Sauer <[hidden email]> writes:
>
>> On 12/01/2011 08:30 PM, Nicola Fontana wrote:
>>> On Sun, 20 Nov 2011 22:13:34 +0100
>>> Simon Josefsson <[hidden email]> wrote:
>>>
>>>> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
>>>> to the latest gtk-doc.m4 from your git repo, which contains this new
>>>> piece of code:
>>>>
>>>>     dnl don't check for glib if we build glib
>>>>     if test "x$PACKAGE_NAME" != "xglib"; then
>>>>       dnl don't fail if someone does not have glib
>>>>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>>>>     fi
>>> It should be:
>>>        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0
>>>> = 2.10.0,,[:])
>> what is the semantics for [:] ?
> David already answered that.
>
>> It works for me and the point of this check is that we only check for
>> glib if we don't build glib.
> Why is a developer environment for glib required when building
> documentation?
>
> I'm assuming it works for you because you have glib header files etc
> installed, but that is not always the case.
It is only used in the introspection scanner. If your library is not
gobject based, you will have an empty .types file and not running
gtkdoc-scangobj. This is just to get the required CFLAGS, LDFLAGS to
build the scanner.

Stefan

> I'm using gtk-doc in several projects (GNU Libtasn1, GnuTLS, Shishi,
> GSS, GNU SASL, GNU Libidn, Libidn2, and maybe others) which do not have
> any dependency on glib otherwise, and it has worked fine so far before
> this change was introduced in gtk-doc.m4 recently.
>
> The generated documentation looks fine if I apply the patch here to let
> building proceed even when glib is unavailable.
>
> I'm sure gtk-doc-tools are used in many other projects that doesn't
> require glib as well, so I believe it would be quite unfortunate for
> gtk-doc to require a glib development environment.
>
> /Simon

_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTKDOC_DEPS in recent gtk-doc.m4

Simon Josefsson-2
Stefan Sauer <[hidden email]> writes:

> On 12/04/2011 12:49 PM, Simon Josefsson wrote:
>> Stefan Sauer <[hidden email]> writes:
>>
>>> On 12/01/2011 08:30 PM, Nicola Fontana wrote:
>>>> On Sun, 20 Nov 2011 22:13:34 +0100
>>>> Simon Josefsson <[hidden email]> wrote:
>>>>
>>>>> Hi!  I'm using gtk-doc in for example GNU Libtasn1 and recently upgraded
>>>>> to the latest gtk-doc.m4 from your git repo, which contains this new
>>>>> piece of code:
>>>>>
>>>>>     dnl don't check for glib if we build glib
>>>>>     if test "x$PACKAGE_NAME" != "xglib"; then
>>>>>       dnl don't fail if someone does not have glib
>>>>>       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
>>>>>     fi
>>>> It should be:
>>>>        PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0
>>>>> = 2.10.0,,[:])
>>> what is the semantics for [:] ?
>> David already answered that.
>>
>>> It works for me and the point of this check is that we only check for
>>> glib if we don't build glib.
>> Why is a developer environment for glib required when building
>> documentation?
>>
>> I'm assuming it works for you because you have glib header files etc
>> installed, but that is not always the case.
> It is only used in the introspection scanner. If your library is not
> gobject based, you will have an empty .types file and not running
> gtkdoc-scangobj. This is just to get the required CFLAGS, LDFLAGS to
> build the scanner.

It never gets that far -- with the current gtk-doc.m4, all of my
projects halts during ./configure.  With the patch proposed earlier in
this thread, it would work as you describe.

/Simon
_______________________________________________
gtk-doc-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-doc-list
Loading...