19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
# Configure paths for GLIB
23
# Owen Taylor 1997-2001
25
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
27
dnl gthread, or gio is specified in MODULES, pass to pkg-config
29
AC_DEFUN([AM_PATH_GLIB_2_0],
31
dnl Get the cflags and libraries from pkg-config
33
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
34
, enable_glibtest=yes)
36
pkg_config_args=glib-2.0
41
pkg_config_args="$pkg_config_args gmodule-2.0"
44
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
47
pkg_config_args="$pkg_config_args gobject-2.0"
50
pkg_config_args="$pkg_config_args gthread-2.0"
53
pkg_config_args="$pkg_config_args $module-2.0"
58
PKG_PROG_PKG_CONFIG([0.16])
62
if test "x$PKG_CONFIG" = x ; then
67
min_glib_version=ifelse([$1], ,2.0.0,$1)
68
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
70
if test x$PKG_CONFIG != xno ; then
71
## don't try to run the test against uninstalled libtool libs
72
if $PKG_CONFIG --uninstalled $pkg_config_args; then
73
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
77
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
84
if test x"$no_glib" = x ; then
85
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
86
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
87
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
88
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
90
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
91
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
92
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
93
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
94
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
95
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
96
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
97
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
98
if test "x$enable_glibtest" = "xyes" ; then
99
ac_save_CFLAGS="$CFLAGS"
101
CFLAGS="$CFLAGS $GLIB_CFLAGS"
102
LIBS="$GLIB_LIBS $LIBS"
104
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
105
dnl checks the results of pkg-config to some extent)
116
unsigned int major, minor, micro;
119
fclose (fopen ("conf.glibtest", "w"));
121
/* HP/UX 9 (%@#!) writes to sscanf strings */
122
tmp_version = g_strdup("$min_glib_version");
123
if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
124
printf("%s, bad version string\n", "$min_glib_version");
128
if ((glib_major_version != $glib_config_major_version) ||
129
(glib_minor_version != $glib_config_minor_version) ||
130
(glib_micro_version != $glib_config_micro_version))
132
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
133
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
134
glib_major_version, glib_minor_version, glib_micro_version);
135
printf ("*** was found! If pkg-config was correct, then it is best\n");
136
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
137
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
138
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
139
printf("*** required on your system.\n");
140
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
141
printf("*** to point to the correct configuration files\n");
143
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
144
(glib_minor_version != GLIB_MINOR_VERSION) ||
145
(glib_micro_version != GLIB_MICRO_VERSION))
147
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
148
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
149
printf("*** library (version %d.%d.%d)\n",
150
glib_major_version, glib_minor_version, glib_micro_version);
154
if ((glib_major_version > major) ||
155
((glib_major_version == major) && (glib_minor_version > minor)) ||
156
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
162
printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
163
glib_major_version, glib_minor_version, glib_micro_version);
164
printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
165
major, minor, micro);
166
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
168
printf("*** If you have already installed a sufficiently new version, this error\n");
169
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
170
printf("*** being found. The easiest way to fix this is to remove the old version\n");
171
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
172
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
173
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
174
printf("*** so that the correct libraries are found at run-time))\n");
179
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
180
CFLAGS="$ac_save_CFLAGS"
184
if test "x$no_glib" = x ; then
185
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
186
ifelse([$2], , :, [$2])
189
if test "$PKG_CONFIG" = "no" ; then
190
echo "*** A new enough version of pkg-config was not found."
191
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
193
if test -f conf.glibtest ; then
196
echo "*** Could not run GLIB test program, checking why..."
197
ac_save_CFLAGS="$CFLAGS"
199
CFLAGS="$CFLAGS $GLIB_CFLAGS"
200
LIBS="$LIBS $GLIB_LIBS"
204
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
205
[ echo "*** The test program compiled, but did not run. This usually means"
206
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
207
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
208
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
209
echo "*** to the installed location Also, make sure you have run ldconfig if that"
210
echo "*** is required on your system"
212
echo "*** If you have an old version installed, it is best to remove it, although"
213
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
214
[ echo "*** The test program failed to compile or link. See the file config.log for the"
215
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
216
CFLAGS="$ac_save_CFLAGS"
225
GLIB_COMPILE_RESOURCES=""
226
ifelse([$3], , :, [$3])
228
AC_SUBST(GLIB_CFLAGS)
230
AC_SUBST(GLIB_GENMARSHAL)
231
AC_SUBST(GOBJECT_QUERY)
232
AC_SUBST(GLIB_MKENUMS)
233
AC_SUBST(GLIB_COMPILE_RESOURCES)
238
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
239
dnl the schema should be compiled
242
AC_DEFUN([GLIB_GSETTINGS],
244
m4_pattern_allow([AM_V_GEN])
245
AC_ARG_ENABLE(schemas-compile,
246
AS_HELP_STRING([--disable-schemas-compile],
247
[Disable regeneration of gschemas.compiled on install]),
248
[case ${enableval} in
249
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
250
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
251
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
253
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
254
PKG_PROG_PKG_CONFIG([0.16])
255
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
256
if test x$cross_compiling != xyes; then
257
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
259
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
261
AC_SUBST(GLIB_COMPILE_SCHEMAS)
262
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
263
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
265
ifelse([$1],,[:],[$1])
269
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
271
mostlyclean-am: clean-gsettings-schemas
273
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
275
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
276
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
278
all-am: $(gsettings_SCHEMAS:.xml=.valid)
279
uninstall-am: uninstall-gsettings-schemas
280
install-data-am: install-gsettings-schemas
282
.SECONDARY: $(gsettings_SCHEMAS)
284
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
286
if test -n "$^"; then \
287
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
288
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
289
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
292
uninstall-gsettings-schemas:
294
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
295
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
296
test -n "$$files" || exit 0; \
297
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
298
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
299
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
301
clean-gsettings-schemas:
302
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
304
ifdef gsettings_ENUM_NAMESPACE
305
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
306
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
309
_GSETTINGS_SUBST(GSETTINGS_RULES)
312
dnl _GSETTINGS_SUBST(VARIABLE)
313
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
314
AC_DEFUN([_GSETTINGS_SUBST],
317
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
321
dnl -*- mode: autoconf -*-
322
dnl Copyright 2009 Johan Dahlin
324
dnl This file is free software; the author(s) gives unlimited
325
dnl permission to copy and/or distribute it, with or without
326
dnl modifications, as long as this notice is preserved.
331
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
333
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
334
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
335
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
337
dnl enable/disable introspection
338
m4_if([$2], [require],
340
enable_introspection=yes
342
AC_ARG_ENABLE(introspection,
343
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
344
[Enable introspection for this build]),,
345
[enable_introspection=auto])
348
AC_MSG_CHECKING([for gobject-introspection])
350
dnl presence/version checking
351
AS_CASE([$enable_introspection],
353
found_introspection="no (disabled, use --enable-introspection to enable)"
356
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
357
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
358
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
359
found_introspection=yes,
360
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
363
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
364
dnl Canonicalize enable_introspection
365
enable_introspection=$found_introspection
368
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
371
AC_MSG_RESULT([$found_introspection])
373
INTROSPECTION_SCANNER=
374
INTROSPECTION_COMPILER=
375
INTROSPECTION_GENERATE=
376
INTROSPECTION_GIRDIR=
377
INTROSPECTION_TYPELIBDIR=
378
if test "x$found_introspection" = "xyes"; then
379
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
380
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
381
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
382
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
383
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
384
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
385
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
386
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
388
AC_SUBST(INTROSPECTION_SCANNER)
389
AC_SUBST(INTROSPECTION_COMPILER)
390
AC_SUBST(INTROSPECTION_GENERATE)
391
AC_SUBST(INTROSPECTION_GIRDIR)
392
AC_SUBST(INTROSPECTION_TYPELIBDIR)
393
AC_SUBST(INTROSPECTION_CFLAGS)
394
AC_SUBST(INTROSPECTION_LIBS)
395
AC_SUBST(INTROSPECTION_MAKEFILE)
397
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
402
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
404
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
406
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
410
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
413
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
415
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
418
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
419
# serial 1 (pkg-config-0.24)
421
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
423
# This program is free software; you can redistribute it and/or modify
424
# it under the terms of the GNU General Public License as published by
425
# the Free Software Foundation; either version 2 of the License, or
426
# (at your option) any later version.
428
# This program is distributed in the hope that it will be useful, but
429
# WITHOUT ANY WARRANTY; without even the implied warranty of
430
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
431
# General Public License for more details.
433
# You should have received a copy of the GNU General Public License
434
# along with this program; if not, write to the Free Software
435
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
437
# As a special exception to the GNU General Public License, if you
438
# distribute this file as part of a program that contains a
439
# configuration script generated by Autoconf, you may include it under
440
# the same distribution terms that you use for the rest of that program.
442
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
443
# ----------------------------------
444
AC_DEFUN([PKG_PROG_PKG_CONFIG],
445
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
446
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
447
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
448
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
449
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
450
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
452
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
453
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
455
if test -n "$PKG_CONFIG"; then
456
_pkg_min_version=m4_default([$1], [0.9.0])
457
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
458
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
465
])# PKG_PROG_PKG_CONFIG
467
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
469
# Check to see whether a particular set of modules exists. Similar
470
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
472
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
473
# only at the first occurence in configure.ac, so if the first place
474
# it's called might be skipped (such as if it is within an "if", you
475
# have to call PKG_CHECK_EXISTS manually
476
# --------------------------------------------------------------
477
AC_DEFUN([PKG_CHECK_EXISTS],
478
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
479
if test -n "$PKG_CONFIG" && \
480
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
481
m4_default([$2], [:])
482
m4_ifvaln([$3], [else
486
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
487
# ---------------------------------------------
488
m4_define([_PKG_CONFIG],
489
[if test -n "$$1"; then
491
elif test -n "$PKG_CONFIG"; then
492
PKG_CHECK_EXISTS([$3],
493
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
494
test "x$?" != "x0" && pkg_failed=yes ],
501
# _PKG_SHORT_ERRORS_SUPPORTED
502
# -----------------------------
503
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
504
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
505
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
506
_pkg_short_errors_supported=yes
508
_pkg_short_errors_supported=no
510
])# _PKG_SHORT_ERRORS_SUPPORTED
513
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
514
# [ACTION-IF-NOT-FOUND])
517
# Note that if there is a possibility the first call to
518
# PKG_CHECK_MODULES might not happen, you should be sure to include an
519
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
522
# --------------------------------------------------------------
523
AC_DEFUN([PKG_CHECK_MODULES],
524
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
525
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
526
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
529
AC_MSG_CHECKING([for $1])
531
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
532
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
534
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
535
and $1[]_LIBS to avoid the need to call pkg-config.
536
See the pkg-config man page for more details.])
538
if test $pkg_failed = yes; then
540
_PKG_SHORT_ERRORS_SUPPORTED
541
if test $_pkg_short_errors_supported = yes; then
542
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
544
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
546
# Put the nasty error message in config.log where it belongs
547
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
549
m4_default([$4], [AC_MSG_ERROR(
550
[Package requirements ($2) were not met:
554
Consider adjusting the PKG_CONFIG_PATH environment variable if you
555
installed software in a non-standard prefix.
559
elif test $pkg_failed = untried; then
561
m4_default([$4], [AC_MSG_FAILURE(
562
[The pkg-config script could not be found or is too old. Make sure it
563
is in your PATH or set the PKG_CONFIG environment variable to the full
568
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
571
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
572
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
576
])# PKG_CHECK_MODULES
579
# PKG_INSTALLDIR(DIRECTORY)
580
# -------------------------
581
# Substitutes the variable pkgconfigdir as the location where a module
582
# should install pkg-config .pc files. By default the directory is
583
# $libdir/pkgconfig, but the default can be changed by passing
584
# DIRECTORY. The user can override through the --with-pkgconfigdir
586
AC_DEFUN([PKG_INSTALLDIR],
587
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
588
m4_pushdef([pkg_description],
589
[pkg-config installation directory @<:@]pkg_default[@:>@])
590
AC_ARG_WITH([pkgconfigdir],
591
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
592
[with_pkgconfigdir=]pkg_default)
593
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
594
m4_popdef([pkg_default])
595
m4_popdef([pkg_description])
596
]) dnl PKG_INSTALLDIR
599
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
600
# -------------------------
601
# Substitutes the variable noarch_pkgconfigdir as the location where a
602
# module should install arch-independent pkg-config .pc files. By
603
# default the directory is $datadir/pkgconfig, but the default can be
604
# changed by passing DIRECTORY. The user can override through the
605
# --with-noarch-pkgconfigdir parameter.
606
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
607
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
608
m4_pushdef([pkg_description],
609
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
610
AC_ARG_WITH([noarch-pkgconfigdir],
611
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
612
[with_noarch_pkgconfigdir=]pkg_default)
613
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
614
m4_popdef([pkg_default])
615
m4_popdef([pkg_description])
616
]) dnl PKG_NOARCH_INSTALLDIR
22
618
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
24
620
# This file is free software; the Free Software Foundation
1362
1958
AC_SUBST([am__untar])
1363
1959
]) # _AM_PROG_TAR
1365
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1366
# serial 1 (pkg-config-0.24)
1368
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1370
# This program is free software; you can redistribute it and/or modify
1371
# it under the terms of the GNU General Public License as published by
1372
# the Free Software Foundation; either version 2 of the License, or
1373
# (at your option) any later version.
1375
# This program is distributed in the hope that it will be useful, but
1376
# WITHOUT ANY WARRANTY; without even the implied warranty of
1377
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1378
# General Public License for more details.
1380
# You should have received a copy of the GNU General Public License
1381
# along with this program; if not, write to the Free Software
1382
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1384
# As a special exception to the GNU General Public License, if you
1385
# distribute this file as part of a program that contains a
1386
# configuration script generated by Autoconf, you may include it under
1387
# the same distribution terms that you use for the rest of that program.
1389
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1390
# ----------------------------------
1391
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1392
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1393
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1394
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1395
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1396
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1397
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1399
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1400
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1402
if test -n "$PKG_CONFIG"; then
1403
_pkg_min_version=m4_default([$1], [0.9.0])
1404
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1405
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1406
AC_MSG_RESULT([yes])
1412
])# PKG_PROG_PKG_CONFIG
1414
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1416
# Check to see whether a particular set of modules exists. Similar
1417
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1419
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1420
# only at the first occurence in configure.ac, so if the first place
1421
# it's called might be skipped (such as if it is within an "if", you
1422
# have to call PKG_CHECK_EXISTS manually
1423
# --------------------------------------------------------------
1424
AC_DEFUN([PKG_CHECK_EXISTS],
1425
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1426
if test -n "$PKG_CONFIG" && \
1427
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1428
m4_default([$2], [:])
1429
m4_ifvaln([$3], [else
1433
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1434
# ---------------------------------------------
1435
m4_define([_PKG_CONFIG],
1436
[if test -n "$$1"; then
1438
elif test -n "$PKG_CONFIG"; then
1439
PKG_CHECK_EXISTS([$3],
1440
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1441
test "x$?" != "x0" && pkg_failed=yes ],
1448
# _PKG_SHORT_ERRORS_SUPPORTED
1449
# -----------------------------
1450
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1451
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1452
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1453
_pkg_short_errors_supported=yes
1455
_pkg_short_errors_supported=no
1457
])# _PKG_SHORT_ERRORS_SUPPORTED
1460
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1461
# [ACTION-IF-NOT-FOUND])
1464
# Note that if there is a possibility the first call to
1465
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1466
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1469
# --------------------------------------------------------------
1470
AC_DEFUN([PKG_CHECK_MODULES],
1471
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1472
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1473
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1476
AC_MSG_CHECKING([for $1])
1478
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1479
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1481
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1482
and $1[]_LIBS to avoid the need to call pkg-config.
1483
See the pkg-config man page for more details.])
1485
if test $pkg_failed = yes; then
1487
_PKG_SHORT_ERRORS_SUPPORTED
1488
if test $_pkg_short_errors_supported = yes; then
1489
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1491
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1493
# Put the nasty error message in config.log where it belongs
1494
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1496
m4_default([$4], [AC_MSG_ERROR(
1497
[Package requirements ($2) were not met:
1501
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1502
installed software in a non-standard prefix.
1506
elif test $pkg_failed = untried; then
1508
m4_default([$4], [AC_MSG_FAILURE(
1509
[The pkg-config script could not be found or is too old. Make sure it
1510
is in your PATH or set the PKG_CONFIG environment variable to the full
1515
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1518
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1519
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1520
AC_MSG_RESULT([yes])
1523
])# PKG_CHECK_MODULES
1526
# PKG_INSTALLDIR(DIRECTORY)
1527
# -------------------------
1528
# Substitutes the variable pkgconfigdir as the location where a module
1529
# should install pkg-config .pc files. By default the directory is
1530
# $libdir/pkgconfig, but the default can be changed by passing
1531
# DIRECTORY. The user can override through the --with-pkgconfigdir
1533
AC_DEFUN([PKG_INSTALLDIR],
1534
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1535
m4_pushdef([pkg_description],
1536
[pkg-config installation directory @<:@]pkg_default[@:>@])
1537
AC_ARG_WITH([pkgconfigdir],
1538
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1539
[with_pkgconfigdir=]pkg_default)
1540
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1541
m4_popdef([pkg_default])
1542
m4_popdef([pkg_description])
1543
]) dnl PKG_INSTALLDIR
1546
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1547
# -------------------------
1548
# Substitutes the variable noarch_pkgconfigdir as the location where a
1549
# module should install arch-independent pkg-config .pc files. By
1550
# default the directory is $datadir/pkgconfig, but the default can be
1551
# changed by passing DIRECTORY. The user can override through the
1552
# --with-noarch-pkgconfigdir parameter.
1553
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1554
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1555
m4_pushdef([pkg_description],
1556
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1557
AC_ARG_WITH([noarch-pkgconfigdir],
1558
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1559
[with_noarch_pkgconfigdir=]pkg_default)
1560
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1561
m4_popdef([pkg_default])
1562
m4_popdef([pkg_description])
1563
]) dnl PKG_NOARCH_INSTALLDIR
1565
# Configure paths for GLIB
1566
# Owen Taylor 1997-2001
1568
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1569
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
1570
dnl gthread, or gio is specified in MODULES, pass to pkg-config
1572
AC_DEFUN([AM_PATH_GLIB_2_0],
1574
dnl Get the cflags and libraries from pkg-config
1576
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
1577
, enable_glibtest=yes)
1579
pkg_config_args=glib-2.0
1584
pkg_config_args="$pkg_config_args gmodule-2.0"
1587
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
1590
pkg_config_args="$pkg_config_args gobject-2.0"
1593
pkg_config_args="$pkg_config_args gthread-2.0"
1596
pkg_config_args="$pkg_config_args $module-2.0"
1601
PKG_PROG_PKG_CONFIG([0.16])
1605
if test "x$PKG_CONFIG" = x ; then
1610
min_glib_version=ifelse([$1], ,2.0.0,$1)
1611
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
1613
if test x$PKG_CONFIG != xno ; then
1614
## don't try to run the test against uninstalled libtool libs
1615
if $PKG_CONFIG --uninstalled $pkg_config_args; then
1616
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
1620
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
1627
if test x"$no_glib" = x ; then
1628
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
1629
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
1630
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
1631
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
1633
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
1634
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
1635
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
1636
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1637
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
1638
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1639
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
1640
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1641
if test "x$enable_glibtest" = "xyes" ; then
1642
ac_save_CFLAGS="$CFLAGS"
1643
ac_save_LIBS="$LIBS"
1644
CFLAGS="$CFLAGS $GLIB_CFLAGS"
1645
LIBS="$GLIB_LIBS $LIBS"
1647
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
1648
dnl checks the results of pkg-config to some extent)
1659
unsigned int major, minor, micro;
1662
fclose (fopen ("conf.glibtest", "w"));
1664
/* HP/UX 9 (%@#!) writes to sscanf strings */
1665
tmp_version = g_strdup("$min_glib_version");
1666
if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
1667
printf("%s, bad version string\n", "$min_glib_version");
1671
if ((glib_major_version != $glib_config_major_version) ||
1672
(glib_minor_version != $glib_config_minor_version) ||
1673
(glib_micro_version != $glib_config_micro_version))
1675
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
1676
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
1677
glib_major_version, glib_minor_version, glib_micro_version);
1678
printf ("*** was found! If pkg-config was correct, then it is best\n");
1679
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
1680
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1681
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1682
printf("*** required on your system.\n");
1683
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1684
printf("*** to point to the correct configuration files\n");
1686
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
1687
(glib_minor_version != GLIB_MINOR_VERSION) ||
1688
(glib_micro_version != GLIB_MICRO_VERSION))
1690
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
1691
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
1692
printf("*** library (version %d.%d.%d)\n",
1693
glib_major_version, glib_minor_version, glib_micro_version);
1697
if ((glib_major_version > major) ||
1698
((glib_major_version == major) && (glib_minor_version > minor)) ||
1699
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
1705
printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
1706
glib_major_version, glib_minor_version, glib_micro_version);
1707
printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
1708
major, minor, micro);
1709
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
1711
printf("*** If you have already installed a sufficiently new version, this error\n");
1712
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1713
printf("*** being found. The easiest way to fix this is to remove the old version\n");
1714
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
1715
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1716
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1717
printf("*** so that the correct libraries are found at run-time))\n");
1722
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1723
CFLAGS="$ac_save_CFLAGS"
1724
LIBS="$ac_save_LIBS"
1727
if test "x$no_glib" = x ; then
1728
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
1729
ifelse([$2], , :, [$2])
1732
if test "$PKG_CONFIG" = "no" ; then
1733
echo "*** A new enough version of pkg-config was not found."
1734
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
1736
if test -f conf.glibtest ; then
1739
echo "*** Could not run GLIB test program, checking why..."
1740
ac_save_CFLAGS="$CFLAGS"
1741
ac_save_LIBS="$LIBS"
1742
CFLAGS="$CFLAGS $GLIB_CFLAGS"
1743
LIBS="$LIBS $GLIB_LIBS"
1747
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
1748
[ echo "*** The test program compiled, but did not run. This usually means"
1749
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
1750
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
1751
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1752
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1753
echo "*** is required on your system"
1755
echo "*** If you have an old version installed, it is best to remove it, although"
1756
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1757
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1758
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
1759
CFLAGS="$ac_save_CFLAGS"
1760
LIBS="$ac_save_LIBS"
1768
GLIB_COMPILE_RESOURCES=""
1769
ifelse([$3], , :, [$3])
1771
AC_SUBST(GLIB_CFLAGS)
1773
AC_SUBST(GLIB_GENMARSHAL)
1774
AC_SUBST(GOBJECT_QUERY)
1775
AC_SUBST(GLIB_MKENUMS)
1776
AC_SUBST(GLIB_COMPILE_RESOURCES)
1781
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1782
dnl the schema should be compiled
1785
AC_DEFUN([GLIB_GSETTINGS],
1787
m4_pattern_allow([AM_V_GEN])
1788
AC_ARG_ENABLE(schemas-compile,
1789
AS_HELP_STRING([--disable-schemas-compile],
1790
[Disable regeneration of gschemas.compiled on install]),
1791
[case ${enableval} in
1792
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1793
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1794
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1796
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1797
PKG_PROG_PKG_CONFIG([0.16])
1798
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1799
if test x$cross_compiling != xyes; then
1800
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1802
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1804
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1805
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1806
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1808
ifelse([$1],,[:],[$1])
1812
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1814
mostlyclean-am: clean-gsettings-schemas
1816
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1818
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1819
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1821
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1822
uninstall-am: uninstall-gsettings-schemas
1823
install-data-am: install-gsettings-schemas
1825
.SECONDARY: $(gsettings_SCHEMAS)
1827
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1829
if test -n "$^"; then \
1830
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1831
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1832
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1835
uninstall-gsettings-schemas:
1836
@$(NORMAL_UNINSTALL)
1837
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1838
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1839
test -n "$$files" || exit 0; \
1840
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1841
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1842
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1844
clean-gsettings-schemas:
1845
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1847
ifdef gsettings_ENUM_NAMESPACE
1848
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1849
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1852
_GSETTINGS_SUBST(GSETTINGS_RULES)
1855
dnl _GSETTINGS_SUBST(VARIABLE)
1856
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1857
AC_DEFUN([_GSETTINGS_SUBST],
1860
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1864
dnl -*- mode: autoconf -*-
1865
dnl Copyright 2009 Johan Dahlin
1867
dnl This file is free software; the author(s) gives unlimited
1868
dnl permission to copy and/or distribute it, with or without
1869
dnl modifications, as long as this notice is preserved.
1874
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
1876
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
1877
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1878
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
1880
dnl enable/disable introspection
1881
m4_if([$2], [require],
1883
enable_introspection=yes
1885
AC_ARG_ENABLE(introspection,
1886
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
1887
[Enable introspection for this build]),,
1888
[enable_introspection=auto])
1891
AC_MSG_CHECKING([for gobject-introspection])
1893
dnl presence/version checking
1894
AS_CASE([$enable_introspection],
1896
found_introspection="no (disabled, use --enable-introspection to enable)"
1899
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
1900
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
1901
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
1902
found_introspection=yes,
1903
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
1906
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
1907
dnl Canonicalize enable_introspection
1908
enable_introspection=$found_introspection
1911
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
1914
AC_MSG_RESULT([$found_introspection])
1916
INTROSPECTION_SCANNER=
1917
INTROSPECTION_COMPILER=
1918
INTROSPECTION_GENERATE=
1919
INTROSPECTION_GIRDIR=
1920
INTROSPECTION_TYPELIBDIR=
1921
if test "x$found_introspection" = "xyes"; then
1922
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
1923
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
1924
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
1925
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
1926
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
1927
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
1928
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
1929
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
1931
AC_SUBST(INTROSPECTION_SCANNER)
1932
AC_SUBST(INTROSPECTION_COMPILER)
1933
AC_SUBST(INTROSPECTION_GENERATE)
1934
AC_SUBST(INTROSPECTION_GIRDIR)
1935
AC_SUBST(INTROSPECTION_TYPELIBDIR)
1936
AC_SUBST(INTROSPECTION_CFLAGS)
1937
AC_SUBST(INTROSPECTION_LIBS)
1938
AC_SUBST(INTROSPECTION_MAKEFILE)
1940
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
1945
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
1947
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
1949
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
1953
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
1956
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
1958
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
1961
1961
m4_include([m4/gettext.m4])
1962
1962
m4_include([m4/gtk-doc.m4])
1963
1963
m4_include([m4/iconv.m4])