~ubuntu-branches/ubuntu/wily/gnome-software/wily-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2014-10-18 09:12:33 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20141018091233-4qeq6sg8ywfc5z09
Tags: 3.14.1-1
* New upstream release
  - debian/control.in: Bump gtk+-3.0 build-dependency to 3.14.1
  - debian/rules: Bump plugin API version to 7

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
22
 
 
23
# nls.m4 serial 5 (gettext-0.18)
 
24
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
 
25
dnl Inc.
 
26
dnl This file is free software; the Free Software Foundation
 
27
dnl gives unlimited permission to copy and/or distribute it,
 
28
dnl with or without modifications, as long as this notice is preserved.
 
29
dnl
 
30
dnl This file can can be used in projects which are not available under
 
31
dnl the GNU General Public License or the GNU Library General Public
 
32
dnl License but which still want to provide support for the GNU gettext
 
33
dnl functionality.
 
34
dnl Please note that the actual code of the GNU gettext library is covered
 
35
dnl by the GNU Library General Public License, and the rest of the GNU
 
36
dnl gettext package package is covered by the GNU General Public License.
 
37
dnl They are *not* in the public domain.
 
38
 
 
39
dnl Authors:
 
40
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
41
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
42
 
 
43
AC_PREREQ([2.50])
 
44
 
 
45
AC_DEFUN([AM_NLS],
 
46
[
 
47
  AC_MSG_CHECKING([whether NLS is requested])
 
48
  dnl Default is enabled NLS
 
49
  AC_ARG_ENABLE([nls],
 
50
    [  --disable-nls           do not use Native Language Support],
 
51
    USE_NLS=$enableval, USE_NLS=yes)
 
52
  AC_MSG_RESULT([$USE_NLS])
 
53
  AC_SUBST([USE_NLS])
 
54
])
 
55
 
 
56
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
57
# serial 1 (pkg-config-0.24)
 
58
 
59
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
60
#
 
61
# This program is free software; you can redistribute it and/or modify
 
62
# it under the terms of the GNU General Public License as published by
 
63
# the Free Software Foundation; either version 2 of the License, or
 
64
# (at your option) any later version.
 
65
#
 
66
# This program is distributed in the hope that it will be useful, but
 
67
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
68
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
69
# General Public License for more details.
 
70
#
 
71
# You should have received a copy of the GNU General Public License
 
72
# along with this program; if not, write to the Free Software
 
73
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
74
#
 
75
# As a special exception to the GNU General Public License, if you
 
76
# distribute this file as part of a program that contains a
 
77
# configuration script generated by Autoconf, you may include it under
 
78
# the same distribution terms that you use for the rest of that program.
 
79
 
 
80
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
81
# ----------------------------------
 
82
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
83
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
84
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
85
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
86
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
87
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
88
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
89
 
 
90
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
91
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
92
fi
 
93
if test -n "$PKG_CONFIG"; then
 
94
        _pkg_min_version=m4_default([$1], [0.9.0])
 
95
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
96
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
97
                AC_MSG_RESULT([yes])
 
98
        else
 
99
                AC_MSG_RESULT([no])
 
100
                PKG_CONFIG=""
 
101
        fi
 
102
fi[]dnl
 
103
])# PKG_PROG_PKG_CONFIG
 
104
 
 
105
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
106
#
 
107
# Check to see whether a particular set of modules exists.  Similar
 
108
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
109
#
 
110
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
111
# only at the first occurence in configure.ac, so if the first place
 
112
# it's called might be skipped (such as if it is within an "if", you
 
113
# have to call PKG_CHECK_EXISTS manually
 
114
# --------------------------------------------------------------
 
115
AC_DEFUN([PKG_CHECK_EXISTS],
 
116
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
117
if test -n "$PKG_CONFIG" && \
 
118
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
119
  m4_default([$2], [:])
 
120
m4_ifvaln([$3], [else
 
121
  $3])dnl
 
122
fi])
 
123
 
 
124
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
125
# ---------------------------------------------
 
126
m4_define([_PKG_CONFIG],
 
127
[if test -n "$$1"; then
 
128
    pkg_cv_[]$1="$$1"
 
129
 elif test -n "$PKG_CONFIG"; then
 
130
    PKG_CHECK_EXISTS([$3],
 
131
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
132
                      test "x$?" != "x0" && pkg_failed=yes ],
 
133
                     [pkg_failed=yes])
 
134
 else
 
135
    pkg_failed=untried
 
136
fi[]dnl
 
137
])# _PKG_CONFIG
 
138
 
 
139
# _PKG_SHORT_ERRORS_SUPPORTED
 
