~ubuntu-branches/ubuntu/natty/gnome-icon-theme/natty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-06-10 11:50:31 UTC
  • mfrom: (1.1.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20100610115031-d5kn01lfqthbzcim
Tags: 2.30.3-1ubuntu1
* Merge with Debian unstable, remaining Ubuntu changes:
* debian/control.in:
  - Add Vcs-Bzr link
* debian/rules:
  - Install distributor icons
  - Use the --enable-icon-mapping configure option
* debian/prerm:
* debian/postinst:
  - Update alternatives for Ubuntu icon
* debian/source:
  - Use source version 3.0
* debian/ubuntu-icons: 
  - Ubuntu logo and cd isos logos
* debian/watch: 
  - Watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
17
 
[m4_warning([this file was generated for autoconf 2.64.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
 
17
[m4_warning([this file was generated for autoconf 2.63.
18
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
22
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
23
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
24
 
#
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.
30
 
#
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.
34
 
#
35
 
# Macro to add for using GNU gettext.
36
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37
 
#
38
 
# Modified to never use included libintl. 
39
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
40
 
#
41
 
# Major rework to remove unused code
42
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
43
 
#
44
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
45
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46
 
#
47
 
# Modified to require ngettext
48
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
49
 
#
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
53
 
AC_PREREQ(2.53)
54
 
 
55
 
dnl
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.
59
 
dnl
60
 
m4_copy([AC_DEFUN],[glib_DEFUN])
61
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
62
 
dnl
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.
65
 
dnl
66
 
 
67
 
# GLIB_LC_MESSAGES
68
 
#--------------------
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.])
78
 
    fi
79
 
  fi])
80
 
 
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,
90
 
[case "[$]$1" in
91
 
  /*)
92
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93
 
  ;;
94
 
  *)
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
99
 
      if [$3]; then
100
 
        ac_cv_path_$1="$ac_dir/$ac_word"
101
 
        break
102
 
      fi
103
 
    fi
104
 
  done
105
 
  IFS="$ac_save_ifs"
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"
109
 
])dnl
110
 
  ;;
111
 
esac])dnl
112
 
$1="$ac_cv_path_$1"
113
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114
 
  AC_MSG_RESULT([$]$1)
 
22
 
 
23
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
24
# serial 40 IT_PROG_INTLTOOL
 
25
AC_DEFUN([IT_PROG_INTLTOOL], [
 
26
AC_PREREQ([2.50])dnl
 
27
AC_REQUIRE([AM_NLS])dnl
 
28
 
 
29
case "$am__api_version" in
 
30
    1.[01234])
 
31
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
32
    ;;
 
33
    *)
 
34
    ;;
 
35
esac
 
36
 
 
37
if test -n "$1"; then
 
38
    AC_MSG_CHECKING([for intltool >= $1])
 
39
 
 
40
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
41
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
42
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
43
    ]
 
44
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
45
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
46
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
47
fi
 
48
 
 
49
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
50
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
51
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
52
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
53
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
54
fi
 
55
 
 
56
  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 $< [$]@' 
 
57
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 $< [$]@' 
 
58
     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 $< [$]@' 
 
59
     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 $< [$]@' 
 
60
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
61
     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 $< [$]@' 
 
62
   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 $< [$]@' 
 
63
    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 $< [$]@' 
 
64
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 $< [$]@' 
 
65
       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 $< [$]@' 
 
66
      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 $< [$]@' 
 
67
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
68
      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 $< [$]@' 
 
69
      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 $< [$]@' 
 
70
    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 $< [$]@' 
 
71
  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 $< [$]@' 
 
72
    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 $< [$]@' 
 
73
    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 $< [$]@'
 
74
   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 $< [$]@'
 
75
 
 
76
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
77
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
78
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
79
_IT_SUBST(INTLTOOL_PROP_RULE)
 
80
_IT_SUBST(INTLTOOL_OAF_RULE)
 
81
_IT_SUBST(INTLTOOL_PONG_RULE)
 
82
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
83
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
84
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
85
_IT_SUBST(INTLTOOL_UI_RULE)
 
86
_IT_SUBST(INTLTOOL_XAM_RULE)
 
87
_IT_SUBST(INTLTOOL_KBD_RULE)
 
88
_IT_SUBST(INTLTOOL_XML_RULE)
 
89
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
90
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
91
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
92
_IT_SUBST(INTLTOOL_THEME_RULE)
 
93
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
94
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
95
 
 
96
# Check the gettext tools to make sure they are GNU
 
97
AC_PATH_PROG(XGETTEXT, xgettext)
 
98
AC_PATH_PROG(MSGMERGE, msgmerge)
 
99
AC_PATH_PROG(MSGFMT, msgfmt)
 
100
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
101
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
102
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
103
fi
 
104
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
105
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
106
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
107
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
108
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
109
fi
 
110
 
 
111
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
112
if test -z "$INTLTOOL_PERL"; then
 
113
   AC_MSG_ERROR([perl not found])
 
114
fi
 
115
AC_MSG_CHECKING([for perl >= 5.8.1])
 
116
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
117
if test $? -ne 0; then
 
118
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
115
119
else
116
 
  AC_MSG_RESULT(no)
117
 
fi
118
 
AC_SUBST($1)dnl
 
120
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
121
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
122
fi
 
123
if test "x$2" != "xno-xml"; then
 
124
   AC_MSG_CHECKING([for XML::Parser])
 
125
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
126
       AC_MSG_RESULT([ok])
 
127
   else
 
128
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
129
   fi
 
130
fi
 
131
 
 
132
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
133
AC_SUBST(ALL_LINGUAS)
 
134
 
 
135
# Set DATADIRNAME correctly if it is not set yet
 
136
# (copied from glib-gettext.m4)
 
137
if test -z "$DATADIRNAME"; then
 
138
  AC_LINK_IFELSE(
 
139
    [AC_LANG_PROGRAM([[]],
 
140
                     [[extern int _nl_msg_cat_cntr;
 
141
                       return _nl_msg_cat_cntr]])],
 
142
    [DATADIRNAME=share],
 
143
    [case $host in
 
144
    *-*-solaris*)
 
145
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
146
    dnl GNU format message catalog is always supported,
 
147
    dnl since both are added to the libc all together.
 
148
    dnl Hence, we'd like to go with DATADIRNAME=share
 
149
    dnl in this case.
 
150
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
151
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
152
    ;;
 
153
    *)
 
154
    [DATADIRNAME=lib]
 
155
    ;;
 
156
    esac])
 
157
fi
 
158
AC_SUBST(DATADIRNAME)
 
159
 
 
160
IT_PO_SUBDIR([po])
 
161
 
119
162
])
120
163
 
121
 
# GLIB_WITH_NLS
122
 
#-----------------
123
 
glib_DEFUN([GLIB_WITH_NLS],
124
 
  dnl NLS is obligatory
125
 
  [USE_NLS=yes
126
 
    AC_SUBST(USE_NLS)
127
 
 
128
 
    gt_cv_have_gettext=no
129
 
 
130
 
    CATOBJEXT=NONE
131
 
    XGETTEXT=:
132
 
    INTLLIBS=
133
 
 
134
 
    AC_CHECK_HEADER(libintl.h,
135
 
     [gt_cv_func_dgettext_libintl="no"
136
 
      libintl_extra_libs=""
137
 
 
138
 
      #
139
 
      # First check in libc
140
 
      #
141
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142
 
        [AC_TRY_LINK([
143
 
#include <libintl.h>
144
 
],
145
 
         [return !ngettext ("","", 1)],
146
 
          gt_cv_func_ngettext_libc=yes,
147
 
          gt_cv_func_ngettext_libc=no)
148
 
        ])
149
 
  
150
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152
 
                [AC_TRY_LINK([
153
 
#include <libintl.h>
154
 
],
155
 
                  [return !dgettext ("","")],
156
 
                  gt_cv_func_dgettext_libc=yes,
157
 
                  gt_cv_func_dgettext_libc=no)
158
 
                ])
159
 
      fi
160
 
  
161
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
163
 
      fi
164
 
 
165
 
      #
166
 
      # If we don't have everything we want, check in libintl
167
 
      #
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
171
 
        
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)])])
176
 
 
177
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
179
 
          AC_MSG_RESULT([])
180
 
          AC_CHECK_LIB(intl, ngettext,
181
 
                [AC_CHECK_LIB(intl, dcgettext,
182
 
                       [gt_cv_func_dgettext_libintl=yes
183
 
                        libintl_extra_libs=-liconv],
184
 
                        :,-liconv)],
185
 
                :,-liconv)
186
 
        fi
187
 
 
188
 
        #
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
192
 
        #
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"
199
 
 
200
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201
 
            gt_cv_func_dgettext_libc=no
202
 
          else
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
206
 
            fi
207
 
          fi
208
 
        fi
209
 
      fi
210
 
 
211
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
212
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213
 
        gt_cv_have_gettext=yes
214
 
      fi
215
 
  
216
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217
 
        INTLLIBS="-lintl $libintl_extra_libs"
218
 
      fi
219
 
  
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)
229
 
          MSGFMT_OPTS=
230
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
231
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232
 
msgid ""
233
 
msgstr ""
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],
248
 
            [CATOBJEXT=.gmo 
249
 
             DATADIRNAME=share],
250
 
            [case $host in
251
 
            *-*-solaris*)
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,
258
 
              [CATOBJEXT=.gmo 
259
 
               DATADIRNAME=share],
260
 
              [CATOBJEXT=.mo
261
 
               DATADIRNAME=lib])
262
 
            ;;
263
 
            *)
264
 
            CATOBJEXT=.mo
265
 
            DATADIRNAME=lib
266
 
            ;;
267
 
            esac])
268
 
          LIBS="$glib_save_LIBS"
269
 
          INSTOBJEXT=.mo
270
 
        else
271
 
          gt_cv_have_gettext=no
272
 
        fi
273
 
      fi
274
 
    ])
275
 
 
276
 
    if test "$gt_cv_have_gettext" = "yes" ; then
277
 
      AC_DEFINE(ENABLE_NLS, 1,
278
 
        [always defined to indicate that i18n is enabled])
279
 
    fi
280
 
 
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
286
 
        : ;
287
 
      else
288
 
        AC_MSG_RESULT(
289
 
          [found xgettext program is not GNU xgettext; ignore it])
290
 
        XGETTEXT=":"
291
 
      fi
292
 
    fi
293
 
 
294
 
    # We need to process the po/ directory.
295
 
    POSUB=po
296
 
 
297
 
    AC_OUTPUT_COMMANDS(
298
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
299
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300
 
      esac])
301
 
 
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
304
 
    dnl in configure.in.
305
 
    for lang in $ALL_LINGUAS; do
306
 
      GMOFILES="$GMOFILES $lang.gmo"
307
 
      POFILES="$POFILES $lang.po"
308
 
    done
309
 
 
310
 
    dnl Make all variables we use known to autoconf.
311
 
    AC_SUBST(CATALOGS)
312
 
    AC_SUBST(CATOBJEXT)
313
 
    AC_SUBST(DATADIRNAME)
314
 
    AC_SUBST(GMOFILES)
315
 
    AC_SUBST(INSTOBJEXT)
316
 
    AC_SUBST(INTLLIBS)
317
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
318
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
319
 
    AC_SUBST(POFILES)
320
 
    AC_SUBST(POSUB)
 
164
 
 
165
# IT_PO_SUBDIR(DIRNAME)
 
166
# ---------------------
 
167
# All po subdirs have to be declared with this macro; the subdir "po" is
 
168
# declared by IT_PROG_INTLTOOL.
 
169
#
 
170
AC_DEFUN([IT_PO_SUBDIR],
 
171
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
172
dnl
 
173
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
174
dnl of config.status.
 
175
AC_CONFIG_COMMANDS_PRE([
 
176
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
177
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
178
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
179
    fi
 
180
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
181
    >"$1/stamp-it.tmp"
 
182
    [sed '/^#/d
 
183
         s/^[[].*] *//
 
184
         /^[    ]*$/d
 
185
        '"s|^|  $ac_top_srcdir/|" \
 
186
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
187
    ]
 
188
    [sed '/^POTFILES =/,/[^\\]$/ {
 
189
                /^POTFILES =/!d
 
190
                r $1/POTFILES
 
191
          }
 
192
         ' "$1/Makefile.in" >"$1/Makefile"]
 
193
    rm -f "$1/Makefile.tmp"
 
194
    mv "$1/stamp-it.tmp" "$1/stamp-it"
321
195
  ])
 
196
])dnl
 
