~ubuntu-branches/ubuntu/quantal/libbonobo/quantal-201207170711

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-03-10 17:09:44 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080310170944-llfraf7l0pcqvek3
Tags: 2.22.0-0ubuntu1
* New upstream version
  - Fix warnings from GCC 4.3.x
  - Translation updates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006  Free Software Foundation, Inc.
 
4
# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
m4_if(m4_PACKAGE_VERSION, [2.61],,
15
 
[m4_fatal([this file was generated for autoconf 2.61.
16
 
You have another version of autoconf.  If you want to use that,
17
 
you should regenerate the build system entirely.], [63])])
 
14
m4_ifndef([AC_AUTOCONF_VERSION],
 
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
16
m4_if(AC_AUTOCONF_VERSION, [2.61],,
 
17
[m4_warning([this file was generated for autoconf 2.61.
 
18
You have another version of autoconf.  It may work, but is not guaranteed to.
 
19
If you have problems, you may need to regenerate the build system entirely.
 
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
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)
 
115
else
 
116
  AC_MSG_RESULT(no)
 
117
fi
 
118
AC_SUBST($1)dnl
 
119
])
 
120
 
 
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)
 
321
  ])
 
322
 
 
323
# AM_GLIB_GNU_GETTEXT
 
324
# -------------------
 
325
# Do checks necessary for use of gettext. If a suitable implementation 
 
326
# of gettext is found in either in libintl or in the C library,
 
327
# it will set INTLLIBS to the libraries needed for use of gettext
 
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
330
# on various variables needed by the Makefile.in.in installed by 
 
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])
 
453
 
 
454
 
 
455
# gnome-common.m4
 
456
 
457
 
 
458
dnl GNOME_COMMON_INIT
 
459
 
 
460
AC_DEFUN([GNOME_COMMON_INIT],
 
461
[
 
462
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
463
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
464
 
 
465
  dnl ensure that when the Automake generated makefile calls aclocal,
 
466
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
467
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
468
  if test -n "$ac_macro_dir"; then
 
469
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
470
  fi
 
471
 
 
472
  AC_SUBST([ACLOCAL_AMFLAGS])
 
473
])
 
474
 
 
475
AC_DEFUN([GNOME_DEBUG_CHECK],
 
476
[
 
477
        AC_ARG_ENABLE([debug],
 
478
                      AC_HELP_STRING([--enable-debug],
 
479
                                     [turn on debugging]),,
 
480
                      [enable_debug=no])
 
481
 
 
482
        if test x$enable_debug = xyes ; then
 
483
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
484
                [Enable additional debugging at the expense of performance and size])
 
485
        fi
 
486
])
 
487
 
 
488
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
489
dnl define DISABLE_DEPRECATED
 
490
dnl
 
491
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
492
[
 
493
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
494
 
 
495
        if test $USE_MAINTAINER_MODE = yes; then
 
496
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
 
497
        else
 
498
                DISABLE_DEPRECATED=""
 
499
        fi
 
500
        AC_SUBST(DISABLE_DEPRECATED)
 
501
])
 
502
 
 
503
dnl GNOME_COMPILE_WARNINGS
 
504
dnl Turn on many useful compiler warnings
 
505
dnl For now, only works on GCC
 
506
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
507
    dnl ******************************
 
508
    dnl More compiler warnings
 
509
    dnl ******************************
 
510
 
 
511
    AC_ARG_ENABLE(compile-warnings, 
 
512
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
513
                                 [Turn on compiler warnings]),,
 
514
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
515
 
 
516
    warnCFLAGS=
 
517
    if test "x$GCC" != xyes; then
 
518
        enable_compile_warnings=no
 
519
    fi
 
520
 
 
521
    warning_flags=
 
522
    realsave_CFLAGS="$CFLAGS"
 
523
 
 
524
    case "$enable_compile_warnings" in
 
525
    no)
 
526
        warning_flags=
 
527
        ;;
 
528
    minimum)
 
529
        warning_flags="-Wall"
 
530
        ;;
 
531
    yes)
 
532
        warning_flags="-Wall -Wmissing-prototypes"
 
533
        ;;
 
534
    maximum|error)
 
535
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
536
        CFLAGS="$warning_flags $CFLAGS"
 
537
        for option in -Wno-sign-compare; do
 
538
                SAVE_CFLAGS="$CFLAGS"
 
539
                CFLAGS="$CFLAGS $option"
 
540
                AC_MSG_CHECKING([whether gcc understands $option])
 
541
                AC_TRY_COMPILE([], [],
 
542
                        has_option=yes,
 
543
                        has_option=no,)
 
544
                CFLAGS="$SAVE_CFLAGS"
 
545
                AC_MSG_RESULT($has_option)
 
546
                if test $has_option = yes; then
 
547
                  warning_flags="$warning_flags $option"
 
548
                fi
 
549
                unset has_option
 
550
                unset SAVE_CFLAGS
 
551
        done
 
552
        unset option
 
553
        if test "$enable_compile_warnings" = "error" ; then
 
554
            warning_flags="$warning_flags -Werror"
 
555
        fi
 
556
        ;;
 
557
    *)
 
558
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
559
        ;;
 
560
    esac
 
561
    CFLAGS="$realsave_CFLAGS"
 
562
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
563
    AC_MSG_RESULT($warning_flags)
 
564
 
 
565
    AC_ARG_ENABLE(iso-c,
 
566
                  AC_HELP_STRING([--enable-iso-c],
 
567
                                 [Try to warn if code is not ISO C ]),,
 
568
                  [enable_iso_c=no])
 
569
 
 
570
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
571
    complCFLAGS=
 
572
    if test "x$enable_iso_c" != "xno"; then
 
573
        if test "x$GCC" = "xyes"; then
 
574
        case " $CFLAGS " in
 
575
            *[\ \       ]-ansi[\ \      ]*) ;;
 
576
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
577
        esac
 
578
        case " $CFLAGS " in
 
579
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
580
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
581
        esac
 
582
        fi
 
583
    fi
 
584
    AC_MSG_RESULT($complCFLAGS)
 
585
 
 
586
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
587
    AC_SUBST(WARN_CFLAGS)
 
588
])
 
589
 
 
590
dnl For C++, do basically the same thing.
 
591
 
 
592
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
593
  AC_ARG_ENABLE(cxx-warnings,
 
594
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
595
                               [Turn on compiler warnings.]),,
 
596
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
597
 
 
598
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
599
  warnCXXFLAGS=
 
600
  if test "x$GXX" != xyes; then
 
601
    enable_cxx_warnings=no
 
602
  fi
 
603
  if test "x$enable_cxx_warnings" != "xno"; then
 
604
    if test "x$GXX" = "xyes"; then
 
605
      case " $CXXFLAGS " in
 
