19
20
If you have problems, you may need to regenerate the build system entirely.
20
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
23
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
24
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
26
# This file is free software, distributed under the terms of the GNU
27
# General Public License. As a special exception to the GNU General
28
# Public License, this file may be distributed as part of a program
29
# that contains a configuration script generated by Autoconf, under
30
# the same distribution terms as the rest of that program.
32
# This file can be copied and used freely without restrictions. It can
33
# be used in projects which are not available under the GNU Public License
34
# but which still want to provide support for the GNU gettext functionality.
36
# Macro to add for using GNU gettext.
37
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
39
# Modified to never use included libintl.
40
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
42
# Major rework to remove unused code
43
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
45
# Added better handling of ALL_LINGUAS from GNU gettext version
46
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
48
# Modified to require ngettext
49
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
51
# We need this here as well, since someone might use autoconf-2.5x
52
# to configure GLib then an older version to configure a package
53
# using AM_GLIB_GNU_GETTEXT
57
dnl We go to great lengths to make sure that aclocal won't
58
dnl try to pull in the installed version of these macros
59
dnl when running aclocal in the glib directory.
61
m4_copy([AC_DEFUN],[glib_DEFUN])
62
m4_copy([AC_REQUIRE],[glib_REQUIRE])
64
dnl At the end, if we're not within glib, we'll define the public
65
dnl definitions in terms of our private definitions.
70
glib_DEFUN([GLIB_LC_MESSAGES],
71
[AC_CHECK_HEADERS([locale.h])
72
if test $ac_cv_header_locale_h = yes; then
73
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76
if test $am_cv_val_LC_MESSAGES = yes; then
77
AC_DEFINE(HAVE_LC_MESSAGES, 1,
78
[Define if your <locale.h> file defines LC_MESSAGES.])
82
# GLIB_PATH_PROG_WITH_TEST
83
#----------------------------
84
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87
[# Extract the first word of "$2", so it can be a program name with args.
88
set dummy $2; ac_word=[$]2
89
AC_MSG_CHECKING([for $ac_word])
90
AC_CACHE_VAL(ac_cv_path_$1,
93
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
96
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97
for ac_dir in ifelse([$5], , $PATH, [$5]); do
98
test -z "$ac_dir" && ac_dir=.
99
if test -f $ac_dir/$ac_word; then
101
ac_cv_path_$1="$ac_dir/$ac_word"
107
dnl If no 4th arg is given, leave the cache variable unset,
108
dnl so AC_PATH_PROGS will keep looking.
109
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
114
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
124
glib_DEFUN([GLIB_WITH_NLS],
125
dnl NLS is obligatory
129
gt_cv_have_gettext=no
135
AC_CHECK_HEADER(libintl.h,
136
[gt_cv_func_dgettext_libintl="no"
137
libintl_extra_libs=""
140
# First check in libc
142
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
146
[return !ngettext ("","", 1)],
147
gt_cv_func_ngettext_libc=yes,
148
gt_cv_func_ngettext_libc=no)
151
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
156
[return !dgettext ("","")],
157
gt_cv_func_dgettext_libc=yes,
158
gt_cv_func_dgettext_libc=no)
162
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163
AC_CHECK_FUNCS(bind_textdomain_codeset)
167
# If we don't have everything we want, check in libintl
169
if test "$gt_cv_func_dgettext_libc" != "yes" \
170
|| test "$gt_cv_func_ngettext_libc" != "yes" \
171
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
173
AC_CHECK_LIB(intl, bindtextdomain,
174
[AC_CHECK_LIB(intl, ngettext,
175
[AC_CHECK_LIB(intl, dgettext,
176
gt_cv_func_dgettext_libintl=yes)])])
178
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179
AC_MSG_CHECKING([if -liconv is needed to use gettext])
181
AC_CHECK_LIB(intl, ngettext,
182
[AC_CHECK_LIB(intl, dcgettext,
183
[gt_cv_func_dgettext_libintl=yes
184
libintl_extra_libs=-liconv],
190
# If we found libintl, then check in it for bind_textdomain_codeset();
191
# we'll prefer libc if neither have bind_textdomain_codeset(),
192
# and both have dgettext and ngettext
194
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195
glib_save_LIBS="$LIBS"
196
LIBS="$LIBS -lintl $libintl_extra_libs"
197
unset ac_cv_func_bind_textdomain_codeset
198
AC_CHECK_FUNCS(bind_textdomain_codeset)
199
LIBS="$glib_save_LIBS"
201
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202
gt_cv_func_dgettext_libc=no
204
if test "$gt_cv_func_dgettext_libc" = "yes" \
205
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
206
gt_cv_func_dgettext_libintl=no
212
if test "$gt_cv_func_dgettext_libc" = "yes" \
213
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
214
gt_cv_have_gettext=yes
217
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218
INTLLIBS="-lintl $libintl_extra_libs"
221
if test "$gt_cv_have_gettext" = "yes"; then
222
AC_DEFINE(HAVE_GETTEXT,1,
223
[Define if the GNU gettext() function is already present or preinstalled.])
224
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226
if test "$MSGFMT" != "no"; then
227
glib_save_LIBS="$LIBS"
228
LIBS="$LIBS $INTLLIBS"
229
AC_CHECK_FUNCS(dcgettext)
231
AC_MSG_CHECKING([if msgfmt accepts -c])
232
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
235
"Content-Type: text/plain; charset=UTF-8\n"
236
"Project-Id-Version: test 1.0\n"
237
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
238
"Last-Translator: test <foo@bar.xx>\n"
239
"Language-Team: C <LL@li.org>\n"
240
"MIME-Version: 1.0\n"
241
"Content-Transfer-Encoding: 8bit\n"
242
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243
AC_SUBST(MSGFMT_OPTS)
244
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248
return _nl_msg_cat_cntr],
253
dnl On Solaris, if bind_textdomain_codeset is in libc,
254
dnl GNU format message catalog is always supported,
255
dnl since both are added to the libc all together.
256
dnl Hence, we'd like to go with DATADIRNAME=share and
257
dnl and CATOBJEXT=.gmo in this case.
258
AC_CHECK_FUNC(bind_textdomain_codeset,
273
LIBS="$glib_save_LIBS"
276
gt_cv_have_gettext=no
281
if test "$gt_cv_have_gettext" = "yes" ; then
282
AC_DEFINE(ENABLE_NLS, 1,
283
[always defined to indicate that i18n is enabled])
286
dnl Test whether we really found GNU xgettext.
287
if test "$XGETTEXT" != ":"; then
288
dnl If it is not GNU xgettext we define it as : so that the
289
dnl Makefiles still can work.
290
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
294
[found xgettext program is not GNU xgettext; ignore it])
299
# We need to process the po/ directory.
303
[case "$CONFIG_FILES" in *po/Makefile.in*)
304
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
307
dnl These rules are solely for the distribution goal. While doing this
308
dnl we only have to keep exactly one list of the available catalogs
310
for lang in $ALL_LINGUAS; do
311
GMOFILES="$GMOFILES $lang.gmo"
312
POFILES="$POFILES $lang.po"
315
dnl Make all variables we use known to autoconf.
318
AC_SUBST(DATADIRNAME)
322
AC_SUBST(PO_IN_DATADIR_TRUE)
323
AC_SUBST(PO_IN_DATADIR_FALSE)
328
# AM_GLIB_GNU_GETTEXT
329
# -------------------
330
# Do checks necessary for use of gettext. If a suitable implementation
331
# of gettext is found in either in libintl or in the C library,
332
# it will set INTLLIBS to the libraries needed for use of gettext
333
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335
# on various variables needed by the Makefile.in.in installed by
338
glib_DEFUN([GLIB_GNU_GETTEXT],
339
[AC_REQUIRE([AC_PROG_CC])dnl
340
AC_REQUIRE([AC_HEADER_STDC])dnl
345
if test "$gt_cv_have_gettext" = "yes"; then
346
if test "x$ALL_LINGUAS" = "x"; then
349
AC_MSG_CHECKING(for catalogs to be installed)
351
for presentlang in $ALL_LINGUAS; do
353
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
354
desiredlanguages="$LINGUAS"
356
desiredlanguages="$ALL_LINGUAS"
358
for desiredlang in $desiredlanguages; do
359
# Use the presentlang catalog if desiredlang is
360
# a. equal to presentlang, or
361
# b. a variant of presentlang (because in this case,
362
# presentlang can be used as a fallback for messages
363
# which are not translated in the desiredlang catalog).
364
case "$desiredlang" in
365
"$presentlang"*) useit=yes;;
368
if test $useit = yes; then
369
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
373
AC_MSG_RESULT($LINGUAS)
376
dnl Construct list of names of catalog files to be constructed.
377
if test -n "$LINGUAS"; then
378
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
382
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
383
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
384
dnl Try to locate is.
386
if test -n "$ac_aux_dir"; then
387
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
389
if test -z "$MKINSTALLDIRS"; then
390
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
392
AC_SUBST(MKINSTALLDIRS)
394
dnl Generate list of files to be processed by xgettext which will
395
dnl be included in po/Makefile.
396
test -d po || mkdir po
397
if test "x$srcdir" != "x."; then
398
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
399
posrcprefix="$srcdir/"
401
posrcprefix="../$srcdir/"
407
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
408
< $srcdir/po/POTFILES.in > po/POTFILES
411
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
412
# -------------------------------
413
# Define VARIABLE to the location where catalog files will
414
# be installed by po/Makefile.
415
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
416
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
417
glib_save_prefix="$prefix"
418
glib_save_exec_prefix="$exec_prefix"
419
glib_save_datarootdir="$datarootdir"
420
test "x$prefix" = xNONE && prefix=$ac_default_prefix
421
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
422
datarootdir=`eval echo "${datarootdir}"`
423
if test "x$CATOBJEXT" = "x.mo" ; then
424
localedir=`eval echo "${libdir}/locale"`
426
localedir=`eval echo "${datadir}/locale"`
428
prefix="$glib_save_prefix"
429
exec_prefix="$glib_save_exec_prefix"
430
datarootdir="$glib_save_datarootdir"
431
AC_DEFINE_UNQUOTED($1, "$localedir",
432
[Define the location where the catalogs will be installed])
436
dnl Now the definitions that aclocal will find
438
ifdef(glib_configure_ac,[],[
439
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
440
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
443
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
445
# Create a temporary file with TEST-FILE as its contents and pass the
446
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
447
# 0 and perform ACTION-IF-FAIL for any other exit status.
448
AC_DEFUN([GLIB_RUN_PROG],
449
[cat >conftest.foo <<_ACEOF
452
if AC_RUN_LOG([$1 conftest.foo]); then
453
m4_ifval([$3], [$3], [:])
454
m4_ifvaln([$4], [else $4])dnl
455
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
456
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
465
dnl GNOME_COMMON_INIT
467
AU_DEFUN([GNOME_COMMON_INIT],
469
dnl this macro should come after AC_CONFIG_MACRO_DIR
470
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
472
dnl ensure that when the Automake generated makefile calls aclocal,
473
dnl it honours the $ACLOCAL_FLAGS environment variable
474
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
475
if test -n "$ac_macro_dir"; then
476
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
479
AC_SUBST([ACLOCAL_AMFLAGS])
481
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
482
in your top-level Makefile.am, instead, where "m4" is the macro directory set
483
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
485
AC_DEFUN([GNOME_DEBUG_CHECK],
487
AC_ARG_ENABLE([debug],
488
AC_HELP_STRING([--enable-debug],
489
[turn on debugging]),,
492
if test x$enable_debug = xyes ; then
493
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
494
[Enable additional debugging at the expense of performance and size])
498
dnl GNOME_MAINTAINER_MODE_DEFINES ()
499
dnl define DISABLE_DEPRECATED
501
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
503
AC_REQUIRE([AM_MAINTAINER_MODE])
505
DISABLE_DEPRECATED=""
506
if test $USE_MAINTAINER_MODE = yes; then
507
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
508
for DOMAIN in $DOMAINS; do
509
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
513
AC_SUBST(DISABLE_DEPRECATED)
516
dnl GNOME_COMPILE_WARNINGS
517
dnl Turn on many useful compiler warnings
518
dnl For now, only works on GCC
519
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
520
dnl ******************************
521
dnl More compiler warnings
522
dnl ******************************
524
AC_ARG_ENABLE(compile-warnings,
525
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
526
[Turn on compiler warnings]),,
527
[enable_compile_warnings="m4_default([$1],[yes])"])
530
if test "x$GCC" != xyes; then
531
enable_compile_warnings=no
535
realsave_CFLAGS="$CFLAGS"
537
case "$enable_compile_warnings" in
542
warning_flags="-Wall"
545
warning_flags="-Wall -Wmissing-prototypes"
548
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
549
CFLAGS="$warning_flags $CFLAGS"
550
for option in -Wno-sign-compare; do
551
SAVE_CFLAGS="$CFLAGS"
552
CFLAGS="$CFLAGS $option"
553
AC_MSG_CHECKING([whether gcc understands $option])
554
AC_TRY_COMPILE([], [],
557
CFLAGS="$SAVE_CFLAGS"
558
AC_MSG_RESULT($has_option)
559
if test $has_option = yes; then
560
warning_flags="$warning_flags $option"
566
if test "$enable_compile_warnings" = "error" ; then
567
warning_flags="$warning_flags -Werror"
571
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
574
CFLAGS="$realsave_CFLAGS"
575
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
576
AC_MSG_RESULT($warning_flags)
579
AC_HELP_STRING([--enable-iso-c],
580
[Try to warn if code is not ISO C ]),,
583
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
585
if test "x$enable_iso_c" != "xno"; then
586
if test "x$GCC" = "xyes"; then
588
*[\ \ ]-ansi[\ \ ]*) ;;
589
*) complCFLAGS="$complCFLAGS -ansi" ;;
592
*[\ \ ]-pedantic[\ \ ]*) ;;
593
*) complCFLAGS="$complCFLAGS -pedantic" ;;
597
AC_MSG_RESULT($complCFLAGS)
599
WARN_CFLAGS="$warning_flags $complCFLAGS"
600
AC_SUBST(WARN_CFLAGS)
603
dnl For C++, do basically the same thing.
605
AC_DEFUN([GNOME_CXX_WARNINGS],[
606
AC_ARG_ENABLE(cxx-warnings,
607
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
608
[Turn on compiler warnings.]),,
609
[enable_cxx_warnings="m4_default([$1],[minimum])"])
611
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
613
if test "x$GXX" != xyes; then
614
enable_cxx_warnings=no
616
if test "x$enable_cxx_warnings" != "xno"; then
617
if test "x$GXX" = "xyes"; then
618
case " $CXXFLAGS " in
619
*[\ \ ]-Wall[\ \ ]*) ;;
620
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
623
## -W is not all that useful. And it cannot be controlled
624
## with individual -Wno-xxx flags, unlike -Wall
625
if test "x$enable_cxx_warnings" = "xyes"; then
626
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
630
AC_MSG_RESULT($warnCXXFLAGS)
632
AC_ARG_ENABLE(iso-cxx,
633
AC_HELP_STRING([--enable-iso-cxx],
634
[Try to warn if code is not ISO C++ ]),,
637
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
639
if test "x$enable_iso_cxx" != "xno"; then
640
if test "x$GXX" = "xyes"; then
641
case " $CXXFLAGS " in
642
*[\ \ ]-ansi[\ \ ]*) ;;
643
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
646
case " $CXXFLAGS " in
647
*[\ \ ]-pedantic[\ \ ]*) ;;
648
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
652
AC_MSG_RESULT($complCXXFLAGS)
654
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
655
AC_SUBST(WARN_CXXFLAGS)
659
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
660
dnl the schema should be compiled
663
AC_DEFUN([GLIB_GSETTINGS],
665
m4_pattern_allow([AM_V_GEN])
666
AC_ARG_ENABLE(schemas-compile,
667
AS_HELP_STRING([--disable-schemas-compile],
668
[Disable regeneration of gschemas.compiled on install]),
669
[case ${enableval} in
670
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
671
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
672
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
674
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
675
PKG_PROG_PKG_CONFIG([0.16])
676
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
677
if test x$cross_compiling != xyes; then
678
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
680
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
682
AC_SUBST(GLIB_COMPILE_SCHEMAS)
683
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
684
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
686
ifelse([$1],,[:],[$1])
690
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
692
mostlyclean-am: clean-gsettings-schemas
694
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
696
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
697
$(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 [$]@
699
all-am: $(gsettings_SCHEMAS:.xml=.valid)
700
uninstall-am: uninstall-gsettings-schemas
701
install-data-am: install-gsettings-schemas
703
.SECONDARY: $(gsettings_SCHEMAS)
705
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
707
if test -n "$^"; then \
708
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
709
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
710
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
713
uninstall-gsettings-schemas:
715
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
716
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
717
test -n "$$files" || exit 0; \
718
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
719
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
720
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
722
clean-gsettings-schemas:
723
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
725
ifdef gsettings_ENUM_NAMESPACE
726
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
727
$(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 [$]@
730
_GSETTINGS_SUBST(GSETTINGS_RULES)
733
dnl _GSETTINGS_SUBST(VARIABLE)
734
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
735
AC_DEFUN([_GSETTINGS_SUBST],
738
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
742
# nls.m4 serial 5 (gettext-0.18)
743
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
745
dnl This file is free software; the Free Software Foundation
746
dnl gives unlimited permission to copy and/or distribute it,
747
dnl with or without modifications, as long as this notice is preserved.
749
dnl This file can can be used in projects which are not available under
750
dnl the GNU General Public License or the GNU Library General Public
751
dnl License but which still want to provide support for the GNU gettext
753
dnl Please note that the actual code of the GNU gettext library is covered
754
dnl by the GNU Library General Public License, and the rest of the GNU
755
dnl gettext package package is covered by the GNU General Public License.
756
dnl They are *not* in the public domain.
759
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
760
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
766
AC_MSG_CHECKING([whether NLS is requested])
767
dnl Default is enabled NLS
769
[ --disable-nls do not use Native Language Support],
770
USE_NLS=$enableval, USE_NLS=yes)
771
AC_MSG_RESULT([$USE_NLS])
775
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
776
# serial 1 (pkg-config-0.24)
778
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
780
# This program is free software; you can redistribute it and/or modify
781
# it under the terms of the GNU General Public License as published by
782
# the Free Software Foundation; either version 2 of the License, or
783
# (at your option) any later version.
785
# This program is distributed in the hope that it will be useful, but
786
# WITHOUT ANY WARRANTY; without even the implied warranty of
787
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
788
# General Public License for more details.
790
# You should have received a copy of the GNU General Public License
791
# along with this program; if not, write to the Free Software
792
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
794
# As a special exception to the GNU General Public License, if you
795
# distribute this file as part of a program that contains a
796
# configuration script generated by Autoconf, you may include it under
797
# the same distribution terms that you use for the rest of that program.
799
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
800
# ----------------------------------
801
AC_DEFUN([PKG_PROG_PKG_CONFIG],
802
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
803
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
804
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
805
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
806
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
808
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
809
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
811
if test -n "$PKG_CONFIG"; then
812
_pkg_min_version=m4_default([$1], [0.9.0])
813
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
814
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
821
])# PKG_PROG_PKG_CONFIG
823
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
825
# Check to see whether a particular set of modules exists. Similar
826
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
828
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
829
# only at the first occurence in configure.ac, so if the first place
830
# it's called might be skipped (such as if it is within an "if", you
831
# have to call PKG_CHECK_EXISTS manually
832
# --------------------------------------------------------------
833
AC_DEFUN([PKG_CHECK_EXISTS],
834
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
835
if test -n "$PKG_CONFIG" && \
836
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
837
m4_default([$2], [:])
838
m4_ifvaln([$3], [else
842
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
843
# ---------------------------------------------
844
m4_define([_PKG_CONFIG],
845
[if test -n "$$1"; then
847
elif test -n "$PKG_CONFIG"; then
848
PKG_CHECK_EXISTS([$3],
849
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
856
# _PKG_SHORT_ERRORS_SUPPORTED
857
# -----------------------------
858
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
859
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
860
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
861
_pkg_short_errors_supported=yes
863
_pkg_short_errors_supported=no
865
])# _PKG_SHORT_ERRORS_SUPPORTED
868
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
869
# [ACTION-IF-NOT-FOUND])
872
# Note that if there is a possibility the first call to
873
# PKG_CHECK_MODULES might not happen, you should be sure to include an
874
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
877
# --------------------------------------------------------------
878
AC_DEFUN([PKG_CHECK_MODULES],
879
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
880
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
881
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
884
AC_MSG_CHECKING([for $1])
886
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
887
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
889
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
890
and $1[]_LIBS to avoid the need to call pkg-config.
891
See the pkg-config man page for more details.])
893
if test $pkg_failed = yes; then
895
_PKG_SHORT_ERRORS_SUPPORTED
896
if test $_pkg_short_errors_supported = yes; then
897
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
899
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
901
# Put the nasty error message in config.log where it belongs
902
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
904
m4_default([$4], [AC_MSG_ERROR(
905
[Package requirements ($2) were not met:
909
Consider adjusting the PKG_CONFIG_PATH environment variable if you
910
installed software in a non-standard prefix.
914
elif test $pkg_failed = untried; then
916
m4_default([$4], [AC_MSG_FAILURE(
917
[The pkg-config script could not be found or is too old. Make sure it
918
is in your PATH or set the PKG_CONFIG environment variable to the full
923
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
926
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
927
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
931
])# PKG_CHECK_MODULES
933
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
24
936
# This file is free software; the Free Software Foundation
25
937
# gives unlimited permission to copy and/or distribute it,
26
938
# with or without modifications, as long as this notice is preserved.
28
942
# AM_AUTOMAKE_VERSION(VERSION)
29
943
# ----------------------------
30
944
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1068
2030
AC_SUBST([am__untar])
1069
2031
]) # _AM_PROG_TAR
1071
# nls.m4 serial 5 (gettext-0.18)
1072
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1074
dnl This file is free software; the Free Software Foundation
1075
dnl gives unlimited permission to copy and/or distribute it,
1076
dnl with or without modifications, as long as this notice is preserved.
1078
dnl This file can can be used in projects which are not available under
1079
dnl the GNU General Public License or the GNU Library General Public
1080
dnl License but which still want to provide support for the GNU gettext
1082
dnl Please note that the actual code of the GNU gettext library is covered
1083
dnl by the GNU Library General Public License, and the rest of the GNU
1084
dnl gettext package package is covered by the GNU General Public License.
1085
dnl They are *not* in the public domain.
1088
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1089
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1095
AC_MSG_CHECKING([whether NLS is requested])
1096
dnl Default is enabled NLS
1097
AC_ARG_ENABLE([nls],
1098
[ --disable-nls do not use Native Language Support],
1099
USE_NLS=$enableval, USE_NLS=yes)
1100
AC_MSG_RESULT([$USE_NLS])
1104
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1105
# serial 1 (pkg-config-0.24)
1107
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1109
# This program is free software; you can redistribute it and/or modify
1110
# it under the terms of the GNU General Public License as published by
1111
# the Free Software Foundation; either version 2 of the License, or
1112
# (at your option) any later version.
1114
# This program is distributed in the hope that it will be useful, but
1115
# WITHOUT ANY WARRANTY; without even the implied warranty of
1116
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1117
# General Public License for more details.
1119
# You should have received a copy of the GNU General Public License
1120
# along with this program; if not, write to the Free Software
1121
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1123
# As a special exception to the GNU General Public License, if you
1124
# distribute this file as part of a program that contains a
1125
# configuration script generated by Autoconf, you may include it under
1126
# the same distribution terms that you use for the rest of that program.
1128
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1129
# ----------------------------------
1130
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1131
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1132
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1133
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1134
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1135
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1137
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1138
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1140
if test -n "$PKG_CONFIG"; then
1141
_pkg_min_version=m4_default([$1], [0.9.0])
1142
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1143
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1144
AC_MSG_RESULT([yes])
1150
])# PKG_PROG_PKG_CONFIG
1152
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1154
# Check to see whether a particular set of modules exists. Similar
1155
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1157
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1158
# only at the first occurence in configure.ac, so if the first place
1159
# it's called might be skipped (such as if it is within an "if", you
1160
# have to call PKG_CHECK_EXISTS manually
1161
# --------------------------------------------------------------
1162
AC_DEFUN([PKG_CHECK_EXISTS],
1163
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1164
if test -n "$PKG_CONFIG" && \
1165
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1166
m4_default([$2], [:])
1167
m4_ifvaln([$3], [else
1171
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1172
# ---------------------------------------------
1173
m4_define([_PKG_CONFIG],
1174
[if test -n "$$1"; then
1176
elif test -n "$PKG_CONFIG"; then
1177
PKG_CHECK_EXISTS([$3],
1178
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1185
# _PKG_SHORT_ERRORS_SUPPORTED
1186
# -----------------------------
1187
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1188
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1189
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1190
_pkg_short_errors_supported=yes
1192
_pkg_short_errors_supported=no
1194
])# _PKG_SHORT_ERRORS_SUPPORTED
1197
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1198
# [ACTION-IF-NOT-FOUND])
1201
# Note that if there is a possibility the first call to
1202
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1203
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1206
# --------------------------------------------------------------
1207
AC_DEFUN([PKG_CHECK_MODULES],
1208
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1209
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1210
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1213
AC_MSG_CHECKING([for $1])
1215
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1216
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1218
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1219
and $1[]_LIBS to avoid the need to call pkg-config.
1220
See the pkg-config man page for more details.])
1222
if test $pkg_failed = yes; then
1224
_PKG_SHORT_ERRORS_SUPPORTED
1225
if test $_pkg_short_errors_supported = yes; then
1226
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1228
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1230
# Put the nasty error message in config.log where it belongs
1231
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1233
m4_default([$4], [AC_MSG_ERROR(
1234
[Package requirements ($2) were not met:
1238
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1239
installed software in a non-standard prefix.
1243
elif test $pkg_failed = untried; then
1245
m4_default([$4], [AC_MSG_FAILURE(
1246
[The pkg-config script could not be found or is too old. Make sure it
1247
is in your PATH or set the PKG_CONFIG environment variable to the full
1252
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
1255
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1256
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1257
AC_MSG_RESULT([yes])
1260
])# PKG_CHECK_MODULES
1262
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1263
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1265
# This file is free software, distributed under the terms of the GNU
1266
# General Public License. As a special exception to the GNU General
1267
# Public License, this file may be distributed as part of a program
1268
# that contains a configuration script generated by Autoconf, under
1269
# the same distribution terms as the rest of that program.
1271
# This file can be copied and used freely without restrictions. It can
1272
# be used in projects which are not available under the GNU Public License
1273
# but which still want to provide support for the GNU gettext functionality.
1275
# Macro to add for using GNU gettext.
1276
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1278
# Modified to never use included libintl.
1279
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1281
# Major rework to remove unused code
1282
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1284
# Added better handling of ALL_LINGUAS from GNU gettext version
1285
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1287
# Modified to require ngettext
1288
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1290
# We need this here as well, since someone might use autoconf-2.5x
1291
# to configure GLib then an older version to configure a package
1292
# using AM_GLIB_GNU_GETTEXT
1296
dnl We go to great lengths to make sure that aclocal won't
1297
dnl try to pull in the installed version of these macros
1298
dnl when running aclocal in the glib directory.
1300
m4_copy([AC_DEFUN],[glib_DEFUN])
1301
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1303
dnl At the end, if we're not within glib, we'll define the public
1304
dnl definitions in terms of our private definitions.
1308
#--------------------
1309
glib_DEFUN([GLIB_LC_MESSAGES],
1310
[AC_CHECK_HEADERS([locale.h])
1311
if test $ac_cv_header_locale_h = yes; then
1312
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1313
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1314
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1315
if test $am_cv_val_LC_MESSAGES = yes; then
1316
AC_DEFINE(HAVE_LC_MESSAGES, 1,
1317
[Define if your <locale.h> file defines LC_MESSAGES.])
1321
# GLIB_PATH_PROG_WITH_TEST
1322
#----------------------------
1323
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1324
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1325
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1326
[# Extract the first word of "$2", so it can be a program name with args.
1327
set dummy $2; ac_word=[$]2
1328
AC_MSG_CHECKING([for $ac_word])
1329
AC_CACHE_VAL(ac_cv_path_$1,
1332
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1335
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1336
for ac_dir in ifelse([$5], , $PATH, [$5]); do
1337
test -z "$ac_dir" && ac_dir=.
1338
if test -f $ac_dir/$ac_word; then
1340
ac_cv_path_$1="$ac_dir/$ac_word"
1346
dnl If no 4th arg is given, leave the cache variable unset,
1347
dnl so AC_PATH_PROGS will keep looking.
1348
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1353
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1354
AC_MSG_RESULT([$]$1)
1363
glib_DEFUN([GLIB_WITH_NLS],
1364
dnl NLS is obligatory
1368
gt_cv_have_gettext=no
1374
AC_CHECK_HEADER(libintl.h,
1375
[gt_cv_func_dgettext_libintl="no"
1376
libintl_extra_libs=""
1379
# First check in libc
1381
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1383
#include <libintl.h>
1385
[return !ngettext ("","", 1)],
1386
gt_cv_func_ngettext_libc=yes,
1387
gt_cv_func_ngettext_libc=no)
1390
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1391
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1393
#include <libintl.h>
1395
[return !dgettext ("","")],
1396
gt_cv_func_dgettext_libc=yes,
1397
gt_cv_func_dgettext_libc=no)
1401
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1402
AC_CHECK_FUNCS(bind_textdomain_codeset)
1406
# If we don't have everything we want, check in libintl
1408
if test "$gt_cv_func_dgettext_libc" != "yes" \
1409
|| test "$gt_cv_func_ngettext_libc" != "yes" \
1410
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1412
AC_CHECK_LIB(intl, bindtextdomain,
1413
[AC_CHECK_LIB(intl, ngettext,
1414
[AC_CHECK_LIB(intl, dgettext,
1415
gt_cv_func_dgettext_libintl=yes)])])
1417
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1418
AC_MSG_CHECKING([if -liconv is needed to use gettext])
1420
AC_CHECK_LIB(intl, ngettext,
1421
[AC_CHECK_LIB(intl, dcgettext,
1422
[gt_cv_func_dgettext_libintl=yes
1423
libintl_extra_libs=-liconv],
1429
# If we found libintl, then check in it for bind_textdomain_codeset();
1430
# we'll prefer libc if neither have bind_textdomain_codeset(),
1431
# and both have dgettext and ngettext
1433
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1434
glib_save_LIBS="$LIBS"
1435
LIBS="$LIBS -lintl $libintl_extra_libs"
1436
unset ac_cv_func_bind_textdomain_codeset
1437
AC_CHECK_FUNCS(bind_textdomain_codeset)
1438
LIBS="$glib_save_LIBS"
1440
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1441
gt_cv_func_dgettext_libc=no
1443
if test "$gt_cv_func_dgettext_libc" = "yes" \
1444
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1445
gt_cv_func_dgettext_libintl=no
1451
if test "$gt_cv_func_dgettext_libc" = "yes" \
1452
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1453
gt_cv_have_gettext=yes
1456
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1457
INTLLIBS="-lintl $libintl_extra_libs"
1460
if test "$gt_cv_have_gettext" = "yes"; then
1461
AC_DEFINE(HAVE_GETTEXT,1,
1462
[Define if the GNU gettext() function is already present or preinstalled.])
1463
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1464
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1465
if test "$MSGFMT" != "no"; then
1466
glib_save_LIBS="$LIBS"
1467
LIBS="$LIBS $INTLLIBS"
1468
AC_CHECK_FUNCS(dcgettext)
1470
AC_MSG_CHECKING([if msgfmt accepts -c])
1471
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1474
"Content-Type: text/plain; charset=UTF-8\n"
1475
"Project-Id-Version: test 1.0\n"
1476
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1477
"Last-Translator: test <foo@bar.xx>\n"
1478
"Language-Team: C <LL@li.org>\n"
1479
"MIME-Version: 1.0\n"
1480
"Content-Transfer-Encoding: 8bit\n"
1481
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1482
AC_SUBST(MSGFMT_OPTS)
1483
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1484
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1485
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1486
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1487
return _nl_msg_cat_cntr],
1492
dnl On Solaris, if bind_textdomain_codeset is in libc,
1493
dnl GNU format message catalog is always supported,
1494
dnl since both are added to the libc all together.
1495
dnl Hence, we'd like to go with DATADIRNAME=share and
1496
dnl and CATOBJEXT=.gmo in this case.
1497
AC_CHECK_FUNC(bind_textdomain_codeset,
1512
LIBS="$glib_save_LIBS"
1515
gt_cv_have_gettext=no
1520
if test "$gt_cv_have_gettext" = "yes" ; then
1521
AC_DEFINE(ENABLE_NLS, 1,
1522
[always defined to indicate that i18n is enabled])
1525
dnl Test whether we really found GNU xgettext.
1526
if test "$XGETTEXT" != ":"; then
1527
dnl If it is not GNU xgettext we define it as : so that the
1528
dnl Makefiles still can work.
1529
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1533
[found xgettext program is not GNU xgettext; ignore it])
1538
# We need to process the po/ directory.
1542
[case "$CONFIG_FILES" in *po/Makefile.in*)
1543
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1546
dnl These rules are solely for the distribution goal. While doing this
1547
dnl we only have to keep exactly one list of the available catalogs
1548
dnl in configure.ac.
1549
for lang in $ALL_LINGUAS; do
1550
GMOFILES="$GMOFILES $lang.gmo"
1551
POFILES="$POFILES $lang.po"
1554
dnl Make all variables we use known to autoconf.
1557
AC_SUBST(DATADIRNAME)
1559
AC_SUBST(INSTOBJEXT)
1561
AC_SUBST(PO_IN_DATADIR_TRUE)
1562
AC_SUBST(PO_IN_DATADIR_FALSE)
1567
# AM_GLIB_GNU_GETTEXT
1568
# -------------------
1569
# Do checks necessary for use of gettext. If a suitable implementation
1570
# of gettext is found in either in libintl or in the C library,
1571
# it will set INTLLIBS to the libraries needed for use of gettext
1572
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1573
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1574
# on various variables needed by the Makefile.in.in installed by
1577
glib_DEFUN([GLIB_GNU_GETTEXT],
1578
[AC_REQUIRE([AC_PROG_CC])dnl
1579
AC_REQUIRE([AC_HEADER_STDC])dnl
1584
if test "$gt_cv_have_gettext" = "yes"; then
1585
if test "x$ALL_LINGUAS" = "x"; then
1588
AC_MSG_CHECKING(for catalogs to be installed)
1590
for presentlang in $ALL_LINGUAS; do
1592
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1593
desiredlanguages="$LINGUAS"
1595
desiredlanguages="$ALL_LINGUAS"
1597
for desiredlang in $desiredlanguages; do
1598
# Use the presentlang catalog if desiredlang is
1599
# a. equal to presentlang, or
1600
# b. a variant of presentlang (because in this case,
1601
# presentlang can be used as a fallback for messages
1602
# which are not translated in the desiredlang catalog).
1603
case "$desiredlang" in
1604
"$presentlang"*) useit=yes;;
1607
if test $useit = yes; then
1608
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1611
LINGUAS=$NEW_LINGUAS
1612
AC_MSG_RESULT($LINGUAS)
1615
dnl Construct list of names of catalog files to be constructed.
1616
if test -n "$LINGUAS"; then
1617
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1621
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1622
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1623
dnl Try to locate is.
1625
if test -n "$ac_aux_dir"; then
1626
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1628
if test -z "$MKINSTALLDIRS"; then
1629
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1631
AC_SUBST(MKINSTALLDIRS)
1633
dnl Generate list of files to be processed by xgettext which will
1634
dnl be included in po/Makefile.
1635
test -d po || mkdir po
1636
if test "x$srcdir" != "x."; then
1637
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1638
posrcprefix="$srcdir/"
1640
posrcprefix="../$srcdir/"
1646
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1647
< $srcdir/po/POTFILES.in > po/POTFILES
1650
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1651
# -------------------------------
1652
# Define VARIABLE to the location where catalog files will
1653
# be installed by po/Makefile.
1654
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1655
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1656
glib_save_prefix="$prefix"
1657
glib_save_exec_prefix="$exec_prefix"
1658
glib_save_datarootdir="$datarootdir"
1659
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1660
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1661
datarootdir=`eval echo "${datarootdir}"`
1662
if test "x$CATOBJEXT" = "x.mo" ; then
1663
localedir=`eval echo "${libdir}/locale"`
1665
localedir=`eval echo "${datadir}/locale"`
1667
prefix="$glib_save_prefix"
1668
exec_prefix="$glib_save_exec_prefix"
1669
datarootdir="$glib_save_datarootdir"
1670
AC_DEFINE_UNQUOTED($1, "$localedir",
1671
[Define the location where the catalogs will be installed])
1675
dnl Now the definitions that aclocal will find
1677
ifdef(glib_configure_ac,[],[
1678
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1679
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1682
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1684
# Create a temporary file with TEST-FILE as its contents and pass the
1685
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1686
# 0 and perform ACTION-IF-FAIL for any other exit status.
1687
AC_DEFUN([GLIB_RUN_PROG],
1688
[cat >conftest.foo <<_ACEOF
1691
if AC_RUN_LOG([$1 conftest.foo]); then
1692
m4_ifval([$3], [$3], [:])
1693
m4_ifvaln([$4], [else $4])dnl
1694
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1695
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1704
dnl GNOME_COMMON_INIT
1706
AU_DEFUN([GNOME_COMMON_INIT],
1708
dnl this macro should come after AC_CONFIG_MACRO_DIR
1709
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1711
dnl ensure that when the Automake generated makefile calls aclocal,
1712
dnl it honours the $ACLOCAL_FLAGS environment variable
1713
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1714
if test -n "$ac_macro_dir"; then
1715
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1718
AC_SUBST([ACLOCAL_AMFLAGS])
1720
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
1721
in your top-level Makefile.am, instead, where "m4" is the macro directory set
1722
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
1724
AC_DEFUN([GNOME_DEBUG_CHECK],
1726
AC_ARG_ENABLE([debug],
1727
AC_HELP_STRING([--enable-debug],
1728
[turn on debugging]),,
1731
if test x$enable_debug = xyes ; then
1732
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1733
[Enable additional debugging at the expense of performance and size])
1737
dnl GNOME_MAINTAINER_MODE_DEFINES ()
1738
dnl define DISABLE_DEPRECATED
1740
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1742
AC_REQUIRE([AM_MAINTAINER_MODE])
1744
DISABLE_DEPRECATED=""
1745
if test $USE_MAINTAINER_MODE = yes; then
1746
DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
1747
for DOMAIN in $DOMAINS; do
1748
DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1752
AC_SUBST(DISABLE_DEPRECATED)
1755
dnl GNOME_COMPILE_WARNINGS
1756
dnl Turn on many useful compiler warnings
1757
dnl For now, only works on GCC
1758
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1759
dnl ******************************
1760
dnl More compiler warnings
1761
dnl ******************************
1763
AC_ARG_ENABLE(compile-warnings,
1764
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1765
[Turn on compiler warnings]),,
1766
[enable_compile_warnings="m4_default([$1],[yes])"])
1769
if test "x$GCC" != xyes; then
1770
enable_compile_warnings=no
1774
realsave_CFLAGS="$CFLAGS"
1776
case "$enable_compile_warnings" in
1781
warning_flags="-Wall"
1784
warning_flags="-Wall -Wmissing-prototypes"
1787
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1788
CFLAGS="$warning_flags $CFLAGS"
1789
for option in -Wno-sign-compare; do
1790
SAVE_CFLAGS="$CFLAGS"
1791
CFLAGS="$CFLAGS $option"
1792
AC_MSG_CHECKING([whether gcc understands $option])
1793
AC_TRY_COMPILE([], [],
1796
CFLAGS="$SAVE_CFLAGS"
1797
AC_MSG_RESULT($has_option)
1798
if test $has_option = yes; then
1799
warning_flags="$warning_flags $option"
1805
if test "$enable_compile_warnings" = "error" ; then
1806
warning_flags="$warning_flags -Werror"
1810
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1813
CFLAGS="$realsave_CFLAGS"
1814
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1815
AC_MSG_RESULT($warning_flags)
1817
AC_ARG_ENABLE(iso-c,
1818
AC_HELP_STRING([--enable-iso-c],
1819
[Try to warn if code is not ISO C ]),,
1822
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1824
if test "x$enable_iso_c" != "xno"; then
1825
if test "x$GCC" = "xyes"; then
1827
*[\ \ ]-ansi[\ \ ]*) ;;
1828
*) complCFLAGS="$complCFLAGS -ansi" ;;
1831
*[\ \ ]-pedantic[\ \ ]*) ;;
1832
*) complCFLAGS="$complCFLAGS -pedantic" ;;
1836
AC_MSG_RESULT($complCFLAGS)
1838
WARN_CFLAGS="$warning_flags $complCFLAGS"
1839
AC_SUBST(WARN_CFLAGS)
1842
dnl For C++, do basically the same thing.
1844
AC_DEFUN([GNOME_CXX_WARNINGS],[
1845
AC_ARG_ENABLE(cxx-warnings,
1846
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1847
[Turn on compiler warnings.]),,
1848
[enable_cxx_warnings="m4_default([$1],[minimum])"])
1850
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1852
if test "x$GXX" != xyes; then
1853
enable_cxx_warnings=no
1855
if test "x$enable_cxx_warnings" != "xno"; then
1856
if test "x$GXX" = "xyes"; then
1857
case " $CXXFLAGS " in
1858
*[\ \ ]-Wall[\ \ ]*) ;;
1859
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
1862
## -W is not all that useful. And it cannot be controlled
1863
## with individual -Wno-xxx flags, unlike -Wall
1864
if test "x$enable_cxx_warnings" = "xyes"; then
1865
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1869
AC_MSG_RESULT($warnCXXFLAGS)
1871
AC_ARG_ENABLE(iso-cxx,
1872
AC_HELP_STRING([--enable-iso-cxx],
1873
[Try to warn if code is not ISO C++ ]),,
1874
[enable_iso_cxx=no])
1876
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1878
if test "x$enable_iso_cxx" != "xno"; then
1879
if test "x$GXX" = "xyes"; then
1880
case " $CXXFLAGS " in
1881
*[\ \ ]-ansi[\ \ ]*) ;;
1882
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1885
case " $CXXFLAGS " in
1886
*[\ \ ]-pedantic[\ \ ]*) ;;
1887
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1891
AC_MSG_RESULT($complCXXFLAGS)
1893
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1894
AC_SUBST(WARN_CXXFLAGS)
1898
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1899
dnl the schema should be compiled
1902
AC_DEFUN([GLIB_GSETTINGS],
1904
m4_pattern_allow([AM_V_GEN])
1905
AC_ARG_ENABLE(schemas-compile,
1906
AS_HELP_STRING([--disable-schemas-compile],
1907
[Disable regeneration of gschemas.compiled on install]),
1908
[case ${enableval} in
1909
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1910
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1911
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1913
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1914
PKG_PROG_PKG_CONFIG([0.16])
1915
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1916
if test x$cross_compiling != xyes; then
1917
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1919
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1921
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1922
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1923
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1925
ifelse([$1],,[:],[$1])
1929
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1931
mostlyclean-am: clean-gsettings-schemas
1933
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1935
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1936
$(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 [$]@
1938
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1939
uninstall-am: uninstall-gsettings-schemas
1940
install-data-am: install-gsettings-schemas
1942
.SECONDARY: $(gsettings_SCHEMAS)
1944
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1946
if test -n "$^"; then \
1947
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1948
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1949
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1952
uninstall-gsettings-schemas:
1953
@$(NORMAL_UNINSTALL)
1954
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1955
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1956
test -n "$$files" || exit 0; \
1957
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1958
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1959
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1961
clean-gsettings-schemas:
1962
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1964
ifdef gsettings_ENUM_NAMESPACE
1965
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1966
$(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 [$]@
1969
_GSETTINGS_SUBST(GSETTINGS_RULES)
1972
dnl _GSETTINGS_SUBST(VARIABLE)
1973
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1974
AC_DEFUN([_GSETTINGS_SUBST],
1977
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1981
2033
m4_include([m4/intltool.m4])
1982
2034
m4_include([m4/libtool.m4])
1983
2035
m4_include([m4/ltoptions.m4])