197
])
322
198
 
323
 
# AM_GLIB_GNU_GETTEXT
 
199
# _IT_SUBST(VARIABLE)
324
200
# -------------------
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 
331
 
# glib-gettextize.
332
 
dnl
333
 
glib_DEFUN([GLIB_GNU_GETTEXT],
334
 
  [AC_REQUIRE([AC_PROG_CC])dnl
335
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
336
 
   
337
 
   GLIB_LC_MESSAGES
338
 
   GLIB_WITH_NLS
339
 
 
340
 
   if test "$gt_cv_have_gettext" = "yes"; then
341
 
     if test "x$ALL_LINGUAS" = "x"; then
342
 
       LINGUAS=
343
 
     else
344
 
       AC_MSG_CHECKING(for catalogs to be installed)
345
 
       NEW_LINGUAS=
346
 
       for presentlang in $ALL_LINGUAS; do
347
 
         useit=no
348
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349
 
           desiredlanguages="$LINGUAS"
350
 
         else
351
 
           desiredlanguages="$ALL_LINGUAS"
352
 
         fi
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;;
361
 
           esac
362
 
         done
363
 
         if test $useit = yes; then
364
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365
 
         fi
366
 
       done
367
 
       LINGUAS=$NEW_LINGUAS
368
 
       AC_MSG_RESULT($LINGUAS)
369
 
     fi
370
 
 
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
374
 
     fi
375
 
   fi
376
 
 
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.
380
 
   MKINSTALLDIRS=
381
 
   if test -n "$ac_aux_dir"; then
382
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383
 
   fi
384
 
   if test -z "$MKINSTALLDIRS"; then
385
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386
 
   fi
387
 
   AC_SUBST(MKINSTALLDIRS)
388
 
 
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/"
395
 
     else
396
 
       posrcprefix="../$srcdir/"
397
 
     fi
398
 
   else
399
 
     posrcprefix="../"
400
 
   fi
401
 
   rm -f po/POTFILES
402
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403
 
        < $srcdir/po/POTFILES.in > po/POTFILES
404
 
  ])