606
      *[\ \     ]-Wall[\ \      ]*) ;;
 
607
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
608
      esac
 
609
 
 
610
      ## -W is not all that useful.  And it cannot be controlled
 
611
      ## with individual -Wno-xxx flags, unlike -Wall
 
612
      if test "x$enable_cxx_warnings" = "xyes"; then
 
613
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
614
      fi
 
615
    fi
 
616
  fi
 
617
  AC_MSG_RESULT($warnCXXFLAGS)
 
618
 
 
619
   AC_ARG_ENABLE(iso-cxx,
 
620
                 AC_HELP_STRING([--enable-iso-cxx],
 
621
                                [Try to warn if code is not ISO C++ ]),,
 
622
                 [enable_iso_cxx=no])
 
623
 
 
624
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
625
   complCXXFLAGS=
 
626
   if test "x$enable_iso_cxx" != "xno"; then
 
627
     if test "x$GXX" = "xyes"; then
 
628
      case " $CXXFLAGS " in
 
629
      *[\ \     ]-ansi[\ \      ]*) ;;
 
630
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
631
      esac
 
632
 
 
633
      case " $CXXFLAGS " in
 
634
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
635
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
636
      esac
 
637
     fi
 
638
   fi
 
639
  AC_MSG_RESULT($complCXXFLAGS)
 
640
 
 
641
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
642
  AC_SUBST(WARN_CXXFLAGS)
 
643
])
18
644
 
19
645
dnl -*- mode: autoconf -*-
20
646
 
39
665
                   [use gtk-doc to build documentation [[default=no]]]),,
40
666
    [enable_gtk_doc=no])
41
667
 
42
 
  have_gtk_doc=no
43
668
  if test x$enable_gtk_doc = xyes; then
44
 
    if test -z "$PKG_CONFIG"; then
45
 
      AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
46
 
    fi
47
 
    if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
48
 
      have_gtk_doc=yes
49
 
    fi
50
 
 
51
 
  dnl do we want to do a version check?
52
 
ifelse([$1],[],,
53
 
    [gtk_doc_min_version=$1
54
 
    if test "$have_gtk_doc" = yes; then
55
 
      AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
56
 
      if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
57
 
        AC_MSG_RESULT([yes])
58
 
      else
59
 
        AC_MSG_RESULT([no])
60
 
        have_gtk_doc=no
61
 
      fi
62
 
    fi
63
 
])
64
 
    if test "$have_gtk_doc" != yes; then
65
 
      enable_gtk_doc=no
66
 
    fi
 
669
    ifelse([$1],[],
 
670
      [PKG_CHECK_EXISTS([gtk-doc],,
 
671
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
 
672
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
 
673
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
67
674
  fi
68
675
 
 
676
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
 
677
  AC_MSG_RESULT($enable_gtk_doc)
 
678
 
 
679
  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
 
680
 
69
681
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
70
682
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
71
683
])
72
684
 
 
685
 
 
686
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
687
# serial 36 IT_PROG_INTLTOOL
 
688
AC_DEFUN([IT_PROG_INTLTOOL],
 
689
[AC_PREREQ([2.50])dnl
 
690
 
 
691
case "$am__api_version" in
 
692
    1.[01234])
 
693
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
694
    ;;
 
695
    *)
 
696
    ;;
 
697
esac
 
698
 
 
699
if test -n "$1"; then
 
700
    AC_MSG_CHECKING([for intltool >= $1])
 
701
 
 
702
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
703
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
 
704
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
 
705
    ]
 
706
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
707
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
708
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
709
fi
 
710
 
 
711
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
712
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
713
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
714
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
715
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
716
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
717
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
718
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
719
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
720
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
721
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
722
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
723
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
724
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
725
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
726
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
727
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
728
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
729
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
730
 
 
731
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
732
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
733
AC_SUBST(INTLTOOL_KEYS_RULE)
 
734
AC_SUBST(INTLTOOL_PROP_RULE)
 
735
AC_SUBST(INTLTOOL_OAF_RULE)
 
736
AC_SUBST(INTLTOOL_PONG_RULE)
 
737
AC_SUBST(INTLTOOL_SERVER_RULE)
 
738
AC_SUBST(INTLTOOL_SHEET_RULE)
 
739
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
740
AC_SUBST(INTLTOOL_UI_RULE)
 
741
AC_SUBST(INTLTOOL_XAM_RULE)
 
742
AC_SUBST(INTLTOOL_KBD_RULE)
 
743
AC_SUBST(INTLTOOL_XML_RULE)
 
744
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
745
AC_SUBST(INTLTOOL_CAVES_RULE)
 
746
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
747
AC_SUBST(INTLTOOL_THEME_RULE)
 
748
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
749
AC_SUBST(INTLTOOL_POLICY_RULE)
 
750
 
 
751
# Check the gettext tools to make sure they are GNU
 
752
AC_PATH_PROG(XGETTEXT, xgettext)
 
753
AC_PATH_PROG(MSGMERGE, msgmerge)
 
754
AC_PATH_PROG(MSGFMT, msgfmt)
 
755
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
756
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
757
fi
 
758
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
759
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
760
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
761
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
762
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
763
fi
 
764
 
 
765
# Use the tools built into the package, not the ones that are installed.
 
766
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 
767
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
 
768
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
769
 
 
770
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
771
if test -z "$INTLTOOL_PERL"; then
 
772
   AC_MSG_ERROR([perl not found; required for intltool])
 
773
fi
 
774
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
775
   AC_MSG_ERROR([perl 5.x required for intltool])
 
776
fi
 
777
if test "x$2" != "xno-xml"; then
 
778
   AC_MSG_CHECKING([for XML::Parser])
 
779
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
780
       AC_MSG_RESULT([ok])
 
781
   else
 
782
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
783
   fi
 
784
fi
 
785
 
 
786
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
787
AC_SUBST(ALL_LINGUAS)
 
788
 
 
789
# Set DATADIRNAME correctly if it is not set yet
 
790
# (copied from glib-gettext.m4)
 
791
if test -z "$DATADIRNAME"; then
 
792
  AC_LINK_IFELSE(
 
793
    [AC_LANG_PROGRAM([[]],
 
794
                     [[extern int _nl_msg_cat_cntr;
 
795
                       return _nl_msg_cat_cntr]])],
 
796
    [DATADIRNAME=share],
 
797
    [case $host in
 
798
    *-*-solaris*)
 
799
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
800
    dnl GNU format message catalog is always supported,
 
801
    dnl since both are added to the libc all together.
 
802
    dnl Hence, we'd like to go with DATADIRNAME=share
 
803
    dnl in this case.
 
804
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
805
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
806
    ;;
 
807
    *)
 
808
    [DATADIRNAME=lib]
 
809
    ;;
 
