~binli/ubuntu/vivid/modemmanager/lp1441095

« back to all changes in this revision

Viewing changes to m4/introspection.m4

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Guido Günther, Michael Biebl
  • Date: 2014-06-25 02:23:09 UTC
  • mfrom: (20.2.2 sid)
  • Revision ID: package-import@ubuntu.com-20140625022309-43papaenj5ikbx3y
Tags: 1.2.0-1
[ Guido Günther ]
* New upstream version 1.2.0 (Closes: #731851)
* Update patches
* Install locale files
* Require newer libqmi
* Update symbols file
* Ship gobject introspection data
* Ship vala bindings

[ Michael Biebl ]
* Use canonical URI for Vcs-Git
* Use gir dh addon
* Update extendend package description (Closes: #744180)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl -*- mode: autoconf -*-
 
2
dnl Copyright 2009 Johan Dahlin
 
3
dnl
 
4
dnl This file is free software; the author(s) gives unlimited
 
5
dnl permission to copy and/or distribute it, with or without
 
6
dnl modifications, as long as this notice is preserved.
 
7
dnl
 
8
 
 
9
# serial 1
 
10
 
 
11
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
 
12
[
 
13
    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
 
14
    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
15
    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
 
16
 
 
17
    dnl enable/disable introspection
 
18
    m4_if([$2], [require],
 
19
    [dnl
 
20
        enable_introspection=yes
 
21
    ],[dnl
 
22
        AC_ARG_ENABLE(introspection,
 
23
                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
 
24
                                 [Enable introspection for this build]),, 
 
25
                                 [enable_introspection=auto])
 
26
    ])dnl
 
27
 
 
28
    AC_MSG_CHECKING([for gobject-introspection])
 
29
 
 
30
    dnl presence/version checking
 
31
    AS_CASE([$enable_introspection],
 
32
    [no], [dnl
 
33
        found_introspection="no (disabled, use --enable-introspection to enable)"
 
34
    ],dnl
 
35
    [yes],[dnl
 
36
        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
 
37
                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
 
38
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
 
39
                         found_introspection=yes,
 
40
                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
 
41
    ],dnl
 
42
    [auto],[dnl
 
43
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
 
44
        dnl Canonicalize enable_introspection
 
45
        enable_introspection=$found_introspection
 
46
    ],dnl
 
47
    [dnl        
 
48
        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
 
49
    ])dnl
 
50
 
 
51
    AC_MSG_RESULT([$found_introspection])
 
52
 
 
53
    INTROSPECTION_SCANNER=
 
54
    INTROSPECTION_COMPILER=
 
55
    INTROSPECTION_GENERATE=
 
56
    INTROSPECTION_GIRDIR=
 
57
    INTROSPECTION_TYPELIBDIR=
 
58
    if test "x$found_introspection" = "xyes"; then
 
59
       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
 
60
       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
 
61
       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
 
62
       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
 
63
       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
 
64
       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
 
65
       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
 
66
       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
 
67
    fi
 
68
    AC_SUBST(INTROSPECTION_SCANNER)
 
69
    AC_SUBST(INTROSPECTION_COMPILER)
 
70
    AC_SUBST(INTROSPECTION_GENERATE)
 
71
    AC_SUBST(INTROSPECTION_GIRDIR)
 
72
    AC_SUBST(INTROSPECTION_TYPELIBDIR)
 
73
    AC_SUBST(INTROSPECTION_CFLAGS)
 
74
    AC_SUBST(INTROSPECTION_LIBS)
 
75
    AC_SUBST(INTROSPECTION_MAKEFILE)
 
76
 
 
77
    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
 
78
])
 
79
 
 
80
 
 
81
dnl Usage:
 
82
dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
 
83
 
 
84
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
 
85
[
 
86
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
 
87
])
 
88
 
 
89
dnl Usage:
 
90
dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
 
91
 
 
92
 
 
93
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
 
94
[
 
95
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
 
96
])