405
 
 
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"`
420
 
else
421
 
  localedir=`eval echo "${datadir}/locale"`
422
 
fi
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])
428
 
])
429
 
 
430
 
dnl
431
 
dnl Now the definitions that aclocal will find
432
 
dnl
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($@)])
436
 
])dnl
437
 
 
438
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
 
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
445
 
$2
446
 
_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
452
 
fi])
 
201
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
202
#
 
203
AC_DEFUN([_IT_SUBST],
 
204
[
 
205
AC_SUBST([$1])
 
206
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
207
]
 
208
)
 
209
 
 
210
# deprecated macros
 
211
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
212
# A hint is needed for aclocal from Automake <= 1.9.4:
 
213
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
453
214
 
454
215
 
455
216
# nls.m4 serial 3 (gettext-0.15)
552
313
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
553
314
# ---------------------------------------------
554
315
m4_define([_PKG_CONFIG],
555
 
[if test -n "$PKG_CONFIG"; then
556
 
    if test -n "$$1"; then
557
 
        pkg_cv_[]$1="$$1"
558
 
    else
559
 
        PKG_CHECK_EXISTS([$3],
560
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
561
 
                         [pkg_failed=yes])
562
 
    fi
563
 
else
564
 
        pkg_failed=untried
 
316
[if test -n "$$1"; then
 
317
    pkg_cv_[]$1="$$1"
 
318
 elif test -n "$PKG_CONFIG"; then
 
319
    PKG_CHECK_EXISTS([$3],
 
320
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
321
                     [pkg_failed=yes])
 
322
 else
 
323
    pkg_failed=untried
565
324
fi[]dnl
566
325
])# _PKG_CONFIG
567
326
 
605
364
if test $pkg_failed = yes; then
606
365
        _PKG_SHORT_ERRORS_SUPPORTED
607
366
        if test $_pkg_short_errors_supported = yes; then
608
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
367
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
609
368
        else 
610
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
369
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
611
370
        fi
612
371
        # Put the nasty error message in config.log where it belongs
613
372
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1589
1348
AC_SUBST([am__untar])
1590
1349
]) # _AM_PROG_TAR
1591
1350
 