140
# -----------------------------
 
141
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
142
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
143
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
144
        _pkg_short_errors_supported=yes
 
145
else
 
146
        _pkg_short_errors_supported=no
 
147
fi[]dnl
 
148
])# _PKG_SHORT_ERRORS_SUPPORTED
 
149
 
 
150
 
 
151
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
152
# [ACTION-IF-NOT-FOUND])
 
153
#
 
154
#
 
155
# Note that if there is a possibility the first call to
 
156
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
157
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
158
#
 
159
#
 
160
# --------------------------------------------------------------
 
161
AC_DEFUN([PKG_CHECK_MODULES],
 
162
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
163
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
164
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
165
 
 
166
pkg_failed=no
 
167
AC_MSG_CHECKING([for $1])
 
168
 
 
169
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
170
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
171
 
 
172
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
173
and $1[]_LIBS to avoid the need to call pkg-config.
 
174
See the pkg-config man page for more details.])
 
175
 
 
176
if test $pkg_failed = yes; then
 
177
        AC_MSG_RESULT([no])
 
178
        _PKG_SHORT_ERRORS_SUPPORTED
 
179
        if test $_pkg_short_errors_supported = yes; then
 
180
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
181
        else 
 
182
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
183
        fi
 
184
        # Put the nasty error message in config.log where it belongs
 
185
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
186
 
 
187
        m4_default([$4], [AC_MSG_ERROR(
 
188
[Package requirements ($2) were not met:
 
189
 
 
190
$$1_PKG_ERRORS
 
191
 
 
192
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
193
installed software in a non-standard prefix.
 
194
 
 
195
_PKG_TEXT])[]dnl
 
196
        ])
 
197
elif test $pkg_failed = untried; then
 
198
        AC_MSG_RESULT([no])
 
199
        m4_default([$4], [AC_MSG_FAILURE(
 
200
[The pkg-config script could not be found or is too old.  Make sure it
 
201
is in your PATH or set the PKG_CONFIG environment variable to the full
 
202
path to pkg-config.
 
203
 
 
204
_PKG_TEXT
 
205
 
 
206
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
207
        ])
 
208
else
 
209
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
210
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
211
        AC_MSG_RESULT([yes])
 
212
        $3
 
213
fi[]dnl
 
214
])# PKG_CHECK_MODULES
 
215
 
 
216
 
 
217
# PKG_INSTALLDIR(DIRECTORY)
 
218
# -------------------------
 
219
# Substitutes the variable pkgconfigdir as the location where a module
 
220
# should install pkg-config .pc files. By default the directory is
 
221
# $libdir/pkgconfig, but the default can be changed by passing
 
222
# DIRECTORY. The user can override through the --with-pkgconfigdir
 
223
# parameter.
 
224
AC_DEFUN([PKG_INSTALLDIR],
 
225
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 
226
m4_pushdef([pkg_description],
 
227
    [pkg-config installation directory @<:@]pkg_default[@:>@])
 
228
AC_ARG_WITH([pkgconfigdir],
 
229
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
 
230
    [with_pkgconfigdir=]pkg_default)
 
231
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 
232
m4_popdef([pkg_default])
 
233
m4_popdef([pkg_description])
 
234
]) dnl PKG_INSTALLDIR
 
235
 
 
236
 
 
237
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
 
238
# -------------------------
 
239
# Substitutes the variable noarch_pkgconfigdir as the location where a
 
240
# module should install arch-independent pkg-config .pc files. By
 
241
# default the directory is $datadir/pkgconfig, but the default can be
 
242
# changed by passing DIRECTORY. The user can override through the
 
243
# --with-noarch-pkgconfigdir parameter.
 
244
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 
245
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 
246
m4_pushdef([pkg_description],
 
247
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
 
248
AC_ARG_WITH([noarch-pkgconfigdir],
 
249
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
 
250
    [with_noarch_pkgconfigdir=]pkg_default)
 
251
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 
252
m4_popdef([pkg_default])
 
253
m4_popdef([pkg_description])
 
254
]) dnl PKG_NOARCH_INSTALLDIR
 
255
 
 
256
 
 
257
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
 
258
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
259
# -------------------------------------------
 
260
# Retrieves the value of the pkg-config variable for the given module.
 
261
AC_DEFUN([PKG_CHECK_VAR],
 
262
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
263
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
 
264
 
 
265
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
 
266
AS_VAR_COPY([$1], [pkg_cv_][$1])
 
267
 
 
268
AS_VAR_IF([$1], [""], [$5], [$4])dnl
 
269
])# PKG_CHECK_VAR
 
270
 
