~ubuntu-branches/ubuntu/karmic/gnome-screensaver/karmic-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-09-23 12:54:12 UTC
  • mfrom: (1.1.32 upstream)
  • Revision ID: james.westby@ubuntu.com-20090923125412-thw2xjbm00cilt2w
Tags: 2.28.0-0ubuntu1
* New upstream version
  Fixed bugs:
  - #444927, get idle time from xorg (lp: #357494)
  - #463010, Port gnome-screensaver from libglade to gtkbuilder
  - #564061, Install .desktop file
  - #570402, screensaver crash if number of screens changes
  - #570941, String not marked for translation gnome-screensaver-command.c
  - #574896, [Leave message] Cancel button should clean clipboard buffe
  - #576463, can't unlock screen after upgrade until restarting 
             gnome-screensaver
  - #581995, Fade out doesn't properly fall back to gamma number if X server
             only supports 0-size ramp
  - #586174, Encoding key in desktop files is deprecated
  - #589728, gnome-screensaver: implicit declaration g_printf
  - #590776, screensaver is never activated
  - #591193, Update/Create .gitignore
  - #591194, Add Comment and Icon in gnome-screensaver.desktop
  - #594082, gnome-screensaver ignores input when fading to black
  Translators
* debian/control.in:
  - don't use libglade
* debian/patches/06_unbreak_upgrade_from_jaunty.patch:
  - the change is in the new version

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.63],,
17
 