1592
 
 
1593
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1594
 
# serial 40 IT_PROG_INTLTOOL
1595
 
AC_DEFUN([IT_PROG_INTLTOOL], [
1596
 
AC_PREREQ([2.50])dnl
1597
 
AC_REQUIRE([AM_NLS])dnl
1598
 
 
1599
 
case "$am__api_version" in
1600
 
    1.[01234])
1601
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1602
 
    ;;
1603
 
    *)
1604
 
    ;;
1605
 
esac
1606
 
 
1607
 
if test -n "$1"; then
1608
 
    AC_MSG_CHECKING([for intltool >= $1])
1609
 
 
1610
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1611
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1612
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1613
 
    ]
1614
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1615
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1616
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1617
 
fi
1618
 
 
1619
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1620
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1621
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1622
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1623
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1624
 
fi
1625
 
 
1626
 
  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 $< [$]@' 
1627
 
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 $< [$]@' 
1628
 
     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 $< [$]@' 
1629
 
     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 $< [$]@' 
1630
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1631
 
     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 $< [$]@' 
1632
 
   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 $< [$]@' 
1633
 
    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 $< [$]@' 
1634
 
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 $< [$]@' 
1635
 
       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 $< [$]@' 
1636
 
      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 $< [$]@' 
1637
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
1638
 
      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 $< [$]@' 