810
    esac])
 
811
fi
 
812
AC_SUBST(DATADIRNAME)
 
813
 
 
814
IT_PO_SUBDIR([po])
 
815
 
 
816
dnl The following is very similar to
 
817
dnl
 
818
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
819
dnl
 
820
dnl with the following slight differences:
 
821
dnl  - the *.in files are in ac_aux_dir,
 
822
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
823
dnl  - the evaluation of the third parameter enables a hack which computes
 
824
dnl    the actual value of $libdir,
 
825
dnl  - the user sees "executing intltool commands", instead of
 
826
dnl    "creating intltool-extract" and such.
 
827
dnl
 
828
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
829
dnl a reason for it.
 
830
 
 
831
AC_CONFIG_COMMANDS([intltool], [
 
832
 
 
833
for file in intltool-extract intltool-merge intltool-update; do
 
834
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
835
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
836
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
837
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
838
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
839
    rm -f ${file}.out
 
840
  else
 
841
    mv -f ${file}.out ${file}
 
842
  fi
 
843
  chmod ugo+x ${file}
 
844
  chmod u+w ${file}
 
845
done
 
846
 
 
847
],
 
848
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
849
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
850
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
 
851
 
 
852
])
 
853
 
 
854
 
 
855
# IT_PO_SUBDIR(DIRNAME)
 
856
# ---------------------
 
857
# All po subdirs have to be declared with this macro; the subdir "po" is
 
858
# declared by IT_PROG_INTLTOOL.
 
859
#
 
860
AC_DEFUN([IT_PO_SUBDIR],
 
861
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
862
dnl
 
863
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
864
dnl of config.status.
 
865
AC_CONFIG_COMMANDS_PRE([
 
866
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
867
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
868
    >"$1/stamp-it.tmp"
 
869
    [sed '/^#/d
 
870
         s/^[[].*] *//
 
871
         /^[    ]*$/d
 
872
        '"s|^|  $ac_top_srcdir/|" \
 
873
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
874
    ]
 
875
    if test ! -f "$1/Makefile"; then
 
876
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
877
    fi
 
878
    mv "$1/Makefile" "$1/Makefile.tmp"
 
879
    [sed '/^POTFILES =/,/[^\\]$/ {
 
880
                /^POTFILES =/!d
 
881
                r $1/POTFILES
 
882
          }
 
883
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
884
    rm -f "$1/Makefile.tmp"
 
885
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
886
  ])
 
887
])dnl
 
888
])
 
889
 
 
890
 
 
891
# deprecated macros
 
892
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
893
# A hint is needed for aclocal from Automake <= 1.9.4:
 
894
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
895
 
 
896
 
73
897
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
74
898
 
75
 
# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
 
899
# serial 51 AC_PROG_LIBTOOL
76
900
 
77
901
 
78
902
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
624
1448
      esac
625
1449
      ;;
626
1450
    *64-bit*)
 
1451
      libsuff=64
627
1452
      case $host in
628
1453
        x86_64-*kfreebsd*-gnu)
629
1454
          LD="${LD-ld} -m elf_x86_64_fbsd"
1682
2507
  # Some rework will be needed to allow for fast_install
1683
2508
  # before this can be enabled.
1684
2509
  hardcode_into_libs=yes
 
2510
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
2511
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1685
2512
 
1686
2513
  # Append ld.so.conf contents to the search path
1687
2514
  if test -f /etc/ld.so.conf; then
1688
2515
    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' ' '`
1689
 
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
2516
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1690
2517
  fi
1691
2518
 
1692
2519
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1698
2525
  dynamic_linker='GNU/Linux ld.so'
1699
2526
  ;;
1700
2527
 
1701
 
netbsdelf*-gnu)
1702
 
  version_type=linux
1703
 
  need_lib_prefix=no
1704
 
  need_version=no
1705
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1706
 
  soname_spec='${libname}${release}${shared_ext}$major'
1707
 
  shlibpath_var=LD_LIBRARY_PATH
1708
 
  shlibpath_overrides_runpath=no
1709
 
  hardcode_into_libs=yes
1710
 
  dynamic_linker='NetBSD ld.elf_so'
1711
 
  ;;
1712
 
 
1713
2528
netbsd*)
1714
2529
  version_type=sunos
1715
2530
  need_lib_prefix=no
2484
3299
  lt_cv_deplibs_check_method=pass_all
2485
3300
  ;;
2486
3301
 
2487
 
netbsd* | netbsdelf*-gnu)
 
3302
netbsd*)
2488
3303
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2489
3304
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2490
3305
  else
3518
4333
        ;;
3519
4334
    esac
3520
4335
    ;;
3521
 
  netbsd* | netbsdelf*-gnu)
 
4336
  netbsd*)
3522
4337
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3523
4338
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3524
4339
      wlarc=
5199
6014
            ;;
5200
6015
        esac
5201
6016
        ;;
5202
 
      netbsd* | netbsdelf*-gnu)
 
6017
      netbsd*)
5203
6018
        ;;
5204
6019
      osf3* | osf4* | osf5*)
5205
6020
        case $cc_basename in
5574
6389
  cygwin* | mingw*)
5575
6390
    _LT_AC_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'
5576
6391
  ;;
5577
 
  linux* | k*bsd*-gnu)
5578
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5579
 
  ;;
5580
6392
  *)
5581
6393
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5582
6394
  ;;
5782
6594
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5783
6595
          $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5784
6596
        fi
5785
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5786
6597
      else
5787
6598
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5788
6599
      fi
5789
6600
      ;;
5790
6601
 
5791
 
    netbsd* | netbsdelf*-gnu)
 
6602
    netbsd*)
5792
6603
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5793
6604
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5794
6605
        wlarc=
6220
7031
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6221
7032
      ;;
6222
7033
 
6223
 
    netbsd* | netbsdelf*-gnu)
 
7034
    netbsd*)
6224
7035
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6225
7036
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6226
7037
      else
6719
7530
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6720
7531
# ---------------------------------------------
6721
7532
m4_define([_PKG_CONFIG],
6722
 
[if test -n "$PKG_CONFIG"; then
6723
 
    if test -n "$$1"; then
6724
 
        pkg_cv_[]$1="$$1"
6725
 
    else
6726
 
        PKG_CHECK_EXISTS([$3],
6727
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6728
 
                         [pkg_failed=yes])
6729
 
    fi
6730
 
else
6731
 
        pkg_failed=untried
 
7533
[if test -n "$$1"; then
 
7534
    pkg_cv_[]$1="$$1"
 
7535
 elif test -n "$PKG_CONFIG"; then
 
7536
    PKG_CHECK_EXISTS([$3],
 
7537
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
7538
                     [pkg_failed=yes])
 
7539
 else
 
7540
    pkg_failed=untried
6732
7541
fi[]dnl
6733
7542
])# _PKG_CONFIG
6734
7543
 
6772
7581
if test $pkg_failed = yes; then
6773
7582
        _PKG_SHORT_ERRORS_SUPPORTED
6774
7583
        if test $_pkg_short_errors_supported = yes; then
6775
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
7584
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
6776
7585
        else 
6777
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
7586
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
6778
7587
        fi
6779
7588
        # Put the nasty error message in config.log where it belongs
6780
7589
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6809
7618
fi[]dnl
6810
7619
])# PKG_CHECK_MODULES
6811
7620
 