[m4_warning([this file was generated for autoconf 2.63.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
 
17
[m4_warning([this file was generated for autoconf 2.64.
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
 
dnl AM_GCONF_SOURCE_2
23
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
24
 
dnl  (i.e. pass to gconftool-2
25
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
26
 
dnl  you should install foo.schemas files
27
 
dnl
28
 
 
29
 
AC_DEFUN([AM_GCONF_SOURCE_2],
30
 
[
31
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
32
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
33
 
  else
34
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
35
 
  fi
36
 
 
37
 
  AC_ARG_WITH([gconf-source],
38
 
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
39
 
                             [Config database for installing schema files.]),
40
 
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
41
 
 
42
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
43
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
44
 
 
45
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
46
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
47
 
  fi
48
 
 
49
 
  AC_ARG_WITH([gconf-schema-file-dir],
50
 
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
51
 
                             [Directory for installing schema files.]),
52
 
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
53
 
 
54
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
55
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
56
 
 
57
 
  AC_ARG_ENABLE(schemas-install,
58
 
        AC_HELP_STRING([--disable-schemas-install],
59
 
                       [Disable the schemas installation]),
60
 
     [case ${enableval} in
61
 
       yes|no) ;;
62
 
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
63
 
      esac])
64
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
65
 
])
66
 
 
67
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
68
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
69
 
#
70
 
# This file is free software, distributed under the terms of the GNU
71
 
# General Public License.  As a special exception to the GNU General
72
 
# Public License, this file may be distributed as part of a program
73
 
# that contains a configuration script generated by Autoconf, under
74
 
# the same distribution terms as the rest of that program.
75
 
#
76
 
# This file can be copied and used freely without restrictions.  It can
77
 
# be used in projects which are not available under the GNU Public License
78
 
# but which still want to provide support for the GNU gettext functionality.
79
 
#
80
 
# Macro to add for using GNU gettext.
81
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
82
 
#
83
 
# Modified to never use included libintl. 
84
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
85
 
#
86
 
# Major rework to remove unused code
87
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
88
 
#
89
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
90
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
91
 
#
92
 
# Modified to require ngettext
93
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
94
 
#
95
 
# We need this here as well, since someone might use autoconf-2.5x
96
 
# to configure GLib then an older version to configure a package
97
 
# using AM_GLIB_GNU_GETTEXT
98
 
AC_PREREQ(2.53)
99
 
 
100
 
dnl
101
 
dnl We go to great lengths to make sure that aclocal won't 
102
 
dnl try to pull in the installed version of these macros
103
 
dnl when running aclocal in the glib directory.
104
 
dnl
105
 
m4_copy([AC_DEFUN],[glib_DEFUN])
106
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
107
 
dnl
108
 
dnl At the end, if we're not within glib, we'll define the public
109
 
dnl definitions in terms of our private definitions.
110
 
dnl
111
 
 
112
 
# GLIB_LC_MESSAGES
113
 
#--------------------
114
 
glib_DEFUN([GLIB_LC_MESSAGES],
115
 
  [AC_CHECK_HEADERS([locale.h])
116
 
    if test $ac_cv_header_locale_h = yes; then
117
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
118
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
119
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
120
 
    if test $am_cv_val_LC_MESSAGES = yes; then
121
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
122
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
123
 
    fi
124
 
  fi])
125
 
 
126
 
# GLIB_PATH_PROG_WITH_TEST
127
 
#----------------------------
128
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
129
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
130
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
131
 
[# Extract the first word of "$2", so it can be a program name with args.
132
 
set dummy $2; ac_word=[$]2
133
 
AC_MSG_CHECKING([for $ac_word])
134
 
AC_CACHE_VAL(ac_cv_path_$1,
135
 
[case "[$]$1" in
136
 
  /*)
137
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
138
 
  ;;
139
 
  *)
140
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
141
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
142
 
    test -z "$ac_dir" && ac_dir=.
143
 
    if test -f $ac_dir/$ac_word; then
144
 
      if [$3]; then
145
 
        ac_cv_path_$1="$ac_dir/$ac_word"
146
 
        break
147
 
      fi
148
 
    fi
149
 
  done
150
 
  IFS="$ac_save_ifs"
151
 
dnl If no 4th arg is given, leave the cache variable unset,
152
 
dnl so AC_PATH_PROGS will keep looking.
153
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
154
 
])dnl
155
 
  ;;
156
 
esac])dnl
157
 
$1="$ac_cv_path_$1"
158
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
159
 
  AC_MSG_RESULT([$]$1)
160
 
else
161
 
  AC_MSG_RESULT(no)
162
 
fi
163
 
AC_SUBST($1)dnl
164
 
])
165
 
 
166
 
# GLIB_WITH_NLS
167
 
#-----------------
168
 
glib_DEFUN([GLIB_WITH_NLS],
169
 
  dnl NLS is obligatory
170
 
  [USE_NLS=yes
171
 
    AC_SUBST(USE_NLS)
172
 
 
173
 
    gt_cv_have_gettext=no
174
 
 
175
 
    CATOBJEXT=NONE
176
 
    XGETTEXT=:
177
 
    INTLLIBS=
178
 
 
179
 
    AC_CHECK_HEADER(libintl.h,
180
 
     [gt_cv_func_dgettext_libintl="no"
181
 
      libintl_extra_libs=""
182
 
 
183
 
      #
184
 
      # First check in libc
185
 
      #
186
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
187
 
        [AC_TRY_LINK([
188
 
#include <libintl.h>
189
 
],
190
 
         [return !ngettext ("","", 1)],
191
 
          gt_cv_func_ngettext_libc=yes,
192
 
          gt_cv_func_ngettext_libc=no)
193
 
        ])
194
 
  
195
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
196
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
197
 
                [AC_TRY_LINK([
198
 
#include <libintl.h>
199
 
],
200
 
                  [return !dgettext ("","")],
201
 
                  gt_cv_func_dgettext_libc=yes,
202
 
                  gt_cv_func_dgettext_libc=no)
203
 
                ])
204
 
      fi
205
 
  
206
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
207
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
208
 
      fi
209
 
 
210
 
      #
211
 
      # If we don't have everything we want, check in libintl
212
 
      #
213
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
214
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
215
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
216
 
        
217
 
        AC_CHECK_LIB(intl, bindtextdomain,
218
 
            [AC_CHECK_LIB(intl, ngettext,
219
 
                    [AC_CHECK_LIB(intl, dgettext,
220
 
                                  gt_cv_func_dgettext_libintl=yes)])])
221
 
 
222
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
223
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
224
 
          AC_MSG_RESULT([])
225
 
          AC_CHECK_LIB(intl, ngettext,
226
 
                [AC_CHECK_LIB(intl, dcgettext,
227
 
                       [gt_cv_func_dgettext_libintl=yes
228
 
                        libintl_extra_libs=-liconv],
229
 
                        :,-liconv)],
230
 
                :,-liconv)
231
 
        fi
232
 
 
233
 
        #
234
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
235
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
236
 
        # and both have dgettext and ngettext
237
 
        #
238
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
239
 
          glib_save_LIBS="$LIBS"
240
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
241
 
          unset ac_cv_func_bind_textdomain_codeset
242
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
243
 
          LIBS="$glib_save_LIBS"
244
 
 
245
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
246
 
            gt_cv_func_dgettext_libc=no
247
 
          else
248
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
249
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
250
 
              gt_cv_func_dgettext_libintl=no
251
 
            fi
252
 
          fi
253
 
        fi
254
 
      fi
255
 
 
256
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
257
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
258
 
        gt_cv_have_gettext=yes
259
 
      fi
260
 
  
261
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
262
 
        INTLLIBS="-lintl $libintl_extra_libs"
263
 
      fi
264
 
  
265
 
      if test "$gt_cv_have_gettext" = "yes"; then
266
 
        AC_DEFINE(HAVE_GETTEXT,1,
267
 
          [Define if the GNU gettext() function is already present or preinstalled.])
268
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
269
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
270
 
        if test "$MSGFMT" != "no"; then
271
 
          glib_save_LIBS="$LIBS"
272
 
          LIBS="$LIBS $INTLLIBS"
273
 
          AC_CHECK_FUNCS(dcgettext)
274
 
          MSGFMT_OPTS=
275
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
276
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
277
 
msgid ""
278
 
msgstr ""
279
 
"Content-Type: text/plain; charset=UTF-8\n"
280
 
"Project-Id-Version: test 1.0\n"
281
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
282
 
"Last-Translator: test <foo@bar.xx>\n"
283
 
"Language-Team: C <LL@li.org>\n"
284
 
"MIME-Version: 1.0\n"
285
 
"Content-Transfer-Encoding: 8bit\n"
286
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
287
 
          AC_SUBST(MSGFMT_OPTS)
288
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
289
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
290
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
291
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
292
 
                         return _nl_msg_cat_cntr],
293
 
            [CATOBJEXT=.gmo 
294
 
             DATADIRNAME=share],
295
 
            [case $host in
296
 
            *-*-solaris*)
297
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
298
 
            dnl GNU format message catalog is always supported,
299
 
            dnl since both are added to the libc all together.
300
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
301
 
            dnl and CATOBJEXT=.gmo in this case.
302
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
303
 
              [CATOBJEXT=.gmo 
304
 
               DATADIRNAME=share],
305
 
              [CATOBJEXT=.mo
306
 
               DATADIRNAME=lib])
307
 
            ;;
308
 
            *)
309
 
            CATOBJEXT=.mo
310
 
            DATADIRNAME=lib
311
 
            ;;
312
 
            esac])
313
 
          LIBS="$glib_save_LIBS"
314
 
          INSTOBJEXT=.mo
315
 
        else
316
 
          gt_cv_have_gettext=no
317
 
        fi
318
 
      fi
319
 
    ])
320
 
 
321
 
    if test "$gt_cv_have_gettext" = "yes" ; then
322
 
      AC_DEFINE(ENABLE_NLS, 1,
323
 
        [always defined to indicate that i18n is enabled])
324
 
    fi
325
 
 
326
 
    dnl Test whether we really found GNU xgettext.
327
 
    if test "$XGETTEXT" != ":"; then
328
 
      dnl If it is not GNU xgettext we define it as : so that the
329
 
      dnl Makefiles still can work.
330
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
331
 
        : ;
332
 
      else
333
 
        AC_MSG_RESULT(
334
 
          [found xgettext program is not GNU xgettext; ignore it])
335
 
        XGETTEXT=":"
336
 
      fi
337
 
    fi
338
 
 
339
 
    # We need to process the po/ directory.
340
 
    POSUB=po
341
 
 
342
 
    AC_OUTPUT_COMMANDS(
343
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
344
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
345
 
      esac])
346
 
 
347
 
    dnl These rules are solely for the distribution goal.  While doing this
348
 
    dnl we only have to keep exactly one list of the available catalogs
349
 
    dnl in configure.in.
350
 
    for lang in $ALL_LINGUAS; do
351
 
      GMOFILES="$GMOFILES $lang.gmo"
352
 
      POFILES="$POFILES $lang.po"
353
 
    done
354
 
 
355
 
    dnl Make all variables we use known to autoconf.
356
 
    AC_SUBST(CATALOGS)
357
 
    AC_SUBST(CATOBJEXT)
358
 
    AC_SUBST(DATADIRNAME)
359
 
    AC_SUBST(GMOFILES)
360
 
    AC_SUBST(INSTOBJEXT)
361
 
    AC_SUBST(INTLLIBS)
362
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
363
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
364
 
    AC_SUBST(POFILES)
365
 
    AC_SUBST(POSUB)
366
 
  ])
367
 
 
368
 
# AM_GLIB_GNU_GETTEXT
369
 
# -------------------
370
 
# Do checks necessary for use of gettext. If a suitable implementation 
371
 
# of gettext is found in either in libintl or in the C library,
372
 
# it will set INTLLIBS to the libraries needed for use of gettext
373
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
374
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
375
 
# on various variables needed by the Makefile.in.in installed by 
376
 
# glib-gettextize.
377
 
dnl
378
 
glib_DEFUN([GLIB_GNU_GETTEXT],
379
 
  [AC_REQUIRE([AC_PROG_CC])dnl
380
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
381
 
   
382
 
   GLIB_LC_MESSAGES
383
 
   GLIB_WITH_NLS
384
 
 
385
 
   if test "$gt_cv_have_gettext" = "yes"; then
386
 
     if test "x$ALL_LINGUAS" = "x"; then
387
 
       LINGUAS=
388
 
     else
389
 
       AC_MSG_CHECKING(for catalogs to be installed)
390
 
       NEW_LINGUAS=
391
 
       for presentlang in $ALL_LINGUAS; do
392
 
         useit=no
393
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
394
 
           desiredlanguages="$LINGUAS"
395
 
         else
396
 
           desiredlanguages="$ALL_LINGUAS"
397
 
         fi
398
 
         for desiredlang in $desiredlanguages; do
399
 
           # Use the presentlang catalog if desiredlang is
400
 
           #   a. equal to presentlang, or
401
 
           #   b. a variant of presentlang (because in this case,
402
 
           #      presentlang can be used as a fallback for messages
403
 
           #      which are not translated in the desiredlang catalog).
404
 
           case "$desiredlang" in
405
 
             "$presentlang"*) useit=yes;;
406
 
           esac
407
 
         done
408
 
         if test $useit = yes; then
409
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
410
 
         fi
411
 
       done
412
 
       LINGUAS=$NEW_LINGUAS
413
 
       AC_MSG_RESULT($LINGUAS)
414
 
     fi
415
 
 
416
 
     dnl Construct list of names of catalog files to be constructed.
417
 
     if test -n "$LINGUAS"; then
418
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
419
 
     fi
420
 
   fi
421
 
 
422
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
423
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
424
 
   dnl Try to locate is.
425
 
   MKINSTALLDIRS=
426
 
   if test -n "$ac_aux_dir"; then
427
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
428
 
   fi
429
 
   if test -z "$MKINSTALLDIRS"; then
430
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
431
 
   fi
432
 
   AC_SUBST(MKINSTALLDIRS)
433
 
 
434
 
   dnl Generate list of files to be processed by xgettext which will
435
 
   dnl be included in po/Makefile.
436
 
   test -d po || mkdir po
437
 
   if test "x$srcdir" != "x."; then
438
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
439
 
       posrcprefix="$srcdir/"
440
 
     else
441
 
       posrcprefix="../$srcdir/"
442
 
     fi
443
 
   else
444
 
     posrcprefix="../"
445
 
   fi
446
 
   rm -f po/POTFILES
447
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
448
 
        < $srcdir/po/POTFILES.in > po/POTFILES
449
 
  ])
450
 
 
451
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
452
 
# -------------------------------
453
 
# Define VARIABLE to the location where catalog files will
454
 
# be installed by po/Makefile.
455
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
456
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
457
 
glib_save_prefix="$prefix"
458
 
glib_save_exec_prefix="$exec_prefix"
459
 
glib_save_datarootdir="$datarootdir"
460
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
461
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
462
 
datarootdir=`eval echo "${datarootdir}"`
463
 
if test "x$CATOBJEXT" = "x.mo" ; then
464
 
  localedir=`eval echo "${libdir}/locale"`
465
 
else
466
 
  localedir=`eval echo "${datadir}/locale"`
467
 
fi
468
 
prefix="$glib_save_prefix"
469
 
exec_prefix="$glib_save_exec_prefix"
470
 
datarootdir="$glib_save_datarootdir"
471
 
AC_DEFINE_UNQUOTED($1, "$localedir",
472
 
  [Define the location where the catalogs will be installed])
473
 
])
474
 
 
475
 
dnl
476
 
dnl Now the definitions that aclocal will find
477
 
dnl
478
 
ifdef(glib_configure_in,[],[
479
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
480
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
481
 
])dnl
482
 
 
483
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
484
 
485
 
# Create a temporary file with TEST-FILE as its contents and pass the
486
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
487
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
488
 
AC_DEFUN([GLIB_RUN_PROG],
489
 
[cat >conftest.foo <<_ACEOF
490
 
$2
491
 
_ACEOF
492
 
if AC_RUN_LOG([$1 conftest.foo]); then
493
 
  m4_ifval([$3], [$3], [:])
494
 
m4_ifvaln([$4], [else $4])dnl
495
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
496
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
497
 
fi])
498
 
 
499
 
 
500
 
dnl GNOME_COMPILE_WARNINGS
501
 
dnl Turn on many useful compiler warnings
502
 
dnl For now, only works on GCC
503
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
504
 
    dnl ******************************
505
 
    dnl More compiler warnings
506
 
    dnl ******************************
507
 
 
508
 
    AC_ARG_ENABLE(compile-warnings, 
509
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
510
 
                                 [Turn on compiler warnings]),,
511
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
512
 
 
513
 
    warnCFLAGS=
514
 
    if test "x$GCC" != xyes; then
515
 
        enable_compile_warnings=no
516
 
    fi
517
 
 
518
 
    warning_flags=
519
 
    realsave_CFLAGS="$CFLAGS"
520
 
 
521
 
    case "$enable_compile_warnings" in
522
 
    no)
523
 
        warning_flags=
524
 
        ;;
525
 
    minimum)
526
 
        warning_flags="-Wall"
527
 
        ;;
528
 
    yes)
529
 
        warning_flags="-Wall -Wmissing-prototypes"
530
 
        ;;
531
 
    maximum|error)
532
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
533
 
        CFLAGS="$warning_flags $CFLAGS"
534
 
        for option in -Wno-sign-compare; do
535
 
                SAVE_CFLAGS="$CFLAGS"
536
 
                CFLAGS="$CFLAGS $option"
537
 
                AC_MSG_CHECKING([whether gcc understands $option])
538
 
                AC_TRY_COMPILE([], [],
539
 
                        has_option=yes,
540
 
                        has_option=no,)
541
 
                CFLAGS="$SAVE_CFLAGS"
542
 
                AC_MSG_RESULT($has_option)
543
 
                if test $has_option = yes; then
544
 
                  warning_flags="$warning_flags $option"
545
 
                fi
546
 
                unset has_option
547
 
                unset SAVE_CFLAGS
548
 
        done
549
 
        unset option
550
 
        if test "$enable_compile_warnings" = "error" ; then
551
 
            warning_flags="$warning_flags -Werror"
552
 
        fi
553
 
        ;;
554
 
    *)
555
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
556
 
        ;;
557
 
    esac
558
 
    CFLAGS="$realsave_CFLAGS"
559
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
560
 
    AC_MSG_RESULT($warning_flags)
561
 
 
562
 
    AC_ARG_ENABLE(iso-c,
563
 
                  AC_HELP_STRING([--enable-iso-c],
564
 
                                 [Try to warn if code is not ISO C ]),,
565
 
                  [enable_iso_c=no])
566
 
 
567
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
568
 
    complCFLAGS=
569
 
    if test "x$enable_iso_c" != "xno"; then
570
 
        if test "x$GCC" = "xyes"; then
571
 
        case " $CFLAGS " in
572
 
            *[\ \       ]-ansi[\ \      ]*) ;;
573
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
574
 
        esac
575
 
        case " $CFLAGS " in
576
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
577
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
578
 
        esac
579
 
        fi
580
 
    fi
581
 
    AC_MSG_RESULT($complCFLAGS)
582
 
 
583
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
584
 
    AC_SUBST(WARN_CFLAGS)
585
 
])
586
 
 
587
 
dnl For C++, do basically the same thing.
588
 
 
589
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
590
 
  AC_ARG_ENABLE(cxx-warnings,
591
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
592
 
                               [Turn on compiler warnings.]),,
593
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
594
 
 
595
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
596
 
  warnCXXFLAGS=
597
 
  if test "x$GXX" != xyes; then
598
 
    enable_cxx_warnings=no
599
 
  fi
600
 
  if test "x$enable_cxx_warnings" != "xno"; then
601
 
    if test "x$GXX" = "xyes"; then
602
 
      case " $CXXFLAGS " in
603
 
      *[\ \     ]-Wall[\ \      ]*) ;;
604
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
605
 
      esac
606
 
 
607
 
      ## -W is not all that useful.  And it cannot be controlled
608
 
      ## with individual -Wno-xxx flags, unlike -Wall
609
 
      if test "x$enable_cxx_warnings" = "xyes"; then
610
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
611
 
      fi
612
 
    fi
613
 
  fi
614
 
  AC_MSG_RESULT($warnCXXFLAGS)
615
 
 
616
 
   AC_ARG_ENABLE(iso-cxx,
617
 
                 AC_HELP_STRING([--enable-iso-cxx],
618
 
                                [Try to warn if code is not ISO C++ ]),,
619
 
                 [enable_iso_cxx=no])
620
 
 
621
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
622
 
   complCXXFLAGS=
623
 
   if test "x$enable_iso_cxx" != "xno"; then
624
 
     if test "x$GXX" = "xyes"; then
625
 
      case " $CXXFLAGS " in
626
 
      *[\ \     ]-ansi[\ \      ]*) ;;
627
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
628
 
      esac
629
 
 
630
 
      case " $CXXFLAGS " in
631
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
632
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
633
 
      esac
634
 
     fi
635
 
   fi
636
 
  AC_MSG_RESULT($complCXXFLAGS)
637
 
 
638
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
639
 
  AC_SUBST(WARN_CXXFLAGS)
640
 
])
641
 
 
642
 
 
643
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
644
 
# serial 40 IT_PROG_INTLTOOL
645
 
AC_DEFUN([IT_PROG_INTLTOOL], [
646
 
AC_PREREQ([2.50])dnl
647
 
AC_REQUIRE([AM_NLS])dnl
648
 
 
649
 
case "$am__api_version" in
650
 
    1.[01234])
651
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
652
 
    ;;
653
 
    *)
654
 
    ;;
655
 
esac
656
 
 
657
 
if test -n "$1"; then
658
 
    AC_MSG_CHECKING([for intltool >= $1])
659
 
 
660
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
661
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
662
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
663
 
    ]
664
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
665
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
666
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
667
 
fi
668
 
 
669
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
670
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
671
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
672
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
673
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
674
 
fi
675
 
 
676
 
  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 $< [$]@' 
677
 
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 $< [$]@' 
678
 
     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 $< [$]@' 
679
 
     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 $< [$]@' 
680
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
681
 
     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 $< [$]@' 
682
 
   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 $< [$]@' 
683
 
    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 $< [$]@' 
684
 
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 $< [$]@' 
685
 
       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 $< [$]@' 
686
 
      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 $< [$]@' 
687
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
688
 
      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 $< [$]@' 
689
 
      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 $< [$]@' 
690
 
    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 $< [$]@' 
691
 
  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 $< [$]@' 
692
 
    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 $< [$]@' 
693
 
    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 $< [$]@'
694
 
   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 $< [$]@'
695
 
 
696
 
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
697
 
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
698
 
_IT_SUBST(INTLTOOL_KEYS_RULE)
699
 
_IT_SUBST(INTLTOOL_PROP_RULE)
700
 
_IT_SUBST(INTLTOOL_OAF_RULE)
701
 
_IT_SUBST(INTLTOOL_PONG_RULE)
702
 
_IT_SUBST(INTLTOOL_SERVER_RULE)
703
 
_IT_SUBST(INTLTOOL_SHEET_RULE)
704
 
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
705
 
_IT_SUBST(INTLTOOL_UI_RULE)
706
 
_IT_SUBST(INTLTOOL_XAM_RULE)
707
 
_IT_SUBST(INTLTOOL_KBD_RULE)
708
 
_IT_SUBST(INTLTOOL_XML_RULE)
709
 
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
710
 
_IT_SUBST(INTLTOOL_CAVES_RULE)
711
 
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
712
 
_IT_SUBST(INTLTOOL_THEME_RULE)
713
 
_IT_SUBST(INTLTOOL_SERVICE_RULE)
714
 
_IT_SUBST(INTLTOOL_POLICY_RULE)
715
 
 
716
 
# Check the gettext tools to make sure they are GNU
717
 
AC_PATH_PROG(XGETTEXT, xgettext)
718
 
AC_PATH_PROG(MSGMERGE, msgmerge)
719
 
AC_PATH_PROG(MSGFMT, msgfmt)
720
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
721
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
722
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
723
 
fi
724
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
725
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
726
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
727
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
728
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
729
 
fi
730
 
 
731
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
732
 
if test -z "$INTLTOOL_PERL"; then
733
 
   AC_MSG_ERROR([perl not found])
734
 
fi
735
 
AC_MSG_CHECKING([for perl >= 5.8.1])
736
 
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
737
 
if test $? -ne 0; then
738
 
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
739
 
else
740
 
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
741
 
   AC_MSG_RESULT([$IT_PERL_VERSION])
742
 
fi
743
 
if test "x$2" != "xno-xml"; then
744
 
   AC_MSG_CHECKING([for XML::Parser])
745
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
746
 
       AC_MSG_RESULT([ok])
747
 
   else
748
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
749
 
   fi
750
 
fi
751
 
 
752
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
753
 
AC_SUBST(ALL_LINGUAS)
754
 
 
755
 
# Set DATADIRNAME correctly if it is not set yet
756
 
# (copied from glib-gettext.m4)
757
 
if test -z "$DATADIRNAME"; then
758
 
  AC_LINK_IFELSE(
759
 
    [AC_LANG_PROGRAM([[]],
760
 
                     [[extern int _nl_msg_cat_cntr;
761
 
                       return _nl_msg_cat_cntr]])],
762
 
    [DATADIRNAME=share],
763
 
    [case $host in
764
 
    *-*-solaris*)
765
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
766
 
    dnl GNU format message catalog is always supported,
767
 
    dnl since both are added to the libc all together.
768
 
    dnl Hence, we'd like to go with DATADIRNAME=share
769
 
    dnl in this case.
770
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
771
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
772
 
    ;;
773
 
    *)
774
 
    [DATADIRNAME=lib]
775
 
    ;;
776
 
    esac])
777
 
fi
778
 
AC_SUBST(DATADIRNAME)
779
 
 
780
 
IT_PO_SUBDIR([po])
781
 
 
782
 
])
783
 
 
784
 
 
785
 
# IT_PO_SUBDIR(DIRNAME)
786
 
# ---------------------
787
 
# All po subdirs have to be declared with this macro; the subdir "po" is
788
 
# declared by IT_PROG_INTLTOOL.
789
 
#
790
 
AC_DEFUN([IT_PO_SUBDIR],
791
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
792
 
dnl
793
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
794
 
dnl of config.status.
795
 
AC_CONFIG_COMMANDS_PRE([
796
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
797
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
798
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
799
 
    fi
800
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
801
 
    >"$1/stamp-it.tmp"
802
 
    [sed '/^#/d
803
 
         s/^[[].*] *//
804
 
         /^[    ]*$/d
805
 
        '"s|^|  $ac_top_srcdir/|" \
806
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
807
 
    ]
808
 
    [sed '/^POTFILES =/,/[^\\]$/ {
809
 
                /^POTFILES =/!d
810
 
                r $1/POTFILES
811
 
          }
812
 
         ' "$1/Makefile.in" >"$1/Makefile"]
813
 
    rm -f "$1/Makefile.tmp"
814
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
815
 
  ])
816
 
])dnl
817
 
])
818
 
 
819
 
# _IT_SUBST(VARIABLE)
820
 
# -------------------
821
 
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
822
 
#
823
 
AC_DEFUN([_IT_SUBST],
824
 
[
825
 
AC_SUBST([$1])
826
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
827
 
]
828
 
)
829
 
 
830
 
# deprecated macros
831
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
832
 
# A hint is needed for aclocal from Automake <= 1.9.4:
833
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
834
 
 
835
 
 
836
22
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
837
23
#
838
24
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3299
2485
  # before this can be enabled.
3300
2486
  hardcode_into_libs=yes
3301
2487
 
3302
 
  # Add ABI-specific directories to the system library path.
3303
 
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3304
 
 
3305
2488
  # Append ld.so.conf contents to the search path
3306
2489
  if test -f /etc/ld.so.conf; then
3307
2490
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3308
 
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
 
2491
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3309
2492
  fi
3310
2493
 
3311
2494
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3317
2500
  dynamic_linker='GNU/Linux ld.so'
3318
2501
  ;;
3319
2502
 
 
2503
netbsdelf*-gnu)
 
2504
  version_type=linux
 
2505
  need_lib_prefix=no
 
2506
  need_version=no
 
2507
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2508
  soname_spec='${libname}${release}${shared_ext}$major'
 
2509
  shlibpath_var=LD_LIBRARY_PATH
 
2510
  shlibpath_overrides_runpath=no
 
2511
  hardcode_into_libs=yes
 
2512
  dynamic_linker='NetBSD ld.elf_so'
 
2513
  ;;
 
2514
 
3320
2515
netbsd*)
3321
2516
  version_type=sunos
