14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
[m4_warning([this file was generated for autoconf 2.68.
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
[m4_warning([this file was generated for autoconf 2.65.
18
18
You have another version of autoconf. It may work, but is not guaranteed to.
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
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License. As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
31
# This file can be copied and used freely without restrictions. It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
[AC_CHECK_HEADERS([locale.h])
71
if test $ac_cv_header_locale_h = yes; then
72
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
if test $am_cv_val_LC_MESSAGES = yes; then
76
AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
[Define if your <locale.h> file defines LC_MESSAGES.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
95
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
test -z "$ac_dir" && ac_dir=.
98
if test -f $ac_dir/$ac_word; then
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
168
if test "$gt_cv_func_dgettext_libc" != "yes" \
169
|| test "$gt_cv_func_ngettext_libc" != "yes" \
170
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
AC_CHECK_LIB(intl, bindtextdomain,
173
[AC_CHECK_LIB(intl, ngettext,
174
[AC_CHECK_LIB(intl, dgettext,
175
gt_cv_func_dgettext_libintl=yes)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
189
# If we found libintl, then check in it for bind_textdomain_codeset();
190
# we'll prefer libc if neither have bind_textdomain_codeset(),
191
# and both have dgettext and ngettext
193
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
glib_save_LIBS="$LIBS"
195
LIBS="$LIBS -lintl $libintl_extra_libs"
196
unset ac_cv_func_bind_textdomain_codeset
197
AC_CHECK_FUNCS(bind_textdomain_codeset)
198
LIBS="$glib_save_LIBS"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
203
if test "$gt_cv_func_dgettext_libc" = "yes" \
204
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
gt_cv_func_dgettext_libintl=no
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
220
if test "$gt_cv_have_gettext" = "yes"; then
221
AC_DEFINE(HAVE_GETTEXT,1,
222
[Define if the GNU gettext() function is already present or preinstalled.])
223
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
if test "$MSGFMT" != "no"; then
226
glib_save_LIBS="$LIBS"
227
LIBS="$LIBS $INTLLIBS"
228
AC_CHECK_FUNCS(dcgettext)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
252
dnl On Solaris, if bind_textdomain_codeset is in libc,
253
dnl GNU format message catalog is always supported,
254
dnl since both are added to the libc all together.
255
dnl Hence, we'd like to go with DATADIRNAME=share and
256
dnl and CATOBJEXT=.gmo in this case.
257
AC_CHECK_FUNC(bind_textdomain_codeset,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
281
dnl Test whether we really found GNU xgettext.
282
if test "$XGETTEXT" != ":"; then
283
dnl If it is not GNU xgettext we define it as : so that the
284
dnl Makefiles still can work.
285
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
302
dnl These rules are solely for the distribution goal. While doing this
303
dnl we only have to keep exactly one list of the available catalogs
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
353
for desiredlang in $desiredlanguages; do
354
# Use the presentlang catalog if desiredlang is
355
# a. equal to presentlang, or
356
# b. a variant of presentlang (because in this case,
357
# presentlang can be used as a fallback for messages
358
# which are not translated in the desiredlang catalog).
359
case "$desiredlang" in
360
"$presentlang"*) useit=yes;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
371
dnl Construct list of names of catalog files to be constructed.
372
if test -n "$LINGUAS"; then
373
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
377
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
dnl Try to locate is.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
389
dnl Generate list of files to be processed by xgettext which will
390
dnl be included in po/Makefile.
391
test -d po || mkdir po
392
if test "x$srcdir" != "x."; then
393
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
posrcprefix="$srcdir/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_ac,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
457
dnl the schema should be compiled
460
AC_DEFUN([GLIB_GSETTINGS],
462
m4_pattern_allow([AM_V_GEN])
463
AC_ARG_ENABLE(schemas-compile,
464
AC_HELP_STRING([--disable-schemas-compile],
465
[Disable regeneration of gschemas.compiled on install]),
466
[case ${enableval} in
467
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
468
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
469
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
471
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
472
PKG_PROG_PKG_CONFIG([0.16])
473
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
474
if test x$cross_compiling != xyes; then
475
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
477
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
479
AC_SUBST(GLIB_COMPILE_SCHEMAS)
480
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
481
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
483
ifelse([$1],,[:],[$1])
487
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
489
mostlyclean-am: clean-gsettings-schemas
491
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
493
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
494
$(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 [$]@
496
all-am: $(gsettings_SCHEMAS:.xml=.valid)
497
uninstall-am: uninstall-gsettings-schemas
498
install-data-am: install-gsettings-schemas
500
.SECONDARY: $(gsettings_SCHEMAS)
502
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
504
if test -n "$^"; then \
505
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
506
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
507
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
510
uninstall-gsettings-schemas:
512
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
513
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
514
test -n "$$files" || exit 0; \
515
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
516
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
517
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
519
clean-gsettings-schemas:
520
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
522
ifdef gsettings_ENUM_NAMESPACE
523
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
524
$(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 [$]@
527
_GSETTINGS_SUBST(GSETTINGS_RULES)
530
dnl _GSETTINGS_SUBST(VARIABLE)
531
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
532
AC_DEFUN([_GSETTINGS_SUBST],
535
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
539
# nls.m4 serial 5 (gettext-0.18)
540
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
542
dnl This file is free software; the Free Software Foundation
543
dnl gives unlimited permission to copy and/or distribute it,
544
dnl with or without modifications, as long as this notice is preserved.
546
dnl This file can can be used in projects which are not available under
547
dnl the GNU General Public License or the GNU Library General Public
548
dnl License but which still want to provide support for the GNU gettext
550
dnl Please note that the actual code of the GNU gettext library is covered
551
dnl by the GNU Library General Public License, and the rest of the GNU
552
dnl gettext package package is covered by the GNU General Public License.
553
dnl They are *not* in the public domain.
556
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
557
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
563
AC_MSG_CHECKING([whether NLS is requested])
564
dnl Default is enabled NLS
566
[ --disable-nls do not use Native Language Support],
567
USE_NLS=$enableval, USE_NLS=yes)
568
AC_MSG_RESULT([$USE_NLS])
572
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
573
# serial 1 (pkg-config-0.24)
575
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
577
# This program is free software; you can redistribute it and/or modify
578
# it under the terms of the GNU General Public License as published by
579
# the Free Software Foundation; either version 2 of the License, or
580
# (at your option) any later version.
582
# This program is distributed in the hope that it will be useful, but
583
# WITHOUT ANY WARRANTY; without even the implied warranty of
584
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
585
# General Public License for more details.
587
# You should have received a copy of the GNU General Public License
588
# along with this program; if not, write to the Free Software
589
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
591
# As a special exception to the GNU General Public License, if you
592
# distribute this file as part of a program that contains a
593
# configuration script generated by Autoconf, you may include it under
594
# the same distribution terms that you use for the rest of that program.
596
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
597
# ----------------------------------
598
AC_DEFUN([PKG_PROG_PKG_CONFIG],
599
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
600
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
601
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
602
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
603
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
605
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
606
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
608
if test -n "$PKG_CONFIG"; then
609
_pkg_min_version=m4_default([$1], [0.9.0])
610
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
611
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
618
])# PKG_PROG_PKG_CONFIG
620
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
622
# Check to see whether a particular set of modules exists. Similar
623
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
625
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
626
# only at the first occurence in configure.ac, so if the first place
627
# it's called might be skipped (such as if it is within an "if", you
628
# have to call PKG_CHECK_EXISTS manually
629
# --------------------------------------------------------------
630
AC_DEFUN([PKG_CHECK_EXISTS],
631
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
632
if test -n "$PKG_CONFIG" && \
633
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
634
m4_default([$2], [:])
635
m4_ifvaln([$3], [else
639
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
640
# ---------------------------------------------
641
m4_define([_PKG_CONFIG],
642
[if test -n "$$1"; then
644
elif test -n "$PKG_CONFIG"; then
645
PKG_CHECK_EXISTS([$3],
646
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
653
# _PKG_SHORT_ERRORS_SUPPORTED
654
# -----------------------------
655
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
656
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
657
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
658
_pkg_short_errors_supported=yes
660
_pkg_short_errors_supported=no
662
])# _PKG_SHORT_ERRORS_SUPPORTED
665
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
666
# [ACTION-IF-NOT-FOUND])
669
# Note that if there is a possibility the first call to
670
# PKG_CHECK_MODULES might not happen, you should be sure to include an
671
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
674
# --------------------------------------------------------------
675
AC_DEFUN([PKG_CHECK_MODULES],
676
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
677
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
678
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
681
AC_MSG_CHECKING([for $1])
683
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
684
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
686
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
687
and $1[]_LIBS to avoid the need to call pkg-config.
688
See the pkg-config man page for more details.])
690
if test $pkg_failed = yes; then
692
_PKG_SHORT_ERRORS_SUPPORTED
693
if test $_pkg_short_errors_supported = yes; then
694
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
696
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
698
# Put the nasty error message in config.log where it belongs
699
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
701
m4_default([$4], [AC_MSG_ERROR(
702
[Package requirements ($2) were not met:
706
Consider adjusting the PKG_CONFIG_PATH environment variable if you
707
installed software in a non-standard prefix.
711
elif test $pkg_failed = untried; then
713
m4_default([$4], [AC_MSG_FAILURE(
714
[The pkg-config script could not be found or is too old. Make sure it
715
is in your PATH or set the PKG_CONFIG environment variable to the full
720
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
723
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
724
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
728
])# PKG_CHECK_MODULES
730
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
732
24
# This file is free software; the Free Software Foundation
1724
1016
AC_SUBST([am__untar])
1725
1017
]) # _AM_PROG_TAR
1019
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1020
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1022
# This file is free software, distributed under the terms of the GNU
1023
# General Public License. As a special exception to the GNU General
1024
# Public License, this file may be distributed as part of a program
1025
# that contains a configuration script generated by Autoconf, under
1026
# the same distribution terms as the rest of that program.
1028
# This file can be copied and used freely without restrictions. It can
1029
# be used in projects which are not available under the GNU Public License
1030
# but which still want to provide support for the GNU gettext functionality.
1032
# Macro to add for using GNU gettext.
1033
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1035
# Modified to never use included libintl.
1036
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1038
# Major rework to remove unused code
1039
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1041
# Added better handling of ALL_LINGUAS from GNU gettext version
1042
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1044
# Modified to require ngettext
1045
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1047
# We need this here as well, since someone might use autoconf-2.5x
1048
# to configure GLib then an older version to configure a package
1049
# using AM_GLIB_GNU_GETTEXT
1053
dnl We go to great lengths to make sure that aclocal won't
1054
dnl try to pull in the installed version of these macros
1055
dnl when running aclocal in the glib directory.
1057
m4_copy([AC_DEFUN],[glib_DEFUN])
1058
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1060
dnl At the end, if we're not within glib, we'll define the public
1061
dnl definitions in terms of our private definitions.
1065
#--------------------
1066
glib_DEFUN([GLIB_LC_MESSAGES],
1067
[AC_CHECK_HEADERS([locale.h])
1068
if test $ac_cv_header_locale_h = yes; then
1069
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1070
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1071
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1072
if test $am_cv_val_LC_MESSAGES = yes; then
1073
AC_DEFINE(HAVE_LC_MESSAGES, 1,
1074
[Define if your <locale.h> file defines LC_MESSAGES.])
1078
# GLIB_PATH_PROG_WITH_TEST
1079
#----------------------------
1080
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1081
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1082
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1083
[# Extract the first word of "$2", so it can be a program name with args.
1084
set dummy $2; ac_word=[$]2
1085
AC_MSG_CHECKING([for $ac_word])
1086
AC_CACHE_VAL(ac_cv_path_$1,
1089
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1092
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1093
for ac_dir in ifelse([$5], , $PATH, [$5]); do
1094
test -z "$ac_dir" && ac_dir=.
1095
if test -f $ac_dir/$ac_word; then
1097
ac_cv_path_$1="$ac_dir/$ac_word"
1103
dnl If no 4th arg is given, leave the cache variable unset,
1104
dnl so AC_PATH_PROGS will keep looking.
1105
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1110
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1111
AC_MSG_RESULT([$]$1)
1120
glib_DEFUN([GLIB_WITH_NLS],
1121
dnl NLS is obligatory
1125
gt_cv_have_gettext=no
1131
AC_CHECK_HEADER(libintl.h,
1132
[gt_cv_func_dgettext_libintl="no"
1133
libintl_extra_libs=""
1136
# First check in libc
1138
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1140
#include <libintl.h>
1142
[return !ngettext ("","", 1)],
1143
gt_cv_func_ngettext_libc=yes,
1144
gt_cv_func_ngettext_libc=no)
1147
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1148
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1150
#include <libintl.h>
1152
[return !dgettext ("","")],
1153
gt_cv_func_dgettext_libc=yes,
1154
gt_cv_func_dgettext_libc=no)
1158
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1159
AC_CHECK_FUNCS(bind_textdomain_codeset)
1163
# If we don't have everything we want, check in libintl
1165
if test "$gt_cv_func_dgettext_libc" != "yes" \
1166
|| test "$gt_cv_func_ngettext_libc" != "yes" \
1167
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1169
AC_CHECK_LIB(intl, bindtextdomain,
1170
[AC_CHECK_LIB(intl, ngettext,
1171
[AC_CHECK_LIB(intl, dgettext,
1172
gt_cv_func_dgettext_libintl=yes)])])
1174
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1175
AC_MSG_CHECKING([if -liconv is needed to use gettext])
1177
AC_CHECK_LIB(intl, ngettext,
1178
[AC_CHECK_LIB(intl, dcgettext,
1179
[gt_cv_func_dgettext_libintl=yes
1180
libintl_extra_libs=-liconv],
1186
# If we found libintl, then check in it for bind_textdomain_codeset();
1187
# we'll prefer libc if neither have bind_textdomain_codeset(),
1188
# and both have dgettext and ngettext
1190
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1191
glib_save_LIBS="$LIBS"
1192
LIBS="$LIBS -lintl $libintl_extra_libs"
1193
unset ac_cv_func_bind_textdomain_codeset
1194
AC_CHECK_FUNCS(bind_textdomain_codeset)
1195
LIBS="$glib_save_LIBS"
1197
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1198
gt_cv_func_dgettext_libc=no
1200
if test "$gt_cv_func_dgettext_libc" = "yes" \
1201
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1202
gt_cv_func_dgettext_libintl=no
1208
if test "$gt_cv_func_dgettext_libc" = "yes" \
1209
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1210
gt_cv_have_gettext=yes
1213
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1214
INTLLIBS="-lintl $libintl_extra_libs"
1217
if test "$gt_cv_have_gettext" = "yes"; then
1218
AC_DEFINE(HAVE_GETTEXT,1,
1219
[Define if the GNU gettext() function is already present or preinstalled.])
1220
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1221
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1222
if test "$MSGFMT" != "no"; then
1223
glib_save_LIBS="$LIBS"
1224
LIBS="$LIBS $INTLLIBS"
1225
AC_CHECK_FUNCS(dcgettext)
1227
AC_MSG_CHECKING([if msgfmt accepts -c])
1228
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1231
"Content-Type: text/plain; charset=UTF-8\n"
1232
"Project-Id-Version: test 1.0\n"
1233
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1234
"Last-Translator: test <foo@bar.xx>\n"
1235
"Language-Team: C <LL@li.org>\n"
1236
"MIME-Version: 1.0\n"
1237
"Content-Transfer-Encoding: 8bit\n"
1238
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1239
AC_SUBST(MSGFMT_OPTS)
1240
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1241
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1242
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1243
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1244
return _nl_msg_cat_cntr],
1249
dnl On Solaris, if bind_textdomain_codeset is in libc,
1250
dnl GNU format message catalog is always supported,
1251
dnl since both are added to the libc all together.
1252
dnl Hence, we'd like to go with DATADIRNAME=share and
1253
dnl and CATOBJEXT=.gmo in this case.
1254
AC_CHECK_FUNC(bind_textdomain_codeset,
1265
LIBS="$glib_save_LIBS"
1268
gt_cv_have_gettext=no
1273
if test "$gt_cv_have_gettext" = "yes" ; then
1274
AC_DEFINE(ENABLE_NLS, 1,
1275
[always defined to indicate that i18n is enabled])
1278
dnl Test whether we really found GNU xgettext.
1279
if test "$XGETTEXT" != ":"; then
1280
dnl If it is not GNU xgettext we define it as : so that the
1281
dnl Makefiles still can work.
1282
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1286
[found xgettext program is not GNU xgettext; ignore it])
1291
# We need to process the po/ directory.
1295
[case "$CONFIG_FILES" in *po/Makefile.in*)
1296
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1299
dnl These rules are solely for the distribution goal. While doing this
1300
dnl we only have to keep exactly one list of the available catalogs
1301
dnl in configure.ac.
1302
for lang in $ALL_LINGUAS; do
1303
GMOFILES="$GMOFILES $lang.gmo"
1304
POFILES="$POFILES $lang.po"
1307
dnl Make all variables we use known to autoconf.
1310
AC_SUBST(DATADIRNAME)
1312
AC_SUBST(INSTOBJEXT)
1314
AC_SUBST(PO_IN_DATADIR_TRUE)
1315
AC_SUBST(PO_IN_DATADIR_FALSE)
1320
# AM_GLIB_GNU_GETTEXT
1321
# -------------------
1322
# Do checks necessary for use of gettext. If a suitable implementation
1323
# of gettext is found in either in libintl or in the C library,
1324
# it will set INTLLIBS to the libraries needed for use of gettext
1325
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1326
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1327
# on various variables needed by the Makefile.in.in installed by
1330
glib_DEFUN([GLIB_GNU_GETTEXT],
1331
[AC_REQUIRE([AC_PROG_CC])dnl
1332
AC_REQUIRE([AC_HEADER_STDC])dnl
1337
if test "$gt_cv_have_gettext" = "yes"; then
1338
if test "x$ALL_LINGUAS" = "x"; then
1341
AC_MSG_CHECKING(for catalogs to be installed)
1343
for presentlang in $ALL_LINGUAS; do
1345
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1346
desiredlanguages="$LINGUAS"
1348
desiredlanguages="$ALL_LINGUAS"
1350
for desiredlang in $desiredlanguages; do
1351
# Use the presentlang catalog if desiredlang is
1352
# a. equal to presentlang, or
1353
# b. a variant of presentlang (because in this case,
1354
# presentlang can be used as a fallback for messages
1355
# which are not translated in the desiredlang catalog).
1356
case "$desiredlang" in
1357
"$presentlang"*) useit=yes;;
1360
if test $useit = yes; then
1361
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1364
LINGUAS=$NEW_LINGUAS
1365
AC_MSG_RESULT($LINGUAS)
1368
dnl Construct list of names of catalog files to be constructed.
1369
if test -n "$LINGUAS"; then
1370
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1374
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1375
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1376
dnl Try to locate is.
1378
if test -n "$ac_aux_dir"; then
1379
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1381
if test -z "$MKINSTALLDIRS"; then
1382
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1384
AC_SUBST(MKINSTALLDIRS)
1386
dnl Generate list of files to be processed by xgettext which will
1387
dnl be included in po/Makefile.
1388
test -d po || mkdir po
1389
if test "x$srcdir" != "x."; then
1390
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1391
posrcprefix="$srcdir/"
1393
posrcprefix="../$srcdir/"
1399
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1400
< $srcdir/po/POTFILES.in > po/POTFILES
1403
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1404
# -------------------------------
1405
# Define VARIABLE to the location where catalog files will
1406
# be installed by po/Makefile.
1407
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1408
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1409
glib_save_prefix="$prefix"
1410
glib_save_exec_prefix="$exec_prefix"
1411
glib_save_datarootdir="$datarootdir"
1412
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1413
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1414
datarootdir=`eval echo "${datarootdir}"`
1415
if test "x$CATOBJEXT" = "x.mo" ; then
1416
localedir=`eval echo "${libdir}/locale"`
1418
localedir=`eval echo "${datadir}/locale"`
1420
prefix="$glib_save_prefix"
1421
exec_prefix="$glib_save_exec_prefix"
1422
datarootdir="$glib_save_datarootdir"
1423
AC_DEFINE_UNQUOTED($1, "$localedir",
1424
[Define the location where the catalogs will be installed])
1428
dnl Now the definitions that aclocal will find
1430
ifdef(glib_configure_ac,[],[
1431
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1432
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1435
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1437
# Create a temporary file with TEST-FILE as its contents and pass the
1438
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1439
# 0 and perform ACTION-IF-FAIL for any other exit status.
1440
AC_DEFUN([GLIB_RUN_PROG],
1441
[cat >conftest.foo <<_ACEOF
1444
if AC_RUN_LOG([$1 conftest.foo]); then
1445
m4_ifval([$3], [$3], [:])
1446
m4_ifvaln([$4], [else $4])dnl
1447
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1448
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1453
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1454
dnl the schema should be compiled
1457
AC_DEFUN([GLIB_GSETTINGS],
1459
m4_pattern_allow([AM_V_GEN])
1460
AC_ARG_ENABLE(schemas-compile,
1461
AC_HELP_STRING([--disable-schemas-compile],
1462
[Disable regeneration of gschemas.compiled on install]),
1463
[case ${enableval} in
1464
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1465
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1466
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1468
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1469
PKG_PROG_PKG_CONFIG([0.16])
1470
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1471
if test x$cross_compiling != xyes; then
1472
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1474
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1476
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1477
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1478
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1480
ifelse([$1],,[:],[$1])
1484
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1486
mostlyclean-am: clean-gsettings-schemas
1488
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1490
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1491
$(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 [$]@
1493
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1494
uninstall-am: uninstall-gsettings-schemas
1495
install-data-am: install-gsettings-schemas
1497
.SECONDARY: $(gsettings_SCHEMAS)
1499
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1501
if test -n "$^"; then \
1502
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1503
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1504
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1507
uninstall-gsettings-schemas:
1508
@$(NORMAL_UNINSTALL)
1509
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1510
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1511
test -n "$$files" || exit 0; \
1512
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1513
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1514
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1516
clean-gsettings-schemas:
1517
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1519
ifdef gsettings_ENUM_NAMESPACE
1520
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1521
$(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 [$]@
1524
_GSETTINGS_SUBST(GSETTINGS_RULES)
1527
dnl _GSETTINGS_SUBST(VARIABLE)
1528
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1529
AC_DEFUN([_GSETTINGS_SUBST],
1532
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1536
# nls.m4 serial 5 (gettext-0.18)
1537
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1539
dnl This file is free software; the Free Software Foundation
1540
dnl gives unlimited permission to copy and/or distribute it,
1541
dnl with or without modifications, as long as this notice is preserved.
1543
dnl This file can can be used in projects which are not available under
1544
dnl the GNU General Public License or the GNU Library General Public
1545
dnl License but which still want to provide support for the GNU gettext
1547
dnl Please note that the actual code of the GNU gettext library is covered
1548
dnl by the GNU Library General Public License, and the rest of the GNU
1549
dnl gettext package package is covered by the GNU General Public License.
1550
dnl They are *not* in the public domain.
1553
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1554
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1560
AC_MSG_CHECKING([whether NLS is requested])
1561
dnl Default is enabled NLS
1562
AC_ARG_ENABLE([nls],
1563
[ --disable-nls do not use Native Language Support],
1564
USE_NLS=$enableval, USE_NLS=yes)
1565
AC_MSG_RESULT([$USE_NLS])
1569
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1570
# serial 1 (pkg-config-0.24)
1572
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1574
# This program is free software; you can redistribute it and/or modify
1575
# it under the terms of the GNU General Public License as published by
1576
# the Free Software Foundation; either version 2 of the License, or
1577
# (at your option) any later version.
1579
# This program is distributed in the hope that it will be useful, but
1580
# WITHOUT ANY WARRANTY; without even the implied warranty of
1581
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1582
# General Public License for more details.
1584
# You should have received a copy of the GNU General Public License
1585
# along with this program; if not, write to the Free Software
1586
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1588
# As a special exception to the GNU General Public License, if you
1589
# distribute this file as part of a program that contains a
1590
# configuration script generated by Autoconf, you may include it under
1591
# the same distribution terms that you use for the rest of that program.
1593
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1594
# ----------------------------------
1595
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1596
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1597
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1598
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1599
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1600
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1602
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1603
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1605
if test -n "$PKG_CONFIG"; then
1606
_pkg_min_version=m4_default([$1], [0.9.0])
1607
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1608
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1609
AC_MSG_RESULT([yes])
1615
])# PKG_PROG_PKG_CONFIG
1617
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1619
# Check to see whether a particular set of modules exists. Similar
1620
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1622
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1623
# only at the first occurence in configure.ac, so if the first place
1624
# it's called might be skipped (such as if it is within an "if", you
1625
# have to call PKG_CHECK_EXISTS manually
1626
# --------------------------------------------------------------
1627
AC_DEFUN([PKG_CHECK_EXISTS],
1628
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1629
if test -n "$PKG_CONFIG" && \
1630
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1631
m4_default([$2], [:])
1632
m4_ifvaln([$3], [else
1636
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1637
# ---------------------------------------------
1638
m4_define([_PKG_CONFIG],
1639
[if test -n "$$1"; then
1641
elif test -n "$PKG_CONFIG"; then
1642
PKG_CHECK_EXISTS([$3],
1643
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1650
# _PKG_SHORT_ERRORS_SUPPORTED
1651
# -----------------------------
1652
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1653
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1654
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1655
_pkg_short_errors_supported=yes
1657
_pkg_short_errors_supported=no
1659
])# _PKG_SHORT_ERRORS_SUPPORTED
1662
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1663
# [ACTION-IF-NOT-FOUND])
1666
# Note that if there is a possibility the first call to
1667
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1668
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1671
# --------------------------------------------------------------
1672
AC_DEFUN([PKG_CHECK_MODULES],
1673
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1674
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1675
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1678
AC_MSG_CHECKING([for $1])
1680
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1681
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1683
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1684
and $1[]_LIBS to avoid the need to call pkg-config.
1685
See the pkg-config man page for more details.])
1687
if test $pkg_failed = yes; then
1689
_PKG_SHORT_ERRORS_SUPPORTED
1690
if test $_pkg_short_errors_supported = yes; then
1691
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1693
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1695
# Put the nasty error message in config.log where it belongs
1696
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1698
m4_default([$4], [AC_MSG_ERROR(
1699
[Package requirements ($2) were not met:
1703
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1704
installed software in a non-standard prefix.
1708
elif test $pkg_failed = untried; then
1710
m4_default([$4], [AC_MSG_FAILURE(
1711
[The pkg-config script could not be found or is too old. Make sure it
1712
is in your PATH or set the PKG_CONFIG environment variable to the full
1717
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
1720
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1721
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1722
AC_MSG_RESULT([yes])
1725
])# PKG_CHECK_MODULES
1727
1727
m4_include([m4/intltool.m4])