~ubuntu-branches/ubuntu/gutsy/tomboy/gutsy-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-11-16 21:24:14 UTC
  • mfrom: (1.1.7 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20061116212414-i9mqu3nnn90ulo7m
Tags: 0.5.0-0ubuntu1
* New upstream release
* debian/patches/52_applet-crash.patch:
  + Dropped, merged upstream
* debian/control,
  debian/patches/52_external-dbus-sharp.patch:
  + Build depend on libdbus-1-cil and build against it instead of the
    bundled version
* debian/rules:
  + Install DBus service file into the correct directory
* debian/patches/53_tomboy-tray-icon.patch:
  + Correctly set the icon for the trayicon

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
dnl AM_GCONF_SOURCE_2
15
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
16
 
dnl  (i.e. pass to gconftool-2
17
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
18
 
dnl  you should install foo.schemas files
19
 
dnl
20
 
 
21
 
AC_DEFUN([AM_GCONF_SOURCE_2],
22
 
[
23
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
24
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
25
 
  else
26
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
27
 
  fi
28
 
 
29
 
  AC_ARG_WITH(gconf-source, 
30
 
  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
31
 
 
32
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
33
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
34
 
 
35
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
36
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
37
 
  fi
38
 
 
39
 
  AC_ARG_WITH(gconf-schema-file-dir, 
40
 
  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
41
 
 
42
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
43
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
44
 
 
45
 
  AC_ARG_ENABLE(schemas-install,
46
 
     [  --disable-schemas-install       Disable the schemas installation],
47
 
     [case ${enableval} in
48
 
       yes|no) ;;
49
 
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
50
 
      esac])
51
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
52
 
])
53
 
 
54
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
55
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
56
 
#
57
 
# This file is free software, distributed under the terms of the GNU
58
 
# General Public License.  As a special exception to the GNU General
59
 
# Public License, this file may be distributed as part of a program
60
 
# that contains a configuration script generated by Autoconf, under
61
 
# the same distribution terms as the rest of that program.
62
 
#
63
 
# This file can be copied and used freely without restrictions.  It can
64
 
# be used in projects which are not available under the GNU Public License
65
 
# but which still want to provide support for the GNU gettext functionality.
66
 
#
67
 
# Macro to add for using GNU gettext.
68
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
69
 
#
70
 
# Modified to never use included libintl. 
71
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
72
 
#
73
 
# Major rework to remove unused code
74
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
75
 
#
76
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
77
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
78
 
#
79
 
# Modified to require ngettext
80
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
81
 
#
82
 
# We need this here as well, since someone might use autoconf-2.5x
83
 
# to configure GLib then an older version to configure a package
84
 
# using AM_GLIB_GNU_GETTEXT
85
 
AC_PREREQ(2.53)
86
 
 
87
 
dnl
88
 
dnl We go to great lengths to make sure that aclocal won't 
89
 
dnl try to pull in the installed version of these macros
90
 
dnl when running aclocal in the glib directory.
91
 
dnl
92
 
m4_copy([AC_DEFUN],[glib_DEFUN])
93
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
94
 
dnl
95
 
dnl At the end, if we're not within glib, we'll define the public
96
 
dnl definitions in terms of our private definitions.
97
 
dnl
98
 
 
99
 
# GLIB_LC_MESSAGES
100
 
#--------------------
101
 
glib_DEFUN([GLIB_LC_MESSAGES],
102
 
  [AC_CHECK_HEADERS([locale.h])
103
 
    if test $ac_cv_header_locale_h = yes; then
104
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
105
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
106
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
107
 
    if test $am_cv_val_LC_MESSAGES = yes; then
108
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
109
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
110
 
    fi
111
 
  fi])
112
 
 
113
 
# GLIB_PATH_PROG_WITH_TEST
114
 
#----------------------------
115
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
116
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
117
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
118
 
[# Extract the first word of "$2", so it can be a program name with args.
119
 
set dummy $2; ac_word=[$]2
120
 
AC_MSG_CHECKING([for $ac_word])
121
 
AC_CACHE_VAL(ac_cv_path_$1,
122
 
[case "[$]$1" in
123
 
  /*)
124
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
125
 
  ;;
126
 
  *)
127
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
128
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
129
 
    test -z "$ac_dir" && ac_dir=.
130
 
    if test -f $ac_dir/$ac_word; then
131
 
      if [$3]; then
132
 
        ac_cv_path_$1="$ac_dir/$ac_word"
133
 
        break
134
 
      fi
135
 
    fi
136
 
  done
137
 
  IFS="$ac_save_ifs"
138
 
dnl If no 4th arg is given, leave the cache variable unset,
139
 
dnl so AC_PATH_PROGS will keep looking.
140
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
141
 
])dnl
142
 
  ;;
143
 
esac])dnl
144
 
$1="$ac_cv_path_$1"
145
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
146
 
  AC_MSG_RESULT([$]$1)
147
 
else
148
 
  AC_MSG_RESULT(no)
149
 
fi
150
 
AC_SUBST($1)dnl
151
 
])
152
 
 
153
 
# GLIB_WITH_NLS
154
 
#-----------------
155
 
glib_DEFUN([GLIB_WITH_NLS],
156
 
  dnl NLS is obligatory
157
 
  [USE_NLS=yes
158
 
    AC_SUBST(USE_NLS)
159
 
 
160
 
    gt_cv_have_gettext=no
161
 
 
162
 
    CATOBJEXT=NONE
163
 
    XGETTEXT=:
164
 
    INTLLIBS=
165
 
 
166
 
    AC_CHECK_HEADER(libintl.h,
167
 
     [gt_cv_func_dgettext_libintl="no"
168
 
      libintl_extra_libs=""
169
 
 
170
 
      #
171
 
      # First check in libc
172
 
      #
173
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
174
 
        [AC_TRY_LINK([
175
 
#include <libintl.h>
176
 
],
177
 
         [return !ngettext ("","", 1)],
178
 
          gt_cv_func_ngettext_libc=yes,
179
 
          gt_cv_func_ngettext_libc=no)
180
 
        ])
181
 
  
182
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
183
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
184
 
                [AC_TRY_LINK([
185
 
#include <libintl.h>
186
 
],
187
 
                  [return !dgettext ("","")],
188
 
                  gt_cv_func_dgettext_libc=yes,
189
 
                  gt_cv_func_dgettext_libc=no)
190
 
                ])
191
 
      fi
192
 
  
193
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
194
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
195
 
      fi
196
 
 
197
 
      #
198
 
      # If we don't have everything we want, check in libintl
199
 
      #
200
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
201
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
202
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
203
 
        
204
 
        AC_CHECK_LIB(intl, bindtextdomain,
205
 
            [AC_CHECK_LIB(intl, ngettext,
206
 
                    [AC_CHECK_LIB(intl, dgettext,
207
 
                                  gt_cv_func_dgettext_libintl=yes)])])
208
 
 
209
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
210
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
211
 
          AC_MSG_RESULT([])
212
 
          AC_CHECK_LIB(intl, ngettext,
213
 
                [AC_CHECK_LIB(intl, dcgettext,
214
 
                       [gt_cv_func_dgettext_libintl=yes
215
 
                        libintl_extra_libs=-liconv],
216
 
                        :,-liconv)],
217
 
                :,-liconv)
218
 
        fi
219
 
 
220
 
        #
221
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
222
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
223
 
        # and both have dgettext and ngettext
224
 
        #
225
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
226
 
          glib_save_LIBS="$LIBS"
227
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
228
 
          unset ac_cv_func_bind_textdomain_codeset
229
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
230
 
          LIBS="$glib_save_LIBS"
231
 
 
232
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
233
 
            gt_cv_func_dgettext_libc=no
234
 
          else
235
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
236
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
237
 
              gt_cv_func_dgettext_libintl=no
238
 
            fi
239
 
          fi
240
 
        fi
241
 
      fi
242
 
 
243
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
244
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
245
 
        gt_cv_have_gettext=yes
246
 
      fi
247
 
  
248
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
249
 
        INTLLIBS="-lintl $libintl_extra_libs"
250
 
      fi
251
 
  
252
 
      if test "$gt_cv_have_gettext" = "yes"; then
253
 
        AC_DEFINE(HAVE_GETTEXT,1,
254
 
          [Define if the GNU gettext() function is already present or preinstalled.])
255
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
256
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
257
 
        if test "$MSGFMT" != "no"; then
258
 
          glib_save_LIBS="$LIBS"
259
 
          LIBS="$LIBS $INTLLIBS"
260
 
          AC_CHECK_FUNCS(dcgettext)
261
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
262
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
263
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
264
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
265
 
                         return _nl_msg_cat_cntr],
266
 
            [CATOBJEXT=.gmo 
267
 
             DATADIRNAME=share],
268
 
            [case $host in
269
 
            *-*-solaris*)
270
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
271
 
            dnl GNU format message catalog is always supported,
272
 
            dnl since both are added to the libc all together.
273
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
274
 
            dnl and CATOBJEXT=.gmo in this case.
275
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
276
 
              [CATOBJEXT=.gmo 
277
 
               DATADIRNAME=share],
278
 
              [CATOBJEXT=.mo
279
 
               DATADIRNAME=lib])
280
 
            ;;
281
 
            *)
282
 
            CATOBJEXT=.mo
283
 
            DATADIRNAME=lib
284
 
            ;;
285
 
            esac])
286
 
          LIBS="$glib_save_LIBS"
287
 
          INSTOBJEXT=.mo
288
 
        else
289
 
          gt_cv_have_gettext=no
290
 
        fi
291
 
      fi
292
 
    ])
293
 
 
294
 
    if test "$gt_cv_have_gettext" = "yes" ; then
295
 
      AC_DEFINE(ENABLE_NLS, 1,
296
 
        [always defined to indicate that i18n is enabled])
297
 
    fi
298
 
 
299
 
    dnl Test whether we really found GNU xgettext.
300
 
    if test "$XGETTEXT" != ":"; then
301
 
      dnl If it is not GNU xgettext we define it as : so that the
302
 
      dnl Makefiles still can work.
303
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
304
 
        : ;
305
 
      else
306
 
        AC_MSG_RESULT(
307
 
          [found xgettext program is not GNU xgettext; ignore it])
308
 
        XGETTEXT=":"
309
 
      fi
310
 
    fi
311
 
 
312
 
    # We need to process the po/ directory.
313
 
    POSUB=po
314
 
 
315
 
    AC_OUTPUT_COMMANDS(
316
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
317
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
318
 
      esac])
319
 
 
320
 
    dnl These rules are solely for the distribution goal.  While doing this
321
 
    dnl we only have to keep exactly one list of the available catalogs
322
 
    dnl in configure.in.
323
 
    for lang in $ALL_LINGUAS; do
324
 
      GMOFILES="$GMOFILES $lang.gmo"
325
 
      POFILES="$POFILES $lang.po"
326
 
    done
327
 
 
328
 
    dnl Make all variables we use known to autoconf.
329
 
    AC_SUBST(CATALOGS)
330
 
    AC_SUBST(CATOBJEXT)
331
 
    AC_SUBST(DATADIRNAME)
332
 
    AC_SUBST(GMOFILES)
333
 
    AC_SUBST(INSTOBJEXT)
334
 
    AC_SUBST(INTLLIBS)
335
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
336
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
337
 
    AC_SUBST(POFILES)
338
 
    AC_SUBST(POSUB)
339
 
  ])
340
 
 
341
 
# AM_GLIB_GNU_GETTEXT
342
 
# -------------------
343
 
# Do checks necessary for use of gettext. If a suitable implementation 
344
 
# of gettext is found in either in libintl or in the C library,
345
 
# it will set INTLLIBS to the libraries needed for use of gettext
346
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
347
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
348
 
# on various variables needed by the Makefile.in.in installed by 
349
 
# glib-gettextize.
350
 
dnl
351
 
glib_DEFUN([GLIB_GNU_GETTEXT],
352
 
  [AC_REQUIRE([AC_PROG_CC])dnl
353
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
354
 
   
355
 
   GLIB_LC_MESSAGES
356
 
   GLIB_WITH_NLS
357
 
 
358
 
   if test "$gt_cv_have_gettext" = "yes"; then
359
 
     if test "x$ALL_LINGUAS" = "x"; then
360
 
       LINGUAS=
361
 
     else
362
 
       AC_MSG_CHECKING(for catalogs to be installed)
363
 
       NEW_LINGUAS=
364
 
       for presentlang in $ALL_LINGUAS; do
365
 
         useit=no
366
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
367
 
           desiredlanguages="$LINGUAS"
368
 
         else
369
 
           desiredlanguages="$ALL_LINGUAS"
370
 
         fi
371
 
         for desiredlang in $desiredlanguages; do
372
 
           # Use the presentlang catalog if desiredlang is
373
 
           #   a. equal to presentlang, or
374
 
           #   b. a variant of presentlang (because in this case,
375
 
           #      presentlang can be used as a fallback for messages
376
 
           #      which are not translated in the desiredlang catalog).
377
 
           case "$desiredlang" in
378
 
             "$presentlang"*) useit=yes;;
379
 
           esac
380
 
         done
381
 
         if test $useit = yes; then
382
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
383
 
         fi
384
 
       done
385
 
       LINGUAS=$NEW_LINGUAS
386
 
       AC_MSG_RESULT($LINGUAS)
387
 
     fi
388
 
 
389
 
     dnl Construct list of names of catalog files to be constructed.
390
 
     if test -n "$LINGUAS"; then
391
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
392
 
     fi
393
 
   fi
394
 
 
395
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
396
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
397
 
   dnl Try to locate is.
398
 
   MKINSTALLDIRS=
399
 
   if test -n "$ac_aux_dir"; then
400
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
401
 
   fi
402
 
   if test -z "$MKINSTALLDIRS"; then
403
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
404
 
   fi
405
 
   AC_SUBST(MKINSTALLDIRS)
406
 
 
407
 
   dnl Generate list of files to be processed by xgettext which will
408
 
   dnl be included in po/Makefile.
409
 
   test -d po || mkdir po
410
 
   if test "x$srcdir" != "x."; then
411
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
412
 
       posrcprefix="$srcdir/"
413
 
     else
414
 
       posrcprefix="../$srcdir/"
415
 
     fi
416
 
   else
417
 
     posrcprefix="../"
418
 
   fi
419
 
   rm -f po/POTFILES
420
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
421
 
        < $srcdir/po/POTFILES.in > po/POTFILES
422
 
  ])
423
 
 
424
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
425
 
# -------------------------------
426
 
# Define VARIABLE to the location where catalog files will
427
 
# be installed by po/Makefile.
428
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
429
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
430
 
glib_save_prefix="$prefix"
431
 
glib_save_exec_prefix="$exec_prefix"
432
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
433
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
434
 
if test "x$CATOBJEXT" = "x.mo" ; then
435
 
  localedir=`eval echo "${libdir}/locale"`
436
 
else
437
 
  localedir=`eval echo "${datadir}/locale"`
438
 
fi
439
 
prefix="$glib_save_prefix"
440
 
exec_prefix="$glib_save_exec_prefix"
441
 
AC_DEFINE_UNQUOTED($1, "$localedir",
442
 
  [Define the location where the catalogs will be installed])
443
 
])
444
 
 
445
 
dnl
446
 
dnl Now the definitions that aclocal will find
447
 
dnl
448
 
ifdef(glib_configure_in,[],[
449
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
450
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
451
 
])dnl
452
 
 
453
 
# gnome-common.m4
454
 
455
 
 
456
 
dnl GNOME_COMMON_INIT
457
 
 
458
 
AC_DEFUN([GNOME_COMMON_INIT],
459
 
[
460
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
461
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
462
 
 
463
 
  dnl ensure that when the Automake generated makefile calls aclocal,
464
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
465
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
466
 
  if test -n "$ac_macro_dir"; then
467
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
468
 
  fi
469
 
 
470
 
  AC_SUBST([ACLOCAL_AMFLAGS])
471
 
])
472
 
 
473
 
AC_DEFUN([GNOME_DEBUG_CHECK],
474
 
[
475
 
        AC_ARG_ENABLE([debug],
476
 
                      AC_HELP_STRING([--enable-debug],
477
 
                                     [turn on debugging]),,
478
 
                      [enable_debug=no])
479
 
 
480
 
        if test x$enable_debug = xyes ; then
481
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
482
 
                [Enable additional debugging at the expense of performance and size])
483
 
        fi
484
 
])
485
 
 
486
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
487
 
dnl define DISABLE_DEPRECATED
488
 
dnl
489
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
490
 
[
491
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
492
 
 
493
 
        if test $USE_MAINTAINER_MODE = yes; then
494
 
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
495
 
        else
496
 
                DISABLE_DEPRECATED=""
497
 
        fi
498
 
        AC_SUBST(DISABLE_DEPRECATED)
499
 
])
500
 
 
501
 
dnl GNOME_DOC_INIT([MINIMUM-VERSION])
502
 
 
503
 
AC_DEFUN([GNOME_DOC_INIT],
504
 
[
505
 
dnl Only apply the version check if we're not configuring ourselves!
506
 
if test "x$PACKAGE" != "xgnome-doc-utils"; then
507
 
  GDU_REQUIRED_VERSION=0.3.2
508
 
  if test -n "$1"; then
509
 
    GDU_REQUIRED_VERSION=$1
510
 
  fi
511
 
 
512
 
  PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
513
 
fi
514
 
 
515
 
AC_ARG_WITH([help-dir],
516
 
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
517
 
  [with_help_dir='${datadir}/gnome/help'])
518
 
HELP_DIR="$with_help_dir"
519
 
AC_SUBST(HELP_DIR)
520
 
 
521
 
AC_ARG_WITH([omf-dir],
522
 
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
523
 
  [with_omf_dir='${datadir}/omf'])
524
 
OMF_DIR="$with_omf_dir"
525
 
AC_SUBST(OMF_DIR)
526
 
 
527
 
AC_ARG_WITH([help-formats],
528
 
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
529
 
  [with_help_formats=''])
530
 
DOC_USER_FORMATS="$with_help_formats"
531
 
AC_SUBST(DOC_USER_FORMATS)
532
 
 
533
 
AC_ARG_ENABLE([scrollkeeper],
534
 
        [AC_HELP_STRING([--disable-scrollkeeper],
535
 
                        [do not make updates to the scrollkeeper database])],,
536
 
        enable_scrollkeeper=yes)
537
 
AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
538
 
 
539
 
AC_OUTPUT_COMMANDS([
540
 
gdumk=`pkg-config --variable datadir gnome-doc-utils`/gnome-doc-utils/gnome-doc-utils.make
541
 
if test -f $srcdir/gnome-doc-utils.m4; then
542
 
  if ! cmp -s $srcdir/gnome-doc-utils.make gnome-doc-utils.make; then
543
 
    cp $srcdir/gnome-doc-utils.make gnome-doc-utils.make
544
 
  fi
545
 
else
546
 
  if ! cmp -s $gdumk gnome-doc-utils.make; then
547
 
    cp $gdumk gnome-doc-utils.make
548
 
  fi
549
 
fi
550
 
if ! grep 'gnome-doc-utils\.make' $ac_top_srcdir/Makefile.am >/dev/null; then
551
 
  echo gnome-doc-utils.make should be added to EXTRA_DIST in Makefile.am
552
 
fi
553
 
])
554
 
])
555
 
 
556
14
 
557
15
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
558
16
# serial 35 IT_PROG_INTLTOOL
737
195
 
738
196
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
739
197
 
740
 
# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
 
198
# serial 48 AC_PROG_LIBTOOL
741
199
 
742
200
 
743
201
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2317
1775
  dynamic_linker='GNU/Linux ld.so'
2318
1776
  ;;
2319
1777
 
2320
 
netbsdelf*-gnu)
2321
 
  version_type=linux
2322
 
  need_lib_prefix=no
2323
 
  need_version=no
2324
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2325
 
  soname_spec='${libname}${release}${shared_ext}$major'
2326
 
  shlibpath_var=LD_LIBRARY_PATH
2327
 
  shlibpath_overrides_runpath=no
2328
 
  hardcode_into_libs=yes
2329
 
  dynamic_linker='NetBSD ld.elf_so'
2330
 
  ;;
2331
 
 
2332
1778
knetbsd*-gnu)
2333
1779
  version_type=linux
2334
1780
  need_lib_prefix=no
3104
2550
  lt_cv_deplibs_check_method=pass_all
3105
2551
  ;;
3106
2552
 
3107
 
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
2553
netbsd*)
3108
2554
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3109
2555
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3110
2556
  else
4113
3559
        ;;
4114
3560
    esac
4115
3561
    ;;
4116
 
  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
3562
  netbsd*)
4117
3563
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4118
3564
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4119
3565
      wlarc=
5737
5183
            ;;
5738
5184
        esac
5739
5185
        ;;
5740
 
      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
5186
      netbsd*)
5741
5187
        ;;
5742
5188
      osf3* | osf4* | osf5*)
5743
5189
        case $cc_basename in
6089
5535
  cygwin* | mingw*)
6090
5536
    _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'
6091
5537
  ;;
6092
 
  kfreebsd*-gnu)
6093
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6094
 
  ;;
6095
 
  linux*)
6096
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6097
 
  ;;
6098
5538
  *)
6099
5539
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6100
5540
  ;;
6291
5731
  $echo "local: *; };" >> $output_objdir/$libname.ver~
6292
5732
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6293
5733
        fi
6294
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6295
5734
      else
6296
5735
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
6297
5736
      fi
6298
5737
      ;;
6299
5738
 
6300
 
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
5739
    netbsd*)
6301
5740
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6302
5741
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6303
5742
        wlarc=
6627
6066
      ;;
6628
6067
 
6629
6068
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6630
 
    freebsd* | dragonfly*)
6631
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6632
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6633
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6634
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6635
 
      ;;
6636
 
      
6637
 
    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
6638
 
    kfreebsd*-gnu)
6639
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6640
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6641
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6642
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6643
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
6069
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
6070
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6071
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6072
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6073
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6644
6074
      ;;
6645
6075
 
6646
6076
    hpux9*)
6738
6168
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6739
6169
      ;;
6740
6170
 
6741
 
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
6171
    netbsd*)
6742
6172
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6743
6173
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6744
6174
      else
8175
7605
AC_SUBST([am__untar])
8176
7606
]) # _AM_PROG_TAR
8177
7607
 
 
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=`eval echo "${datadir}/locale"`
 
8020
fi
 
8021
prefix="$glib_save_prefix"
 
8022
exec_prefix="$glib_save_exec_prefix"
 
8023
AC_DEFINE_UNQUOTED($1, "$localedir",
 
8024
  [Define the location where the catalogs will be installed])
 
8025
])
 
8026
 
 
8027
dnl
 
8028
dnl Now the definitions that aclocal will find
 
8029
dnl
 
8030
ifdef(glib_configure_in,[],[
 
8031
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
8032
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
8033
])dnl
 
8034
 
 
8035
# gnome-common.m4
 
8036
 
8037
 
 
8038
dnl GNOME_COMMON_INIT
 
8039
 
 
8040
AC_DEFUN([GNOME_COMMON_INIT],
 
8041
[
 
8042
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
8043
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
8044
 
 
8045
  dnl ensure that when the Automake generated makefile calls aclocal,
 
8046
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
8047
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
8048
  if test -n "$ac_macro_dir"; then
 
8049
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
8050
  fi
 
8051
 
 
8052
  AC_SUBST([ACLOCAL_AMFLAGS])
 
8053
])
 
8054
 
 
8055
AC_DEFUN([GNOME_DEBUG_CHECK],
 
8056
[
 
8057
        AC_ARG_ENABLE([debug],
 
8058
                      AC_HELP_STRING([--enable-debug],
 
8059
                                     [turn on debugging]),,
 
8060
                      [enable_debug=no])
 
8061
 
 
8062
        if test x$enable_debug = xyes ; then
 
8063
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
8064
                [Enable additional debugging at the expense of performance and size])
 
8065
        fi
 
8066
])
 
8067
 
 
8068
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
8069
dnl define DISABLE_DEPRECATED
 
8070
dnl
 
8071
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
8072
[
 
8073
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
8074
 
 
8075
        if test $USE_MAINTAINER_MODE = yes; then
 
8076
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
 
8077
        else
 
8078
                DISABLE_DEPRECATED=""
 
8079
        fi
 
8080
        AC_SUBST(DISABLE_DEPRECATED)
 
8081
])
 
8082
 
 
8083
dnl GNOME_DOC_INIT([MINIMUM-VERSION])
 
8084
 
 
8085
AC_DEFUN([GNOME_DOC_INIT],
 
8086
[
 
8087
dnl Only apply the version check if we're not configuring ourselves!
 
8088
if test "x$PACKAGE" != "xgnome-doc-utils"; then
 
8089
  GDU_REQUIRED_VERSION=0.3.2
 
8090
  if test -n "$1"; then
 
8091
    GDU_REQUIRED_VERSION=$1
 
8092
  fi
 
8093
 
 
8094
  PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
 
8095
fi
 
8096
 
 
8097
AC_ARG_WITH([help-dir],
 
8098
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
 
8099
  [with_help_dir='${datadir}/gnome/help'])
 
8100
HELP_DIR="$with_help_dir"
 
8101
AC_SUBST(HELP_DIR)
 
8102
 
 
8103
AC_ARG_WITH([omf-dir],
 
8104
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
 
8105
  [with_omf_dir='${datadir}/omf'])
 
8106
OMF_DIR="$with_omf_dir"
 
8107
AC_SUBST(OMF_DIR)
 
8108
 
 
8109
AC_ARG_WITH([help-formats],
 
8110
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
 
8111
  [with_help_formats=''])
 
8112
DOC_USER_FORMATS="$with_help_formats"
 
8113
AC_SUBST(DOC_USER_FORMATS)
 
8114
 
 
8115
AC_ARG_ENABLE([scrollkeeper],
 
8116
        [AC_HELP_STRING([--disable-scrollkeeper],
 
8117
                        [do not make updates to the scrollkeeper database])],,
 
8118
        enable_scrollkeeper=yes)
 
8119
AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
 
8120
 
 
8121
])
 
8122