3322
2517
  need_lib_prefix=no
3908
3103
  lt_cv_deplibs_check_method=pass_all
3909
3104
  ;;
3910
3105
 
3911
 
netbsd*)
 
3106
netbsd* | netbsdelf*-gnu)
3912
3107
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3913
3108
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3914
3109
  else
4589
3784
            ;;
4590
3785
        esac
4591
3786
        ;;
4592
 
      netbsd*)
 
3787
      netbsd* | netbsdelf*-gnu)
4593
3788
        ;;
4594
3789
      *qnx* | *nto*)
4595
3790
        # QNX uses GNU C++, but need to define -shared option too, otherwise
5014
4209
  cygwin* | mingw* | cegcc*)
5015
4210
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5016
4211
  ;;
 
4212
  linux* | k*bsd*-gnu)
 
4213
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
4214
  ;;
5017
4215
  *)
5018
4216
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5019
4217
  ;;
5078
4276
  openbsd*)
5079
4277
    with_gnu_ld=no
5080
4278
    ;;
 
4279
  linux* | k*bsd*-gnu)
 
4280
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
4281
    ;;
5081
4282
  esac
5082
4283
 
5083
4284
  _LT_TAGVAR(ld_shlibs, $1)=yes
5260
4461
      fi
5261
4462
      ;;