23
271
# Configure paths for GLIB
24
272
# Owen Taylor     1997-2001
25
273
 
930
1178
]
931
1179
)
932
1180
 
933
 
# nls.m4 serial 5 (gettext-0.18)
934
 
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
935
 
dnl Inc.
936
 
dnl This file is free software; the Free Software Foundation
937
 
dnl gives unlimited permission to copy and/or distribute it,
938
 
dnl with or without modifications, as long as this notice is preserved.
939
 
dnl
940
 
dnl This file can can be used in projects which are not available under
941
 
dnl the GNU General Public License or the GNU Library General Public
942
 
dnl License but which still want to provide support for the GNU gettext
943
 
dnl functionality.
944
 
dnl Please note that the actual code of the GNU gettext library is covered
945
 
dnl by the GNU Library General Public License, and the rest of the GNU
946
 
dnl gettext package package is covered by the GNU General Public License.
947
 
dnl They are *not* in the public domain.
948
 
 
949
 
dnl Authors:
950
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
951
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
952
 
 
953
 
AC_PREREQ([2.50])
954
 
 
955
 
AC_DEFUN([AM_NLS],
956
 
[
957
 
  AC_MSG_CHECKING([whether NLS is requested])
958
 
  dnl Default is enabled NLS
959
 
  AC_ARG_ENABLE([nls],
960
 
    [  --disable-nls           do not use Native Language Support],
961
 
    USE_NLS=$enableval, USE_NLS=yes)
962
 
  AC_MSG_RESULT([$USE_NLS])
963
 
  AC_SUBST([USE_NLS])
964
 
])
965
 
 
966
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
967
 
# serial 1 (pkg-config-0.24)
968
 
969
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
970
 
#
971
 
# This program is free software; you can redistribute it and/or modify
972
 
# it under the terms of the GNU General Public License as published by
973
 
# the Free Software Foundation; either version 2 of the License, or
974
 
# (at your option) any later version.
975
 
#
976
 
# This program is distributed in the hope that it will be useful, but
977
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
978
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
979
 
# General Public License for more details.
980
 
#
981
 
# You should have received a copy of the GNU General Public License
982
 
# along with this program; if not, write to the Free Software
983
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
984
 
#
985
 
# As a special exception to the GNU General Public License, if you
986
 
# distribute this file as part of a program that contains a
987
 
# configuration script generated by Autoconf, you may include it under
988
 
# the same distribution terms that you use for the rest of that program.
989
 
 
990
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
991
 
# ----------------------------------
992
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
993
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
994
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
995
 
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
996
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
997
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
998
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
999
 
 
1000
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1001
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1002
 
fi
1003
 
if test -n "$PKG_CONFIG"; then
1004
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1005
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1006
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1007
 
                AC_MSG_RESULT([yes])
1008
 
        else
1009
 
                AC_MSG_RESULT([no])
1010
 
                PKG_CONFIG=""
1011
 
        fi
1012
 
fi[]dnl
1013
 
])# PKG_PROG_PKG_CONFIG
1014
 
 
1015
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1016
 
#
1017
 
# Check to see whether a particular set of modules exists.  Similar
1018
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1019
 
#
1020
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1021
 
# only at the first occurence in configure.ac, so if the first place
1022
 
# it's called might be skipped (such as if it is within an "if", you
1023
 
# have to call PKG_CHECK_EXISTS manually
1024
 
# --------------------------------------------------------------
1025
 
AC_DEFUN([PKG_CHECK_EXISTS],
1026
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1027
 
if test -n "$PKG_CONFIG" && \
1028
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1029
 
  m4_default([$2], [:])
1030
 
m4_ifvaln([$3], [else
1031
 
  $3])dnl
1032
 
fi])
1033
 
 
1034
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1035
 
# ---------------------------------------------
1036
 
m4_define([_PKG_CONFIG],
1037
 
[if test -n "$$1"; then
1038
 
    pkg_cv_[]$1="$$1"
1039
 
 elif test -n "$PKG_CONFIG"; then
1040
 
    PKG_CHECK_EXISTS([$3],
1041
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1042
 
                      test "x$?" != "x0" && pkg_failed=yes ],
1043
 
                     [pkg_failed=yes])
1044
 
 else
1045
 
    pkg_failed=untried
1046
 
fi[]dnl
1047
 
])# _PKG_CONFIG
1048
 
 
1049
 
# _PKG_SHORT_ERRORS_SUPPORTED
1050
 
# -----------------------------
1051
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1052
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1053
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1054
 
        _pkg_short_errors_supported=yes
1055
 
else
1056
 
        _pkg_short_errors_supported=no
1057
 