6812
 
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
7621
# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
6813
7622
#
6814
7623
# This file is free software; the Free Software Foundation
6815
7624
# gives unlimited permission to copy and/or distribute it,
6824
7633
[am__api_version='1.10'
6825
7634
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6826
7635
dnl require some minimum version.  Point them to the right macro.
6827
 
m4_if([$1], [1.10], [],
 
7636
m4_if([$1], [1.10.1], [],
6828
7637
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6829
7638
])
6830
7639
 
6840
7649
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6841
7650
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6842
7651
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6843
 
[AM_AUTOMAKE_VERSION([1.10])dnl
6844
 
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
7652
[AM_AUTOMAKE_VERSION([1.10.1])dnl
 
7653
m4_ifndef([AC_AUTOCONF_VERSION],
 
7654
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
7655
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
6845
7656
 
6846
7657
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6847
7658
 
7113
7924
  # each Makefile.in and add a new line on top of each file to say so.
7114
7925
  # Grep'ing the whole file is not good either: AIX grep has a line
7115
7926
  # limit of 2048, but all sed's we know have understand at least 4000.
7116
 
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
 
7927
  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7117
7928
    dirpart=`AS_DIRNAME("$mf")`
7118
7929
  else
7119
7930
    continue
7161
7972
# Do all the work for Automake.                             -*- Autoconf -*-
7162
7973
 
7163
7974
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7164
 
# 2005, 2006 Free Software Foundation, Inc.
 
7975
# 2005, 2006, 2008 Free Software Foundation, Inc.
7165
7976
#
7166
7977
# This file is free software; the Free Software Foundation
7167
7978
# gives unlimited permission to copy and/or distribute it,
7168
7979
# with or without modifications, as long as this notice is preserved.
7169
7980
 
7170
 
# serial 12
 
7981
# serial 13
7171
7982
 
7172
7983
# This macro actually does too much.  Some checks are only needed if
7173
7984
# your package does certain things.  But this isn't really a big deal.
7272
8083
# our stamp files there.
7273
8084
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7274
8085
[# Compute $1's index in $config_headers.
 
8086
_am_arg=$1
7275
8087
_am_stamp_count=1
7276
8088
for _am_header in $config_headers :; do
7277
8089
  case $_am_header in
7278
 
    $1 | $1:* )
 
8090
    $_am_arg | $_am_arg:* )
7279
8091
      break ;;
7280
8092
    * )
7281
8093
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7282
8094
  esac
7283
8095
done
7284
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
8096
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7285
8097
 
7286
8098
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7287
8099
#
7603
8415
 
7604
8416
# _AM_SUBST_NOTMAKE(VARIABLE)
7605
8417
# ---------------------------
7606
 
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
8418
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
7607
8419
# This macro is traced by Automake.
7608
8420
AC_DEFUN([_AM_SUBST_NOTMAKE])
7609
8421
 
7703
8515
AC_SUBST([am__untar])
7704
8516
]) # _AM_PROG_TAR
7705
8517
 
7706
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7707
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7708
 
#
7709
 
# This file is free software, distributed under the terms of the GNU
7710
 
# General Public License.  As a special exception to the GNU General
7711
 
# Public License, this file may be distributed as part of a program
7712
 
# that contains a configuration script generated by Autoconf, under
7713
 
# the same distribution terms as the rest of that program.
7714
 
#
7715
 
# This file can be copied and used freely without restrictions.  It can
7716
 
# be used in projects which are not available under the GNU Public License
7717
 
# but which still want to provide support for the GNU gettext functionality.
7718
 
#
7719
 
# Macro to add for using GNU gettext.
7720
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7721
 
#
7722
 
# Modified to never use included libintl. 
7723
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7724
 
#
7725
 
# Major rework to remove unused code
7726
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7727
 
#
7728
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
7729
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7730
 
#
7731
 
# Modified to require ngettext
7732
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7733
 
#
7734
 
# We need this here as well, since someone might use autoconf-2.5x
7735
 
# to configure GLib then an older version to configure a package
7736
 
# using AM_GLIB_GNU_GETTEXT
7737
 
AC_PREREQ(2.53)
7738
 
 
7739
 
dnl
7740
 
dnl We go to great lengths to make sure that aclocal won't 
7741
 
dnl try to pull in the installed version of these macros
7742
 
dnl when running aclocal in the glib directory.
7743
 
dnl
7744
 
m4_copy([AC_DEFUN],[glib_DEFUN])
7745
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7746
 
dnl
7747
 
dnl At the end, if we're not within glib, we'll define the public
7748
 
dnl definitions in terms of our private definitions.
7749
 
dnl
7750
 
 
7751
 
# GLIB_LC_MESSAGES
7752
 
#--------------------
7753
 
glib_DEFUN([GLIB_LC_MESSAGES],
7754
 
  [AC_CHECK_HEADERS([locale.h])
7755
 
    if test $ac_cv_header_locale_h = yes; then
7756
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7757
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7758
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7759
 
    if test $am_cv_val_LC_MESSAGES = yes; then
7760
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7761
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
7762
 
    fi
7763
 
  fi])
7764
 
 
7765
 
# GLIB_PATH_PROG_WITH_TEST
7766
 
#----------------------------
7767
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7768
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7769
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7770
 