5262
4463
 
5263
 
    netbsd*)
 
4464
    netbsd* | netbsdelf*-gnu)
5264
4465
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5265
4466
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5266
4467
        wlarc=
5435
4636
        if test "$aix_use_runtimelinking" = yes; then
5436
4637
          shared_flag="$shared_flag "'${wl}-G'
5437
4638
        fi
 
4639
        _LT_TAGVAR(link_all_deplibs, $1)=no
5438
4640
      else
5439
4641
        # not using gcc
5440
4642
        if test "$host_cpu" = ia64; then
5673
4875
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5674
4876
      ;;
5675
4877
 
5676
 
    netbsd*)
 
4878
    netbsd* | netbsdelf*-gnu)
5677
4879
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5678
4880
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5679
4881
      else
8882
8084
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8883
8085
# ---------------------------------------------
8884
8086
m4_define([_PKG_CONFIG],
8885
 
[if test -n "$$1"; then
8886
 
    pkg_cv_[]$1="$$1"
8887
 
 elif test -n "$PKG_CONFIG"; then
8888
 
    PKG_CHECK_EXISTS([$3],
8889
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8890
 
                     [pkg_failed=yes])
8891
 
 else
8892
 
    pkg_failed=untried
 
8087
[if test -n "$PKG_CONFIG"; then
 
8088
    if test -n "$$1"; then
 
8089
        pkg_cv_[]$1="$$1"
 
8090
    else
 
8091
        PKG_CHECK_EXISTS([$3],
 
8092
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
8093
                         [pkg_failed=yes])
 
8094
    fi
 
8095
else
 
8096
        pkg_failed=untried
8893
8097
fi[]dnl
8894
8098
])# _PKG_CONFIG
8895
8099
 
8933
8137
if test $pkg_failed = yes; then
8934
8138
        _PKG_SHORT_ERRORS_SUPPORTED
8935
8139
        if test $_pkg_short_errors_supported = yes; then
8936
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
8140
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
8937
8141
        else 
8938
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
8142
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8939
8143
        fi
8940
8144
        # Put the nasty error message in config.log where it belongs
8941
8145
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9987
9191
AC_SUBST([am__untar])
9988
9192
]) # _AM_PROG_TAR
9989
9193
 
 
9194
dnl AM_GCONF_SOURCE_2
 