fi[]dnl
1058
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1059
 
 
1060
 
 
1061
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1062
 
# [ACTION-IF-NOT-FOUND])
1063
 
#
1064
 
#
1065
 
# Note that if there is a possibility the first call to
1066
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1067
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1068
 
#
1069
 
#
1070
 
# --------------------------------------------------------------
1071
 
AC_DEFUN([PKG_CHECK_MODULES],
1072
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1073
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1074
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1075
 
 
1076
 
pkg_failed=no
1077
 
AC_MSG_CHECKING([for $1])
1078
 
 
1079
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1080
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1081
 
 
1082
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1083
 
and $1[]_LIBS to avoid the need to call pkg-config.
1084
 
See the pkg-config man page for more details.])
1085
 
 
1086
 
if test $pkg_failed = yes; then
1087
 
        AC_MSG_RESULT([no])
1088
 
        _PKG_SHORT_ERRORS_SUPPORTED
1089
 
        if test $_pkg_short_errors_supported = yes; then
1090
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1091
 
        else 
1092
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1093
 
        fi
1094
 
        # Put the nasty error message in config.log where it belongs
1095
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1096
 
 
1097
 
        m4_default([$4], [AC_MSG_ERROR(
1098
 
[Package requirements ($2) were not met:
1099
 
 
1100
 
$$1_PKG_ERRORS
1101
 
 
1102
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1103
 
installed software in a non-standard prefix.
1104
 
 
1105
 
_PKG_TEXT])[]dnl
1106
 
        ])
1107
 
elif test $pkg_failed = untried; then
1108
 
        AC_MSG_RESULT([no])
1109
 
        m4_default([$4], [AC_MSG_FAILURE(
1110
 
[The pkg-config script could not be found or is too old.  Make sure it
1111
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1112
 
path to pkg-config.
1113
 
 
1114
 
_PKG_TEXT
1115
 
 
1116
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1117
 
        ])
1118
 
else
1119
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1120
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1121
 
        AC_MSG_RESULT([yes])
1122
 
        $3
1123
 
fi[]dnl
1124
 
])# PKG_CHECK_MODULES
1125
 
 
1126
 
 
1127
 
# PKG_INSTALLDIR(DIRECTORY)
1128
 
# -------------------------
1129
 
# Substitutes the variable pkgconfigdir as the location where a module
1130
 
# should install pkg-config .pc files. By default the directory is
1131
 
# $libdir/pkgconfig, but the default can be changed by passing
1132
 
# DIRECTORY. The user can override through the --with-pkgconfigdir
1133
 
# parameter.
1134
 
AC_DEFUN([PKG_INSTALLDIR],
1135
 
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1136
 
m4_pushdef([pkg_description],
1137
 
    [pkg-config installation directory @<:@]pkg_default[@:>@])
1138
 
AC_ARG_WITH([pkgconfigdir],
1139
 
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1140
 
    [with_pkgconfigdir=]pkg_default)
1141
 
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1142
 
m4_popdef([pkg_default])
1143
 
m4_popdef([pkg_description])
1144
 
]) dnl PKG_INSTALLDIR
1145
 
 
1146
 
 
1147
 
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1148
 
# -------------------------
1149
 
# Substitutes the variable noarch_pkgconfigdir as the location where a
1150
 
# module should install arch-independent pkg-config .pc files. By
1151
 
# default the directory is $datadir/pkgconfig, but the default can be
1152
 
# changed by passing DIRECTORY. The user can override through the
1153
 
# --with-noarch-pkgconfigdir parameter.
1154
 
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1155
 
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1156
 
m4_pushdef([pkg_description],
1157
 
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1158
 
AC_ARG_WITH([noarch-pkgconfigdir],
1159
 
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1160
 
    [with_noarch_pkgconfigdir=]pkg_default)
1161
 
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1162
 
m4_popdef([pkg_default])
1163
 
m4_popdef([pkg_description])
1164
 
]) dnl PKG_NOARCH_INSTALLDIR
1165
 
 
1166
 
 
1167
 
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1168
 
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1169
 
# -------------------------------------------
1170
 
# Retrieves the value of the pkg-config variable for the given module.
1171
 
AC_DEFUN([PKG_CHECK_VAR],
1172
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1173
 
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1174
 
 
1175
 
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1176
 
AS_VAR_COPY([$1], [pkg_cv_][$1])
1177
 
 
1178
 
AS_VAR_IF([$1], [""], [$5], [$4])dnl
1179
 
])# PKG_CHECK_VAR
1180
 
 
1181
1181
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
1182
1182
#
1183
1183
# This file is free software; the Free Software Foundation