1639
 
      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 $< [$]@' 
1640
 
    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 $< [$]@' 
1641
 
  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 $< [$]@' 
1642
 
    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 $< [$]@' 
1643
 
    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 $< [$]@'
1644
 
   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 $< [$]@'
1645
 
 
1646
 
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1647
 
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1648
 
_IT_SUBST(INTLTOOL_KEYS_RULE)
1649
 
_IT_SUBST(INTLTOOL_PROP_RULE)
1650
 
_IT_SUBST(INTLTOOL_OAF_RULE)
1651
 
_IT_SUBST(INTLTOOL_PONG_RULE)
1652
 
_IT_SUBST(INTLTOOL_SERVER_RULE)
1653
 
_IT_SUBST(INTLTOOL_SHEET_RULE)
1654
 
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1655
 
_IT_SUBST(INTLTOOL_UI_RULE)
1656
 
_IT_SUBST(INTLTOOL_XAM_RULE)
1657
 
_IT_SUBST(INTLTOOL_KBD_RULE)
1658
 
_IT_SUBST(INTLTOOL_XML_RULE)
1659
 
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1660
 
_IT_SUBST(INTLTOOL_CAVES_RULE)
1661
 
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1662
 
_IT_SUBST(INTLTOOL_THEME_RULE)
1663
 
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1664
 
_IT_SUBST(INTLTOOL_POLICY_RULE)
1665
 
 
1666
 
# Check the gettext tools to make sure they are GNU
1667
 
AC_PATH_PROG(XGETTEXT, xgettext)
1668
 