9195
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
9196
dnl  (i.e. pass to gconftool-2
 
9197
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
9198
dnl  you should install foo.schemas files
 
9199
dnl
 
9200
 
 
9201
AC_DEFUN([AM_GCONF_SOURCE_2],
 
9202
[
 
9203
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
9204
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
9205
  else
 
9206
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
9207
  fi
 
9208
 
 
9209
  AC_ARG_WITH([gconf-source],
 
9210
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
 
9211
                             [Config database for installing schema files.]),
 
9212
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
 
9213
 
 
9214
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
9215
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
9216
 
 
9217
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
9218
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
9219
  fi
 
9220
 
 
9221
  AC_ARG_WITH([gconf-schema-file-dir],
 
9222
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
 
9223
                             [Directory for installing schema files.]),
 
9224
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
 
9225
 
 
9226
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
9227
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
9228
 
 
9229
  AC_ARG_ENABLE(schemas-install,
 
9230
        AC_HELP_STRING([--disable-schemas-install],
 
9231
                       [Disable the schemas installation]),
 
9232
     [case ${enableval} in
 
9233
       yes|no) ;;
 
9234
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
 
9235
      esac])
 
9236
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
9237
])
 
9238
 
 
9239
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
9240
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
9241
#
 
9242
# This file is free software, distributed under the terms of the GNU
 
9243
# General Public License.  As a special exception to the GNU General
 
9244
# Public License, this file may be distributed as part of a program
 
9245
# that contains a configuration script generated by Autoconf, under
 
9246
# the same distribution terms as the rest of that program.
 
9247
#
 
9248
# This file can be copied and used freely without restrictions.  It can
 
9249
# be used in projects which are not available under the GNU Public License
 
9250
# but which still want to provide support for the GNU gettext functionality.
 
9251
#
 
9252
# Macro to add for using GNU gettext.
 
9253
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
9254
#
 
9255
# Modified to never use included libintl. 
 
9256
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
9257
#
 
9258
# Major rework to remove unused code
 
9259
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
9260
#
 
9261
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
9262
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
9263
#
 
9264
# Modified to require ngettext
 
9265
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
9266
#
 
9267
# We need this here as well, since someone might use autoconf-2.5x
 
9268
# to configure GLib then an older version to configure a package
 
9269
# using AM_GLIB_GNU_GETTEXT
 
9270
AC_PREREQ(2.53)
 
9271
 
 
9272
dnl
 
9273
dnl We go to great lengths to make sure that aclocal won't 
 
9274
dnl try to pull in the installed version of these macros
 
9275
dnl when running aclocal in the glib directory.
 
9276
dnl
 
9277
m4_copy([AC_DEFUN],[glib_DEFUN])
 
9278
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
9279
dnl
 
9280
dnl At the end, if we're not within glib, we'll define the public
 
9281
dnl definitions in terms of our private definitions.
 
9282
dnl
 
9283
 
 
9284
# GLIB_LC_MESSAGES
 
9285
#--------------------
 
9286
glib_DEFUN([GLIB_LC_MESSAGES],
 
9287
  [AC_CHECK_HEADERS([locale.h])
 
9288
    if test $ac_cv_header_locale_h = yes; then
 
9289
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
9290
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
9291
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
9292
    if test $am_cv_val_LC_MESSAGES = yes; then
 
9293
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
9294
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
9295
    fi
 
9296
  fi])
 
9297
 
 
9298
# GLIB_PATH_PROG_WITH_TEST
 
9299
#----------------------------
 