[# Extract the first word of "$2", so it can be a program name with args.
7771
 
set dummy $2; ac_word=[$]2
7772
 
AC_MSG_CHECKING([for $ac_word])
7773
 
AC_CACHE_VAL(ac_cv_path_$1,
7774
 
[case "[$]$1" in
7775
 
  /*)
7776
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7777
 
  ;;
7778
 
  *)
7779
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7780
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7781
 
    test -z "$ac_dir" && ac_dir=.
7782
 
    if test -f $ac_dir/$ac_word; then
7783
 
      if [$3]; then
7784
 
        ac_cv_path_$1="$ac_dir/$ac_word"
7785
 
        break
7786
 
      fi
7787
 
    fi
7788
 
  done
7789
 
  IFS="$ac_save_ifs"
7790
 
dnl If no 4th arg is given, leave the cache variable unset,
7791
 
dnl so AC_PATH_PROGS will keep looking.
7792
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7793
 
])dnl
7794
 
  ;;
7795
 
esac])dnl
7796
 
$1="$ac_cv_path_$1"
7797
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7798
 
  AC_MSG_RESULT([$]$1)
7799
 
else
7800
 
  AC_MSG_RESULT(no)
7801
 
fi
7802
 
AC_SUBST($1)dnl
7803
 
])
7804
 
 
7805
 
# GLIB_WITH_NLS
7806
 
#-----------------
7807
 
glib_DEFUN([GLIB_WITH_NLS],
7808
 
  dnl NLS is obligatory
7809
 
  [USE_NLS=yes
7810
 
    AC_SUBST(USE_NLS)
7811
 
 
7812
 
    gt_cv_have_gettext=no
7813
 
 
7814
 
    CATOBJEXT=NONE
7815
 
    XGETTEXT=:
7816
 
    INTLLIBS=
7817
 
 
7818
 
    AC_CHECK_HEADER(libintl.h,
7819
 
     [gt_cv_func_dgettext_libintl="no"
7820
 
      libintl_extra_libs=""
7821
 
 
7822
 
      #
7823
 
      # First check in libc
7824
 
      #
7825
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7826
 
        [AC_TRY_LINK([
7827
 
#include <libintl.h>
7828
 
],
7829
 
         [return !ngettext ("","", 1)],
7830
 
          gt_cv_func_ngettext_libc=yes,
7831
 
          gt_cv_func_ngettext_libc=no)
7832
 
        ])
7833
 
  
7834
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7835
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7836
 
                [AC_TRY_LINK([
7837
 
#include <libintl.h>
7838
 
],
7839
 
                  [return !dgettext ("","")],
7840
 
                  gt_cv_func_dgettext_libc=yes,
7841
 
                  gt_cv_func_dgettext_libc=no)
7842
 
                ])
7843
 
      fi
7844
 
  
7845
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7846
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7847
 
      fi
7848
 
 
7849
 
      #
7850
 
      # If we don't have everything we want, check in libintl
7851
 
      #
7852
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
7853
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
7854
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7855
 
        
7856
 
        AC_CHECK_LIB(intl, bindtextdomain,
7857
 
            [AC_CHECK_LIB(intl, ngettext,
7858
 
                    [AC_CHECK_LIB(intl, dgettext,
7859
 
                                  gt_cv_func_dgettext_libintl=yes)])])
7860
 
 
7861
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7862
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
7863
 
          AC_MSG_RESULT([])
7864
 
          AC_CHECK_LIB(intl, ngettext,
7865
 
                [AC_CHECK_LIB(intl, dcgettext,
7866
 
                       [gt_cv_func_dgettext_libintl=yes
7867
 
                        libintl_extra_libs=-liconv],
7868
 
                        :,-liconv)],
7869
 
                :,-liconv)
7870
 
        fi
7871
 
 
7872
 
        #
7873
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
7874
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
7875
 
        # and both have dgettext and ngettext
7876
 
        #
7877
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7878
 
          glib_save_LIBS="$LIBS"
7879
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
7880
 
          unset ac_cv_func_bind_textdomain_codeset
7881
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7882
 
          LIBS="$glib_save_LIBS"
7883
 
 
7884
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7885
 
            gt_cv_func_dgettext_libc=no
7886
 
          else
7887
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7888
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
7889
 
              gt_cv_func_dgettext_libintl=no
7890
 
            fi
7891
 
          fi
7892
 
        fi
7893
 
      fi
7894
 
 
7895
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7896
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7897
 
        gt_cv_have_gettext=yes
7898
 
      fi
7899
 
  
7900
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7901
 
        INTLLIBS="-lintl $libintl_extra_libs"
7902
 
      fi
7903
 
  
7904
 
      if test "$gt_cv_have_gettext" = "yes"; then
7905
 
        AC_DEFINE(HAVE_GETTEXT,1,
7906
 
          [Define if the GNU gettext() function is already present or preinstalled.])
7907
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7908
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7909
 
        if test "$MSGFMT" != "no"; then
7910
 
          glib_save_LIBS="$LIBS"
7911
 
          LIBS="$LIBS $INTLLIBS"
7912
 
          AC_CHECK_FUNCS(dcgettext)
7913
 
          MSGFMT_OPTS=
7914
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
7915
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
7916
 
msgid ""
7917
 
msgstr ""
7918
 
"Content-Type: text/plain; charset=UTF-8\n"
7919
 
"Project-Id-Version: test 1.0\n"
7920
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7921
 
"Last-Translator: test <foo@bar.xx>\n"
7922
 
"Language-Team: C <LL@li.org>\n"
7923
 
"MIME-Version: 1.0\n"
7924
 
"Content-Transfer-Encoding: 8bit\n"
7925
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7926
 
          AC_SUBST(MSGFMT_OPTS)
7927
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7928
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7929
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7930
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7931
 
                         return _nl_msg_cat_cntr],
7932
 
            [CATOBJEXT=.gmo 
7933
 
             DATADIRNAME=share],
7934
 
            [case $host in
7935
 
            *-*-solaris*)
7936
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
7937
 
            dnl GNU format message catalog is always supported,
7938
 
            dnl since both are added to the libc all together.
7939
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
7940
 
            dnl and CATOBJEXT=.gmo in this case.
7941
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
7942
 
              [CATOBJEXT=.gmo 
7943
 
               DATADIRNAME=share],
7944
 
              [CATOBJEXT=.mo
7945
 
               DATADIRNAME=lib])
7946
 
            ;;
7947
 
            *)
7948
 
            CATOBJEXT=.mo
7949
 
            DATADIRNAME=lib
7950
 
            ;;
7951
 
            esac])
7952
 
          LIBS="$glib_save_LIBS"
7953
 
          INSTOBJEXT=.mo
7954
 
        else
7955
 
          gt_cv_have_gettext=no
7956
 
        fi
7957
 
      fi
7958
 
    ])
7959
 
 
7960
 
    if test "$gt_cv_have_gettext" = "yes" ; then
7961
 
      AC_DEFINE(ENABLE_NLS, 1,
7962
 
        [always defined to indicate that i18n is enabled])
7963
 
    fi
7964
 
 
7965
 
    dnl Test whether we really found GNU xgettext.
7966
 
    if test "$XGETTEXT" != ":"; then
7967
 
      dnl If it is not GNU xgettext we define it as : so that the
7968
 
      dnl Makefiles still can work.
7969
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7970
 
        : ;
7971
 
      else
7972
 
        AC_MSG_RESULT(
7973
 
          [found xgettext program is not GNU xgettext; ignore it])
7974
 
        XGETTEXT=":"
7975
 
      fi
7976
 
    fi
7977
 
 
7978
 
    # We need to process the po/ directory.
7979
 
    POSUB=po
7980
 
 
7981
 
    AC_OUTPUT_COMMANDS(
7982
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7983
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7984
 
      esac])
7985
 
 
7986
 
    dnl These rules are solely for the distribution goal.  While doing this
7987
 
    dnl we only have to keep exactly one list of the available catalogs
7988
 
    dnl in configure.in.
7989
 
    for lang in $ALL_LINGUAS; do
7990
 
      GMOFILES="$GMOFILES $lang.gmo"
7991
 
      POFILES="$POFILES $lang.po"
7992
 
    done
7993
 
 
7994
 
    dnl Make all variables we use known to autoconf.
7995
 
    AC_SUBST(CATALOGS)
7996
 
    AC_SUBST(CATOBJEXT)
7997
 
    AC_SUBST(DATADIRNAME)
7998
 
    AC_SUBST(GMOFILES)
7999
 
    AC_SUBST(INSTOBJEXT)
8000
 
    AC_SUBST(INTLLIBS)
8001
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
8002
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
8003
 
    AC_SUBST(POFILES)
8004
 
    AC_SUBST(POSUB)
8005
 
  ])
8006
 
 
8007
 
# AM_GLIB_GNU_GETTEXT
8008
 
# -------------------
8009
 
# Do checks necessary for use of gettext. If a suitable implementation 
8010
 
# of gettext is found in either in libintl or in the C library,
8011
 
# it will set INTLLIBS to the libraries needed for use of gettext
8012
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8013
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8014
 
# on various variables needed by the Makefile.in.in installed by 
8015
 
# glib-gettextize.
8016
 
dnl
8017
 
glib_DEFUN([GLIB_GNU_GETTEXT],
8018
 
  [AC_REQUIRE([AC_PROG_CC])dnl
8019
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
8020
 
   
8021
 
   GLIB_LC_MESSAGES
8022
 
   GLIB_WITH_NLS
8023
 
 
8024
 
   if test "$gt_cv_have_gettext" = "yes"; then
8025
 
     if test "x$ALL_LINGUAS" = "x"; then
8026
 
       LINGUAS=
8027
 
     else
8028
 
       AC_MSG_CHECKING(for catalogs to be installed)
8029
 
       NEW_LINGUAS=
8030
 
       for presentlang in $ALL_LINGUAS; do
8031
 
         useit=no
8032
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8033
 
           desiredlanguages="$LINGUAS"
8034
 
         else
8035
 
           desiredlanguages="$ALL_LINGUAS"
8036
 
         fi
8037
 
         for desiredlang in $desiredlanguages; do
8038
 
           # Use the presentlang catalog if desiredlang is
8039
 
           #   a. equal to presentlang, or
8040
 
           #   b. a variant of presentlang (because in this case,
8041
 
           #      presentlang can be used as a fallback for messages
8042
 
           #      which are not translated in the desiredlang catalog).
8043
 
           case "$desiredlang" in
8044
 
             "$presentlang"*) useit=yes;;
8045
 
           esac
8046
 
         done
8047
 
         if test $useit = yes; then
8048
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8049
 
         fi
8050
 
       done
8051
 
       LINGUAS=$NEW_LINGUAS
8052
 
       AC_MSG_RESULT($LINGUAS)
8053
 
     fi
8054
 
 
8055
 
     dnl Construct list of names of catalog files to be constructed.
8056
 
     if test -n "$LINGUAS"; then
8057
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8058
 
     fi
8059
 
   fi
8060
 
 
8061
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8062
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
8063
 
   dnl Try to locate is.
8064
 
   MKINSTALLDIRS=
8065
 
   if test -n "$ac_aux_dir"; then
8066
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8067
 
   fi
8068
 
   if test -z "$MKINSTALLDIRS"; then
8069
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8070
 
   fi
8071
 
   AC_SUBST(MKINSTALLDIRS)
8072
 
 
8073
 
   dnl Generate list of files to be processed by xgettext which will
8074
 
   dnl be included in po/Makefile.
8075
 
   test -d po || mkdir po
8076
 
   if test "x$srcdir" != "x."; then
8077
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8078
 
       posrcprefix="$srcdir/"
8079
 
     else
8080
 
       posrcprefix="../$srcdir/"
8081
 
     fi
8082
 
   else
8083
 
     posrcprefix="../"
8084
 
   fi
8085
 
   rm -f po/POTFILES
8086
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8087
 
        < $srcdir/po/POTFILES.in > po/POTFILES
8088
 
  ])
8089
 
 
8090
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8091
 
# -------------------------------
8092
 
# Define VARIABLE to the location where catalog files will
8093
 
# be installed by po/Makefile.
8094
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8095
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8096
 
glib_save_prefix="$prefix"
8097
 
glib_save_exec_prefix="$exec_prefix"
8098
 
glib_save_datarootdir="$datarootdir"
8099
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8100
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8101
 
datarootdir=`eval echo "${datarootdir}"`
8102
 
if test "x$CATOBJEXT" = "x.mo" ; then
8103
 
  localedir=`eval echo "${libdir}/locale"`
8104
 
else
8105
 
  localedir=`eval echo "${datadir}/locale"`
8106
 
fi
8107
 
prefix="$glib_save_prefix"
8108
 
exec_prefix="$glib_save_exec_prefix"
8109
 
datarootdir="$glib_save_datarootdir"
8110
 
AC_DEFINE_UNQUOTED($1, "$localedir",
8111
 
  [Define the location where the catalogs will be installed])
8112
 
])
8113
 
 
8114
 
dnl
8115
 
dnl Now the definitions that aclocal will find
8116
 
dnl
8117
 
ifdef(glib_configure_in,[],[
8118
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8119
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8120
 
])dnl
8121
 
 
8122
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
8123
 
8124
 
# Create a temporary file with TEST-FILE as its contents and pass the
8125
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
8126
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
8127
 
AC_DEFUN([GLIB_RUN_PROG],
8128
 
[cat >conftest.foo <<_ACEOF
8129
 
$2
8130
 
_ACEOF
8131
 
if AC_RUN_LOG([$1 conftest.foo]); then
8132
 
  m4_ifval([$3], [$3], [:])
8133
 
m4_ifvaln([$4], [else $4])dnl
8134
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
8135
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
8136
 
fi])
8137
 
 
8138
 
 
8139
 
# gnome-common.m4
8140
 
8141
 
 
8142
 
dnl GNOME_COMMON_INIT
8143
 
 
8144
 
AC_DEFUN([GNOME_COMMON_INIT],
8145
 
[
8146
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
8147
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
8148
 
 
8149
 
  dnl ensure that when the Automake generated makefile calls aclocal,
8150
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
8151
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
8152
 
  if test -n "$ac_macro_dir"; then
8153
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
8154
 
  fi
8155
 
 
8156
 
  AC_SUBST([ACLOCAL_AMFLAGS])
8157
 
])
8158
 
 
8159
 
AC_DEFUN([GNOME_DEBUG_CHECK],
8160
 
[
8161
 
        AC_ARG_ENABLE([debug],
8162
 
                      AC_HELP_STRING([--enable-debug],
8163
 
                                     [turn on debugging]),,
8164
 
                      [enable_debug=no])
8165
 
 
8166
 
        if test x$enable_debug = xyes ; then
8167
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
8168
 
                [Enable additional debugging at the expense of performance and size])
8169
 
        fi
8170
 
])
8171
 
 
8172
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
8173
 
dnl define DISABLE_DEPRECATED
8174
 
dnl
8175
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
8176
 
[
8177
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
8178
 
 
8179
 
        if test $USE_MAINTAINER_MODE = yes; then
8180
 
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
8181
 
        else
8182
 
                DISABLE_DEPRECATED=""
8183
 
        fi
8184
 
        AC_SUBST(DISABLE_DEPRECATED)
8185
 
])
8186
 
 
8187
 
dnl GNOME_COMPILE_WARNINGS
8188
 
dnl Turn on many useful compiler warnings
8189
 
dnl For now, only works on GCC
8190
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
8191
 
    dnl ******************************
8192
 
    dnl More compiler warnings
8193
 
    dnl ******************************
8194
 
 
8195
 
    AC_ARG_ENABLE(compile-warnings, 
8196
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
8197
 
                                 [Turn on compiler warnings]),,
8198
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
8199
 
 
8200
 
    warnCFLAGS=
8201
 
    if test "x$GCC" != xyes; then
8202
 
        enable_compile_warnings=no
8203
 
    fi
8204
 
 
8205
 
    warning_flags=
8206
 
    realsave_CFLAGS="$CFLAGS"
8207
 
 
8208
 
    case "$enable_compile_warnings" in
8209
 
    no)
8210
 
        warning_flags=
8211
 
        ;;
8212
 
    minimum)
8213
 
        warning_flags="-Wall"
8214
 
        ;;
8215
 
    yes)
8216
 
        warning_flags="-Wall -Wmissing-prototypes"
8217
 
        ;;
8218
 
    maximum|error)
8219
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
8220
 
        CFLAGS="$warning_flags $CFLAGS"
8221
 
        for option in -Wno-sign-compare; do
8222
 
                SAVE_CFLAGS="$CFLAGS"
8223
 
                CFLAGS="$CFLAGS $option"
8224
 
                AC_MSG_CHECKING([whether gcc understands $option])
8225
 
                AC_TRY_COMPILE([], [],
8226
 
                        has_option=yes,
8227
 
                        has_option=no,)
8228
 
                CFLAGS="$SAVE_CFLAGS"
8229
 
                AC_MSG_RESULT($has_option)
8230
 
                if test $has_option = yes; then
8231
 
                  warning_flags="$warning_flags $option"
8232
 
                fi
8233
 
                unset has_option
8234
 
                unset SAVE_CFLAGS
8235
 
        done
8236
 
        unset option
8237
 
        if test "$enable_compile_warnings" = "error" ; then
8238
 
            warning_flags="$warning_flags -Werror"
8239
 
        fi
8240
 
        ;;
8241
 
    *)
8242
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
8243
 
        ;;
8244
 
    esac
8245
 
    CFLAGS="$realsave_CFLAGS"
8246
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
8247
 
    AC_MSG_RESULT($warning_flags)
8248
 
 
8249
 
    AC_ARG_ENABLE(iso-c,
8250
 
                  AC_HELP_STRING([--enable-iso-c],
8251
 
                                 [Try to warn if code is not ISO C ]),,
8252
 
                  [enable_iso_c=no])
8253
 
 
8254
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
8255
 
    complCFLAGS=
8256
 
    if test "x$enable_iso_c" != "xno"; then
8257
 
        if test "x$GCC" = "xyes"; then
8258
 
        case " $CFLAGS " in
8259
 
            *[\ \       ]-ansi[\ \      ]*) ;;
8260
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
8261
 
        esac
8262
 
        case " $CFLAGS " in
8263
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
8264
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
8265
 
        esac
8266
 
        fi
8267
 
    fi
8268
 
    AC_MSG_RESULT($complCFLAGS)
8269
 
 
8270
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
8271
 
    AC_SUBST(WARN_CFLAGS)
8272
 
])
8273
 
 
8274
 
dnl For C++, do basically the same thing.
8275
 
 
8276
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
8277
 
  AC_ARG_ENABLE(cxx-warnings,
8278
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8279
 
                               [Turn on compiler warnings.]),,
8280
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
8281
 
 
8282
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8283
 
  warnCXXFLAGS=
8284
 
  if test "x$GXX" != xyes; then
8285
 
    enable_cxx_warnings=no
8286
 
  fi
8287
 
  if test "x$enable_cxx_warnings" != "xno"; then
8288
 
    if test "x$GXX" = "xyes"; then
8289
 
      case " $CXXFLAGS " in
8290
 
      *[\ \     ]-Wall[\ \      ]*) ;;
8291
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
8292
 
      esac
8293
 
 
8294
 
      ## -W is not all that useful.  And it cannot be controlled
8295
 
      ## with individual -Wno-xxx flags, unlike -Wall
8296
 
      if test "x$enable_cxx_warnings" = "xyes"; then
8297
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8298
 
      fi
8299
 
    fi
8300
 
  fi
8301
 
  AC_MSG_RESULT($warnCXXFLAGS)
8302
 
 
8303
 
   AC_ARG_ENABLE(iso-cxx,
8304
 
                 AC_HELP_STRING([--enable-iso-cxx],
8305
 
                                [Try to warn if code is not ISO C++ ]),,
8306
 
                 [enable_iso_cxx=no])
8307
 
 
8308
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8309
 
   complCXXFLAGS=
8310
 
   if test "x$enable_iso_cxx" != "xno"; then
8311
 
     if test "x$GXX" = "xyes"; then
8312
 
      case " $CXXFLAGS " in
8313
 
      *[\ \     ]-ansi[\ \      ]*) ;;
8314
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8315
 
      esac
8316
 
 
8317
 
      case " $CXXFLAGS " in
8318
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
8319
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8320
 
      esac
8321
 
     fi
8322
 
   fi
8323
 
  AC_MSG_RESULT($complCXXFLAGS)
8324
 
 
8325
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8326
 
  AC_SUBST(WARN_CXXFLAGS)
8327
 
])
8328
 
 
8329
 
 
8330
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8331
 
# serial 36 IT_PROG_INTLTOOL
8332
 
AC_DEFUN([IT_PROG_INTLTOOL],
8333
 
[AC_PREREQ([2.50])dnl
8334
 
 
8335
 
case "$am__api_version" in
8336
 
    1.[01234])
8337
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8338
 
    ;;
8339
 
    *)
8340
 
    ;;
8341
 
esac
8342
 
 
8343
 
if test -n "$1"; then
8344
 
    AC_MSG_CHECKING([for intltool >= $1])
8345
 
 
8346
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8347
 
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
8348
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
8349
 
    ]
8350
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8351
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8352
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
8353
 
fi
8354
 
 
8355
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8356
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8357
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8358
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8359
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8360
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8361
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8362
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8363
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8364
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8365
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8366
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
8367
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8368
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8369
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8370
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8371
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8372
 
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8373
 
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8374
 
 
8375
 
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8376
 
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8377
 
AC_SUBST(INTLTOOL_KEYS_RULE)
8378
 
AC_SUBST(INTLTOOL_PROP_RULE)
8379
 
AC_SUBST(INTLTOOL_OAF_RULE)
8380
 
AC_SUBST(INTLTOOL_PONG_RULE)
8381
 
AC_SUBST(INTLTOOL_SERVER_RULE)
8382
 
AC_SUBST(INTLTOOL_SHEET_RULE)
8383
 
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8384
 
AC_SUBST(INTLTOOL_UI_RULE)
8385
 
AC_SUBST(INTLTOOL_XAM_RULE)
8386
 
AC_SUBST(INTLTOOL_KBD_RULE)
8387
 
AC_SUBST(INTLTOOL_XML_RULE)
8388
 
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8389
 
AC_SUBST(INTLTOOL_CAVES_RULE)
8390
 
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8391
 
AC_SUBST(INTLTOOL_THEME_RULE)
8392
 
AC_SUBST(INTLTOOL_SERVICE_RULE)
8393
 
AC_SUBST(INTLTOOL_POLICY_RULE)
8394
 
 
8395
 
# Use the tools built into the package, not the ones that are installed.
8396
 
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
8397
 
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
8398
 
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
8399
 
 
8400
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
8401
 
if test -z "$INTLTOOL_PERL"; then
8402
 
   AC_MSG_ERROR([perl not found; required for intltool])
8403
 
fi
8404
 
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8405
 
   AC_MSG_ERROR([perl 5.x required for intltool])
8406
 
fi
8407
 
if test "x$2" != "xno-xml"; then
8408
 
   AC_MSG_CHECKING([for XML::Parser])
8409
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8410
 
       AC_MSG_RESULT([ok])
8411
 
   else
8412
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8413
 
   fi
8414
 
fi
8415
 
 
8416
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8417
 
AC_SUBST(ALL_LINGUAS)
8418
 
 
8419
 
# Set DATADIRNAME correctly if it is not set yet
8420
 
# (copied from glib-gettext.m4)
8421
 
if test -z "$DATADIRNAME"; then
8422
 
  AC_LINK_IFELSE(
8423
 
    [AC_LANG_PROGRAM([[]],
8424
 
                     [[extern int _nl_msg_cat_cntr;
8425
 
                       return _nl_msg_cat_cntr]])],
8426
 
    [DATADIRNAME=share],
8427
 
    [case $host in
8428
 
    *-*-solaris*)
8429
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
8430
 
    dnl GNU format message catalog is always supported,
8431
 
    dnl since both are added to the libc all together.
8432
 
    dnl Hence, we'd like to go with DATADIRNAME=share
8433
 
    dnl in this case.
8434
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
8435
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
8436
 
    ;;
8437
 
    *)
8438
 
    [DATADIRNAME=lib]
8439
 
    ;;
8440
 
    esac])
8441
 
fi
8442
 
AC_SUBST(DATADIRNAME)
8443
 
 
8444
 
IT_PO_SUBDIR([po])
8445
 
 
8446
 
dnl The following is very similar to
8447
 
dnl
8448
 
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
8449
 
dnl
8450
 
dnl with the following slight differences:
8451
 
dnl  - the *.in files are in ac_aux_dir,
8452
 
dnl  - if the file haven't changed upon reconfigure, it's not touched,
8453
 
dnl  - the evaluation of the third parameter enables a hack which computes
8454
 
dnl    the actual value of $libdir,
8455
 
dnl  - the user sees "executing intltool commands", instead of
8456
 
dnl    "creating intltool-extract" and such.
8457
 
dnl
8458
 
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
8459
 
dnl a reason for it.
8460
 
 
8461
 
AC_CONFIG_COMMANDS([intltool], [
8462
 
 
8463
 
for file in intltool-extract intltool-merge intltool-update; do
8464
 
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
8465
 
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
8466
 
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
8467
 
        < ${ac_aux_dir}/${file}.in > ${file}.out
8468
 
  if cmp -s ${file} ${file}.out 2>/dev/null; then
8469
 
    rm -f ${file}.out
8470
 
  else
8471
 
    mv -f ${file}.out ${file}
8472
 
  fi
8473
 
  chmod ugo+x ${file}
8474
 
  chmod u+w ${file}
8475
 
done
8476
 
 
8477
 
],
8478
 
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
8479
 
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
8480
 
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
8481
 
 
8482
 
])
8483
 
 
8484
 
 
8485
 
# IT_PO_SUBDIR(DIRNAME)
8486
 
# ---------------------
8487
 
# All po subdirs have to be declared with this macro; the subdir "po" is
8488
 
# declared by IT_PROG_INTLTOOL.
8489
 
#
8490
 
AC_DEFUN([IT_PO_SUBDIR],
8491
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8492
 
dnl
8493
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8494
 
dnl of config.status.
8495
 
AC_CONFIG_COMMANDS_PRE([
8496
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
8497
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8498
 
    >"$1/stamp-it.tmp"
8499
 
    [sed '/^#/d
8500
 
         s/^[[].*] *//
8501
 
         /^[    ]*$/d
8502
 
        '"s|^|  $ac_top_srcdir/|" \
8503
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8504
 
    ]
8505
 
    if test ! -f "$1/Makefile"; then
8506
 
      AC_MSG_ERROR([$1/Makefile is not ready.])
8507
 
    fi
8508
 
    mv "$1/Makefile" "$1/Makefile.tmp"
8509
 
    [sed '/^POTFILES =/,/[^\\]$/ {
8510
 
                /^POTFILES =/!d
8511
 
                r $1/POTFILES
8512
 
          }
8513
 
         ' "$1/Makefile.tmp" >"$1/Makefile"]
8514
 
    rm -f "$1/Makefile.tmp"
8515
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
8516
 
  ])
8517
 
])dnl
8518
 
])
8519
 
 
8520
 
 
8521
 
# deprecated macros
8522
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8523
 
# A hint is needed for aclocal from Automake <= 1.9.4:
8524
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
8525
 
 
8526