AC_PATH_PROG(MSGMERGE, msgmerge)
1669
 
AC_PATH_PROG(MSGFMT, msgfmt)
1670
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1671
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1672
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1673
 
fi
1674
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1675
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1676
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1677
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1678
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1679
 
fi
1680
 
 
1681
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
1682
 
if test -z "$INTLTOOL_PERL"; then
1683
 
   AC_MSG_ERROR([perl not found])
1684
 
fi
1685
 
AC_MSG_CHECKING([for perl >= 5.8.1])
1686
 
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1687
 
if test $? -ne 0; then
1688
 
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1689
 
else
1690
 
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
1691
 
   AC_MSG_RESULT([$IT_PERL_VERSION])
1692
 
fi
1693
 
if test "x$2" != "xno-xml"; then
1694
 
   AC_MSG_CHECKING([for XML::Parser])
1695
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1696
 
       AC_MSG_RESULT([ok])
1697
 
   else
1698
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1699
 
   fi
1700
 
fi
1701
 
 
1702
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1703
 
AC_SUBST(ALL_LINGUAS)
1704
 
 
1705
 
# Set DATADIRNAME correctly if it is not set yet
1706
 
# (copied from glib-gettext.m4)
1707
 
if test -z "$DATADIRNAME"; then
1708
 
  AC_LINK_IFELSE(
1709
 
    [AC_LANG_PROGRAM([[]],
1710
 
                     [[extern int _nl_msg_cat_cntr;
1711
 
                       return _nl_msg_cat_cntr]])],
1712
 
    [DATADIRNAME=share],
1713
 
    [case $host in
1714
 
    *-*-solaris*)
1715
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
1716
 
    dnl GNU format message catalog is always supported,
1717
 
    dnl since both are added to the libc all together.
1718
 
    dnl Hence, we'd like to go with DATADIRNAME=share
1719
 
    dnl in this case.
1720
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
1721
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
1722
 
    ;;
1723
 
    *)
1724
 
    [DATADIRNAME=lib]
1725
 
    ;;
1726
 
    esac])
1727
 
fi
1728
 
AC_SUBST(DATADIRNAME)
1729
 
 
1730
 
IT_PO_SUBDIR([po])
1731
 
 
1732
 
])
1733
 
 
1734
 
 
1735
 
# IT_PO_SUBDIR(DIRNAME)
1736
 
# ---------------------
1737
 
# All po subdirs have to be declared with this macro; the subdir "po" is
1738
 
# declared by IT_PROG_INTLTOOL.
1739
 
#
1740
 
AC_DEFUN([IT_PO_SUBDIR],
1741
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1742
 
dnl
1743
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1744
 
dnl of config.status.
1745
 
AC_CONFIG_COMMANDS_PRE([
1746
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
1747
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1748
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1749
 
    fi
1750
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1751
 
    >"$1/stamp-it.tmp"
1752
 
    [sed '/^#/d
1753
 
         s/^[[].*] *//
1754
 
         /^[    ]*$/d
1755
 
        '"s|^|  $ac_top_srcdir/|" \
1756
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1757
 
    ]
1758
 
    [sed '/^POTFILES =/,/[^\\]$/ {
1759
 
                /^POTFILES =/!d
1760
 
                r $1/POTFILES
1761
 
          }
1762
 
         ' "$1/Makefile.in" >"$1/Makefile"]
1763
 
    rm -f "$1/Makefile.tmp"
1764
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
1765
 
  ])
1766
 
])dnl
1767
 
])
1768
 
 
1769
 
# _IT_SUBST(VARIABLE)
1770
 
# -------------------
1771
 
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1772
 
#
1773
 
AC_DEFUN([_IT_SUBST],
1774
 
[
1775
 
AC_SUBST([$1])
1776
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1777
 
]
1778
 
)
1779
 
 
1780
 
# deprecated macros
1781
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1782
 
# A hint is needed for aclocal from Automake <= 1.9.4:
1783
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1784
 
 
1785