9300
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
9301
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
9302
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
9303
[# Extract the first word of "$2", so it can be a program name with args.
 
9304
set dummy $2; ac_word=[$]2
 
9305
AC_MSG_CHECKING([for $ac_word])
 
9306
AC_CACHE_VAL(ac_cv_path_$1,
 
9307
[case "[$]$1" in
 
9308
  /*)
 
9309
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
9310
  ;;
 
9311
  *)
 
9312
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
9313
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
9314
    test -z "$ac_dir" && ac_dir=.
 
9315
    if test -f $ac_dir/$ac_word; then
 
9316
      if [$3]; then
 
9317
        ac_cv_path_$1="$ac_dir/$ac_word"
 
9318
        break
 
9319
      fi
 
9320
    fi
 
9321
  done
 
9322
  IFS="$ac_save_ifs"
 
9323
dnl If no 4th arg is given, leave the cache variable unset,
 
9324
dnl so AC_PATH_PROGS will keep looking.
 
9325
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
9326
])dnl
 
9327
  ;;
 
9328
esac])dnl
 
9329
$1="$ac_cv_path_$1"
 
9330
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
9331
  AC_MSG_RESULT([$]$1)
 
9332
else
 
9333
  AC_MSG_RESULT(no)
 
9334
fi
 
9335
AC_SUBST($1)dnl
 
9336
])
 
9337
 
 
9338
# GLIB_WITH_NLS
 
9339
#-----------------
 
9340
glib_DEFUN([GLIB_WITH_NLS],
 
9341
  dnl NLS is obligatory
 
9342
  [USE_NLS=yes
 
9343
    AC_SUBST(USE_NLS)
 
9344
 
 
9345
    gt_cv_have_gettext=no
 
9346
 
 
9347
    CATOBJEXT=NONE
 
9348
    XGETTEXT=:
 
9349
    INTLLIBS=
 
9350
 
 
9351
    AC_CHECK_HEADER(libintl.h,
 
9352
     [gt_cv_func_dgettext_libintl="no"
 
9353
      libintl_extra_libs=""
 
9354
 
 
9355
      #
 
9356
      # First check in libc
 
9357
      #
 
9358
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
9359
        [AC_TRY_LINK([
 
9360
#include <libintl.h>
 
9361
],
 
9362
         [return !ngettext ("","", 1)],
 
9363
          gt_cv_func_ngettext_libc=yes,
 
9364
          gt_cv_func_ngettext_libc=no)
 
9365
        ])
 
9366
  
 
9367
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
9368
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
9369
                [AC_TRY_LINK([
 
9370
#include <libintl.h>
 
9371
],
 
9372
                  [return !dgettext ("","")],
 
9373
                  gt_cv_func_dgettext_libc=yes,
 
9374
                  gt_cv_func_dgettext_libc=no)
 
9375
                ])
 
9376
      fi
 
9377
  
 
9378
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
9379
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
9380
      fi
 
9381
 
 
9382
      #
 
9383
      # If we don't have everything we want, check in libintl
 
9384
      #
 
9385
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
9386
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
9387
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
9388
        
 
9389
        AC_CHECK_LIB(intl, bindtextdomain,
 
9390
            [AC_CHECK_LIB(intl, ngettext,
 
9391
                    [AC_CHECK_LIB(intl, dgettext,
 
9392
                                  gt_cv_func_dgettext_libintl=yes)])])
 
9393
 
 
9394
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
9395
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
9396
          AC_MSG_RESULT([])
 
9397
          AC_CHECK_LIB(intl, ngettext,
 
9398
                [AC_CHECK_LIB(intl, dcgettext,
 
9399
                       [gt_cv_func_dgettext_libintl=yes
 
9400
                        libintl_extra_libs=-liconv],
 
9401
                        :,-liconv)],
 
9402
                :,-liconv)
 
9403
        fi
 
9404
 
 
9405
        #
 
9406
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
9407
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
9408
        # and both have dgettext and ngettext
 
9409
        #
 
9410
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
9411
          glib_save_LIBS="$LIBS"
 
9412
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
9413
          unset ac_cv_func_bind_textdomain_codeset
 
9414
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
9415
          LIBS="$glib_save_LIBS"
 
9416
 
 
9417
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
9418
            gt_cv_func_dgettext_libc=no
 
9419
          else
 
9420
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
9421
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
9422
              gt_cv_func_dgettext_libintl=no
 
9423
            fi
 
9424
          fi
 
9425
        fi
 
9426
      fi
 
9427
 
 
9428
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
9429
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
9430
        gt_cv_have_gettext=yes
 
9431
      fi
 
9432
  
 
9433
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
9434
        INTLLIBS="-lintl $libintl_extra_libs"
 
9435
      fi
 
9436
  
 
9437
      if test "$gt_cv_have_gettext" = "yes"; then
 
9438
        AC_DEFINE(HAVE_GETTEXT,1,
 
9439
          [Define if the GNU gettext() function is already present or preinstalled.])
 
9440
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
9441
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
9442
        if test "$MSGFMT" != "no"; then
 
9443
          glib_save_LIBS="$LIBS"
 
9444
          LIBS="$LIBS $INTLLIBS"
 
9445
          AC_CHECK_FUNCS(dcgettext)
 
9446
          MSGFMT_OPTS=
 
9447
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
9448
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
9449
msgid ""
 
9450
msgstr ""
 
9451
"Content-Type: text/plain; charset=UTF-8\n"
 
9452
"Project-Id-Version: test 1.0\n"
 
9453
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
9454
"Last-Translator: test <foo@bar.xx>\n"
 
9455
"Language-Team: C <LL@li.org>\n"
 
9456
"MIME-Version: 1.0\n"
 
9457
"Content-Transfer-Encoding: 8bit\n"
 
9458
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
9459
          AC_SUBST(MSGFMT_OPTS)
 
9460
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
9461
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
9462
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
9463
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
9464
                         return _nl_msg_cat_cntr],
 
9465
            [CATOBJEXT=.gmo 
 
9466
             DATADIRNAME=share],
 
9467
            [case $host in
 
9468
            *-*-solaris*)
 
9469
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
9470
            dnl GNU format message catalog is always supported,
 
9471
            dnl since both are added to the libc all together.
 
9472
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
9473
            dnl and CATOBJEXT=.gmo in this case.
 
9474
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
9475
              [CATOBJEXT=.gmo 
 
9476
               DATADIRNAME=share],
 
9477
              [CATOBJEXT=.mo
 
9478
               DATADIRNAME=lib])
 
9479
            ;;
 
9480
            *)
 
9481
            CATOBJEXT=.mo
 
9482
            DATADIRNAME=lib
 
9483
            ;;
 
9484
            esac])
 
9485
          LIBS="$glib_save_LIBS"
 
9486
          INSTOBJEXT=.mo
 
9487
        else
 
9488
          gt_cv_have_gettext=no
 
9489
        fi
 
9490
      fi
 
9491
    ])
 
9492
 
 
9493
    if test "$gt_cv_have_gettext" = "yes" ; then
 
9494
      AC_DEFINE(ENABLE_NLS, 1,
 
9495
        [always defined to indicate that i18n is enabled])
 
9496
    fi
 
9497
 
 
9498
    dnl Test whether we really found GNU xgettext.
 
9499
    if test "$XGETTEXT" != ":"; then
 
9500
      dnl If it is not GNU xgettext we define it as : so that the
 
9501
      dnl Makefiles still can work.
 
9502
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
9503
        : ;
 
9504
      else
 
9505
        AC_MSG_RESULT(
 
9506
          [found xgettext program is not GNU xgettext; ignore it])
 
9507
        XGETTEXT=":"
 
9508
      fi
 
9509
    fi
 
9510
 
 
9511
    # We need to process the po/ directory.
 
9512
    POSUB=po
 
9513
 
 
9514
    AC_OUTPUT_COMMANDS(
 
9515
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
9516
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
9517
      esac])
 
9518
 
 
9519
    dnl These rules are solely for the distribution goal.  While doing this
 
9520
    dnl we only have to keep exactly one list of the available catalogs
 
9521
    dnl in configure.in.
 
9522
    for lang in $ALL_LINGUAS; do
 
9523
      GMOFILES="$GMOFILES $lang.gmo"
 
9524
      POFILES="$POFILES $lang.po"
 
9525
    done
 
9526
 
 
9527
    dnl Make all variables we use known to autoconf.
 
9528
    AC_SUBST(CATALOGS)
 
9529
    AC_SUBST(CATOBJEXT)
 
9530
    AC_SUBST(DATADIRNAME)
 
9531
    AC_SUBST(GMOFILES)
 
9532
    AC_SUBST(INSTOBJEXT)
 
9533
    AC_SUBST(INTLLIBS)
 
9534
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
9535
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
9536
    AC_SUBST(POFILES)
 
9537
    AC_SUBST(POSUB)
 
9538
  ])
 
9539
 
 
9540
# AM_GLIB_GNU_GETTEXT
 
9541
# -------------------
 
9542
# Do checks necessary for use of gettext. If a suitable implementation 
 
9543
# of gettext is found in either in libintl or in the C library,
 
9544
# it will set INTLLIBS to the libraries needed for use of gettext
 
9545
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
9546
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
9547
# on various variables needed by the Makefile.in.in installed by 
 
9548
# glib-gettextize.
 
9549
dnl
 
9550
glib_DEFUN([GLIB_GNU_GETTEXT],
 
9551
  [AC_REQUIRE([AC_PROG_CC])dnl
 
9552
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
9553
   
 
9554
   GLIB_LC_MESSAGES
 
9555
   GLIB_WITH_NLS
 
9556
 
 
9557
   if test "$gt_cv_have_gettext" = "yes"; then
 
9558
     if test "x$ALL_LINGUAS" = "x"; then
 
9559
       LINGUAS=
 
9560
     else
 
9561
       AC_MSG_CHECKING(for catalogs to be installed)
 
9562
       NEW_LINGUAS=
 
9563
       for presentlang in $ALL_LINGUAS; do
 
9564
         useit=no
 
9565
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
9566
           desiredlanguages="$LINGUAS"
 
9567
         else
 
9568
           desiredlanguages="$ALL_LINGUAS"
 
9569
         fi
 
9570
         for desiredlang in $desiredlanguages; do
 
9571
           # Use the presentlang catalog if desiredlang is
 
9572
           #   a. equal to presentlang, or
 
9573
           #   b. a variant of presentlang (because in this case,
 
9574
           #      presentlang can be used as a fallback for messages
 
9575
           #      which are not translated in the desiredlang catalog).
 
9576
           case "$desiredlang" in
 
9577
             "$presentlang"*) useit=yes;;
 
9578
           esac
 
9579
         done
 
9580
         if test $useit = yes; then
 
9581
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
9582
         fi
 
9583
       done
 
9584
       LINGUAS=$NEW_LINGUAS
 
9585
       AC_MSG_RESULT($LINGUAS)
 
9586
     fi
 
9587
 
 
9588
     dnl Construct list of names of catalog files to be constructed.
 
9589
     if test -n "$LINGUAS"; then
 
9590
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
9591
     fi
 
9592
   fi
 
9593
 
 
9594
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
9595
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
9596
   dnl Try to locate is.
 
9597
   MKINSTALLDIRS=
 
9598
   if test -n "$ac_aux_dir"; then
 
9599
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
9600
   fi
 
9601
   if test -z "$MKINSTALLDIRS"; then
 
9602
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
9603
   fi
 
9604
   AC_SUBST(MKINSTALLDIRS)
 
9605
 
 
9606
   dnl Generate list of files to be processed by xgettext which will
 
9607
   dnl be included in po/Makefile.
 
9608
   test -d po || mkdir po
 
9609
   if test "x$srcdir" != "x."; then
 
9610
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
9611
       posrcprefix="$srcdir/"
 
9612
     else
 
9613
       posrcprefix="../$srcdir/"
 
9614
     fi
 
9615
   else
 
9616
     posrcprefix="../"
 
9617
   fi
 
9618
   rm -f po/POTFILES
 
9619
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
9620
        < $srcdir/po/POTFILES.in > po/POTFILES
 
9621
  ])
 
9622
 
 
9623
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
9624
# -------------------------------
 
9625
# Define VARIABLE to the location where catalog files will
 
9626
# be installed by po/Makefile.
 
9627
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
9628
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
9629
glib_save_prefix="$prefix"
 
9630
glib_save_exec_prefix="$exec_prefix"
 
9631
glib_save_datarootdir="$datarootdir"
 
9632
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
9633
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
9634
datarootdir=`eval echo "${datarootdir}"`
 
9635
if test "x$CATOBJEXT" = "x.mo" ; then
 
9636
  localedir=`eval echo "${libdir}/locale"`
 
9637
else
 
9638
  localedir=`eval echo "${datadir}/locale"`
 
9639
fi
 
9640
prefix="$glib_save_prefix"
 
9641
exec_prefix="$glib_save_exec_prefix"
 
9642
datarootdir="$glib_save_datarootdir"
 
9643
AC_DEFINE_UNQUOTED($1, "$localedir",
 
9644
  [Define the location where the catalogs will be installed])
 
9645
])
 
9646
 
 
9647
dnl
 
9648
dnl Now the definitions that aclocal will find
 
9649
dnl
 
9650
ifdef(glib_configure_in,[],[
 
9651
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
9652
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
9653
])dnl
 
9654
 
 
9655
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
9656
 
9657
# Create a temporary file with TEST-FILE as its contents and pass the
 
9658
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
9659
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
9660
AC_DEFUN([GLIB_RUN_PROG],
 
9661
[cat >conftest.foo <<_ACEOF
 
9662
$2
 
9663
_ACEOF
 
9664
if AC_RUN_LOG([$1 conftest.foo]); then
 
9665
  m4_ifval([$3], [$3], [:])
 
9666
m4_ifvaln([$4], [else $4])dnl
 
9667
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
9668
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
9669
fi])
 
9670
 
 
9671
 
 
9672
dnl GNOME_COMPILE_WARNINGS
 
9673
dnl Turn on many useful compiler warnings
 
9674
dnl For now, only works on GCC
 
9675
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
9676
    dnl ******************************
 
9677
    dnl More compiler warnings
 
9678
    dnl ******************************
 
9679
 
 
9680
    AC_ARG_ENABLE(compile-warnings, 
 
9681
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
9682
                                 [Turn on compiler warnings]),,
 
9683
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
9684
 
 
9685
    warnCFLAGS=
 
9686
    if test "x$GCC" != xyes; then
 
9687
        enable_compile_warnings=no
 
9688
    fi
 
9689
 
 
9690
    warning_flags=
 
9691
    realsave_CFLAGS="$CFLAGS"
 
9692
 
 
9693
    case "$enable_compile_warnings" in
 
9694
    no)
 
9695
        warning_flags=
 
9696
        ;;
 
9697
    minimum)
 
9698
        warning_flags="-Wall"
 
9699
        ;;
 
9700
    yes)
 
9701
        warning_flags="-Wall -Wmissing-prototypes"
 
9702
        ;;
 
9703
    maximum|error)
 
9704
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
9705
        CFLAGS="$warning_flags $CFLAGS"
 
9706
        for option in -Wno-sign-compare; do
 
9707
                SAVE_CFLAGS="$CFLAGS"
 
9708
                CFLAGS="$CFLAGS $option"
 
9709
                AC_MSG_CHECKING([whether gcc understands $option])
 
9710
                AC_TRY_COMPILE([], [],
 
9711
                        has_option=yes,
 
9712
                        has_option=no,)
 
9713
                CFLAGS="$SAVE_CFLAGS"
 
9714
                AC_MSG_RESULT($has_option)
 
9715
                if test $has_option = yes; then
 
9716
                  warning_flags="$warning_flags $option"
 
9717
                fi
 
9718
                unset has_option
 
9719
                unset SAVE_CFLAGS
 
9720
        done
 
9721
        unset option
 
9722
        if test "$enable_compile_warnings" = "error" ; then
 
9723
            warning_flags="$warning_flags -Werror"
 
9724
        fi
 
9725
        ;;
 
9726
    *)
 
9727
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
9728
        ;;
 
9729
    esac
 
9730
    CFLAGS="$realsave_CFLAGS"
 
9731
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
9732
    AC_MSG_RESULT($warning_flags)
 
9733
 
 
9734
    AC_ARG_ENABLE(iso-c,
 
9735
                  AC_HELP_STRING([--enable-iso-c],
 
9736
                                 [Try to warn if code is not ISO C ]),,
 
9737
                  [enable_iso_c=no])
 
9738
 
 
9739
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
9740
    complCFLAGS=
 
9741
    if test "x$enable_iso_c" != "xno"; then
 
9742
        if test "x$GCC" = "xyes"; then
 
9743
        case " $CFLAGS " in
 
9744
            *[\ \       ]-ansi[\ \      ]*) ;;
 
9745
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
9746
        esac
 
9747
        case " $CFLAGS " in
 
9748
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
9749
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
9750
        esac
 
9751
        fi
 
9752
    fi
 
9753
    AC_MSG_RESULT($complCFLAGS)
 
9754
 
 
9755
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
9756
    AC_SUBST(WARN_CFLAGS)
 
9757
])
 
9758
 
 
9759
dnl For C++, do basically the same thing.
 
9760
 
 
9761
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
9762
  AC_ARG_ENABLE(cxx-warnings,
 
9763
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
9764
                               [Turn on compiler warnings.]),,
 
9765
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
9766
 
 
9767
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
9768
  warnCXXFLAGS=
 
9769
  if test "x$GXX" != xyes; then
 
9770
    enable_cxx_warnings=no
 
9771
  fi
 
9772
  if test "x$enable_cxx_warnings" != "xno"; then
 
9773
    if test "x$GXX" = "xyes"; then
 
9774
      case " $CXXFLAGS " in
 
9775
      *[\ \     ]-Wall[\ \      ]*) ;;
 
9776
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
9777
      esac
 
9778
 
 
9779
      ## -W is not all that useful.  And it cannot be controlled
 
9780
      ## with individual -Wno-xxx flags, unlike -Wall
 
9781
      if test "x$enable_cxx_warnings" = "xyes"; then
 
9782
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
9783
      fi
 
9784
    fi
 
9785
  fi
 
9786
  AC_MSG_RESULT($warnCXXFLAGS)
 
9787
 
 
9788
   AC_ARG_ENABLE(iso-cxx,
 
9789
                 AC_HELP_STRING([--enable-iso-cxx],
 
9790
                                [Try to warn if code is not ISO C++ ]),,
 
9791
                 [enable_iso_cxx=no])
 
9792
 
 
9793
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
9794
   complCXXFLAGS=
 
9795
   if test "x$enable_iso_cxx" != "xno"; then
 
9796
     if test "x$GXX" = "xyes"; then
 
9797
      case " $CXXFLAGS " in
 
9798
      *[\ \     ]-ansi[\ \      ]*) ;;
 
9799
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
9800
      esac
 
9801
 
 
9802
      case " $CXXFLAGS " in
 
9803
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
9804
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
9805
      esac
 
9806
     fi
 
9807
   fi
 
9808
  AC_MSG_RESULT($complCXXFLAGS)
 
9809
 
 
9810
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
9811
  AC_SUBST(WARN_CXXFLAGS)
 
9812
])
 
9813
 
 
9814
 
 
9815
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
9816
# serial 40 IT_PROG_INTLTOOL
 
9817
AC_DEFUN([IT_PROG_INTLTOOL], [
 
9818
AC_PREREQ([2.50])dnl
 
9819
AC_REQUIRE([AM_NLS])dnl
 
9820
 
 
9821
case "$am__api_version" in
 
9822
    1.[01234])
 
9823
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
9824
    ;;
 
9825
    *)
 
9826
    ;;
 
9827
esac
 
9828
 
 
9829
if test -n "$1"; then
 
9830
    AC_MSG_CHECKING([for intltool >= $1])
 
9831
 
 
9832
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
9833
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
9834
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
9835
    ]
 
9836
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
9837
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
9838
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
9839
fi
 
9840
 
 
9841
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
9842
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
9843
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
9844
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
9845
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
9846
fi
 
9847
 
 
9848
  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 $< [$]@' 
 
9849
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 $< [$]@' 
 
9850
     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 $< [$]@' 
 
9851
     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 $< [$]@' 
 
9852
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
9853
     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 $< [$]@' 
 
9854
   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 $< [$]@' 
 
9855
    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 $< [$]@' 
 
9856
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 $< [$]@' 
 
9857
       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 $< [$]@' 
 
9858
      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 $< [$]@' 
 
9859
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
9860
      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 $< [$]@' 
 
9861
      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 $< [$]@' 
 
9862
    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 $< [$]@' 
 
9863
  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 $< [$]@' 
 
9864
    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 $< [$]@' 
 
9865
    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 $< [$]@'
 
9866
   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 $< [$]@'
 
9867
 
 
9868
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
9869
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
9870
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
9871
_IT_SUBST(INTLTOOL_PROP_RULE)
 
9872
_IT_SUBST(INTLTOOL_OAF_RULE)
 
9873
_IT_SUBST(INTLTOOL_PONG_RULE)
 
9874
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
9875
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
9876
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
9877
_IT_SUBST(INTLTOOL_UI_RULE)
 
9878
_IT_SUBST(INTLTOOL_XAM_RULE)
 
9879
_IT_SUBST(INTLTOOL_KBD_RULE)
 
9880
_IT_SUBST(INTLTOOL_XML_RULE)
 
9881
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
9882
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
9883
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
9884
_IT_SUBST(INTLTOOL_THEME_RULE)
 
9885
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
9886
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
9887
 
 
9888
# Check the gettext tools to make sure they are GNU
 
9889
AC_PATH_PROG(XGETTEXT, xgettext)
 
9890
AC_PATH_PROG(MSGMERGE, msgmerge)
 
9891
AC_PATH_PROG(MSGFMT, msgfmt)
 
9892
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
9893
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
9894
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
9895
fi
 
9896
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
9897
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
9898
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
9899
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
9900
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
9901
fi
 
9902
 
 
9903
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
9904
if test -z "$INTLTOOL_PERL"; then
 
9905
   AC_MSG_ERROR([perl not found])
 
9906
fi
 
9907
AC_MSG_CHECKING([for perl >= 5.8.1])
 
9908
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
9909
if test $? -ne 0; then
 
9910
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
9911
else
 
9912
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
9913
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
9914
fi
 
9915
if test "x$2" != "xno-xml"; then
 
9916
   AC_MSG_CHECKING([for XML::Parser])
 
9917
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
9918
       AC_MSG_RESULT([ok])
 
9919
   else
 
9920
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
9921
   fi
 
9922
fi
 
9923
 
 
9924
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
9925
AC_SUBST(ALL_LINGUAS)
 
9926
 
 
9927
# Set DATADIRNAME correctly if it is not set yet
 
9928
# (copied from glib-gettext.m4)
 
9929
if test -z "$DATADIRNAME"; then
 
9930
  AC_LINK_IFELSE(
 
9931
    [AC_LANG_PROGRAM([[]],
 
9932
                     [[extern int _nl_msg_cat_cntr;
 
9933
                       return _nl_msg_cat_cntr]])],
 
9934
    [DATADIRNAME=share],
 
9935
    [case $host in
 
9936
    *-*-solaris*)
 
9937
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
9938
    dnl GNU format message catalog is always supported,
 
9939
    dnl since both are added to the libc all together.
 
9940
    dnl Hence, we'd like to go with DATADIRNAME=share
 
9941
    dnl in this case.
 
9942
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
9943
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
9944
    ;;
 
9945
    *)
 
9946
    [DATADIRNAME=lib]
 
9947
    ;;
 
9948
    esac])
 
9949
fi
 
9950
AC_SUBST(DATADIRNAME)
 
9951
 
 
9952
IT_PO_SUBDIR([po])
 
9953
 
 
9954
])
 
9955
 
 
9956
 
 
9957
# IT_PO_SUBDIR(DIRNAME)
 
9958
# ---------------------
 
9959
# All po subdirs have to be declared with this macro; the subdir "po" is
 
9960
# declared by IT_PROG_INTLTOOL.
 
9961
#
 
9962
AC_DEFUN([IT_PO_SUBDIR],
 
9963
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
9964
dnl
 
9965
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
9966
dnl of config.status.
 
9967
AC_CONFIG_COMMANDS_PRE([
 
9968
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
9969
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
9970
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
9971
    fi
 
9972
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
9973
    >"$1/stamp-it.tmp"
 
9974
    [sed '/^#/d
 
9975
         s/^[[].*] *//
 
9976
         /^[    ]*$/d
 
9977
        '"s|^|  $ac_top_srcdir/|" \
 
9978
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
9979
    ]
 
9980
    [sed '/^POTFILES =/,/[^\\]$/ {
 
9981
                /^POTFILES =/!d
 
9982
                r $1/POTFILES
 
9983
          }
 
9984
         ' "$1/Makefile.in" >"$1/Makefile"]
 
9985
    rm -f "$1/Makefile.tmp"
 
9986
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
9987
  ])
 
9988
])dnl
 
9989
])
 
9990
 
 
9991
# _IT_SUBST(VARIABLE)
 
9992
# -------------------
 
9993
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
9994
#
 
9995
AC_DEFUN([_IT_SUBST],
 
9996
[
 
9997
AC_SUBST([$1])
 
9998
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
9999
]
 
10000
)
 
10001
 
 
10002
# deprecated macros
 
10003
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
10004
# A hint is needed for aclocal from Automake <= 1.9.4:
 
10005
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
10006
 
 
10007