11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
m4_if(m4_PACKAGE_VERSION, [2.61],,
15
[m4_fatal([this file was generated for autoconf 2.61.
16
You have another version of autoconf. If you want to use that,
17
you should regenerate the build system entirely.], [63])])
19
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
20
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
22
# This file is free software, distributed under the terms of the GNU
23
# General Public License. As a special exception to the GNU General
24
# Public License, this file may be distributed as part of a program
25
# that contains a configuration script generated by Autoconf, under
26
# the same distribution terms as the rest of that program.
28
# This file can be copied and used freely without restrictions. It can
29
# be used in projects which are not available under the GNU Public License
30
# but which still want to provide support for the GNU gettext functionality.
32
# Macro to add for using GNU gettext.
33
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
35
# Modified to never use included libintl.
36
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
38
# Major rework to remove unused code
39
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
41
# Added better handling of ALL_LINGUAS from GNU gettext version
42
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
44
# Modified to require ngettext
45
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
47
# We need this here as well, since someone might use autoconf-2.5x
48
# to configure GLib then an older version to configure a package
49
# using AM_GLIB_GNU_GETTEXT
53
dnl We go to great lengths to make sure that aclocal won't
54
dnl try to pull in the installed version of these macros
55
dnl when running aclocal in the glib directory.
57
m4_copy([AC_DEFUN],[glib_DEFUN])
58
m4_copy([AC_REQUIRE],[glib_REQUIRE])
60
dnl At the end, if we're not within glib, we'll define the public
61
dnl definitions in terms of our private definitions.
66
glib_DEFUN([GLIB_LC_MESSAGES],
67
[AC_CHECK_HEADERS([locale.h])
68
if test $ac_cv_header_locale_h = yes; then
69
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
70
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
71
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
72
if test $am_cv_val_LC_MESSAGES = yes; then
73
AC_DEFINE(HAVE_LC_MESSAGES, 1,
74
[Define if your <locale.h> file defines LC_MESSAGES.])
78
# GLIB_PATH_PROG_WITH_TEST
79
#----------------------------
80
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
81
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
82
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
83
[# Extract the first word of "$2", so it can be a program name with args.
84
set dummy $2; ac_word=[$]2
85
AC_MSG_CHECKING([for $ac_word])
86
AC_CACHE_VAL(ac_cv_path_$1,
89
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
92
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
93
for ac_dir in ifelse([$5], , $PATH, [$5]); do
94
test -z "$ac_dir" && ac_dir=.
95
if test -f $ac_dir/$ac_word; then
97
ac_cv_path_$1="$ac_dir/$ac_word"
103
dnl If no 4th arg is given, leave the cache variable unset,
104
dnl so AC_PATH_PROGS will keep looking.
105
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
120
glib_DEFUN([GLIB_WITH_NLS],
121
dnl NLS is obligatory
122
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
126
gt_cv_have_gettext=no
132
AC_CHECK_HEADER(libintl.h,
133
[gt_cv_func_dgettext_libintl="no"
134
libintl_extra_libs=""
137
# First check in libc
139
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143
[return !ngettext ("","", 1)],
144
gt_cv_func_ngettext_libc=yes,
145
gt_cv_func_ngettext_libc=no)
148
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
149
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153
[return !dgettext ("","")],
154
gt_cv_func_dgettext_libc=yes,
155
gt_cv_func_dgettext_libc=no)
159
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
160
AC_CHECK_FUNCS(bind_textdomain_codeset)
164
# If we don't have everything we want, check in libintl
166
if test "$gt_cv_func_dgettext_libc" != "yes" \
167
|| test "$gt_cv_func_ngettext_libc" != "yes" \
168
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
170
AC_CHECK_LIB(intl, bindtextdomain,
171
[AC_CHECK_LIB(intl, ngettext,
172
[AC_CHECK_LIB(intl, dgettext,
173
gt_cv_func_dgettext_libintl=yes)])])
175
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
176
AC_MSG_CHECKING([if -liconv is needed to use gettext])
178
AC_CHECK_LIB(intl, ngettext,
179
[AC_CHECK_LIB(intl, dcgettext,
180
[gt_cv_func_dgettext_libintl=yes
181
libintl_extra_libs=-liconv],
187
# If we found libintl, then check in it for bind_textdomain_codeset();
188
# we'll prefer libc if neither have bind_textdomain_codeset(),
189
# and both have dgettext and ngettext
191
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
192
glib_save_LIBS="$LIBS"
193
LIBS="$LIBS -lintl $libintl_extra_libs"
194
unset ac_cv_func_bind_textdomain_codeset
195
AC_CHECK_FUNCS(bind_textdomain_codeset)
196
LIBS="$glib_save_LIBS"
198
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
199
gt_cv_func_dgettext_libc=no
201
if test "$gt_cv_func_dgettext_libc" = "yes" \
202
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
203
gt_cv_func_dgettext_libintl=no
209
if test "$gt_cv_func_dgettext_libc" = "yes" \
210
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
211
gt_cv_have_gettext=yes
214
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
215
INTLLIBS="-lintl $libintl_extra_libs"
218
if test "$gt_cv_have_gettext" = "yes"; then
219
AC_DEFINE(HAVE_GETTEXT,1,
220
[Define if the GNU gettext() function is already present or preinstalled.])
221
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
222
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
223
if test "$MSGFMT" != "no"; then
224
glib_save_LIBS="$LIBS"
225
LIBS="$LIBS $INTLLIBS"
226
AC_CHECK_FUNCS(dcgettext)
227
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
228
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
229
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
230
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
231
return _nl_msg_cat_cntr],
236
dnl On Solaris, if bind_textdomain_codeset is in libc,
237
dnl GNU format message catalog is always supported,
238
dnl since both are added to the libc all together.
239
dnl Hence, we'd like to go with DATADIRNAME=share and
240
dnl and CATOBJEXT=.gmo in this case.
241
AC_CHECK_FUNC(bind_textdomain_codeset,
252
LIBS="$glib_save_LIBS"
255
gt_cv_have_gettext=no
260
if test "$gt_cv_have_gettext" = "yes" ; then
261
AC_DEFINE(ENABLE_NLS, 1,
262
[always defined to indicate that i18n is enabled])
265
dnl Test whether we really found GNU xgettext.
266
if test "$XGETTEXT" != ":"; then
267
dnl If it is not GNU xgettext we define it as : so that the
268
dnl Makefiles still can work.
269
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
273
[found xgettext program is not GNU xgettext; ignore it])
278
# We need to process the po/ directory.
282
[case "$CONFIG_FILES" in *po/Makefile.in*)
283
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
286
dnl These rules are solely for the distribution goal. While doing this
287
dnl we only have to keep exactly one list of the available catalogs
289
for lang in $ALL_LINGUAS; do
290
GMOFILES="$GMOFILES $lang.gmo"
291
POFILES="$POFILES $lang.po"
294
dnl Make all variables we use known to autoconf.
297
AC_SUBST(DATADIRNAME)
301
AC_SUBST(PO_IN_DATADIR_TRUE)
302
AC_SUBST(PO_IN_DATADIR_FALSE)
307
# AM_GLIB_GNU_GETTEXT
308
# -------------------
309
# Do checks necessary for use of gettext. If a suitable implementation
310
# of gettext is found in either in libintl or in the C library,
311
# it will set INTLLIBS to the libraries needed for use of gettext
312
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
313
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
314
# on various variables needed by the Makefile.in.in installed by
317
glib_DEFUN([GLIB_GNU_GETTEXT],
318
[AC_REQUIRE([AC_PROG_CC])dnl
319
AC_REQUIRE([AC_HEADER_STDC])dnl
324
if test "$gt_cv_have_gettext" = "yes"; then
325
if test "x$ALL_LINGUAS" = "x"; then
328
AC_MSG_CHECKING(for catalogs to be installed)
330
for presentlang in $ALL_LINGUAS; do
332
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
333
desiredlanguages="$LINGUAS"
335
desiredlanguages="$ALL_LINGUAS"
337
for desiredlang in $desiredlanguages; do
338
# Use the presentlang catalog if desiredlang is
339
# a. equal to presentlang, or
340
# b. a variant of presentlang (because in this case,
341
# presentlang can be used as a fallback for messages
342
# which are not translated in the desiredlang catalog).
343
case "$desiredlang" in
344
"$presentlang"*) useit=yes;;
347
if test $useit = yes; then
348
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
352
AC_MSG_RESULT($LINGUAS)
355
dnl Construct list of names of catalog files to be constructed.
356
if test -n "$LINGUAS"; then
357
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
361
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
362
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
363
dnl Try to locate is.
365
if test -n "$ac_aux_dir"; then
366
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
368
if test -z "$MKINSTALLDIRS"; then
369
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
371
AC_SUBST(MKINSTALLDIRS)
373
dnl Generate list of files to be processed by xgettext which will
374
dnl be included in po/Makefile.
375
test -d po || mkdir po
376
if test "x$srcdir" != "x."; then
377
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
378
posrcprefix="$srcdir/"
380
posrcprefix="../$srcdir/"
386
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
387
< $srcdir/po/POTFILES.in > po/POTFILES
390
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
391
# -------------------------------
392
# Define VARIABLE to the location where catalog files will
393
# be installed by po/Makefile.
394
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
395
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
396
glib_save_prefix="$prefix"
397
glib_save_exec_prefix="$exec_prefix"
398
glib_save_datarootdir="$datarootdir"
399
test "x$prefix" = xNONE && prefix=$ac_default_prefix
400
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
401
datarootdir=`eval echo "${datarootdir}"`
402
if test "x$CATOBJEXT" = "x.mo" ; then
403
localedir=`eval echo "${libdir}/locale"`
405
localedir=`eval echo "${datadir}/locale"`
407
prefix="$glib_save_prefix"
408
exec_prefix="$glib_save_exec_prefix"
409
datarootdir="$glib_save_datarootdir"
410
AC_DEFINE_UNQUOTED($1, "$localedir",
411
[Define the location where the catalogs will be installed])
415
dnl Now the definitions that aclocal will find
417
ifdef(glib_configure_in,[],[
418
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
419
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
425
dnl GNOME_COMMON_INIT
427
AC_DEFUN([GNOME_COMMON_INIT],
429
dnl this macro should come after AC_CONFIG_MACRO_DIR
430
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
432
dnl ensure that when the Automake generated makefile calls aclocal,
433
dnl it honours the $ACLOCAL_FLAGS environment variable
434
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
435
if test -n "$ac_macro_dir"; then
436
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
439
AC_SUBST([ACLOCAL_AMFLAGS])
442
AC_DEFUN([GNOME_DEBUG_CHECK],
444
AC_ARG_ENABLE([debug],
445
AC_HELP_STRING([--enable-debug],
446
[turn on debugging]),,
449
if test x$enable_debug = xyes ; then
450
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
451
[Enable additional debugging at the expense of performance and size])
455
dnl GNOME_MAINTAINER_MODE_DEFINES ()
456
dnl define DISABLE_DEPRECATED
458
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
460
AC_REQUIRE([AM_MAINTAINER_MODE])
462
if test $USE_MAINTAINER_MODE = yes; then
463
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
465
DISABLE_DEPRECATED=""
467
AC_SUBST(DISABLE_DEPRECATED)
470
dnl GNOME_COMPILE_WARNINGS
471
dnl Turn on many useful compiler warnings
472
dnl For now, only works on GCC
473
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
474
dnl ******************************
475
dnl More compiler warnings
476
dnl ******************************
478
AC_ARG_ENABLE(compile-warnings,
479
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
480
[Turn on compiler warnings]),,
481
[enable_compile_warnings="m4_default([$1],[yes])"])
484
if test "x$GCC" != xyes; then
485
enable_compile_warnings=no
489
realsave_CFLAGS="$CFLAGS"
491
case "$enable_compile_warnings" in
496
warning_flags="-Wall"
499
warning_flags="-Wall -Wmissing-prototypes"
502
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
503
CFLAGS="$warning_flags $CFLAGS"
504
for option in -Wno-sign-compare; do
505
SAVE_CFLAGS="$CFLAGS"
506
CFLAGS="$CFLAGS $option"
507
AC_MSG_CHECKING([whether gcc understands $option])
508
AC_TRY_COMPILE([], [],
511
CFLAGS="$SAVE_CFLAGS"
512
AC_MSG_RESULT($has_option)
513
if test $has_option = yes; then
514
warning_flags="$warning_flags $option"
520
if test "$enable_compile_warnings" = "error" ; then
521
warning_flags="$warning_flags -Werror"
525
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
528
CFLAGS="$realsave_CFLAGS"
529
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
530
AC_MSG_RESULT($warning_flags)
533
AC_HELP_STRING([--enable-iso-c],
534
[Try to warn if code is not ISO C ]),,
537
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
539
if test "x$enable_iso_c" != "xno"; then
540
if test "x$GCC" = "xyes"; then
542
*[\ \ ]-ansi[\ \ ]*) ;;
543
*) complCFLAGS="$complCFLAGS -ansi" ;;
546
*[\ \ ]-pedantic[\ \ ]*) ;;
547
*) complCFLAGS="$complCFLAGS -pedantic" ;;
551
AC_MSG_RESULT($complCFLAGS)
553
WARN_CFLAGS="$warning_flags $complCFLAGS"
554
AC_SUBST(WARN_CFLAGS)
557
dnl For C++, do basically the same thing.
559
AC_DEFUN([GNOME_CXX_WARNINGS],[
560
AC_ARG_ENABLE(cxx-warnings,
561
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
562
[Turn on compiler warnings.]),,
563
[enable_cxx_warnings="m4_default([$1],[minimum])"])
565
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
567
if test "x$GCC" != xyes; then
568
enable_compile_warnings=no
570
if test "x$enable_cxx_warnings" != "xno"; then
571
if test "x$GCC" = "xyes"; then
572
case " $CXXFLAGS " in
573
*[\ \ ]-Wall[\ \ ]*) ;;
574
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
577
## -W is not all that useful. And it cannot be controlled
578
## with individual -Wno-xxx flags, unlike -Wall
579
if test "x$enable_cxx_warnings" = "xyes"; then
580
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
584
AC_MSG_RESULT($warnCXXFLAGS)
586
AC_ARG_ENABLE(iso-cxx,
587
AC_HELP_STRING([--enable-iso-cxx],
588
[Try to warn if code is not ISO C++ ]),,
591
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
593
if test "x$enable_iso_cxx" != "xno"; then
594
if test "x$GCC" = "xyes"; then
595
case " $CXXFLAGS " in
596
*[\ \ ]-ansi[\ \ ]*) ;;
597
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
600
case " $CXXFLAGS " in
601
*[\ \ ]-pedantic[\ \ ]*) ;;
602
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
606
AC_MSG_RESULT($complCXXFLAGS)
608
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
609
AC_SUBST(WARN_CXXFLAGS)
14
612
dnl -*- mode: autoconf -*-
65
663
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
667
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
668
# serial 35 IT_PROG_INTLTOOL
669
AC_DEFUN([IT_PROG_INTLTOOL],
670
[AC_PREREQ([2.50])dnl
672
case "$am__api_version" in
674
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
680
if test -n "$1"; then
681
AC_MSG_CHECKING(for intltool >= $1)
683
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
684
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
685
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
687
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
688
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
689
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
692
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
693
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
694
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
695
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
696
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
697
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
698
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
699
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
700
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
701
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
702
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
703
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
704
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
705
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
706
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
707
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
708
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
709
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
711
AC_SUBST(INTLTOOL_DESKTOP_RULE)
712
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
713
AC_SUBST(INTLTOOL_KEYS_RULE)
714
AC_SUBST(INTLTOOL_PROP_RULE)
715
AC_SUBST(INTLTOOL_OAF_RULE)
716
AC_SUBST(INTLTOOL_PONG_RULE)
717
AC_SUBST(INTLTOOL_SERVER_RULE)
718
AC_SUBST(INTLTOOL_SHEET_RULE)
719
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
720
AC_SUBST(INTLTOOL_UI_RULE)
721
AC_SUBST(INTLTOOL_XAM_RULE)
722
AC_SUBST(INTLTOOL_KBD_RULE)
723
AC_SUBST(INTLTOOL_XML_RULE)
724
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
725
AC_SUBST(INTLTOOL_CAVES_RULE)
726
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
727
AC_SUBST(INTLTOOL_THEME_RULE)
728
AC_SUBST(INTLTOOL_SERVICE_RULE)
730
# Use the tools built into the package, not the ones that are installed.
731
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
732
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
733
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
735
AC_PATH_PROG(INTLTOOL_PERL, perl)
736
if test -z "$INTLTOOL_PERL"; then
737
AC_MSG_ERROR([perl not found; required for intltool])
739
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
740
AC_MSG_ERROR([perl 5.x required for intltool])
742
if test "x$2" != "xno-xml"; then
743
AC_MSG_CHECKING([for XML::Parser])
744
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
747
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
751
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
752
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
753
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
754
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
756
# Substitute ALL_LINGUAS so we can use it in po/Makefile
757
AC_SUBST(ALL_LINGUAS)
761
dnl The following is very similar to
763
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
765
dnl with the following slight differences:
766
dnl - the *.in files are in ac_aux_dir,
767
dnl - if the file haven't changed upon reconfigure, it's not touched,
768
dnl - the evaluation of the third parameter enables a hack which computes
769
dnl the actual value of $libdir,
770
dnl - the user sees "executing intltool commands", instead of
771
dnl "creating intltool-extract" and such.
773
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
776
AC_CONFIG_COMMANDS([intltool], [
778
for file in intltool-extract intltool-merge intltool-update; do
779
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
780
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
781
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
782
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
783
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
784
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
785
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
786
< ${ac_aux_dir}/${file}.in > ${file}.out
787
if cmp -s ${file} ${file}.out 2>/dev/null; then
790
mv -f ${file}.out ${file}
797
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
798
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
799
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
800
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
801
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
806
# IT_PO_SUBDIR(DIRNAME)
807
# ---------------------
808
# All po subdirs have to be declared with this macro; the subdir "po" is
809
# declared by IT_PROG_INTLTOOL.
811
AC_DEFUN([IT_PO_SUBDIR],
812
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
814
dnl The following CONFIG_COMMANDS should be exetuted at the very end
815
dnl of config.status.
816
AC_CONFIG_COMMANDS_PRE([
817
AC_CONFIG_COMMANDS([$1/stamp-it], [
818
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
823
'"s|^| $ac_top_srcdir/|" \
824
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
826
if test ! -f "$1/Makefile"; then
827
AC_MSG_ERROR([$1/Makefile is not ready.])
829
mv "$1/Makefile" "$1/Makefile.tmp"
830
[sed '/^POTFILES =/,/[^\\]$/ {
834
' "$1/Makefile.tmp" >"$1/Makefile"]
835
rm -f "$1/Makefile.tmp"
836
mv "$1/stamp-it.tmp" "$1/stamp-it"
843
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
844
# A hint is needed for aclocal from Automake <= 1.9.4:
845
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
68
848
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
70
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
850
# serial 48 AC_PROG_LIBTOOL
73
853
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
7457
8275
AC_SUBST([am__untar])
7458
8276
]) # _AM_PROG_TAR
7460
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7461
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7463
# This file is free software, distributed under the terms of the GNU
7464
# General Public License. As a special exception to the GNU General
7465
# Public License, this file may be distributed as part of a program
7466
# that contains a configuration script generated by Autoconf, under
7467
# the same distribution terms as the rest of that program.
7469
# This file can be copied and used freely without restrictions. It can
7470
# be used in projects which are not available under the GNU Public License
7471
# but which still want to provide support for the GNU gettext functionality.
7473
# Macro to add for using GNU gettext.
7474
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7476
# Modified to never use included libintl.
7477
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7479
# Major rework to remove unused code
7480
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7482
# Added better handling of ALL_LINGUAS from GNU gettext version
7483
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7485
# Modified to require ngettext
7486
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7488
# We need this here as well, since someone might use autoconf-2.5x
7489
# to configure GLib then an older version to configure a package
7490
# using AM_GLIB_GNU_GETTEXT
7494
dnl We go to great lengths to make sure that aclocal won't
7495
dnl try to pull in the installed version of these macros
7496
dnl when running aclocal in the glib directory.
7498
m4_copy([AC_DEFUN],[glib_DEFUN])
7499
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7501
dnl At the end, if we're not within glib, we'll define the public
7502
dnl definitions in terms of our private definitions.
7506
#--------------------
7507
glib_DEFUN([GLIB_LC_MESSAGES],
7508
[AC_CHECK_HEADERS([locale.h])
7509
if test $ac_cv_header_locale_h = yes; then
7510
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7511
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7512
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7513
if test $am_cv_val_LC_MESSAGES = yes; then
7514
AC_DEFINE(HAVE_LC_MESSAGES, 1,
7515
[Define if your <locale.h> file defines LC_MESSAGES.])
7519
# GLIB_PATH_PROG_WITH_TEST
7520
#----------------------------
7521
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7522
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7523
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7524
[# Extract the first word of "$2", so it can be a program name with args.
7525
set dummy $2; ac_word=[$]2
7526
AC_MSG_CHECKING([for $ac_word])
7527
AC_CACHE_VAL(ac_cv_path_$1,
7530
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7533
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7534
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7535
test -z "$ac_dir" && ac_dir=.
7536
if test -f $ac_dir/$ac_word; then
7538
ac_cv_path_$1="$ac_dir/$ac_word"
7544
dnl If no 4th arg is given, leave the cache variable unset,
7545
dnl so AC_PATH_PROGS will keep looking.
7546
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7551
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7552
AC_MSG_RESULT([$]$1)
7561
glib_DEFUN([GLIB_WITH_NLS],
7562
dnl NLS is obligatory
7563
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7567
gt_cv_have_gettext=no
7573
AC_CHECK_HEADER(libintl.h,
7574
[gt_cv_func_dgettext_libintl="no"
7575
libintl_extra_libs=""
7578
# First check in libc
7580
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7582
#include <libintl.h>
7584
[return !ngettext ("","", 1)],
7585
gt_cv_func_ngettext_libc=yes,
7586
gt_cv_func_ngettext_libc=no)
7589
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7590
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7592
#include <libintl.h>
7594
[return !dgettext ("","")],
7595
gt_cv_func_dgettext_libc=yes,
7596
gt_cv_func_dgettext_libc=no)
7600
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7601
AC_CHECK_FUNCS(bind_textdomain_codeset)
7605
# If we don't have everything we want, check in libintl
7607
if test "$gt_cv_func_dgettext_libc" != "yes" \
7608
|| test "$gt_cv_func_ngettext_libc" != "yes" \
7609
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7611
AC_CHECK_LIB(intl, bindtextdomain,
7612
[AC_CHECK_LIB(intl, ngettext,
7613
[AC_CHECK_LIB(intl, dgettext,
7614
gt_cv_func_dgettext_libintl=yes)])])
7616
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7617
AC_MSG_CHECKING([if -liconv is needed to use gettext])
7619
AC_CHECK_LIB(intl, ngettext,
7620
[AC_CHECK_LIB(intl, dcgettext,
7621
[gt_cv_func_dgettext_libintl=yes
7622
libintl_extra_libs=-liconv],
7628
# If we found libintl, then check in it for bind_textdomain_codeset();
7629
# we'll prefer libc if neither have bind_textdomain_codeset(),
7630
# and both have dgettext and ngettext
7632
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7633
glib_save_LIBS="$LIBS"
7634
LIBS="$LIBS -lintl $libintl_extra_libs"
7635
unset ac_cv_func_bind_textdomain_codeset
7636
AC_CHECK_FUNCS(bind_textdomain_codeset)
7637
LIBS="$glib_save_LIBS"
7639
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7640
gt_cv_func_dgettext_libc=no
7642
if test "$gt_cv_func_dgettext_libc" = "yes" \
7643
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7644
gt_cv_func_dgettext_libintl=no
7650
if test "$gt_cv_func_dgettext_libc" = "yes" \
7651
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7652
gt_cv_have_gettext=yes
7655
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7656
INTLLIBS="-lintl $libintl_extra_libs"
7659
if test "$gt_cv_have_gettext" = "yes"; then
7660
AC_DEFINE(HAVE_GETTEXT,1,
7661
[Define if the GNU gettext() function is already present or preinstalled.])
7662
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7663
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7664
if test "$MSGFMT" != "no"; then
7665
glib_save_LIBS="$LIBS"
7666
LIBS="$LIBS $INTLLIBS"
7667
AC_CHECK_FUNCS(dcgettext)
7668
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7669
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7670
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7671
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7672
return _nl_msg_cat_cntr],
7677
dnl On Solaris, if bind_textdomain_codeset is in libc,
7678
dnl GNU format message catalog is always supported,
7679
dnl since both are added to the libc all together.
7680
dnl Hence, we'd like to go with DATADIRNAME=share and
7681
dnl and CATOBJEXT=.gmo in this case.
7682
AC_CHECK_FUNC(bind_textdomain_codeset,
7693
LIBS="$glib_save_LIBS"
7696
gt_cv_have_gettext=no
7701
if test "$gt_cv_have_gettext" = "yes" ; then
7702
AC_DEFINE(ENABLE_NLS, 1,
7703
[always defined to indicate that i18n is enabled])
7706
dnl Test whether we really found GNU xgettext.
7707
if test "$XGETTEXT" != ":"; then
7708
dnl If it is not GNU xgettext we define it as : so that the
7709
dnl Makefiles still can work.
7710
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7714
[found xgettext program is not GNU xgettext; ignore it])
7719
# We need to process the po/ directory.
7723
[case "$CONFIG_FILES" in *po/Makefile.in*)
7724
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7727
dnl These rules are solely for the distribution goal. While doing this
7728
dnl we only have to keep exactly one list of the available catalogs
7729
dnl in configure.in.
7730
for lang in $ALL_LINGUAS; do
7731
GMOFILES="$GMOFILES $lang.gmo"
7732
POFILES="$POFILES $lang.po"
7735
dnl Make all variables we use known to autoconf.
7738
AC_SUBST(DATADIRNAME)
7740
AC_SUBST(INSTOBJEXT)
7742
AC_SUBST(PO_IN_DATADIR_TRUE)
7743
AC_SUBST(PO_IN_DATADIR_FALSE)
7748
# AM_GLIB_GNU_GETTEXT
7749
# -------------------
7750
# Do checks necessary for use of gettext. If a suitable implementation
7751
# of gettext is found in either in libintl or in the C library,
7752
# it will set INTLLIBS to the libraries needed for use of gettext
7753
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7754
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7755
# on various variables needed by the Makefile.in.in installed by
7758
glib_DEFUN([GLIB_GNU_GETTEXT],
7759
[AC_REQUIRE([AC_PROG_CC])dnl
7760
AC_REQUIRE([AC_HEADER_STDC])dnl
7765
if test "$gt_cv_have_gettext" = "yes"; then
7766
if test "x$ALL_LINGUAS" = "x"; then
7769
AC_MSG_CHECKING(for catalogs to be installed)
7771
for presentlang in $ALL_LINGUAS; do
7773
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7774
desiredlanguages="$LINGUAS"
7776
desiredlanguages="$ALL_LINGUAS"
7778
for desiredlang in $desiredlanguages; do
7779
# Use the presentlang catalog if desiredlang is
7780
# a. equal to presentlang, or
7781
# b. a variant of presentlang (because in this case,
7782
# presentlang can be used as a fallback for messages
7783
# which are not translated in the desiredlang catalog).
7784
case "$desiredlang" in
7785
"$presentlang"*) useit=yes;;
7788
if test $useit = yes; then
7789
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7792
LINGUAS=$NEW_LINGUAS
7793
AC_MSG_RESULT($LINGUAS)
7796
dnl Construct list of names of catalog files to be constructed.
7797
if test -n "$LINGUAS"; then
7798
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7802
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7803
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7804
dnl Try to locate is.
7806
if test -n "$ac_aux_dir"; then
7807
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7809
if test -z "$MKINSTALLDIRS"; then
7810
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7812
AC_SUBST(MKINSTALLDIRS)
7814
dnl Generate list of files to be processed by xgettext which will
7815
dnl be included in po/Makefile.
7816
test -d po || mkdir po
7817
if test "x$srcdir" != "x."; then
7818
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7819
posrcprefix="$srcdir/"
7821
posrcprefix="../$srcdir/"
7827
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7828
< $srcdir/po/POTFILES.in > po/POTFILES
7831
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7832
# -------------------------------
7833
# Define VARIABLE to the location where catalog files will
7834
# be installed by po/Makefile.
7835
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
7836
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7837
glib_save_prefix="$prefix"
7838
glib_save_exec_prefix="$exec_prefix"
7839
glib_save_datarootdir="$datarootdir"
7840
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7841
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7842
datarootdir=`eval echo "${datarootdir}"`
7843
if test "x$CATOBJEXT" = "x.mo" ; then
7844
localedir=`eval echo "${libdir}/locale"`
7846
localedir=`eval echo "${datadir}/locale"`
7848
prefix="$glib_save_prefix"
7849
exec_prefix="$glib_save_exec_prefix"
7850
datarootdir="$glib_save_datarootdir"
7851
AC_DEFINE_UNQUOTED($1, "$localedir",
7852
[Define the location where the catalogs will be installed])
7856
dnl Now the definitions that aclocal will find
7858
ifdef(glib_configure_in,[],[
7859
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7860
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7866
dnl GNOME_COMMON_INIT
7868
AC_DEFUN([GNOME_COMMON_INIT],
7870
dnl this macro should come after AC_CONFIG_MACRO_DIR
7871
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
7873
dnl ensure that when the Automake generated makefile calls aclocal,
7874
dnl it honours the $ACLOCAL_FLAGS environment variable
7875
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
7876
if test -n "$ac_macro_dir"; then
7877
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
7880
AC_SUBST([ACLOCAL_AMFLAGS])
7883
AC_DEFUN([GNOME_DEBUG_CHECK],
7885
AC_ARG_ENABLE([debug],
7886
AC_HELP_STRING([--enable-debug],
7887
[turn on debugging]),,
7890
if test x$enable_debug = xyes ; then
7891
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
7892
[Enable additional debugging at the expense of performance and size])
7896
dnl GNOME_MAINTAINER_MODE_DEFINES ()
7897
dnl define DISABLE_DEPRECATED
7899
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
7901
AC_REQUIRE([AM_MAINTAINER_MODE])
7903
if test $USE_MAINTAINER_MODE = yes; then
7904
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
7906
DISABLE_DEPRECATED=""
7908
AC_SUBST(DISABLE_DEPRECATED)
7911
dnl GNOME_COMPILE_WARNINGS
7912
dnl Turn on many useful compiler warnings
7913
dnl For now, only works on GCC
7914
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
7915
dnl ******************************
7916
dnl More compiler warnings
7917
dnl ******************************
7919
AC_ARG_ENABLE(compile-warnings,
7920
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
7921
[Turn on compiler warnings]),,
7922
[enable_compile_warnings="m4_default([$1],[yes])"])
7925
if test "x$GCC" != xyes; then
7926
enable_compile_warnings=no
7930
realsave_CFLAGS="$CFLAGS"
7932
case "$enable_compile_warnings" in
7937
warning_flags="-Wall"
7940
warning_flags="-Wall -Wmissing-prototypes"
7943
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
7944
CFLAGS="$warning_flags $CFLAGS"
7945
for option in -Wno-sign-compare; do
7946
SAVE_CFLAGS="$CFLAGS"
7947
CFLAGS="$CFLAGS $option"
7948
AC_MSG_CHECKING([whether gcc understands $option])
7949
AC_TRY_COMPILE([], [],
7952
CFLAGS="$SAVE_CFLAGS"
7953
AC_MSG_RESULT($has_option)
7954
if test $has_option = yes; then
7955
warning_flags="$warning_flags $option"
7961
if test "$enable_compile_warnings" = "error" ; then
7962
warning_flags="$warning_flags -Werror"
7966
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
7969
CFLAGS="$realsave_CFLAGS"
7970
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
7971
AC_MSG_RESULT($warning_flags)
7973
AC_ARG_ENABLE(iso-c,
7974
AC_HELP_STRING([--enable-iso-c],
7975
[Try to warn if code is not ISO C ]),,
7978
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
7980
if test "x$enable_iso_c" != "xno"; then
7981
if test "x$GCC" = "xyes"; then
7983
*[\ \ ]-ansi[\ \ ]*) ;;
7984
*) complCFLAGS="$complCFLAGS -ansi" ;;
7987
*[\ \ ]-pedantic[\ \ ]*) ;;
7988
*) complCFLAGS="$complCFLAGS -pedantic" ;;
7992
AC_MSG_RESULT($complCFLAGS)
7994
WARN_CFLAGS="$warning_flags $complCFLAGS"
7995
AC_SUBST(WARN_CFLAGS)
7998
dnl For C++, do basically the same thing.
8000
AC_DEFUN([GNOME_CXX_WARNINGS],[
8001
AC_ARG_ENABLE(cxx-warnings,
8002
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8003
[Turn on compiler warnings.]),,
8004
[enable_cxx_warnings="m4_default([$1],[minimum])"])
8006
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8008
if test "x$GXX" != xyes; then
8009
enable_cxx_warnings=no
8011
if test "x$enable_cxx_warnings" != "xno"; then
8012
if test "x$GXX" = "xyes"; then
8013
case " $CXXFLAGS " in
8014
*[\ \ ]-Wall[\ \ ]*) ;;
8015
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
8018
## -W is not all that useful. And it cannot be controlled
8019
## with individual -Wno-xxx flags, unlike -Wall
8020
if test "x$enable_cxx_warnings" = "xyes"; then
8021
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8025
AC_MSG_RESULT($warnCXXFLAGS)
8027
AC_ARG_ENABLE(iso-cxx,
8028
AC_HELP_STRING([--enable-iso-cxx],
8029
[Try to warn if code is not ISO C++ ]),,
8030
[enable_iso_cxx=no])
8032
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8034
if test "x$enable_iso_cxx" != "xno"; then
8035
if test "x$GXX" = "xyes"; then
8036
case " $CXXFLAGS " in
8037
*[\ \ ]-ansi[\ \ ]*) ;;
8038
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8041
case " $CXXFLAGS " in
8042
*[\ \ ]-pedantic[\ \ ]*) ;;
8043
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8047
AC_MSG_RESULT($complCXXFLAGS)
8049
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8050
AC_SUBST(WARN_CXXFLAGS)
8054
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8055
# serial 35 IT_PROG_INTLTOOL
8056
AC_DEFUN([IT_PROG_INTLTOOL],
8057
[AC_PREREQ([2.50])dnl
8059
case "$am__api_version" in
8061
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8067
if test -n "$1"; then
8068
AC_MSG_CHECKING(for intltool >= $1)
8070
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8071
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
8072
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
8074
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8075
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8076
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
8079
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8080
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8081
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8082
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8083
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8084
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8085
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8086
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8087
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8088
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8089
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8090
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
8091
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8092
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8093
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8094
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8095
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8096
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8098
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8099
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8100
AC_SUBST(INTLTOOL_KEYS_RULE)
8101
AC_SUBST(INTLTOOL_PROP_RULE)
8102
AC_SUBST(INTLTOOL_OAF_RULE)
8103
AC_SUBST(INTLTOOL_PONG_RULE)
8104
AC_SUBST(INTLTOOL_SERVER_RULE)
8105
AC_SUBST(INTLTOOL_SHEET_RULE)
8106
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8107
AC_SUBST(INTLTOOL_UI_RULE)
8108
AC_SUBST(INTLTOOL_XAM_RULE)
8109
AC_SUBST(INTLTOOL_KBD_RULE)
8110
AC_SUBST(INTLTOOL_XML_RULE)
8111
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8112
AC_SUBST(INTLTOOL_CAVES_RULE)
8113
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8114
AC_SUBST(INTLTOOL_THEME_RULE)
8115
AC_SUBST(INTLTOOL_SERVICE_RULE)
8117
# Use the tools built into the package, not the ones that are installed.
8118
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
8119
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
8120
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
8122
AC_PATH_PROG(INTLTOOL_PERL, perl)
8123
if test -z "$INTLTOOL_PERL"; then
8124
AC_MSG_ERROR([perl not found; required for intltool])
8126
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8127
AC_MSG_ERROR([perl 5.x required for intltool])
8129
if test "x$2" != "xno-xml"; then
8130
AC_MSG_CHECKING([for XML::Parser])
8131
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8134
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8138
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
8139
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
8140
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
8141
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
8143
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8144
AC_SUBST(ALL_LINGUAS)
8148
dnl The following is very similar to
8150
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
8152
dnl with the following slight differences:
8153
dnl - the *.in files are in ac_aux_dir,
8154
dnl - if the file haven't changed upon reconfigure, it's not touched,
8155
dnl - the evaluation of the third parameter enables a hack which computes
8156
dnl the actual value of $libdir,
8157
dnl - the user sees "executing intltool commands", instead of
8158
dnl "creating intltool-extract" and such.
8160
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
8161
dnl a reason for it.
8163
AC_CONFIG_COMMANDS([intltool], [
8165
for file in intltool-extract intltool-merge intltool-update; do
8166
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
8167
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
8168
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
8169
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
8170
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
8171
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
8172
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
8173
< ${ac_aux_dir}/${file}.in > ${file}.out
8174
if cmp -s ${file} ${file}.out 2>/dev/null; then
8177
mv -f ${file}.out ${file}
8184
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
8185
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
8186
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
8187
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
8188
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
8193
# IT_PO_SUBDIR(DIRNAME)
8194
# ---------------------
8195
# All po subdirs have to be declared with this macro; the subdir "po" is
8196
# declared by IT_PROG_INTLTOOL.
8198
AC_DEFUN([IT_PO_SUBDIR],
8199
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8201
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8202
dnl of config.status.
8203
AC_CONFIG_COMMANDS_PRE([
8204
AC_CONFIG_COMMANDS([$1/stamp-it], [
8205
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8210
'"s|^| $ac_top_srcdir/|" \
8211
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8213
if test ! -f "$1/Makefile"; then
8214
AC_MSG_ERROR([$1/Makefile is not ready.])
8216
mv "$1/Makefile" "$1/Makefile.tmp"
8217
[sed '/^POTFILES =/,/[^\\]$/ {
8221
' "$1/Makefile.tmp" >"$1/Makefile"]
8222
rm -f "$1/Makefile.tmp"
8223
mv "$1/stamp-it.tmp" "$1/stamp-it"
8230
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8231
# A hint is needed for aclocal from Automake <= 1.9.4:
8232
# AC_DEFUN([AC_PROG_INTLTOOL], ...)