Quantcast

Configure breaks by build

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

Configure breaks by build

Sascha Manns
Hello list,

i'm preparing some autotools files for my new project.

I have in my configure.ac:

GDK30_MINIMUM_VERSION=2.99.0
GTK30_MINIMUM_VERSION=2.99.0
ATK_MINIMUM_VERSION=2.99.0

PKG_CHECK_MODULES(gdk-3.0 >= $GDK30_MINIMUM_VERSION
                  gtk+-3.0 >= $GTK30_MINIMUM_VERSION
                  atk >= $ATK_MINIMUM_VERSION)

After running the autogen.sh i'm getting:

configure.ac:48: error: AC_SUBST: `gdk-3.0 >= $GDK30_MINIMUM_VERSION 
                  gtk+-3.0 >= $GTK30_MINIMUM_VERSION
                  atk >= $ATK_MINIMUM_VERSION_CFLAGS' is not a valid
shell variable name

But what to do now?

Greetings
Sascha
_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configure breaks by build

Zack Weinberg-2
On Sun, Feb 19, 2017 at 3:48 PM, Sascha Manns <[hidden email]> wrote:

>
> GDK30_MINIMUM_VERSION=2.99.0
> GTK30_MINIMUM_VERSION=2.99.0
> ATK_MINIMUM_VERSION=2.99.0
>
> PKG_CHECK_MODULES(gdk-3.0 >= $GDK30_MINIMUM_VERSION
>                   gtk+-3.0 >= $GTK30_MINIMUM_VERSION
>                   atk >= $ATK_MINIMUM_VERSION)
>
> After running the autogen.sh i'm getting:
>
> configure.ac:48: error: AC_SUBST: `gdk-3.0 >= $GDK30_MINIMUM_VERSION
>                   gtk+-3.0 >= $GTK30_MINIMUM_VERSION
>                   atk >= $ATK_MINIMUM_VERSION_CFLAGS' is not a valid
> shell variable name

Try instead

m4_define([GDK30_MINIMUM_VERSION], [2.99.0])
m4_define([GTK30_MINIMUM_VERSION], [2.99.0])
m4_define([ATK_MINIMUM_VERSION], [2.99.0])

PKG_CHECK_MODULES([
    gdk-3.0 >= GDK30_MINIMUM_VERSION
    gtk+-3.0 >= GTK30_MINIMUM_VERSION
    atk >= ATK_MINIMUM_VERSION
])

I don't know that this will work, but it looks like PKG_CHECK_MODULES
can't handle shell variables in its argument, so the obvious thing is
to try m4 variables instead.

zw

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configure breaks by build

Eric Blake-3
In reply to this post by Sascha Manns
On 02/19/2017 02:48 PM, Sascha Manns wrote:

> Hello list,
>
> i'm preparing some autotools files for my new project.
>
> I have in my configure.ac:
>
> GDK30_MINIMUM_VERSION=2.99.0
> GTK30_MINIMUM_VERSION=2.99.0
> ATK_MINIMUM_VERSION=2.99.0
>
> PKG_CHECK_MODULES(gdk-3.0 >= $GDK30_MINIMUM_VERSION
>                   gtk+-3.0 >= $GTK30_MINIMUM_VERSION
>                   atk >= $ATK_MINIMUM_VERSION)
The autoconf package does not maintain the PKG_CHECK_MODULES() macro, so
your question is probably better asked on the pkg-config development
list.  However, it appears to me that you are getting an error because
your usage of the macro is incorrect.  Here's an example I picked up
from a package that uses the macro correctly:

          PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0])

which makes it look like you forgot a first argument.

--
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

signature.asc (617 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configure breaks by build

Sascha Manns
In reply to this post by Zack Weinberg-2
Hi Zack,

Am Montag, den 20.02.2017, 10:37 -0500 schrieb Zack Weinberg:

> On Sun, Feb 19, 2017 at 3:48 PM, Sascha Manns <[hidden email]
> rg> wrote:
> > GDK30_MINIMUM_VERSION=2.99.0
> > GTK30_MINIMUM_VERSION=2.99.0
> > ATK_MINIMUM_VERSION=2.99.0
> >
> > PKG_CHECK_MODULES(gdk-3.0 >= $GDK30_MINIMUM_VERSION
> >                   gtk+-3.0 >= $GTK30_MINIMUM_VERSION
> >                   atk >= $ATK_MINIMUM_VERSION)
> >
> > After running the autogen.sh i'm getting:
> >
> > configure.ac:48: error: AC_SUBST: `gdk-3.0 >=
> > $GDK30_MINIMUM_VERSION
> >                   gtk+-3.0 >= $GTK30_MINIMUM_VERSION
> >                   atk >= $ATK_MINIMUM_VERSION_CFLAGS' is not a
> > valid
> > shell variable name
>
> Try instead
>
> m4_define([GDK30_MINIMUM_VERSION], [2.99.0])
> m4_define([GTK30_MINIMUM_VERSION], [2.99.0])
> m4_define([ATK_MINIMUM_VERSION], [2.99.0])
>
> PKG_CHECK_MODULES([
>     gdk-3.0 >= GDK30_MINIMUM_VERSION
>     gtk+-3.0 >= GTK30_MINIMUM_VERSION
>     atk >= ATK_MINIMUM_VERSION
> ])
>
> I don't know that this will work, but it looks like PKG_CHECK_MODULES
> can't handle shell variables in its argument, so the obvious thing is
> to try m4 variables instead.
That one works. Thank you very much.

Greetings
Sascha
_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

signature.asc (817 bytes) Download Attachment
Loading...