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])])
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
m4_if(AC_AUTOCONF_VERSION, [2.61],,
17
[m4_warning([this file was generated for autoconf 2.61.
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
If you have problems, you may need to regenerate the build system entirely.
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
# This file is free software, distributed under the terms of the GNU
26
# General Public License. As a special exception to the GNU General
27
# Public License, this file may be distributed as part of a program
28
# that contains a configuration script generated by Autoconf, under
29
# the same distribution terms as the rest of that program.
31
# This file can be copied and used freely without restrictions. It can
32
# be used in projects which are not available under the GNU Public License
33
# but which still want to provide support for the GNU gettext functionality.
35
# Macro to add for using GNU gettext.
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
# Modified to never use included libintl.
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
# Major rework to remove unused code
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
# Added better handling of ALL_LINGUAS from GNU gettext version
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
# Modified to require ngettext
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
# We need this here as well, since someone might use autoconf-2.5x
51
# to configure GLib then an older version to configure a package
52
# using AM_GLIB_GNU_GETTEXT
56
dnl We go to great lengths to make sure that aclocal won't
57
dnl try to pull in the installed version of these macros
58
dnl when running aclocal in the glib directory.
60
m4_copy([AC_DEFUN],[glib_DEFUN])
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
dnl At the end, if we're not within glib, we'll define the public
64
dnl definitions in terms of our private definitions.
69
glib_DEFUN([GLIB_LC_MESSAGES],
70
[AC_CHECK_HEADERS([locale.h])
71
if test $ac_cv_header_locale_h = yes; then
72
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75
if test $am_cv_val_LC_MESSAGES = yes; then
76
AC_DEFINE(HAVE_LC_MESSAGES, 1,
77
[Define if your <locale.h> file defines LC_MESSAGES.])
81
# GLIB_PATH_PROG_WITH_TEST
82
#----------------------------
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86
[# Extract the first word of "$2", so it can be a program name with args.
87
set dummy $2; ac_word=[$]2
88
AC_MSG_CHECKING([for $ac_word])
89
AC_CACHE_VAL(ac_cv_path_$1,
92
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
95
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96
for ac_dir in ifelse([$5], , $PATH, [$5]); do
97
test -z "$ac_dir" && ac_dir=.
98
if test -f $ac_dir/$ac_word; then
100
ac_cv_path_$1="$ac_dir/$ac_word"
106
dnl If no 4th arg is given, leave the cache variable unset,
107
dnl so AC_PATH_PROGS will keep looking.
108
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
123
glib_DEFUN([GLIB_WITH_NLS],
124
dnl NLS is obligatory
128
gt_cv_have_gettext=no
134
AC_CHECK_HEADER(libintl.h,
135
[gt_cv_func_dgettext_libintl="no"
136
libintl_extra_libs=""
139
# First check in libc
141
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
145
[return !ngettext ("","", 1)],
146
gt_cv_func_ngettext_libc=yes,
147
gt_cv_func_ngettext_libc=no)
150
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
155
[return !dgettext ("","")],
156
gt_cv_func_dgettext_libc=yes,
157
gt_cv_func_dgettext_libc=no)
161
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
AC_CHECK_FUNCS(bind_textdomain_codeset)
166
# If we don't have everything we want, check in libintl
168
if test "$gt_cv_func_dgettext_libc" != "yes" \
169
|| test "$gt_cv_func_ngettext_libc" != "yes" \
170
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
AC_CHECK_LIB(intl, bindtextdomain,
173
[AC_CHECK_LIB(intl, ngettext,
174
[AC_CHECK_LIB(intl, dgettext,
175
gt_cv_func_dgettext_libintl=yes)])])
177
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
AC_CHECK_LIB(intl, ngettext,
181
[AC_CHECK_LIB(intl, dcgettext,
182
[gt_cv_func_dgettext_libintl=yes
183
libintl_extra_libs=-liconv],
189
# If we found libintl, then check in it for bind_textdomain_codeset();
190
# we'll prefer libc if neither have bind_textdomain_codeset(),
191
# and both have dgettext and ngettext
193
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194
glib_save_LIBS="$LIBS"
195
LIBS="$LIBS -lintl $libintl_extra_libs"
196
unset ac_cv_func_bind_textdomain_codeset
197
AC_CHECK_FUNCS(bind_textdomain_codeset)
198
LIBS="$glib_save_LIBS"
200
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
gt_cv_func_dgettext_libc=no
203
if test "$gt_cv_func_dgettext_libc" = "yes" \
204
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
205
gt_cv_func_dgettext_libintl=no
211
if test "$gt_cv_func_dgettext_libc" = "yes" \
212
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
gt_cv_have_gettext=yes
216
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
INTLLIBS="-lintl $libintl_extra_libs"
220
if test "$gt_cv_have_gettext" = "yes"; then
221
AC_DEFINE(HAVE_GETTEXT,1,
222
[Define if the GNU gettext() function is already present or preinstalled.])
223
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225
if test "$MSGFMT" != "no"; then
226
glib_save_LIBS="$LIBS"
227
LIBS="$LIBS $INTLLIBS"
228
AC_CHECK_FUNCS(dcgettext)
230
AC_MSG_CHECKING([if msgfmt accepts -c])
231
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
234
"Content-Type: text/plain; charset=UTF-8\n"
235
"Project-Id-Version: test 1.0\n"
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
237
"Last-Translator: test <foo@bar.xx>\n"
238
"Language-Team: C <LL@li.org>\n"
239
"MIME-Version: 1.0\n"
240
"Content-Transfer-Encoding: 8bit\n"
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242
AC_SUBST(MSGFMT_OPTS)
243
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247
return _nl_msg_cat_cntr],
252
dnl On Solaris, if bind_textdomain_codeset is in libc,
253
dnl GNU format message catalog is always supported,
254
dnl since both are added to the libc all together.
255
dnl Hence, we'd like to go with DATADIRNAME=share and
256
dnl and CATOBJEXT=.gmo in this case.
257
AC_CHECK_FUNC(bind_textdomain_codeset,
268
LIBS="$glib_save_LIBS"
271
gt_cv_have_gettext=no
276
if test "$gt_cv_have_gettext" = "yes" ; then
277
AC_DEFINE(ENABLE_NLS, 1,
278
[always defined to indicate that i18n is enabled])
281
dnl Test whether we really found GNU xgettext.
282
if test "$XGETTEXT" != ":"; then
283
dnl If it is not GNU xgettext we define it as : so that the
284
dnl Makefiles still can work.
285
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
289
[found xgettext program is not GNU xgettext; ignore it])
294
# We need to process the po/ directory.
298
[case "$CONFIG_FILES" in *po/Makefile.in*)
299
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
302
dnl These rules are solely for the distribution goal. While doing this
303
dnl we only have to keep exactly one list of the available catalogs
305
for lang in $ALL_LINGUAS; do
306
GMOFILES="$GMOFILES $lang.gmo"
307
POFILES="$POFILES $lang.po"
310
dnl Make all variables we use known to autoconf.
313
AC_SUBST(DATADIRNAME)
317
AC_SUBST(PO_IN_DATADIR_TRUE)
318
AC_SUBST(PO_IN_DATADIR_FALSE)
323
# AM_GLIB_GNU_GETTEXT
324
# -------------------
325
# Do checks necessary for use of gettext. If a suitable implementation
326
# of gettext is found in either in libintl or in the C library,
327
# it will set INTLLIBS to the libraries needed for use of gettext
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330
# on various variables needed by the Makefile.in.in installed by
333
glib_DEFUN([GLIB_GNU_GETTEXT],
334
[AC_REQUIRE([AC_PROG_CC])dnl
335
AC_REQUIRE([AC_HEADER_STDC])dnl
340
if test "$gt_cv_have_gettext" = "yes"; then
341
if test "x$ALL_LINGUAS" = "x"; then
344
AC_MSG_CHECKING(for catalogs to be installed)
346
for presentlang in $ALL_LINGUAS; do
348
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
desiredlanguages="$LINGUAS"
351
desiredlanguages="$ALL_LINGUAS"
353
for desiredlang in $desiredlanguages; do
354
# Use the presentlang catalog if desiredlang is
355
# a. equal to presentlang, or
356
# b. a variant of presentlang (because in this case,
357
# presentlang can be used as a fallback for messages
358
# which are not translated in the desiredlang catalog).
359
case "$desiredlang" in
360
"$presentlang"*) useit=yes;;
363
if test $useit = yes; then
364
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
368
AC_MSG_RESULT($LINGUAS)
371
dnl Construct list of names of catalog files to be constructed.
372
if test -n "$LINGUAS"; then
373
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
377
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379
dnl Try to locate is.
381
if test -n "$ac_aux_dir"; then
382
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
384
if test -z "$MKINSTALLDIRS"; then
385
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
387
AC_SUBST(MKINSTALLDIRS)
389
dnl Generate list of files to be processed by xgettext which will
390
dnl be included in po/Makefile.
391
test -d po || mkdir po
392
if test "x$srcdir" != "x."; then
393
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394
posrcprefix="$srcdir/"
396
posrcprefix="../$srcdir/"
402
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
< $srcdir/po/POTFILES.in > po/POTFILES
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407
# -------------------------------
408
# Define VARIABLE to the location where catalog files will
409
# be installed by po/Makefile.
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412
glib_save_prefix="$prefix"
413
glib_save_exec_prefix="$exec_prefix"
414
glib_save_datarootdir="$datarootdir"
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417
datarootdir=`eval echo "${datarootdir}"`
418
if test "x$CATOBJEXT" = "x.mo" ; then
419
localedir=`eval echo "${libdir}/locale"`
421
localedir=`eval echo "${datadir}/locale"`
423
prefix="$glib_save_prefix"
424
exec_prefix="$glib_save_exec_prefix"
425
datarootdir="$glib_save_datarootdir"
426
AC_DEFINE_UNQUOTED($1, "$localedir",
427
[Define the location where the catalogs will be installed])
431
dnl Now the definitions that aclocal will find
433
ifdef(glib_configure_in,[],[
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
440
# Create a temporary file with TEST-FILE as its contents and pass the
441
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
443
AC_DEFUN([GLIB_RUN_PROG],
444
[cat >conftest.foo <<_ACEOF
447
if AC_RUN_LOG([$1 conftest.foo]); then
448
m4_ifval([$3], [$3], [:])
449
m4_ifvaln([$4], [else $4])dnl
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
458
dnl GNOME_COMMON_INIT
460
AC_DEFUN([GNOME_COMMON_INIT],
462
dnl this macro should come after AC_CONFIG_MACRO_DIR
463
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
465
dnl ensure that when the Automake generated makefile calls aclocal,
466
dnl it honours the $ACLOCAL_FLAGS environment variable
467
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
468
if test -n "$ac_macro_dir"; then
469
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
472
AC_SUBST([ACLOCAL_AMFLAGS])
475
AC_DEFUN([GNOME_DEBUG_CHECK],
477
AC_ARG_ENABLE([debug],
478
AC_HELP_STRING([--enable-debug],
479
[turn on debugging]),,
482
if test x$enable_debug = xyes ; then
483
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
484
[Enable additional debugging at the expense of performance and size])
488
dnl GNOME_MAINTAINER_MODE_DEFINES ()
489
dnl define DISABLE_DEPRECATED
491
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
493
AC_REQUIRE([AM_MAINTAINER_MODE])
495
if test $USE_MAINTAINER_MODE = yes; then
496
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"
498
DISABLE_DEPRECATED=""
500
AC_SUBST(DISABLE_DEPRECATED)
503
dnl GNOME_COMPILE_WARNINGS
504
dnl Turn on many useful compiler warnings
505
dnl For now, only works on GCC
506
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
507
dnl ******************************
508
dnl More compiler warnings
509
dnl ******************************
511
AC_ARG_ENABLE(compile-warnings,
512
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
513
[Turn on compiler warnings]),,
514
[enable_compile_warnings="m4_default([$1],[yes])"])
517
if test "x$GCC" != xyes; then
518
enable_compile_warnings=no
522
realsave_CFLAGS="$CFLAGS"
524
case "$enable_compile_warnings" in
529
warning_flags="-Wall"
532
warning_flags="-Wall -Wmissing-prototypes"
535
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
536
CFLAGS="$warning_flags $CFLAGS"
537
for option in -Wno-sign-compare; do
538
SAVE_CFLAGS="$CFLAGS"
539
CFLAGS="$CFLAGS $option"
540
AC_MSG_CHECKING([whether gcc understands $option])
541
AC_TRY_COMPILE([], [],
544
CFLAGS="$SAVE_CFLAGS"
545
AC_MSG_RESULT($has_option)
546
if test $has_option = yes; then
547
warning_flags="$warning_flags $option"
553
if test "$enable_compile_warnings" = "error" ; then
554
warning_flags="$warning_flags -Werror"
558
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
561
CFLAGS="$realsave_CFLAGS"
562
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
563
AC_MSG_RESULT($warning_flags)
566
AC_HELP_STRING([--enable-iso-c],
567
[Try to warn if code is not ISO C ]),,
570
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
572
if test "x$enable_iso_c" != "xno"; then
573
if test "x$GCC" = "xyes"; then
575
*[\ \ ]-ansi[\ \ ]*) ;;
576
*) complCFLAGS="$complCFLAGS -ansi" ;;
579
*[\ \ ]-pedantic[\ \ ]*) ;;
580
*) complCFLAGS="$complCFLAGS -pedantic" ;;
584
AC_MSG_RESULT($complCFLAGS)
586
WARN_CFLAGS="$warning_flags $complCFLAGS"
587
AC_SUBST(WARN_CFLAGS)
590
dnl For C++, do basically the same thing.
592
AC_DEFUN([GNOME_CXX_WARNINGS],[
593
AC_ARG_ENABLE(cxx-warnings,
594
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
595
[Turn on compiler warnings.]),,
596
[enable_cxx_warnings="m4_default([$1],[minimum])"])
598
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
600
if test "x$GXX" != xyes; then
601
enable_cxx_warnings=no
603
if test "x$enable_cxx_warnings" != "xno"; then
604
if test "x$GXX" = "xyes"; then
605
case " $CXXFLAGS " in
606
*[\ \ ]-Wall[\ \ ]*) ;;
607
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
610
## -W is not all that useful. And it cannot be controlled
611
## with individual -Wno-xxx flags, unlike -Wall
612
if test "x$enable_cxx_warnings" = "xyes"; then
613
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
617
AC_MSG_RESULT($warnCXXFLAGS)
619
AC_ARG_ENABLE(iso-cxx,
620
AC_HELP_STRING([--enable-iso-cxx],
621
[Try to warn if code is not ISO C++ ]),,
624
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
626
if test "x$enable_iso_cxx" != "xno"; then
627
if test "x$GXX" = "xyes"; then
628
case " $CXXFLAGS " in
629
*[\ \ ]-ansi[\ \ ]*) ;;
630
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
633
case " $CXXFLAGS " in
634
*[\ \ ]-pedantic[\ \ ]*) ;;
635
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
639
AC_MSG_RESULT($complCXXFLAGS)
641
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
642
AC_SUBST(WARN_CXXFLAGS)
19
645
dnl -*- mode: autoconf -*-
39
665
[use gtk-doc to build documentation [[default=no]]]),,
40
666
[enable_gtk_doc=no])
43
668
if test x$enable_gtk_doc = xyes; then
44
if test -z "$PKG_CONFIG"; then
45
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
47
if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
51
dnl do we want to do a version check?
53
[gtk_doc_min_version=$1
54
if test "$have_gtk_doc" = yes; then
55
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
56
if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
64
if test "$have_gtk_doc" != yes; then
670
[PKG_CHECK_EXISTS([gtk-doc],,
671
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
672
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
673
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
676
AC_MSG_CHECKING([whether to build gtk-doc documentation])
677
AC_MSG_RESULT($enable_gtk_doc)
679
AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
69
681
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
70
682
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
686
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
687
# serial 36 IT_PROG_INTLTOOL
688
AC_DEFUN([IT_PROG_INTLTOOL],
689
[AC_PREREQ([2.50])dnl
691
case "$am__api_version" in
693
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
699
if test -n "$1"; then
700
AC_MSG_CHECKING([for intltool >= $1])
702
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
703
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
704
[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`
706
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
707
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
708
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
711
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 $< [$]@'
712
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 $< [$]@'
713
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 $< [$]@'
714
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 $< [$]@'
715
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
716
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 $< [$]@'
717
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 $< [$]@'
718
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 $< [$]@'
719
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 $< [$]@'
720
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 $< [$]@'
721
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 $< [$]@'
722
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
723
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 $< [$]@'
724
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 $< [$]@'
725
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 $< [$]@'
726
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 $< [$]@'
727
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 $< [$]@'
728
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 $< [$]@'
729
INTLTOOL_POLICY_RULE='%.policy: %.policy.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 $< [$]@'
731
AC_SUBST(INTLTOOL_DESKTOP_RULE)
732
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
733
AC_SUBST(INTLTOOL_KEYS_RULE)
734
AC_SUBST(INTLTOOL_PROP_RULE)
735
AC_SUBST(INTLTOOL_OAF_RULE)
736
AC_SUBST(INTLTOOL_PONG_RULE)
737
AC_SUBST(INTLTOOL_SERVER_RULE)
738
AC_SUBST(INTLTOOL_SHEET_RULE)
739
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
740
AC_SUBST(INTLTOOL_UI_RULE)
741
AC_SUBST(INTLTOOL_XAM_RULE)
742
AC_SUBST(INTLTOOL_KBD_RULE)
743
AC_SUBST(INTLTOOL_XML_RULE)
744
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
745
AC_SUBST(INTLTOOL_CAVES_RULE)
746
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
747
AC_SUBST(INTLTOOL_THEME_RULE)
748
AC_SUBST(INTLTOOL_SERVICE_RULE)
749
AC_SUBST(INTLTOOL_POLICY_RULE)
751
# Check the gettext tools to make sure they are GNU
752
AC_PATH_PROG(XGETTEXT, xgettext)
753
AC_PATH_PROG(MSGMERGE, msgmerge)
754
AC_PATH_PROG(MSGFMT, msgfmt)
755
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
756
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
758
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
759
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
760
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
761
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
762
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
765
# Use the tools built into the package, not the ones that are installed.
766
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
767
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
768
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
770
AC_PATH_PROG(INTLTOOL_PERL, perl)
771
if test -z "$INTLTOOL_PERL"; then
772
AC_MSG_ERROR([perl not found; required for intltool])
774
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
775
AC_MSG_ERROR([perl 5.x required for intltool])
777
if test "x$2" != "xno-xml"; then
778
AC_MSG_CHECKING([for XML::Parser])
779
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
782
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
786
# Substitute ALL_LINGUAS so we can use it in po/Makefile
787
AC_SUBST(ALL_LINGUAS)
789
# Set DATADIRNAME correctly if it is not set yet
790
# (copied from glib-gettext.m4)
791
if test -z "$DATADIRNAME"; then
793
[AC_LANG_PROGRAM([[]],
794
[[extern int _nl_msg_cat_cntr;
795
return _nl_msg_cat_cntr]])],
799
dnl On Solaris, if bind_textdomain_codeset is in libc,
800
dnl GNU format message catalog is always supported,
801
dnl since both are added to the libc all together.
802
dnl Hence, we'd like to go with DATADIRNAME=share
804
AC_CHECK_FUNC(bind_textdomain_codeset,
805
[DATADIRNAME=share], [DATADIRNAME=lib])
812
AC_SUBST(DATADIRNAME)
816
dnl The following is very similar to
818
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
820
dnl with the following slight differences:
821
dnl - the *.in files are in ac_aux_dir,
822
dnl - if the file haven't changed upon reconfigure, it's not touched,
823
dnl - the evaluation of the third parameter enables a hack which computes
824
dnl the actual value of $libdir,
825
dnl - the user sees "executing intltool commands", instead of
826
dnl "creating intltool-extract" and such.
828
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
831
AC_CONFIG_COMMANDS([intltool], [
833
for file in intltool-extract intltool-merge intltool-update; do
834
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
835
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
836
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
837
< ${ac_aux_dir}/${file}.in > ${file}.out
838
if cmp -s ${file} ${file}.out 2>/dev/null; then
841
mv -f ${file}.out ${file}
848
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
849
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
850
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
855
# IT_PO_SUBDIR(DIRNAME)
856
# ---------------------
857
# All po subdirs have to be declared with this macro; the subdir "po" is
858
# declared by IT_PROG_INTLTOOL.
860
AC_DEFUN([IT_PO_SUBDIR],
861
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
863
dnl The following CONFIG_COMMANDS should be exetuted at the very end
864
dnl of config.status.
865
AC_CONFIG_COMMANDS_PRE([
866
AC_CONFIG_COMMANDS([$1/stamp-it], [
867
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
872
'"s|^| $ac_top_srcdir/|" \
873
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
875
if test ! -f "$1/Makefile"; then
876
AC_MSG_ERROR([$1/Makefile is not ready.])
878
mv "$1/Makefile" "$1/Makefile.tmp"
879
[sed '/^POTFILES =/,/[^\\]$/ {
883
' "$1/Makefile.tmp" >"$1/Makefile"]
884
rm -f "$1/Makefile.tmp"
885
mv "$1/stamp-it.tmp" "$1/stamp-it"
892
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
893
# A hint is needed for aclocal from Automake <= 1.9.4:
894
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
73
897
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
75
# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
899
# serial 51 AC_PROG_LIBTOOL
78
902
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
7703
8515
AC_SUBST([am__untar])
7704
8516
]) # _AM_PROG_TAR
7706
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7707
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7709
# This file is free software, distributed under the terms of the GNU
7710
# General Public License. As a special exception to the GNU General
7711
# Public License, this file may be distributed as part of a program
7712
# that contains a configuration script generated by Autoconf, under
7713
# the same distribution terms as the rest of that program.
7715
# This file can be copied and used freely without restrictions. It can
7716
# be used in projects which are not available under the GNU Public License
7717
# but which still want to provide support for the GNU gettext functionality.
7719
# Macro to add for using GNU gettext.
7720
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7722
# Modified to never use included libintl.
7723
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7725
# Major rework to remove unused code
7726
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7728
# Added better handling of ALL_LINGUAS from GNU gettext version
7729
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7731
# Modified to require ngettext
7732
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7734
# We need this here as well, since someone might use autoconf-2.5x
7735
# to configure GLib then an older version to configure a package
7736
# using AM_GLIB_GNU_GETTEXT
7740
dnl We go to great lengths to make sure that aclocal won't
7741
dnl try to pull in the installed version of these macros
7742
dnl when running aclocal in the glib directory.
7744
m4_copy([AC_DEFUN],[glib_DEFUN])
7745
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7747
dnl At the end, if we're not within glib, we'll define the public
7748
dnl definitions in terms of our private definitions.
7752
#--------------------
7753
glib_DEFUN([GLIB_LC_MESSAGES],
7754
[AC_CHECK_HEADERS([locale.h])
7755
if test $ac_cv_header_locale_h = yes; then
7756
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7757
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7758
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7759
if test $am_cv_val_LC_MESSAGES = yes; then
7760
AC_DEFINE(HAVE_LC_MESSAGES, 1,
7761
[Define if your <locale.h> file defines LC_MESSAGES.])
7765
# GLIB_PATH_PROG_WITH_TEST
7766
#----------------------------
7767
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7768
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7769
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7770
[# Extract the first word of "$2", so it can be a program name with args.
7771
set dummy $2; ac_word=[$]2
7772
AC_MSG_CHECKING([for $ac_word])
7773
AC_CACHE_VAL(ac_cv_path_$1,
7776
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7779
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7780
for ac_dir in ifelse([$5], , $PATH, [$5]); do
7781
test -z "$ac_dir" && ac_dir=.
7782
if test -f $ac_dir/$ac_word; then
7784
ac_cv_path_$1="$ac_dir/$ac_word"
7790
dnl If no 4th arg is given, leave the cache variable unset,
7791
dnl so AC_PATH_PROGS will keep looking.
7792
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7797
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7798
AC_MSG_RESULT([$]$1)
7807
glib_DEFUN([GLIB_WITH_NLS],
7808
dnl NLS is obligatory
7812
gt_cv_have_gettext=no
7818
AC_CHECK_HEADER(libintl.h,
7819
[gt_cv_func_dgettext_libintl="no"
7820
libintl_extra_libs=""
7823
# First check in libc
7825
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7827
#include <libintl.h>
7829
[return !ngettext ("","", 1)],
7830
gt_cv_func_ngettext_libc=yes,
7831
gt_cv_func_ngettext_libc=no)
7834
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7835
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7837
#include <libintl.h>
7839
[return !dgettext ("","")],
7840
gt_cv_func_dgettext_libc=yes,
7841
gt_cv_func_dgettext_libc=no)
7845
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7846
AC_CHECK_FUNCS(bind_textdomain_codeset)
7850
# If we don't have everything we want, check in libintl
7852
if test "$gt_cv_func_dgettext_libc" != "yes" \
7853
|| test "$gt_cv_func_ngettext_libc" != "yes" \
7854
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7856
AC_CHECK_LIB(intl, bindtextdomain,
7857
[AC_CHECK_LIB(intl, ngettext,
7858
[AC_CHECK_LIB(intl, dgettext,
7859
gt_cv_func_dgettext_libintl=yes)])])
7861
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7862
AC_MSG_CHECKING([if -liconv is needed to use gettext])
7864
AC_CHECK_LIB(intl, ngettext,
7865
[AC_CHECK_LIB(intl, dcgettext,
7866
[gt_cv_func_dgettext_libintl=yes
7867
libintl_extra_libs=-liconv],
7873
# If we found libintl, then check in it for bind_textdomain_codeset();
7874
# we'll prefer libc if neither have bind_textdomain_codeset(),
7875
# and both have dgettext and ngettext
7877
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7878
glib_save_LIBS="$LIBS"
7879
LIBS="$LIBS -lintl $libintl_extra_libs"
7880
unset ac_cv_func_bind_textdomain_codeset
7881
AC_CHECK_FUNCS(bind_textdomain_codeset)
7882
LIBS="$glib_save_LIBS"
7884
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7885
gt_cv_func_dgettext_libc=no
7887
if test "$gt_cv_func_dgettext_libc" = "yes" \
7888
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
7889
gt_cv_func_dgettext_libintl=no
7895
if test "$gt_cv_func_dgettext_libc" = "yes" \
7896
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7897
gt_cv_have_gettext=yes
7900
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7901
INTLLIBS="-lintl $libintl_extra_libs"
7904
if test "$gt_cv_have_gettext" = "yes"; then
7905
AC_DEFINE(HAVE_GETTEXT,1,
7906
[Define if the GNU gettext() function is already present or preinstalled.])
7907
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7908
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7909
if test "$MSGFMT" != "no"; then
7910
glib_save_LIBS="$LIBS"
7911
LIBS="$LIBS $INTLLIBS"
7912
AC_CHECK_FUNCS(dcgettext)
7914
AC_MSG_CHECKING([if msgfmt accepts -c])
7915
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
7918
"Content-Type: text/plain; charset=UTF-8\n"
7919
"Project-Id-Version: test 1.0\n"
7920
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7921
"Last-Translator: test <foo@bar.xx>\n"
7922
"Language-Team: C <LL@li.org>\n"
7923
"MIME-Version: 1.0\n"
7924
"Content-Transfer-Encoding: 8bit\n"
7925
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7926
AC_SUBST(MSGFMT_OPTS)
7927
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7928
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7929
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7930
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7931
return _nl_msg_cat_cntr],
7936
dnl On Solaris, if bind_textdomain_codeset is in libc,
7937
dnl GNU format message catalog is always supported,
7938
dnl since both are added to the libc all together.
7939
dnl Hence, we'd like to go with DATADIRNAME=share and
7940
dnl and CATOBJEXT=.gmo in this case.
7941
AC_CHECK_FUNC(bind_textdomain_codeset,
7952
LIBS="$glib_save_LIBS"
7955
gt_cv_have_gettext=no
7960
if test "$gt_cv_have_gettext" = "yes" ; then
7961
AC_DEFINE(ENABLE_NLS, 1,
7962
[always defined to indicate that i18n is enabled])
7965
dnl Test whether we really found GNU xgettext.
7966
if test "$XGETTEXT" != ":"; then
7967
dnl If it is not GNU xgettext we define it as : so that the
7968
dnl Makefiles still can work.
7969
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7973
[found xgettext program is not GNU xgettext; ignore it])
7978
# We need to process the po/ directory.
7982
[case "$CONFIG_FILES" in *po/Makefile.in*)
7983
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7986
dnl These rules are solely for the distribution goal. While doing this
7987
dnl we only have to keep exactly one list of the available catalogs
7988
dnl in configure.in.
7989
for lang in $ALL_LINGUAS; do
7990
GMOFILES="$GMOFILES $lang.gmo"
7991
POFILES="$POFILES $lang.po"
7994
dnl Make all variables we use known to autoconf.
7997
AC_SUBST(DATADIRNAME)
7999
AC_SUBST(INSTOBJEXT)
8001
AC_SUBST(PO_IN_DATADIR_TRUE)
8002
AC_SUBST(PO_IN_DATADIR_FALSE)
8007
# AM_GLIB_GNU_GETTEXT
8008
# -------------------
8009
# Do checks necessary for use of gettext. If a suitable implementation
8010
# of gettext is found in either in libintl or in the C library,
8011
# it will set INTLLIBS to the libraries needed for use of gettext
8012
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8013
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8014
# on various variables needed by the Makefile.in.in installed by
8017
glib_DEFUN([GLIB_GNU_GETTEXT],
8018
[AC_REQUIRE([AC_PROG_CC])dnl
8019
AC_REQUIRE([AC_HEADER_STDC])dnl
8024
if test "$gt_cv_have_gettext" = "yes"; then
8025
if test "x$ALL_LINGUAS" = "x"; then
8028
AC_MSG_CHECKING(for catalogs to be installed)
8030
for presentlang in $ALL_LINGUAS; do
8032
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8033
desiredlanguages="$LINGUAS"
8035
desiredlanguages="$ALL_LINGUAS"
8037
for desiredlang in $desiredlanguages; do
8038
# Use the presentlang catalog if desiredlang is
8039
# a. equal to presentlang, or
8040
# b. a variant of presentlang (because in this case,
8041
# presentlang can be used as a fallback for messages
8042
# which are not translated in the desiredlang catalog).
8043
case "$desiredlang" in
8044
"$presentlang"*) useit=yes;;
8047
if test $useit = yes; then
8048
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8051
LINGUAS=$NEW_LINGUAS
8052
AC_MSG_RESULT($LINGUAS)
8055
dnl Construct list of names of catalog files to be constructed.
8056
if test -n "$LINGUAS"; then
8057
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8061
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8062
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
8063
dnl Try to locate is.
8065
if test -n "$ac_aux_dir"; then
8066
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8068
if test -z "$MKINSTALLDIRS"; then
8069
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8071
AC_SUBST(MKINSTALLDIRS)
8073
dnl Generate list of files to be processed by xgettext which will
8074
dnl be included in po/Makefile.
8075
test -d po || mkdir po
8076
if test "x$srcdir" != "x."; then
8077
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8078
posrcprefix="$srcdir/"
8080
posrcprefix="../$srcdir/"
8086
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8087
< $srcdir/po/POTFILES.in > po/POTFILES
8090
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8091
# -------------------------------
8092
# Define VARIABLE to the location where catalog files will
8093
# be installed by po/Makefile.
8094
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8095
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8096
glib_save_prefix="$prefix"
8097
glib_save_exec_prefix="$exec_prefix"
8098
glib_save_datarootdir="$datarootdir"
8099
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8100
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8101
datarootdir=`eval echo "${datarootdir}"`
8102
if test "x$CATOBJEXT" = "x.mo" ; then
8103
localedir=`eval echo "${libdir}/locale"`
8105
localedir=`eval echo "${datadir}/locale"`
8107
prefix="$glib_save_prefix"
8108
exec_prefix="$glib_save_exec_prefix"
8109
datarootdir="$glib_save_datarootdir"
8110
AC_DEFINE_UNQUOTED($1, "$localedir",
8111
[Define the location where the catalogs will be installed])
8115
dnl Now the definitions that aclocal will find
8117
ifdef(glib_configure_in,[],[
8118
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8119
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8122
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
8124
# Create a temporary file with TEST-FILE as its contents and pass the
8125
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
8126
# 0 and perform ACTION-IF-FAIL for any other exit status.
8127
AC_DEFUN([GLIB_RUN_PROG],
8128
[cat >conftest.foo <<_ACEOF
8131
if AC_RUN_LOG([$1 conftest.foo]); then
8132
m4_ifval([$3], [$3], [:])
8133
m4_ifvaln([$4], [else $4])dnl
8134
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
8135
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
8142
dnl GNOME_COMMON_INIT
8144
AC_DEFUN([GNOME_COMMON_INIT],
8146
dnl this macro should come after AC_CONFIG_MACRO_DIR
8147
AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
8149
dnl ensure that when the Automake generated makefile calls aclocal,
8150
dnl it honours the $ACLOCAL_FLAGS environment variable
8151
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
8152
if test -n "$ac_macro_dir"; then
8153
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
8156
AC_SUBST([ACLOCAL_AMFLAGS])
8159
AC_DEFUN([GNOME_DEBUG_CHECK],
8161
AC_ARG_ENABLE([debug],
8162
AC_HELP_STRING([--enable-debug],
8163
[turn on debugging]),,
8166
if test x$enable_debug = xyes ; then
8167
AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
8168
[Enable additional debugging at the expense of performance and size])
8172
dnl GNOME_MAINTAINER_MODE_DEFINES ()
8173
dnl define DISABLE_DEPRECATED
8175
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
8177
AC_REQUIRE([AM_MAINTAINER_MODE])
8179
if test $USE_MAINTAINER_MODE = yes; then
8180
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"
8182
DISABLE_DEPRECATED=""
8184
AC_SUBST(DISABLE_DEPRECATED)
8187
dnl GNOME_COMPILE_WARNINGS
8188
dnl Turn on many useful compiler warnings
8189
dnl For now, only works on GCC
8190
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
8191
dnl ******************************
8192
dnl More compiler warnings
8193
dnl ******************************
8195
AC_ARG_ENABLE(compile-warnings,
8196
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
8197
[Turn on compiler warnings]),,
8198
[enable_compile_warnings="m4_default([$1],[yes])"])
8201
if test "x$GCC" != xyes; then
8202
enable_compile_warnings=no
8206
realsave_CFLAGS="$CFLAGS"
8208
case "$enable_compile_warnings" in
8213
warning_flags="-Wall"
8216
warning_flags="-Wall -Wmissing-prototypes"
8219
warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
8220
CFLAGS="$warning_flags $CFLAGS"
8221
for option in -Wno-sign-compare; do
8222
SAVE_CFLAGS="$CFLAGS"
8223
CFLAGS="$CFLAGS $option"
8224
AC_MSG_CHECKING([whether gcc understands $option])
8225
AC_TRY_COMPILE([], [],
8228
CFLAGS="$SAVE_CFLAGS"
8229
AC_MSG_RESULT($has_option)
8230
if test $has_option = yes; then
8231
warning_flags="$warning_flags $option"
8237
if test "$enable_compile_warnings" = "error" ; then
8238
warning_flags="$warning_flags -Werror"
8242
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
8245
CFLAGS="$realsave_CFLAGS"
8246
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
8247
AC_MSG_RESULT($warning_flags)
8249
AC_ARG_ENABLE(iso-c,
8250
AC_HELP_STRING([--enable-iso-c],
8251
[Try to warn if code is not ISO C ]),,
8254
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
8256
if test "x$enable_iso_c" != "xno"; then
8257
if test "x$GCC" = "xyes"; then
8259
*[\ \ ]-ansi[\ \ ]*) ;;
8260
*) complCFLAGS="$complCFLAGS -ansi" ;;
8263
*[\ \ ]-pedantic[\ \ ]*) ;;
8264
*) complCFLAGS="$complCFLAGS -pedantic" ;;
8268
AC_MSG_RESULT($complCFLAGS)
8270
WARN_CFLAGS="$warning_flags $complCFLAGS"
8271
AC_SUBST(WARN_CFLAGS)
8274
dnl For C++, do basically the same thing.
8276
AC_DEFUN([GNOME_CXX_WARNINGS],[
8277
AC_ARG_ENABLE(cxx-warnings,
8278
AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8279
[Turn on compiler warnings.]),,
8280
[enable_cxx_warnings="m4_default([$1],[minimum])"])
8282
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8284
if test "x$GXX" != xyes; then
8285
enable_cxx_warnings=no
8287
if test "x$enable_cxx_warnings" != "xno"; then
8288
if test "x$GXX" = "xyes"; then
8289
case " $CXXFLAGS " in
8290
*[\ \ ]-Wall[\ \ ]*) ;;
8291
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
8294
## -W is not all that useful. And it cannot be controlled
8295
## with individual -Wno-xxx flags, unlike -Wall
8296
if test "x$enable_cxx_warnings" = "xyes"; then
8297
warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8301
AC_MSG_RESULT($warnCXXFLAGS)
8303
AC_ARG_ENABLE(iso-cxx,
8304
AC_HELP_STRING([--enable-iso-cxx],
8305
[Try to warn if code is not ISO C++ ]),,
8306
[enable_iso_cxx=no])
8308
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8310
if test "x$enable_iso_cxx" != "xno"; then
8311
if test "x$GXX" = "xyes"; then
8312
case " $CXXFLAGS " in
8313
*[\ \ ]-ansi[\ \ ]*) ;;
8314
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8317
case " $CXXFLAGS " in
8318
*[\ \ ]-pedantic[\ \ ]*) ;;
8319
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8323
AC_MSG_RESULT($complCXXFLAGS)
8325
WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8326
AC_SUBST(WARN_CXXFLAGS)
8330
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8331
# serial 36 IT_PROG_INTLTOOL
8332
AC_DEFUN([IT_PROG_INTLTOOL],
8333
[AC_PREREQ([2.50])dnl
8335
case "$am__api_version" in
8337
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8343
if test -n "$1"; then
8344
AC_MSG_CHECKING([for intltool >= $1])
8346
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8347
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
8348
[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`
8350
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8351
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8352
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
8355
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 $< [$]@'
8356
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 $< [$]@'
8357
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 $< [$]@'
8358
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 $< [$]@'
8359
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8360
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 $< [$]@'
8361
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 $< [$]@'
8362
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 $< [$]@'
8363
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 $< [$]@'
8364
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 $< [$]@'
8365
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 $< [$]@'
8366
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
8367
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 $< [$]@'
8368
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 $< [$]@'
8369
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 $< [$]@'
8370
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 $< [$]@'
8371
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 $< [$]@'
8372
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 $< [$]@'
8373
INTLTOOL_POLICY_RULE='%.policy: %.policy.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 $< [$]@'
8375
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8376
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8377
AC_SUBST(INTLTOOL_KEYS_RULE)
8378
AC_SUBST(INTLTOOL_PROP_RULE)
8379
AC_SUBST(INTLTOOL_OAF_RULE)
8380
AC_SUBST(INTLTOOL_PONG_RULE)
8381
AC_SUBST(INTLTOOL_SERVER_RULE)
8382
AC_SUBST(INTLTOOL_SHEET_RULE)
8383
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8384
AC_SUBST(INTLTOOL_UI_RULE)
8385
AC_SUBST(INTLTOOL_XAM_RULE)
8386
AC_SUBST(INTLTOOL_KBD_RULE)
8387
AC_SUBST(INTLTOOL_XML_RULE)
8388
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8389
AC_SUBST(INTLTOOL_CAVES_RULE)
8390
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8391
AC_SUBST(INTLTOOL_THEME_RULE)
8392
AC_SUBST(INTLTOOL_SERVICE_RULE)
8393
AC_SUBST(INTLTOOL_POLICY_RULE)
8395
# Use the tools built into the package, not the ones that are installed.
8396
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
8397
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
8398
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
8400
AC_PATH_PROG(INTLTOOL_PERL, perl)
8401
if test -z "$INTLTOOL_PERL"; then
8402
AC_MSG_ERROR([perl not found; required for intltool])
8404
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8405
AC_MSG_ERROR([perl 5.x required for intltool])
8407
if test "x$2" != "xno-xml"; then
8408
AC_MSG_CHECKING([for XML::Parser])
8409
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8412
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8416
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8417
AC_SUBST(ALL_LINGUAS)
8419
# Set DATADIRNAME correctly if it is not set yet
8420
# (copied from glib-gettext.m4)
8421
if test -z "$DATADIRNAME"; then
8423
[AC_LANG_PROGRAM([[]],
8424
[[extern int _nl_msg_cat_cntr;
8425
return _nl_msg_cat_cntr]])],
8426
[DATADIRNAME=share],
8429
dnl On Solaris, if bind_textdomain_codeset is in libc,
8430
dnl GNU format message catalog is always supported,
8431
dnl since both are added to the libc all together.
8432
dnl Hence, we'd like to go with DATADIRNAME=share
8434
AC_CHECK_FUNC(bind_textdomain_codeset,
8435
[DATADIRNAME=share], [DATADIRNAME=lib])
8442
AC_SUBST(DATADIRNAME)
8446
dnl The following is very similar to
8448
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
8450
dnl with the following slight differences:
8451
dnl - the *.in files are in ac_aux_dir,
8452
dnl - if the file haven't changed upon reconfigure, it's not touched,
8453
dnl - the evaluation of the third parameter enables a hack which computes
8454
dnl the actual value of $libdir,
8455
dnl - the user sees "executing intltool commands", instead of
8456
dnl "creating intltool-extract" and such.
8458
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
8459
dnl a reason for it.
8461
AC_CONFIG_COMMANDS([intltool], [
8463
for file in intltool-extract intltool-merge intltool-update; do
8464
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
8465
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
8466
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
8467
< ${ac_aux_dir}/${file}.in > ${file}.out
8468
if cmp -s ${file} ${file}.out 2>/dev/null; then
8471
mv -f ${file}.out ${file}
8478
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
8479
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
8480
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
8485
# IT_PO_SUBDIR(DIRNAME)
8486
# ---------------------
8487
# All po subdirs have to be declared with this macro; the subdir "po" is
8488
# declared by IT_PROG_INTLTOOL.
8490
AC_DEFUN([IT_PO_SUBDIR],
8491
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8493
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8494
dnl of config.status.
8495
AC_CONFIG_COMMANDS_PRE([
8496
AC_CONFIG_COMMANDS([$1/stamp-it], [
8497
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8502
'"s|^| $ac_top_srcdir/|" \
8503
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8505
if test ! -f "$1/Makefile"; then
8506
AC_MSG_ERROR([$1/Makefile is not ready.])
8508
mv "$1/Makefile" "$1/Makefile.tmp"
8509
[sed '/^POTFILES =/,/[^\\]$/ {
8513
' "$1/Makefile.tmp" >"$1/Makefile"]
8514
rm -f "$1/Makefile.tmp"
8515
mv "$1/stamp-it.tmp" "$1/stamp-it"
8522
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8523
# A hint is needed for aclocal from Automake <= 1.9.4:
8524
# AC_DEFUN([AC_PROG_INTLTOOL], ...)