~ted/ubuntu/lucid/tomboy/with-patch

« back to all changes in this revision

Viewing changes to aclocal.m4

Tags: upstream-0.7.2
Import upstream version 0.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005  Free Software Foundation, Inc.
 
4
# 2005, 2006  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])])
 
18
 
 
19
dnl AM_GCONF_SOURCE_2
 
20
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
21
dnl  (i.e. pass to gconftool-2
 
22
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
23
dnl  you should install foo.schemas files
 
24
dnl
 
25
 
 
26
AC_DEFUN([AM_GCONF_SOURCE_2],
 
27
[
 
28
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
29
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
30
  else
 
31
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
32
  fi
 
33
 
 
34
  AC_ARG_WITH(gconf-source, 
 
35
  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
 
36
 
 
37
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
38
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
39
 
 
40
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
41
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
42
  fi
 
43
 
 
44
  AC_ARG_WITH(gconf-schema-file-dir, 
 
45
  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
 
46
 
 
47
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
48
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
49
 
 
50
  AC_ARG_ENABLE(schemas-install,
 
51
     [  --disable-schemas-install       Disable the schemas installation],
 
52
     [case ${enableval} in
 
53
       yes|no) ;;
 
54
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
 
55
      esac])
 
56
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
57
])
 
58
 
 
59
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
60
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
61
#
 
62
# This file is free software, distributed under the terms of the GNU
 
63
# General Public License.  As a special exception to the GNU General
 
64
# Public License, this file may be distributed as part of a program
 
65
# that contains a configuration script generated by Autoconf, under
 
66
# the same distribution terms as the rest of that program.
 
67
#
 
68
# This file can be copied and used freely without restrictions.  It can
 
69
# be used in projects which are not available under the GNU Public License
 
70
# but which still want to provide support for the GNU gettext functionality.
 
71
#
 
72
# Macro to add for using GNU gettext.
 
73
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
74
#
 
75
# Modified to never use included libintl. 
 
76
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
77
#
 
78
# Major rework to remove unused code
 
79
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
80
#
 
81
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
82
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
83
#
 
84
# Modified to require ngettext
 
85
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
86
#
 
87
# We need this here as well, since someone might use autoconf-2.5x
 
88
# to configure GLib then an older version to configure a package
 
89
# using AM_GLIB_GNU_GETTEXT
 
90
AC_PREREQ(2.53)
 
91
 
 
92
dnl
 
93
dnl We go to great lengths to make sure that aclocal won't 
 
94
dnl try to pull in the installed version of these macros
 
95
dnl when running aclocal in the glib directory.
 
96
dnl
 
97
m4_copy([AC_DEFUN],[glib_DEFUN])
 
98
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
99
dnl
 
100
dnl At the end, if we're not within glib, we'll define the public
 
101
dnl definitions in terms of our private definitions.
 
102
dnl
 
103
 
 
104
# GLIB_LC_MESSAGES
 
105
#--------------------
 
106
glib_DEFUN([GLIB_LC_MESSAGES],
 
107
  [AC_CHECK_HEADERS([locale.h])
 
108
    if test $ac_cv_header_locale_h = yes; then
 
109
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
110
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
111
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
112
    if test $am_cv_val_LC_MESSAGES = yes; then
 
113
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
114
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
115
    fi
 
116
  fi])
 
117
 
 
118
# GLIB_PATH_PROG_WITH_TEST
 
119
#----------------------------
 
120
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
121
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
122
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
123
[# Extract the first word of "$2", so it can be a program name with args.
 
124
set dummy $2; ac_word=[$]2
 
125
AC_MSG_CHECKING([for $ac_word])
 
126
AC_CACHE_VAL(ac_cv_path_$1,
 
127
[case "[$]$1" in
 
128
  /*)
 
129
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
130
  ;;
 
131
  *)
 
132
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
133
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
134
    test -z "$ac_dir" && ac_dir=.
 
135
    if test -f $ac_dir/$ac_word; then
 
136
      if [$3]; then
 
137
        ac_cv_path_$1="$ac_dir/$ac_word"
 
138
        break
 
139
      fi
 
140
    fi
 
141
  done
 
142
  IFS="$ac_save_ifs"
 
143
dnl If no 4th arg is given, leave the cache variable unset,
 
144
dnl so AC_PATH_PROGS will keep looking.
 
145
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
146
])dnl
 
147
  ;;
 
148
esac])dnl
 
149
$1="$ac_cv_path_$1"
 
150
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
151
  AC_MSG_RESULT([$]$1)
 
152
else
 
153
  AC_MSG_RESULT(no)
 
154
fi
 
155
AC_SUBST($1)dnl
 
156
])
 
157
 
 
158
# GLIB_WITH_NLS
 
159
#-----------------
 
160
glib_DEFUN([GLIB_WITH_NLS],
 
161
  dnl NLS is obligatory
 
162
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
163
    USE_NLS=yes
 
164
    AC_SUBST(USE_NLS)
 
165
 
 
166
    gt_cv_have_gettext=no
 
167
 
 
168
    CATOBJEXT=NONE
 
169
    XGETTEXT=:
 
170
    INTLLIBS=
 
171
 
 
172
    AC_CHECK_HEADER(libintl.h,
 
173
     [gt_cv_func_dgettext_libintl="no"
 
174
      libintl_extra_libs=""
 
175
 
 
176
      #
 
177
      # First check in libc
 
178
      #
 
179
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
180
        [AC_TRY_LINK([
 
181
#include <libintl.h>
 
182
],
 
183
         [return !ngettext ("","", 1)],
 
184
          gt_cv_func_ngettext_libc=yes,
 
185
          gt_cv_func_ngettext_libc=no)
 
186
        ])
 
187
  
 
188
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
189
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
190
                [AC_TRY_LINK([
 
191
#include <libintl.h>
 
192
],
 
193
                  [return !dgettext ("","")],
 
194
                  gt_cv_func_dgettext_libc=yes,
 
195
                  gt_cv_func_dgettext_libc=no)
 
196
                ])
 
197
      fi
 
198
  
 
199
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
200
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
201
      fi
 
202
 
 
203
      #
 
204
      # If we don't have everything we want, check in libintl
 
205
      #
 
206
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
207
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
208
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
209
        
 
210
        AC_CHECK_LIB(intl, bindtextdomain,
 
211
            [AC_CHECK_LIB(intl, ngettext,
 
212
                    [AC_CHECK_LIB(intl, dgettext,
 
213
                                  gt_cv_func_dgettext_libintl=yes)])])
 
214
 
 
215
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
216
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
217
          AC_MSG_RESULT([])
 
218
          AC_CHECK_LIB(intl, ngettext,
 
219
                [AC_CHECK_LIB(intl, dcgettext,
 
220
                       [gt_cv_func_dgettext_libintl=yes
 
221
                        libintl_extra_libs=-liconv],
 
222
                        :,-liconv)],
 
223
                :,-liconv)
 
224
        fi
 
225
 
 
226
        #
 
227
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
228
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
229
        # and both have dgettext and ngettext
 
230
        #
 
231
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
232
          glib_save_LIBS="$LIBS"
 
233
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
234
          unset ac_cv_func_bind_textdomain_codeset
 
235
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
236
          LIBS="$glib_save_LIBS"
 
237
 
 
238
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
239
            gt_cv_func_dgettext_libc=no
 
240
          else
 
241
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
242
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
243
              gt_cv_func_dgettext_libintl=no
 
244
            fi
 
245
          fi
 
246
        fi
 
247
      fi
 
248
 
 
249
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
250
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
251
        gt_cv_have_gettext=yes
 
252
      fi
 
253
  
 
254
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
255
        INTLLIBS="-lintl $libintl_extra_libs"
 
256
      fi
 
257
  
 
258
      if test "$gt_cv_have_gettext" = "yes"; then
 
259
        AC_DEFINE(HAVE_GETTEXT,1,
 
260
          [Define if the GNU gettext() function is already present or preinstalled.])
 
261
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
262
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
263
        if test "$MSGFMT" != "no"; then
 
264
          glib_save_LIBS="$LIBS"
 
265
          LIBS="$LIBS $INTLLIBS"
 
266
          AC_CHECK_FUNCS(dcgettext)
 
267
          MSGFMT_OPTS=
 
268
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
269
          GLIB_RUN_PROG([msgfmt -c -o /dev/null],[
 
270
msgid ""
 
271
msgstr ""
 
272
"Content-Type: text/plain; charset=UTF-8\n"
 
273
"Project-Id-Version: test 1.0\n"
 
274
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
275
"Last-Translator: test <foo@bar.xx>\n"
 
276
"Language-Team: C <LL@li.org>\n"
 
277
"MIME-Version: 1.0\n"
 
278
"Content-Transfer-Encoding: 8bit\n"
 
279
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
280
          AC_SUBST(MSGFMT_OPTS)
 
281
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
282
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
283
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
284
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
285
                         return _nl_msg_cat_cntr],
 
286
            [CATOBJEXT=.gmo 
 
287
             DATADIRNAME=share],
 
288
            [case $host in
 
289
            *-*-solaris*)
 
290
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
291
            dnl GNU format message catalog is always supported,
 
292
            dnl since both are added to the libc all together.
 
293
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
294
            dnl and CATOBJEXT=.gmo in this case.
 
295
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
296
              [CATOBJEXT=.gmo 
 
297
               DATADIRNAME=share],
 
298
              [CATOBJEXT=.mo
 
299
               DATADIRNAME=lib])
 
300
            ;;
 
301
            *)
 
302
            CATOBJEXT=.mo
 
303
            DATADIRNAME=lib
 
304
            ;;
 
305
            esac])
 
306
          LIBS="$glib_save_LIBS"
 
307
          INSTOBJEXT=.mo
 
308
        else
 
309
          gt_cv_have_gettext=no
 
310
        fi
 
311
      fi
 
312
    ])
 
313
 
 
314
    if test "$gt_cv_have_gettext" = "yes" ; then
 
315
      AC_DEFINE(ENABLE_NLS, 1,
 
316
        [always defined to indicate that i18n is enabled])
 
317
    fi
 
318
 
 
319
    dnl Test whether we really found GNU xgettext.
 
320
    if test "$XGETTEXT" != ":"; then
 
321
      dnl If it is not GNU xgettext we define it as : so that the
 
322
      dnl Makefiles still can work.
 
323
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
324
        : ;
 
325
      else
 
326
        AC_MSG_RESULT(
 
327
          [found xgettext program is not GNU xgettext; ignore it])
 
328
        XGETTEXT=":"
 
329
      fi
 
330
    fi
 
331
 
 
332
    # We need to process the po/ directory.
 
333
    POSUB=po
 
334
 
 
335
    AC_OUTPUT_COMMANDS(
 
336
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
337
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
338
      esac])
 
339
 
 
340
    dnl These rules are solely for the distribution goal.  While doing this
 
341
    dnl we only have to keep exactly one list of the available catalogs
 
342
    dnl in configure.in.
 
343
    for lang in $ALL_LINGUAS; do
 
344
      GMOFILES="$GMOFILES $lang.gmo"
 
345
      POFILES="$POFILES $lang.po"
 
346
    done
 
347
 
 
348
    dnl Make all variables we use known to autoconf.
 
349
    AC_SUBST(CATALOGS)
 
350
    AC_SUBST(CATOBJEXT)
 
351
    AC_SUBST(DATADIRNAME)
 
352
    AC_SUBST(GMOFILES)
 
353
    AC_SUBST(INSTOBJEXT)
 
354
    AC_SUBST(INTLLIBS)
 
355
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
356
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
357
    AC_SUBST(POFILES)
 
358
    AC_SUBST(POSUB)
 
359
  ])
 
360
 
 
361
# AM_GLIB_GNU_GETTEXT
 
362
# -------------------
 
363
# Do checks necessary for use of gettext. If a suitable implementation 
 
364
# of gettext is found in either in libintl or in the C library,
 
365
# it will set INTLLIBS to the libraries needed for use of gettext
 
366
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
367
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
368
# on various variables needed by the Makefile.in.in installed by 
 
369
# glib-gettextize.
 
370
dnl
 
371
glib_DEFUN([GLIB_GNU_GETTEXT],
 
372
  [AC_REQUIRE([AC_PROG_CC])dnl
 
373
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
374
   
 
375
   GLIB_LC_MESSAGES
 
376
   GLIB_WITH_NLS
 
377
 
 
378
   if test "$gt_cv_have_gettext" = "yes"; then
 
379
     if test "x$ALL_LINGUAS" = "x"; then
 
380
       LINGUAS=
 
381
     else
 
382
       AC_MSG_CHECKING(for catalogs to be installed)
 
383
       NEW_LINGUAS=
 
384
       for presentlang in $ALL_LINGUAS; do
 
385
         useit=no
 
386
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
387
           desiredlanguages="$LINGUAS"
 
388
         else
 
389
           desiredlanguages="$ALL_LINGUAS"
 
390
         fi
 
391
         for desiredlang in $desiredlanguages; do
 
392
           # Use the presentlang catalog if desiredlang is
 
393
           #   a. equal to presentlang, or
 
394
           #   b. a variant of presentlang (because in this case,
 
395
           #      presentlang can be used as a fallback for messages
 
396
           #      which are not translated in the desiredlang catalog).
 
397
           case "$desiredlang" in
 
398
             "$presentlang"*) useit=yes;;
 
399
           esac
 
400
         done
 
401
         if test $useit = yes; then
 
402
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
403
         fi
 
404
       done
 
405
       LINGUAS=$NEW_LINGUAS
 
406
       AC_MSG_RESULT($LINGUAS)
 
407
     fi
 
408
 
 
409
     dnl Construct list of names of catalog files to be constructed.
 
410
     if test -n "$LINGUAS"; then
 
411
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
412
     fi
 
413
   fi
 
414
 
 
415
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
416
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
417
   dnl Try to locate is.
 
418
   MKINSTALLDIRS=
 
419
   if test -n "$ac_aux_dir"; then
 
420
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
421
   fi
 
422
   if test -z "$MKINSTALLDIRS"; then
 
423
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
424
   fi
 
425
   AC_SUBST(MKINSTALLDIRS)
 
426
 
 
427
   dnl Generate list of files to be processed by xgettext which will
 
428
   dnl be included in po/Makefile.
 
429
   test -d po || mkdir po
 
430
   if test "x$srcdir" != "x."; then
 
431
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
432
       posrcprefix="$srcdir/"
 
433
     else
 
434
       posrcprefix="../$srcdir/"
 
435
     fi
 
436
   else
 
437
     posrcprefix="../"
 
438
   fi
 
439
   rm -f po/POTFILES
 
440
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
441
        < $srcdir/po/POTFILES.in > po/POTFILES
 
442
  ])
 
443
 
 
444
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
445
# -------------------------------
 
446
# Define VARIABLE to the location where catalog files will
 
447
# be installed by po/Makefile.
 
448
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
449
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
450
glib_save_prefix="$prefix"
 
451
glib_save_exec_prefix="$exec_prefix"
 
452
glib_save_datarootdir="$datarootdir"
 
453
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
454
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
455
datarootdir=`eval echo "${datarootdir}"`
 
456
if test "x$CATOBJEXT" = "x.mo" ; then
 
457
  localedir=`eval echo "${libdir}/locale"`
 
458
else
 
459
  localedir=`eval echo "${datadir}/locale"`
 
460
fi
 
461
prefix="$glib_save_prefix"
 
462
exec_prefix="$glib_save_exec_prefix"
 
463
datarootdir="$glib_save_datarootdir"
 
464
AC_DEFINE_UNQUOTED($1, "$localedir",
 
465
  [Define the location where the catalogs will be installed])
 
466
])
 
467
 
 
468
dnl
 
469
dnl Now the definitions that aclocal will find
 
470
dnl
 
471
ifdef(glib_configure_in,[],[
 
472
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
473
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
474
])dnl
 
475
 
 
476
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
477
 
478
# Create a temporary file with TEST-FILE as its contents and pass the
 
479
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
480
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
481
AC_DEFUN([GLIB_RUN_PROG],
 
482
[cat >conftest.foo <<_ACEOF
 
483
$2
 
484
_ACEOF
 
485
if AC_RUN_LOG([$1 conftest.foo]); then
 
486
  m4_ifval([$3], [$3], [:])
 
487
m4_ifvaln([$4], [else $4])dnl
 
488
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
489
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
490
fi])
 
491
 
 
492
 
 
493
# gnome-common.m4
 
494
 
495
 
 
496
dnl GNOME_COMMON_INIT
 
497
 
 
498
AC_DEFUN([GNOME_COMMON_INIT],
 
499
[
 
500
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
501
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
502
 
 
503
  dnl ensure that when the Automake generated makefile calls aclocal,
 
504
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
505
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
506
  if test -n "$ac_macro_dir"; then
 
507
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
508
  fi
 
509
 
 
510
  AC_SUBST([ACLOCAL_AMFLAGS])
 
511
])
 
512
 
 
513
AC_DEFUN([GNOME_DEBUG_CHECK],
 
514
[
 
515
        AC_ARG_ENABLE([debug],
 
516
                      AC_HELP_STRING([--enable-debug],
 
517
                                     [turn on debugging]),,
 
518
                      [enable_debug=no])
 
519
 
 
520
        if test x$enable_debug = xyes ; then
 
521
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
522
                [Enable additional debugging at the expense of performance and size])
 
523
        fi
 
524
])
 
525
 
 
526
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
527
dnl define DISABLE_DEPRECATED
 
528
dnl
 
529
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
530
[
 
531
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
532
 
 
533
        if test $USE_MAINTAINER_MODE = yes; then
 
534
                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"
 
535
        else
 
536
                DISABLE_DEPRECATED=""
 
537
        fi
 
538
        AC_SUBST(DISABLE_DEPRECATED)
 
539
])
 
540
 
 
541
dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
 
542
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
 
543
AC_DEFUN([GNOME_DOC_DEFINES],
 
544
[
 
545
AC_ARG_WITH([help-dir],
 
546
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
 
547
  [with_help_dir='${datadir}/gnome/help'])
 
548
HELP_DIR="$with_help_dir"
 
549
AC_SUBST(HELP_DIR)
 
550
 
 
551
AC_ARG_WITH([omf-dir],
 
552
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
 
553
  [with_omf_dir='${datadir}/omf'])
 
554
OMF_DIR="$with_omf_dir"
 
555
AC_SUBST(OMF_DIR)
 
556
 
 
557
AC_ARG_WITH([help-formats],
 
558
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
 
559
  [with_help_formats=''])
 
560
DOC_USER_FORMATS="$with_help_formats"
 
561
AC_SUBST(DOC_USER_FORMATS)
 
562
 
 
563
AC_ARG_ENABLE([scrollkeeper],
 
564
        [AC_HELP_STRING([--disable-scrollkeeper],
 
565
                        [do not make updates to the scrollkeeper database])],,
 
566
        enable_scrollkeeper=yes)
 
567
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
 
568
 
 
569
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
 
570
])
 
571
 
 
572
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
 
573
#
 
574
AC_DEFUN([GNOME_DOC_INIT],
 
575
[
 
576
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
 
577
 
 
578
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
 
579
        [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
 
580
 
 
581
if test "$gdu_cv_have_gdu" = "yes"; then
 
582
        ifelse([$2],,[:],[$2])
 
583
else
 
584
        ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
 
585
fi
 
586
 
 
587
GNOME_DOC_DEFINES
 
588
])
 
589
 
14
590
 
15
591
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
16
592
# serial 35 IT_PROG_INTLTOOL
103
679
 
104
680
# Substitute ALL_LINGUAS so we can use it in po/Makefile
105
681
AC_SUBST(ALL_LINGUAS)
106
 
    
 
682
 
 
683
# Set DATADIRNAME correctly if it is not set yet
 
684
# (copied from glib-gettext.m4)
 
685
if test -z "$DATADIRNAME"; then
 
686
  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
687
                 return _nl_msg_cat_cntr],
 
688
    [DATADIRNAME=share],
 
689
    [case $host in
 
690
    *-*-solaris*)
 
691
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
692
    dnl GNU format message catalog is always supported,
 
693
    dnl since both are added to the libc all together.
 
694
    dnl Hence, we'd like to go with DATADIRNAME=share
 
695
    dnl in this case.
 
696
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
697
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
698
    ;;
 
699
    *)
 
700
    [DATADIRNAME=lib]
 
701
    ;;
 
702
    esac])
 
703
fi
 
704
AC_SUBST(DATADIRNAME)
 
705
 
107
706
IT_PO_SUBDIR([po])
108
707
 
109
708
dnl The following is very similar to
195
794
 
196
795
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
197
796
 
198
 
# serial 48 AC_PROG_LIBTOOL
 
797
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
199
798
 
200
799
 
201
800
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1579
2178
  dynamic_linker=no
1580
2179
  ;;
1581
2180
 
1582
 
kfreebsd*-gnu)
1583
 
  version_type=linux
1584
 
  need_lib_prefix=no
1585
 
  need_version=no
1586
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1587
 
  soname_spec='${libname}${release}${shared_ext}$major'
1588
 
  shlibpath_var=LD_LIBRARY_PATH
1589
 
  shlibpath_overrides_runpath=no
1590
 
  hardcode_into_libs=yes
1591
 
  dynamic_linker='GNU ld.so'
1592
 
  ;;
1593
 
 
1594
2181
freebsd* | dragonfly*)
1595
2182
  # DragonFly does not have aout.  When/if they implement a new
1596
2183
  # versioning mechanism, adjust this.
1746
2333
  ;;
1747
2334
 
1748
2335
# This must be Linux ELF.
1749
 
linux*)
 
2336
linux* | k*bsd*-gnu)
1750
2337
  version_type=linux
1751
2338
  need_lib_prefix=no
1752
2339
  need_version=no
1775
2362
  dynamic_linker='GNU/Linux ld.so'
1776
2363
  ;;
1777
2364
 
1778
 
knetbsd*-gnu)
 
2365
netbsdelf*-gnu)
1779
2366
  version_type=linux
1780
2367
  need_lib_prefix=no
1781
2368
  need_version=no
1784
2371
  shlibpath_var=LD_LIBRARY_PATH
1785
2372
  shlibpath_overrides_runpath=no
1786
2373
  hardcode_into_libs=yes
1787
 
  dynamic_linker='GNU ld.so'
 
2374
  dynamic_linker='NetBSD ld.elf_so'
1788
2375
  ;;
1789
2376
 
1790
2377
netbsd*)
2492
3079
  lt_cv_deplibs_check_method=pass_all
2493
3080
  ;;
2494
3081
 
2495
 
freebsd* | kfreebsd*-gnu | dragonfly*)
 
3082
freebsd* | dragonfly*)
2496
3083
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2497
3084
    case $host_cpu in
2498
3085
    i*86 )
2546
3133
  ;;
2547
3134
 
2548
3135
# This must be Linux ELF.
2549
 
linux*)
 
3136
linux* | k*bsd*-gnu)
2550
3137
  lt_cv_deplibs_check_method=pass_all
2551
3138
  ;;
2552
3139
 
2553
 
netbsd*)
 
3140
netbsd* | netbsdelf*-gnu)
2554
3141
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2555
3142
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2556
3143
  else
3298
3885
  freebsd-elf*)
3299
3886
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3300
3887
    ;;
3301
 
  freebsd* | kfreebsd*-gnu | dragonfly*)
 
3888
  freebsd* | dragonfly*)
3302
3889
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3303
3890
    # conventions
3304
3891
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3457
4044
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3458
4045
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3459
4046
    ;;
3460
 
  linux*)
 
4047
  linux* | k*bsd*-gnu)
3461
4048
    case $cc_basename in
3462
4049
      KCC*)
3463
4050
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3559
4146
        ;;
3560
4147
    esac
3561
4148
    ;;
3562
 
  netbsd*)
 
4149
  netbsd* | netbsdelf*-gnu)
3563
4150
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3564
4151
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3565
4152
      wlarc=
4824
5411
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4825
5412
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4826
5413
  ;;
4827
 
linux*)
 
5414
linux* | k*bsd*-gnu)
4828
5415
  if test "$host_cpu" = ia64; then
4829
5416
    symcode='[[ABCDGIRSTW]]'
4830
5417
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5097
5684
            ;;
5098
5685
        esac
5099
5686
        ;;
5100
 
      freebsd* | kfreebsd*-gnu | dragonfly*)
 
5687
      freebsd* | dragonfly*)
5101
5688
        # FreeBSD uses GNU C++
5102
5689
        ;;
5103
5690
      hpux9* | hpux10* | hpux11*)
5140
5727
            ;;
5141
5728
        esac
5142
5729
        ;;
5143
 
      linux*)
 
5730
      linux* | k*bsd*-gnu)
5144
5731
        case $cc_basename in
5145
5732
          KCC*)
5146
5733
            # KAI C++ Compiler
5183
5770
            ;;
5184
5771
        esac
5185
5772
        ;;
5186
 
      netbsd*)
 
5773
      netbsd* | netbsdelf*-gnu)
5187
5774
        ;;
5188
5775
      osf3* | osf4* | osf5*)
5189
5776
        case $cc_basename in
5394
5981
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5395
5982
      ;;
5396
5983
 
5397
 
    linux*)
 
5984
    linux* | k*bsd*-gnu)
5398
5985
      case $cc_basename in
5399
5986
      icc* | ecc*)
5400
5987
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5535
6122
  cygwin* | mingw*)
5536
6123
    _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'
5537
6124
  ;;
 
6125
  linux* | k*bsd*-gnu)
 
6126
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
6127
  ;;
5538
6128
  *)
5539
6129
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5540
6130
  ;;
5705
6295
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5706
6296
      ;;
5707
6297
 
5708
 
    linux*)
 
6298
    linux* | k*bsd*-gnu)
5709
6299
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5710
6300
        tmp_addflag=
5711
6301
        case $cc_basename,$host_cpu in
5731
6321
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5732
6322
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5733
6323
        fi
 
6324
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5734
6325
      else
5735
6326
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5736
6327
      fi
5737
6328
      ;;
5738
6329
 
5739
 
    netbsd*)
 
6330
    netbsd* | netbsdelf*-gnu)
5740
6331
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5741
6332
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5742
6333
        wlarc=
6066
6657
      ;;
6067
6658
 
6068
6659
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6069
 
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
6660
    freebsd* | dragonfly*)
6070
6661
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6071
6662
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6072
6663
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6168
6759
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6169
6760
      ;;
6170
6761
 
6171
 
    netbsd*)
 
6762
    netbsd* | netbsdelf*-gnu)
6172
6763
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6173
6764
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6174
6765
      else
6708
7299
 
6709
7300
_PKG_TEXT
6710
7301
])],
6711
 
                [$4])
 
7302
                [AC_MSG_RESULT([no])
 
7303
                $4])
6712
7304
elif test $pkg_failed = untried; then
6713
7305
        ifelse([$4], , [AC_MSG_FAILURE(dnl
6714
7306
[The pkg-config script could not be found or is too old.  Make sure it
6727
7319
fi[]dnl
6728
7320
])# PKG_CHECK_MODULES
6729
7321
 
6730
 
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
7322
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
6731
7323
#
6732
7324
# This file is free software; the Free Software Foundation
6733
7325
# gives unlimited permission to copy and/or distribute it,
6737
7329
# ----------------------------
6738
7330
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6739
7331
# generated from the m4 files accompanying Automake X.Y.
6740
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
7332
# (This private macro should not be called outside this file.)
 
7333
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
7334
[am__api_version='1.10'
 
7335
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
7336
dnl require some minimum version.  Point them to the right macro.
 
7337
m4_if([$1], [1.10], [],
 
7338
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
7339
])
 
7340
 
 
7341
# _AM_AUTOCONF_VERSION(VERSION)
 
7342
# -----------------------------
 
7343
# aclocal traces this macro to find the Autoconf version.
 
7344
# This is a private macro too.  Using m4_define simplifies
 
7345
# the logic in aclocal, which can simply ignore this definition.
 
7346
m4_define([_AM_AUTOCONF_VERSION], [])
6741
7347
 
6742
7348
# AM_SET_CURRENT_AUTOMAKE_VERSION
6743
7349
# -------------------------------
6744
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
7350
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6745
7351
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6746
7352
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6747
 
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
7353
[AM_AUTOMAKE_VERSION([1.10])dnl
 
7354
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
6748
7355
 
6749
7356
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6750
7357
 
6801
7408
 
6802
7409
# AM_CONDITIONAL                                            -*- Autoconf -*-
6803
7410
 
6804
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
7411
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6805
7412
# Free Software Foundation, Inc.
6806
7413
#
6807
7414
# This file is free software; the Free Software Foundation
6808
7415
# gives unlimited permission to copy and/or distribute it,
6809
7416
# with or without modifications, as long as this notice is preserved.
6810
7417
 
6811
 
# serial 7
 
7418
# serial 8
6812
7419
 
6813
7420
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6814
7421
# -------------------------------------
6817
7424
[AC_PREREQ(2.52)dnl
6818
7425
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6819
7426
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6820
 
AC_SUBST([$1_TRUE])
6821
 
AC_SUBST([$1_FALSE])
 
7427
AC_SUBST([$1_TRUE])dnl
 
7428
AC_SUBST([$1_FALSE])dnl
 
7429
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
7430
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6822
7431
if $2; then
6823
7432
  $1_TRUE=
6824
7433
  $1_FALSE='#'
6832
7441
Usually this means the macro was only invoked conditionally.]])
6833
7442
fi])])
6834
7443
 
6835
 
 
6836
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
7444
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6837
7445
# Free Software Foundation, Inc.
6838
7446
#
6839
7447
# This file is free software; the Free Software Foundation
6840
7448
# gives unlimited permission to copy and/or distribute it,
6841
7449
# with or without modifications, as long as this notice is preserved.
6842
7450
 
6843
 
# serial 8
 
7451
# serial 9
6844
7452
 
6845
7453
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6846
7454
# written in clear, in which case automake, when reading aclocal.m4,
6868
7476
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6869
7477
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6870
7478
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
7479
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
6871
7480
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6872
7481
                   [depcc="$$1"   am_compiler_list=])
6873
7482
 
6933
7542
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6934
7543
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6935
7544
         >/dev/null 2>conftest.err &&
 
7545
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6936
7546
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6937
7547
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6938
7548
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6985
7595
  AMDEPBACKSLASH='\'
6986
7596
fi
6987
7597
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6988
 
AC_SUBST([AMDEPBACKSLASH])
 
7598
AC_SUBST([AMDEPBACKSLASH])dnl
 
7599
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
6989
7600
])
6990
7601
 
6991
7602
# Generate code to set up dependency tracking.              -*- Autoconf -*-
7010
7621
  # some people rename them; so instead we look at the file content.
7011
7622
  # Grep'ing the first line is not enough: some people post-process
7012
7623
  # each Makefile.in and add a new line on top of each file to say so.
7013
 
  # So let's grep whole file.
7014
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
7624
  # Grep'ing the whole file is not good either: AIX grep has a line
 
7625
  # limit of 2048, but all sed's we know have understand at least 4000.
 
7626
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
7015
7627
    dirpart=`AS_DIRNAME("$mf")`
7016
7628
  else
7017
7629
    continue
7070
7682
 
7071
7683
# Do all the work for Automake.                             -*- Autoconf -*-
7072
7684
 
7073
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
7074
 
# Free Software Foundation, Inc.
 
7685
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
7686
# 2005, 2006 Free Software Foundation, Inc.
7075
7687
#
7076
7688
# This file is free software; the Free Software Foundation
7077
7689
# gives unlimited permission to copy and/or distribute it,
7094
7706
# arguments mandatory, and then we can depend on a new Autoconf
7095
7707
# release and drop the old call support.
7096
7708
AC_DEFUN([AM_INIT_AUTOMAKE],
7097
 
[AC_PREREQ([2.58])dnl
 
7709
[AC_PREREQ([2.60])dnl
7098
7710
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
7099
7711
dnl the ones we care about.
7100
7712
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7101
7713
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7102
7714
AC_REQUIRE([AC_PROG_INSTALL])dnl
7103
 
# test to see if srcdir already configured
7104
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
7105
 
   test -f $srcdir/config.status; then
7106
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
7715
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
7716
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
7717
  # is not polluted with repeated "-I."
 
7718
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
7719
  # test to see if srcdir already configured
 
7720
  if test -f $srcdir/config.status; then
 
7721
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
7722
  fi
7107
7723
fi
7108
7724
 
7109
7725
# test whether we have cygpath
7123
7739
 AC_SUBST([PACKAGE], [$1])dnl
7124
7740
 AC_SUBST([VERSION], [$2])],
7125
7741
[_AM_SET_OPTIONS([$1])dnl
 
7742
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
7743
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
7744
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7126
7745
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7127
7746
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7128
7747
 
7158
7777
                  [_AM_DEPENDENCIES(CXX)],
7159
7778
                  [define([AC_PROG_CXX],
7160
7779
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
7780
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
7781
                  [_AM_DEPENDENCIES(OBJC)],
 
7782
                  [define([AC_PROG_OBJC],
 
7783
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7161
7784
])
7162
7785
])
7163
7786
 
7193
7816
# Define $install_sh.
7194
7817
AC_DEFUN([AM_PROG_INSTALL_SH],
7195
7818
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7196
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
7819
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
7197
7820
AC_SUBST(install_sh)])
7198
7821
 
7199
7822
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7300
7923
 
7301
7924
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7302
7925
 
7303
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
7926
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7304
7927
# Free Software Foundation, Inc.
7305
7928
#
7306
7929
# This file is free software; the Free Software Foundation
7307
7930
# gives unlimited permission to copy and/or distribute it,
7308
7931
# with or without modifications, as long as this notice is preserved.
7309
7932
 
7310
 
# serial 4
 
7933
# serial 5
7311
7934
 
7312
7935
# AM_MISSING_PROG(NAME, PROGRAM)
7313
7936
# ------------------------------
7323
7946
# If it does, set am_missing_run to use it, otherwise, to nothing.
7324
7947
AC_DEFUN([AM_MISSING_HAS_RUN],
7325
7948
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
7949
AC_REQUIRE_AUX_FILE([missing])dnl
7326
7950
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7327
7951
# Use eval to expand $SHELL
7328
7952
if eval "$MISSING --run true"; then
7333
7957
fi
7334
7958
])
7335
7959
 
7336
 
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
7960
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7337
7961
#
7338
7962
# This file is free software; the Free Software Foundation
7339
7963
# gives unlimited permission to copy and/or distribute it,
7341
7965
 
7342
7966
# AM_PROG_MKDIR_P
7343
7967
# ---------------
7344
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7345
 
#
7346
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7347
 
# created by `make install' are always world readable, even if the
7348
 
# installer happens to have an overly restrictive umask (e.g. 077).
7349
 
# This was a mistake.  There are at least two reasons why we must not
7350
 
# use `-m 0755':
7351
 
#   - it causes special bits like SGID to be ignored,
7352
 
#   - it may be too restrictive (some setups expect 775 directories).
7353
 
#
7354
 
# Do not use -m 0755 and let people choose whatever they expect by
7355
 
# setting umask.
7356
 
#
7357
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7358
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
7359
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7360
 
# concurrently, both version can detect that a/ is missing, but only
7361
 
# one can create it and the other will error out.  Consequently we
7362
 
# restrict ourselves to GNU make (using the --version option ensures
7363
 
# this.)
 
7968
# Check for `mkdir -p'.
7364
7969
AC_DEFUN([AM_PROG_MKDIR_P],
7365
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7366
 
  # We used to keeping the `.' as first argument, in order to
7367
 
  # allow $(mkdir_p) to be used without argument.  As in
7368
 
  #   $(mkdir_p) $(somedir)
7369
 
  # where $(somedir) is conditionally defined.  However this is wrong
7370
 
  # for two reasons:
7371
 
  #  1. if the package is installed by a user who cannot write `.'
7372
 
  #     make install will fail,
7373
 
  #  2. the above comment should most certainly read
7374
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
7375
 
  #     so it does not work when $(somedir) is undefined and
7376
 
  #     $(DESTDIR) is not.
7377
 
  #  To support the latter case, we have to write
7378
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7379
 
  #  so the `.' trick is pointless.
7380
 
  mkdir_p='mkdir -p --'
7381
 
else
7382
 
  # On NextStep and OpenStep, the `mkdir' command does not
7383
 
  # recognize any option.  It will interpret all options as
7384
 
  # directories to create, and then abort because `.' already
7385
 
  # exists.
7386
 
  for d in ./-p ./--version;
7387
 
  do
7388
 
    test -d $d && rmdir $d
7389
 
  done
7390
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7391
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
7392
 
    mkdir_p='$(mkinstalldirs)'
7393
 
  else
7394
 
    mkdir_p='$(install_sh) -d'
7395
 
  fi
7396
 
fi
7397
 
AC_SUBST([mkdir_p])])
 
7970
[AC_PREREQ([2.60])dnl
 
7971
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
7972
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
7973
dnl while keeping a definition of mkdir_p for backward compatibility.
 
7974
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
7975
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
7976
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
7977
dnl adjustment using top_builddir (which is defined more often than
 
7978
dnl MKDIR_P).
 
7979
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
7980
case $mkdir_p in
 
7981
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
7982
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
7983
esac
 
7984
])
7398
7985
 
7399
7986
# Helper functions for option handling.                     -*- Autoconf -*-
7400
7987
 
7429
8016
AC_DEFUN([_AM_IF_OPTION],
7430
8017
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7431
8018
 
 
8019
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
8020
#
 
8021
# This file is free software; the Free Software Foundation
 
8022
# gives unlimited permission to copy and/or distribute it,
 
8023
# with or without modifications, as long as this notice is preserved.
 
8024
 
 
8025
# AM_RUN_LOG(COMMAND)
 
8026
# -------------------
 
8027
# Run COMMAND, save the exit status in ac_status, and log it.
 
8028
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 
8029
AC_DEFUN([AM_RUN_LOG],
 
8030
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 
8031
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 
8032
   ac_status=$?
 
8033
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
8034
   (exit $ac_status); }])
 
8035
 
7432
8036
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7433
8037
 
7434
8038
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7506
8110
if test "$cross_compiling" != no; then
7507
8111
  AC_CHECK_TOOL([STRIP], [strip], :)
7508
8112
fi
7509
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
8113
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7510
8114
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7511
8115
 
 
8116
# Copyright (C) 2006  Free Software Foundation, Inc.
 
8117
#
 
8118
# This file is free software; the Free Software Foundation
 
8119
# gives unlimited permission to copy and/or distribute it,
 
8120
# with or without modifications, as long as this notice is preserved.
 
8121
 
 
8122
# _AM_SUBST_NOTMAKE(VARIABLE)
 
8123
# ---------------------------
 
8124
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
8125
# This macro is traced by Automake.
 
8126
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
8127
 
7512
8128
# Check how to create a tarball.                            -*- Autoconf -*-
7513
8129
 
7514
8130
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7605
8221
AC_SUBST([am__untar])
7606
8222
]) # _AM_PROG_TAR
7607
8223
 
7608
 
dnl AM_GCONF_SOURCE_2
7609
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
7610
 
dnl  (i.e. pass to gconftool-2
7611
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
7612
 
dnl  you should install foo.schemas files
7613
 
dnl
7614
 
 
7615
 
AC_DEFUN([AM_GCONF_SOURCE_2],
7616
 
[
7617
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
7618
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
7619
 
  else
7620
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
7621
 
  fi
7622
 
 
7623
 
  AC_ARG_WITH(gconf-source, 
7624
 
  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
7625
 
 
7626
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
7627
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
7628
 
 
7629
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
7630
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
7631
 
  fi
7632
 
 
7633
 
  AC_ARG_WITH(gconf-schema-file-dir, 
7634
 
  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
7635
 
 
7636
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
7637
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
7638
 
 
7639
 
  AC_ARG_ENABLE(schemas-install,
7640
 
     [  --disable-schemas-install       Disable the schemas installation],
7641
 
     [case ${enableval} in
7642
 
       yes|no) ;;
7643
 
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
7644
 
      esac])
7645
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
7646
 
])
7647
 
 
7648
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7649
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7650
 
#
7651
 
# This file is free software, distributed under the terms of the GNU
7652
 
# General Public License.  As a special exception to the GNU General
7653
 
# Public License, this file may be distributed as part of a program
7654
 
# that contains a configuration script generated by Autoconf, under
7655
 
# the same distribution terms as the rest of that program.
7656
 
#
7657
 
# This file can be copied and used freely without restrictions.  It can
7658
 
# be used in projects which are not available under the GNU Public License
7659
 
# but which still want to provide support for the GNU gettext functionality.
7660
 
#
7661
 
# Macro to add for using GNU gettext.
7662
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7663
 
#
7664
 
# Modified to never use included libintl. 
7665
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7666
 
#
7667
 
# Major rework to remove unused code
7668
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7669
 
#
7670
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
7671
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7672
 
#
7673
 
# Modified to require ngettext
7674
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7675
 
#
7676
 
# We need this here as well, since someone might use autoconf-2.5x
7677
 
# to configure GLib then an older version to configure a package
7678
 
# using AM_GLIB_GNU_GETTEXT
7679
 
AC_PREREQ(2.53)
7680
 
 
7681
 
dnl
7682
 
dnl We go to great lengths to make sure that aclocal won't 
7683
 
dnl try to pull in the installed version of these macros
7684
 
dnl when running aclocal in the glib directory.
7685
 
dnl
7686
 
m4_copy([AC_DEFUN],[glib_DEFUN])
7687
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7688
 
dnl
7689
 
dnl At the end, if we're not within glib, we'll define the public
7690
 
dnl definitions in terms of our private definitions.
7691
 
dnl
7692
 
 
7693
 
# GLIB_LC_MESSAGES
7694
 
#--------------------
7695
 
glib_DEFUN([GLIB_LC_MESSAGES],
7696
 
  [AC_CHECK_HEADERS([locale.h])
7697
 
    if test $ac_cv_header_locale_h = yes; then
7698
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7699
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7700
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7701
 
    if test $am_cv_val_LC_MESSAGES = yes; then
7702
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7703
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
7704
 
    fi
7705
 
  fi])
7706
 
 
7707
 
# GLIB_PATH_PROG_WITH_TEST
7708
 
#----------------------------
7709
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7710
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7711
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7712
 
[# Extract the first word of "$2", so it can be a program name with args.
7713
 
set dummy $2; ac_word=[$]2
7714
 
AC_MSG_CHECKING([for $ac_word])
7715
 
AC_CACHE_VAL(ac_cv_path_$1,
7716
 
[case "[$]$1" in
7717
 
  /*)
7718
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7719
 
  ;;
7720
 
  *)
7721
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7722
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7723
 
    test -z "$ac_dir" && ac_dir=.
7724
 
    if test -f $ac_dir/$ac_word; then
7725
 
      if [$3]; then
7726
 
        ac_cv_path_$1="$ac_dir/$ac_word"
7727
 
        break
7728
 
      fi
7729
 
    fi
7730
 
  done
7731
 
  IFS="$ac_save_ifs"
7732
 
dnl If no 4th arg is given, leave the cache variable unset,
7733
 
dnl so AC_PATH_PROGS will keep looking.
7734
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7735
 
])dnl
7736
 
  ;;
7737
 
esac])dnl
7738
 
$1="$ac_cv_path_$1"
7739
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7740
 
  AC_MSG_RESULT([$]$1)
7741
 
else
7742
 
  AC_MSG_RESULT(no)
7743
 
fi
7744
 
AC_SUBST($1)dnl
7745
 
])
7746
 
 
7747
 
# GLIB_WITH_NLS
7748
 
#-----------------
7749
 
glib_DEFUN([GLIB_WITH_NLS],
7750
 
  dnl NLS is obligatory
7751
 
  [USE_NLS=yes
7752
 
    AC_SUBST(USE_NLS)
7753
 
 
7754
 
    gt_cv_have_gettext=no
7755
 
 
7756
 
    CATOBJEXT=NONE
7757
 
    XGETTEXT=:
7758
 
    INTLLIBS=
7759
 
 
7760
 
    AC_CHECK_HEADER(libintl.h,
7761
 
     [gt_cv_func_dgettext_libintl="no"
7762
 
      libintl_extra_libs=""
7763
 
 
7764
 
      #
7765
 
      # First check in libc
7766
 
      #
7767
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7768
 
        [AC_TRY_LINK([
7769
 
#include <libintl.h>
7770
 
],
7771
 
         [return !ngettext ("","", 1)],
7772
 
          gt_cv_func_ngettext_libc=yes,
7773
 
          gt_cv_func_ngettext_libc=no)
7774
 
        ])
7775
 
  
7776
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7777
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7778
 
                [AC_TRY_LINK([
7779
 
#include <libintl.h>
7780
 
],
7781
 
                  [return !dgettext ("","")],
7782
 
                  gt_cv_func_dgettext_libc=yes,
7783
 
                  gt_cv_func_dgettext_libc=no)
7784
 
                ])
7785
 
      fi
7786
 
  
7787
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7788
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7789
 
      fi
7790
 
 
7791
 
      #
7792
 
      # If we don't have everything we want, check in libintl
7793
 
      #
7794
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
7795
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
7796
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7797
 
        
7798
 
        AC_CHECK_LIB(intl, bindtextdomain,
7799
 
            [AC_CHECK_LIB(intl, ngettext,
7800
 
                    [AC_CHECK_LIB(intl, dgettext,
7801
 
                                  gt_cv_func_dgettext_libintl=yes)])])
7802
 
 
7803
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7804
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
7805
 
          AC_MSG_RESULT([])
7806
 
          AC_CHECK_LIB(intl, ngettext,
7807
 
                [AC_CHECK_LIB(intl, dcgettext,
7808
 
                       [gt_cv_func_dgettext_libintl=yes
7809
 
                        libintl_extra_libs=-liconv],
7810
 
                        :,-liconv)],
7811
 
                :,-liconv)
7812
 
        fi
7813
 
 
7814
 
        #
7815
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
7816
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
7817
 
        # and both have dgettext and ngettext
7818
 
        #
7819
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7820
 
          glib_save_LIBS="$LIBS"
7821
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
7822
 
          unset ac_cv_func_bind_textdomain_codeset
7823
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7824
 
          LIBS="$glib_save_LIBS"
7825
 
 
7826
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7827
 
            gt_cv_func_dgettext_libc=no
7828
 
          else
7829
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7830
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
7831
 
              gt_cv_func_dgettext_libintl=no
7832
 
            fi
7833
 
          fi
7834
 
        fi
7835
 
      fi
7836
 
 
7837
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7838
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7839
 
        gt_cv_have_gettext=yes
7840
 
      fi
7841
 
  
7842
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7843
 
        INTLLIBS="-lintl $libintl_extra_libs"
7844
 
      fi
7845
 
  
7846
 
      if test "$gt_cv_have_gettext" = "yes"; then
7847
 
        AC_DEFINE(HAVE_GETTEXT,1,
7848
 
          [Define if the GNU gettext() function is already present or preinstalled.])
7849
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7850
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7851
 
        if test "$MSGFMT" != "no"; then
7852
 
          glib_save_LIBS="$LIBS"
7853
 
          LIBS="$LIBS $INTLLIBS"
7854
 
          AC_CHECK_FUNCS(dcgettext)
7855
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7856
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7857
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7858
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7859
 
                         return _nl_msg_cat_cntr],
7860
 
            [CATOBJEXT=.gmo 
7861
 
             DATADIRNAME=share],
7862
 
            [case $host in
7863
 
            *-*-solaris*)
7864
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
7865
 
            dnl GNU format message catalog is always supported,
7866
 
            dnl since both are added to the libc all together.
7867
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
7868
 
            dnl and CATOBJEXT=.gmo in this case.
7869
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
7870
 
              [CATOBJEXT=.gmo 
7871
 
               DATADIRNAME=share],
7872
 
              [CATOBJEXT=.mo
7873
 
               DATADIRNAME=lib])
7874
 
            ;;
7875
 
            *)
7876
 
            CATOBJEXT=.mo
7877
 
            DATADIRNAME=lib
7878
 
            ;;
7879
 
            esac])
7880
 
          LIBS="$glib_save_LIBS"
7881
 
          INSTOBJEXT=.mo
7882
 
        else
7883
 
          gt_cv_have_gettext=no
7884
 
        fi
7885
 
      fi
7886
 
    ])
7887
 
 
7888
 
    if test "$gt_cv_have_gettext" = "yes" ; then
7889
 
      AC_DEFINE(ENABLE_NLS, 1,
7890
 
        [always defined to indicate that i18n is enabled])
7891
 
    fi
7892
 
 
7893
 
    dnl Test whether we really found GNU xgettext.
7894
 
    if test "$XGETTEXT" != ":"; then
7895
 
      dnl If it is not GNU xgettext we define it as : so that the
7896
 
      dnl Makefiles still can work.
7897
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7898
 
        : ;
7899
 
      else
7900
 
        AC_MSG_RESULT(
7901
 
          [found xgettext program is not GNU xgettext; ignore it])
7902
 
        XGETTEXT=":"
7903
 
      fi
7904
 
    fi
7905
 
 
7906
 
    # We need to process the po/ directory.
7907
 
    POSUB=po
7908
 
 
7909
 
    AC_OUTPUT_COMMANDS(
7910
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7911
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7912
 
      esac])
7913
 
 
7914
 
    dnl These rules are solely for the distribution goal.  While doing this
7915
 
    dnl we only have to keep exactly one list of the available catalogs
7916
 
    dnl in configure.in.
7917
 
    for lang in $ALL_LINGUAS; do
7918
 
      GMOFILES="$GMOFILES $lang.gmo"
7919
 
      POFILES="$POFILES $lang.po"
7920
 
    done
7921
 
 
7922
 
    dnl Make all variables we use known to autoconf.
7923
 
    AC_SUBST(CATALOGS)
7924
 
    AC_SUBST(CATOBJEXT)
7925
 
    AC_SUBST(DATADIRNAME)
7926
 
    AC_SUBST(GMOFILES)
7927
 
    AC_SUBST(INSTOBJEXT)
7928
 
    AC_SUBST(INTLLIBS)
7929
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
7930
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
7931
 
    AC_SUBST(POFILES)
7932
 
    AC_SUBST(POSUB)
7933
 
  ])
7934
 
 
7935
 
# AM_GLIB_GNU_GETTEXT
7936
 
# -------------------
7937
 
# Do checks necessary for use of gettext. If a suitable implementation 
7938
 
# of gettext is found in either in libintl or in the C library,
7939
 
# it will set INTLLIBS to the libraries needed for use of gettext
7940
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7941
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7942
 
# on various variables needed by the Makefile.in.in installed by 
7943
 
# glib-gettextize.
7944
 
dnl
7945
 
glib_DEFUN([GLIB_GNU_GETTEXT],
7946
 
  [AC_REQUIRE([AC_PROG_CC])dnl
7947
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
7948
 
   
7949
 
   GLIB_LC_MESSAGES
7950
 
   GLIB_WITH_NLS
7951
 
 
7952
 
   if test "$gt_cv_have_gettext" = "yes"; then
7953
 
     if test "x$ALL_LINGUAS" = "x"; then
7954
 
       LINGUAS=
7955
 
     else
7956
 
       AC_MSG_CHECKING(for catalogs to be installed)
7957
 
       NEW_LINGUAS=
7958
 
       for presentlang in $ALL_LINGUAS; do
7959
 
         useit=no
7960
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7961
 
           desiredlanguages="$LINGUAS"
7962
 
         else
7963
 
           desiredlanguages="$ALL_LINGUAS"
7964
 
         fi
7965
 
         for desiredlang in $desiredlanguages; do
7966
 
           # Use the presentlang catalog if desiredlang is
7967
 
           #   a. equal to presentlang, or
7968
 
           #   b. a variant of presentlang (because in this case,
7969
 
           #      presentlang can be used as a fallback for messages
7970
 
           #      which are not translated in the desiredlang catalog).
7971
 
           case "$desiredlang" in
7972
 
             "$presentlang"*) useit=yes;;
7973
 
           esac
7974
 
         done
7975
 
         if test $useit = yes; then
7976
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7977
 
         fi
7978
 
       done
7979
 
       LINGUAS=$NEW_LINGUAS
7980
 
       AC_MSG_RESULT($LINGUAS)
7981
 
     fi
7982
 
 
7983
 
     dnl Construct list of names of catalog files to be constructed.
7984
 
     if test -n "$LINGUAS"; then
7985
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7986
 
     fi
7987
 
   fi
7988
 
 
7989
 
   dnl Generate list of files to be processed by xgettext which will
7990
 
   dnl be included in po/Makefile.
7991
 
   test -d po || mkdir po
7992
 
   if test "x$srcdir" != "x."; then
7993
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7994
 
       posrcprefix="$srcdir/"
7995
 
     else
7996
 
       posrcprefix="../$srcdir/"
7997
 
     fi
7998
 
   else
7999
 
     posrcprefix="../"
8000
 
   fi
8001
 
   rm -f po/POTFILES
8002
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8003
 
        < $srcdir/po/POTFILES.in > po/POTFILES
8004
 
  ])
8005
 
 
8006
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8007
 
# -------------------------------
8008
 
# Define VARIABLE to the location where catalog files will
8009
 
# be installed by po/Makefile.
8010
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8011
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8012
 
glib_save_prefix="$prefix"
8013
 
glib_save_exec_prefix="$exec_prefix"
8014
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8015
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8016
 
if test "x$CATOBJEXT" = "x.mo" ; then
8017
 
  localedir=`eval echo "${libdir}/locale"`
8018
 
else
8019
 
  localedir="${datadir}/locale"
8020
 
  while true; do
8021
 
    expanded_localedir=`eval echo "$localedir"`
8022
 
    test "x$expanded_localedir" = "x$localedir" && break
8023
 
    localedir="$expanded_localedir"
8024
 
  done
8025
 
fi
8026
 
prefix="$glib_save_prefix"
8027
 
exec_prefix="$glib_save_exec_prefix"
8028
 
AC_DEFINE_UNQUOTED($1, "$localedir",
8029
 
  [Define the location where the catalogs will be installed])
8030
 
])
8031
 
 
8032
 
dnl
8033
 
dnl Now the definitions that aclocal will find
8034
 
dnl
8035
 
ifdef(glib_configure_in,[],[
8036
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8037
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8038
 
])dnl
8039
 
 
8040
 
# gnome-common.m4
8041
 
8042
 
 
8043
 
dnl GNOME_COMMON_INIT
8044
 
 
8045
 
AC_DEFUN([GNOME_COMMON_INIT],
8046
 
[
8047
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
8048
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
8049
 
 
8050
 
  dnl ensure that when the Automake generated makefile calls aclocal,
8051
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
8052
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
8053
 
  if test -n "$ac_macro_dir"; then
8054
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
8055
 
  fi
8056
 
 
8057
 
  AC_SUBST([ACLOCAL_AMFLAGS])
8058
 
])
8059
 
 
8060
 
AC_DEFUN([GNOME_DEBUG_CHECK],
8061
 
[
8062
 
        AC_ARG_ENABLE([debug],
8063
 
                      AC_HELP_STRING([--enable-debug],
8064
 
                                     [turn on debugging]),,
8065
 
                      [enable_debug=no])
8066
 
 
8067
 
        if test x$enable_debug = xyes ; then
8068
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
8069
 
                [Enable additional debugging at the expense of performance and size])
8070
 
        fi
8071
 
])
8072
 
 
8073
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
8074
 
dnl define DISABLE_DEPRECATED
8075
 
dnl
8076
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
8077
 
[
8078
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
8079
 
 
8080
 
        if test $USE_MAINTAINER_MODE = yes; then
8081
 
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
8082
 
        else
8083
 
                DISABLE_DEPRECATED=""
8084
 
        fi
8085
 
        AC_SUBST(DISABLE_DEPRECATED)
8086
 
])
8087
 
 
8088
 
dnl GNOME_DOC_INIT([MINIMUM-VERSION])
8089
 
 
8090
 
AC_DEFUN([GNOME_DOC_INIT],
8091
 
[
8092
 
dnl Only apply the version check if we're not configuring ourselves!
8093
 
if test "x$PACKAGE" != "xgnome-doc-utils"; then
8094
 
  GDU_REQUIRED_VERSION=0.3.2
8095
 
  if test -n "$1"; then
8096
 
    GDU_REQUIRED_VERSION=$1
8097
 
  fi
8098
 
 
8099
 
  PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
8100
 
fi
8101
 
 
8102
 
AC_ARG_WITH([help-dir],
8103
 
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
8104
 
  [with_help_dir='${datadir}/gnome/help'])
8105
 
HELP_DIR="$with_help_dir"
8106
 
AC_SUBST(HELP_DIR)
8107
 
 
8108
 
AC_ARG_WITH([omf-dir],
8109
 
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
8110
 
  [with_omf_dir='${datadir}/omf'])
8111
 
OMF_DIR="$with_omf_dir"
8112
 
AC_SUBST(OMF_DIR)
8113
 
 
8114
 
AC_ARG_WITH([help-formats],
8115
 
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
8116
 
  [with_help_formats=''])
8117
 
DOC_USER_FORMATS="$with_help_formats"
8118
 
AC_SUBST(DOC_USER_FORMATS)
8119
 
 
8120
 
AC_ARG_ENABLE([scrollkeeper],
8121
 
        [AC_HELP_STRING([--disable-scrollkeeper],
8122
 
                        [do not make updates to the scrollkeeper database])],,
8123
 
        enable_scrollkeeper=yes)
8124
 
AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
8125
 
 
8126
 
])
8127