~ubuntu-branches/ubuntu/precise/seahorse/precise-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-26 17:22:56 UTC
  • mfrom: (1.2.65 upstream)
  • Revision ID: package-import@ubuntu.com-20110926172256-fqxxr417twt0lnfq
Tags: 3.2.0-0ubuntu1
* New upstream release
  - Fix DNS-SD key sharing crasher and make compatible with seahorse-sharing
  - Removed unused spec file
  - Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
 
22
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
23
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
24
#
 
25
# This file is free software, distributed under the terms of the GNU
 
26
# General Public License.  As a special exception to the GNU General
 
27
# Public License, this file may be distributed as part of a program
 
28
# that contains a configuration script generated by Autoconf, under
 
29
# the same distribution terms as the rest of that program.
 
30
#
 
31
# This file can be copied and used freely without restrictions.  It can
 
32
# be used in projects which are not available under the GNU Public License
 
33
# but which still want to provide support for the GNU gettext functionality.
 
34
#
 
35
# Macro to add for using GNU gettext.
 
36
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
37
#
 
38
# Modified to never use included libintl. 
 
39
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
40
#
 
41
# Major rework to remove unused code
 
42
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
43
#
 
44
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
45
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
46
#
 
47
# Modified to require ngettext
 
48
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
49
#
 
50
# We need this here as well, since someone might use autoconf-2.5x
 
51
# to configure GLib then an older version to configure a package
 
52
# using AM_GLIB_GNU_GETTEXT
 
53
AC_PREREQ(2.53)
 
54
 
 
55
dnl
 
56
dnl We go to great lengths to make sure that aclocal won't 
 
57
dnl try to pull in the installed version of these macros
 
58
dnl when running aclocal in the glib directory.
 
59
dnl
 
60
m4_copy([AC_DEFUN],[glib_DEFUN])
 
61
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
62
dnl
 
63
dnl At the end, if we're not within glib, we'll define the public
 
64
dnl definitions in terms of our private definitions.
 
65
dnl
 
66
 
 
67
# GLIB_LC_MESSAGES
 
68
#--------------------
 
69
glib_DEFUN([GLIB_LC_MESSAGES],
 
70
  [AC_CHECK_HEADERS([locale.h])
 
71
    if test $ac_cv_header_locale_h = yes; then
 
72
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
73
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
74
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
75
    if test $am_cv_val_LC_MESSAGES = yes; then
 
76
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
77
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
78
    fi
 
79
  fi])
 
80
 
 
81
# GLIB_PATH_PROG_WITH_TEST
 
82
#----------------------------
 
83
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
84
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
85
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
86
[# Extract the first word of "$2", so it can be a program name with args.
 
87
set dummy $2; ac_word=[$]2
 
88
AC_MSG_CHECKING([for $ac_word])
 
89
AC_CACHE_VAL(ac_cv_path_$1,
 
90
[case "[$]$1" in
 
91
  /*)
 
92
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
93
  ;;
 
94
  *)
 
95
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
96
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
97
    test -z "$ac_dir" && ac_dir=.
 
98
    if test -f $ac_dir/$ac_word; then
 
99
      if [$3]; then
 
100
        ac_cv_path_$1="$ac_dir/$ac_word"
 
101
        break
 
102
      fi
 
103
    fi
 
104
  done
 
105
  IFS="$ac_save_ifs"
 
106
dnl If no 4th arg is given, leave the cache variable unset,
 
107
dnl so AC_PATH_PROGS will keep looking.
 
108
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
109
])dnl
 
110
  ;;
 
111
esac])dnl
 
112
$1="$ac_cv_path_$1"
 
113
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
114
  AC_MSG_RESULT([$]$1)
 
115
else
 
116
  AC_MSG_RESULT(no)
 
117
fi
 
118
AC_SUBST($1)dnl
 
119
])
 
120
 
 
121
# GLIB_WITH_NLS
 
122
#-----------------
 
123
glib_DEFUN([GLIB_WITH_NLS],
 
124
  dnl NLS is obligatory
 
125
  [USE_NLS=yes
 
126
    AC_SUBST(USE_NLS)
 
127
 
 
128
    gt_cv_have_gettext=no
 
129
 
 
130
    CATOBJEXT=NONE
 
131
    XGETTEXT=:
 
132
    INTLLIBS=
 
133
 
 
134
    AC_CHECK_HEADER(libintl.h,
 
135
     [gt_cv_func_dgettext_libintl="no"
 
136
      libintl_extra_libs=""
 
137
 
 
138
      #
 
139
      # First check in libc
 
140
      #
 
141
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
142
        [AC_TRY_LINK([
 
143
#include <libintl.h>
 
144
],
 
145
         [return !ngettext ("","", 1)],
 
146
          gt_cv_func_ngettext_libc=yes,
 
147
          gt_cv_func_ngettext_libc=no)
 
148
        ])
 
149
  
 
150
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
151
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
152
                [AC_TRY_LINK([
 
153
#include <libintl.h>
 
154
],
 
155
                  [return !dgettext ("","")],
 
156
                  gt_cv_func_dgettext_libc=yes,
 
157
                  gt_cv_func_dgettext_libc=no)
 
158
                ])
 
159
      fi
 
160
  
 
161
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
162
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
163
      fi
 
164
 
 
165
      #
 
166
      # If we don't have everything we want, check in libintl
 
167
      #
 
168
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
169
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
170
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
171
        
 
172
        AC_CHECK_LIB(intl, bindtextdomain,
 
173
            [AC_CHECK_LIB(intl, ngettext,
 
174
                    [AC_CHECK_LIB(intl, dgettext,
 
175
                                  gt_cv_func_dgettext_libintl=yes)])])
 
176
 
 
177
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
178
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
179
          AC_MSG_RESULT([])
 
180
          AC_CHECK_LIB(intl, ngettext,
 
181
                [AC_CHECK_LIB(intl, dcgettext,
 
182
                       [gt_cv_func_dgettext_libintl=yes
 
183
                        libintl_extra_libs=-liconv],
 
184
                        :,-liconv)],
 
185
                :,-liconv)
 
186
        fi
 
187
 
 
188
        #
 
189
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
190
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
191
        # and both have dgettext and ngettext
 
192
        #
 
193
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
194
          glib_save_LIBS="$LIBS"
 
195
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
196
          unset ac_cv_func_bind_textdomain_codeset
 
197
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
198
          LIBS="$glib_save_LIBS"
 
199
 
 
200
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
201
            gt_cv_func_dgettext_libc=no
 
202
          else
 
203
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
204
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
205
              gt_cv_func_dgettext_libintl=no
 
206
            fi
 
207
          fi
 
208
        fi
 
209
      fi
 
210
 
 
211
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
212
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
213
        gt_cv_have_gettext=yes
 
214
      fi
 
215
  
 
216
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
217
        INTLLIBS="-lintl $libintl_extra_libs"
 
218
      fi
 
219
  
 
220
      if test "$gt_cv_have_gettext" = "yes"; then
 
221
        AC_DEFINE(HAVE_GETTEXT,1,
 
222
          [Define if the GNU gettext() function is already present or preinstalled.])
 
223
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
224
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
225
        if test "$MSGFMT" != "no"; then
 
226
          glib_save_LIBS="$LIBS"
 
227
          LIBS="$LIBS $INTLLIBS"
 
228
          AC_CHECK_FUNCS(dcgettext)
 
229
          MSGFMT_OPTS=
 
230
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
231
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
232
msgid ""
 
233
msgstr ""
 
234
"Content-Type: text/plain; charset=UTF-8\n"
 
235
"Project-Id-Version: test 1.0\n"
 
236
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
237
"Last-Translator: test <foo@bar.xx>\n"
 
238
"Language-Team: C <LL@li.org>\n"
 
239
"MIME-Version: 1.0\n"
 
240
"Content-Transfer-Encoding: 8bit\n"
 
241
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
242
          AC_SUBST(MSGFMT_OPTS)
 
243
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
244
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
245
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
246
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
247
                         return _nl_msg_cat_cntr],
 
248
            [CATOBJEXT=.gmo 
 
249
             DATADIRNAME=share],
 
250
            [case $host in
 
251
            *-*-solaris*)
 
252
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
253
            dnl GNU format message catalog is always supported,
 
254
            dnl since both are added to the libc all together.
 
255
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
256
            dnl and CATOBJEXT=.gmo in this case.
 
257
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
258
              [CATOBJEXT=.gmo 
 
259
               DATADIRNAME=share],
 
260
              [CATOBJEXT=.mo
 
261
               DATADIRNAME=lib])
 
262
            ;;
 
263
            *)
 
264
            CATOBJEXT=.mo
 
265
            DATADIRNAME=lib
 
266
            ;;
 
267
            esac])
 
268
          LIBS="$glib_save_LIBS"
 
269
          INSTOBJEXT=.mo
 
270
        else
 
271
          gt_cv_have_gettext=no
 
272
        fi
 
273
      fi
 
274
    ])
 
275
 
 
276
    if test "$gt_cv_have_gettext" = "yes" ; then
 
277
      AC_DEFINE(ENABLE_NLS, 1,
 
278
        [always defined to indicate that i18n is enabled])
 
279
    fi
 
280
 
 
281
    dnl Test whether we really found GNU xgettext.
 
282
    if test "$XGETTEXT" != ":"; then
 
283
      dnl If it is not GNU xgettext we define it as : so that the
 
284
      dnl Makefiles still can work.
 
285
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
286
        : ;
 
287
      else
 
288
        AC_MSG_RESULT(
 
289
          [found xgettext program is not GNU xgettext; ignore it])
 
290
        XGETTEXT=":"
 
291
      fi
 
292
    fi
 
293
 
 
294
    # We need to process the po/ directory.
 
295
    POSUB=po
 
296
 
 
297
    AC_OUTPUT_COMMANDS(
 
298
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
299
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
300
      esac])
 
301
 
 
302
    dnl These rules are solely for the distribution goal.  While doing this
 
303
    dnl we only have to keep exactly one list of the available catalogs
 
304
    dnl in configure.ac.
 
305
    for lang in $ALL_LINGUAS; do
 
306
      GMOFILES="$GMOFILES $lang.gmo"
 
307
      POFILES="$POFILES $lang.po"
 
308
    done
 
309
 
 
310
    dnl Make all variables we use known to autoconf.
 
311
    AC_SUBST(CATALOGS)
 
312
    AC_SUBST(CATOBJEXT)
 
313
    AC_SUBST(DATADIRNAME)
 
314
    AC_SUBST(GMOFILES)
 
315
    AC_SUBST(INSTOBJEXT)
 
316
    AC_SUBST(INTLLIBS)
 
317
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
318
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
319
    AC_SUBST(POFILES)
 
320
    AC_SUBST(POSUB)
 
321
  ])
 
322
 
 
323
# AM_GLIB_GNU_GETTEXT
 
324
# -------------------
 
325
# Do checks necessary for use of gettext. If a suitable implementation 
 
326
# of gettext is found in either in libintl or in the C library,
 
327
# it will set INTLLIBS to the libraries needed for use of gettext
 
328
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
329
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
330
# on various variables needed by the Makefile.in.in installed by 
 
331
# glib-gettextize.
 
332
dnl
 
333
glib_DEFUN([GLIB_GNU_GETTEXT],
 
334
  [AC_REQUIRE([AC_PROG_CC])dnl
 
335
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
336
   
 
337
   GLIB_LC_MESSAGES
 
338
   GLIB_WITH_NLS
 
339
 
 
340
   if test "$gt_cv_have_gettext" = "yes"; then
 
341
     if test "x$ALL_LINGUAS" = "x"; then
 
342
       LINGUAS=
 
343
     else
 
344
       AC_MSG_CHECKING(for catalogs to be installed)
 
345
       NEW_LINGUAS=
 
346
       for presentlang in $ALL_LINGUAS; do
 
347
         useit=no
 
348
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
349
           desiredlanguages="$LINGUAS"
 
350
         else
 
351
           desiredlanguages="$ALL_LINGUAS"
 
352
         fi
 
353
         for desiredlang in $desiredlanguages; do
 
354
           # Use the presentlang catalog if desiredlang is
 
355
           #   a. equal to presentlang, or
 
356
           #   b. a variant of presentlang (because in this case,
 
357
           #      presentlang can be used as a fallback for messages
 
358
           #      which are not translated in the desiredlang catalog).
 
359
           case "$desiredlang" in
 
360
             "$presentlang"*) useit=yes;;
 
361
           esac
 
362
         done
 
363
         if test $useit = yes; then
 
364
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
365
         fi
 
366
       done
 
367
       LINGUAS=$NEW_LINGUAS
 
368
       AC_MSG_RESULT($LINGUAS)
 
369
     fi
 
370
 
 
371
     dnl Construct list of names of catalog files to be constructed.
 
372
     if test -n "$LINGUAS"; then
 
373
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
374
     fi
 
375
   fi
 
376
 
 
377
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
378
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
379
   dnl Try to locate is.
 
380
   MKINSTALLDIRS=
 
381
   if test -n "$ac_aux_dir"; then
 
382
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
383
   fi
 
384
   if test -z "$MKINSTALLDIRS"; then
 
385
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
386
   fi
 
387
   AC_SUBST(MKINSTALLDIRS)
 
388
 
 
389
   dnl Generate list of files to be processed by xgettext which will
 
390
   dnl be included in po/Makefile.
 
391
   test -d po || mkdir po
 
392
   if test "x$srcdir" != "x."; then
 
393
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
394
       posrcprefix="$srcdir/"
 
395
     else
 
396
       posrcprefix="../$srcdir/"
 
397
     fi
 
398
   else
 
399
     posrcprefix="../"
 
400
   fi
 
401
   rm -f po/POTFILES
 
402
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
403
        < $srcdir/po/POTFILES.in > po/POTFILES
 
404
  ])
 
405
 
 
406
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
407
# -------------------------------
 
408
# Define VARIABLE to the location where catalog files will
 
409
# be installed by po/Makefile.
 
410
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
411
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
412
glib_save_prefix="$prefix"
 
413
glib_save_exec_prefix="$exec_prefix"
 
414
glib_save_datarootdir="$datarootdir"
 
415
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
416
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
417
datarootdir=`eval echo "${datarootdir}"`
 
418
if test "x$CATOBJEXT" = "x.mo" ; then
 
419
  localedir=`eval echo "${libdir}/locale"`
 
420
else
 
421
  localedir=`eval echo "${datadir}/locale"`
 
422
fi
 
423
prefix="$glib_save_prefix"
 
424
exec_prefix="$glib_save_exec_prefix"
 
425
datarootdir="$glib_save_datarootdir"
 
426
AC_DEFINE_UNQUOTED($1, "$localedir",
 
427
  [Define the location where the catalogs will be installed])
 
428
])
 
429
 
 
430
dnl
 
431
dnl Now the definitions that aclocal will find
 
432
dnl
 
433
ifdef(glib_configure_ac,[],[
 
434
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
435
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
436
])dnl
 
437
 
 
438
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
439
 
440
# Create a temporary file with TEST-FILE as its contents and pass the
 
441
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
442
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
443
AC_DEFUN([GLIB_RUN_PROG],
 
444
[cat >conftest.foo <<_ACEOF
 
445
$2
 
446
_ACEOF
 
447
if AC_RUN_LOG([$1 conftest.foo]); then
 
448
  m4_ifval([$3], [$3], [:])
 
449
m4_ifvaln([$4], [else $4])dnl
 
450
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
451
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
452
fi])
 
453
 
 
454
 
 
455
dnl GLIB_GSETTINGS
 
456
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
 
457
dnl the schema should be compiled
 
458
dnl
 
459
 
 
460
AC_DEFUN([GLIB_GSETTINGS],
 
461
[
 
462
  m4_pattern_allow([AM_V_GEN])
 
463
  AC_ARG_ENABLE(schemas-compile,
 
464
                AC_HELP_STRING([--disable-schemas-compile],
 
465
                               [Disable regeneration of gschemas.compiled on install]),
 
466
                [case ${enableval} in
 
467
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
 
468
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
 
469
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
 
470
                 esac])
 
471
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
 
472
  PKG_PROG_PKG_CONFIG([0.16])
 
473
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
 
474
  if test x$cross_compiling != xyes; then
 
475
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
 
476
  else
 
477
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
 
478
  fi
 
479
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
 
480
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
 
481
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
 
482
  else
 
483
    ifelse([$1],,[:],[$1])
 
484
  fi
 
485
 
 
486
  GSETTINGS_RULES='
 
487
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
 
488
 
 
489
mostlyclean-am: clean-gsettings-schemas
 
490
 
 
491
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
 
492
 
 
493
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
 
494
        $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
 
495
 
 
496
all-am: $(gsettings_SCHEMAS:.xml=.valid)
 
497
uninstall-am: uninstall-gsettings-schemas
 
498
install-data-am: install-gsettings-schemas
 
499
 
 
500
.SECONDARY: $(gsettings_SCHEMAS)
 
501
 
 
502
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
 
503
        @$(NORMAL_INSTALL)
 
504
        if test -n "$^"; then \
 
505
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
 
506
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
 
507
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
 
508
        fi
 
509
 
 
510
uninstall-gsettings-schemas:
 
511
        @$(NORMAL_UNINSTALL)
 
512
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
 
513
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
 
514
        test -n "$$files" || exit 0; \
 
515
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
 
516
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
 
517
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
 
518
 
 
519
clean-gsettings-schemas:
 
520
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
 
521
 
 
522
ifdef gsettings_ENUM_NAMESPACE
 
523
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
 
524
        $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
 
525
endif
 
526
'
 
527
  _GSETTINGS_SUBST(GSETTINGS_RULES)
 
528
])
 
529
 
 
530
dnl _GSETTINGS_SUBST(VARIABLE)
 
531
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
532
AC_DEFUN([_GSETTINGS_SUBST],
 
533
[
 
534
AC_SUBST([$1])
 
535
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
536
]
 
537
)
 
538
 
 
539
# nls.m4 serial 5 (gettext-0.18)
 
540
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
541
dnl Inc.
 
542
dnl This file is free software; the Free Software Foundation
 
543
dnl gives unlimited permission to copy and/or distribute it,
 
544
dnl with or without modifications, as long as this notice is preserved.
 
545
dnl
 
546
dnl This file can can be used in projects which are not available under
 
547
dnl the GNU General Public License or the GNU Library General Public
 
548
dnl License but which still want to provide support for the GNU gettext
 
549
dnl functionality.
 
550
dnl Please note that the actual code of the GNU gettext library is covered
 
551
dnl by the GNU Library General Public License, and the rest of the GNU
 
552
dnl gettext package package is covered by the GNU General Public License.
 
553
dnl They are *not* in the public domain.
 
554
 
 
555
dnl Authors:
 
556
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
557
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
558
 
 
559
AC_PREREQ([2.50])
 
560
 
 
561
AC_DEFUN([AM_NLS],
 
562
[
 
563
  AC_MSG_CHECKING([whether NLS is requested])
 
564
  dnl Default is enabled NLS
 
565
  AC_ARG_ENABLE([nls],
 
566
    [  --disable-nls           do not use Native Language Support],
 
567
    USE_NLS=$enableval, USE_NLS=yes)
 
568
  AC_MSG_RESULT([$USE_NLS])
 
569
  AC_SUBST([USE_NLS])
 
570
])
 
571
 
 
572
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
573
# serial 1 (pkg-config-0.24)
 
574
 
575
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
576
#
 
577
# This program is free software; you can redistribute it and/or modify
 
578
# it under the terms of the GNU General Public License as published by
 
579
# the Free Software Foundation; either version 2 of the License, or
 
580
# (at your option) any later version.
 
581
#
 
582
# This program is distributed in the hope that it will be useful, but
 
583
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
584
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
585
# General Public License for more details.
 
586
#
 
587
# You should have received a copy of the GNU General Public License
 
588
# along with this program; if not, write to the Free Software
 
589
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
590
#
 
591
# As a special exception to the GNU General Public License, if you
 
592
# distribute this file as part of a program that contains a
 
593
# configuration script generated by Autoconf, you may include it under
 
594
# the same distribution terms that you use for the rest of that program.
 
595
 
 
596
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
597
# ----------------------------------
 
598
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
599
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
600
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
601
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
602
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
603
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
604
 
 
605
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
606
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
607
fi
 
608
if test -n "$PKG_CONFIG"; then
 
609
        _pkg_min_version=m4_default([$1], [0.9.0])
 
610
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
611
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
612
                AC_MSG_RESULT([yes])
 
613
        else
 
614
                AC_MSG_RESULT([no])
 
615
                PKG_CONFIG=""
 
616
        fi
 
617
fi[]dnl
 
618
])# PKG_PROG_PKG_CONFIG
 
619
 
 
620
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
621
#
 
622
# Check to see whether a particular set of modules exists.  Similar
 
623
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
624
#
 
625
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
626
# only at the first occurence in configure.ac, so if the first place
 
627
# it's called might be skipped (such as if it is within an "if", you
 
628
# have to call PKG_CHECK_EXISTS manually
 
629
# --------------------------------------------------------------
 
630
AC_DEFUN([PKG_CHECK_EXISTS],
 
631
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
632
if test -n "$PKG_CONFIG" && \
 
633
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
634
  m4_default([$2], [:])
 
635
m4_ifvaln([$3], [else
 
636
  $3])dnl
 
637
fi])
 
638
 
 
639
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
640
# ---------------------------------------------
 
641
m4_define([_PKG_CONFIG],
 
642
[if test -n "$$1"; then
 
643
    pkg_cv_[]$1="$$1"
 
644
 elif test -n "$PKG_CONFIG"; then
 
645
    PKG_CHECK_EXISTS([$3],
 
646
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
647
                     [pkg_failed=yes])
 
648
 else
 
649
    pkg_failed=untried
 
650
fi[]dnl
 
651
])# _PKG_CONFIG
 
652
 
 
653
# _PKG_SHORT_ERRORS_SUPPORTED
 
654
# -----------------------------
 
655
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
656
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
657
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
658
        _pkg_short_errors_supported=yes
 
659
else
 
660
        _pkg_short_errors_supported=no
 
661
fi[]dnl
 
662
])# _PKG_SHORT_ERRORS_SUPPORTED
 
663
 
 
664
 
 
665
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
666
# [ACTION-IF-NOT-FOUND])
 
667
#
 
668
#
 
669
# Note that if there is a possibility the first call to
 
670
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
671
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
672
#
 
673
#
 
674
# --------------------------------------------------------------
 
675
AC_DEFUN([PKG_CHECK_MODULES],
 
676
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
677
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
678
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
679
 
 
680
pkg_failed=no
 
681
AC_MSG_CHECKING([for $1])
 
682
 
 
683
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
684
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
685
 
 
686
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
687
and $1[]_LIBS to avoid the need to call pkg-config.
 
688
See the pkg-config man page for more details.])
 
689
 
 
690
if test $pkg_failed = yes; then
 
691
        AC_MSG_RESULT([no])
 
692
        _PKG_SHORT_ERRORS_SUPPORTED
 
693
        if test $_pkg_short_errors_supported = yes; then
 
694
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
695
        else 
 
696
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
697
        fi
 
698
        # Put the nasty error message in config.log where it belongs
 
699
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
700
 
 
701
        m4_default([$4], [AC_MSG_ERROR(
 
702
[Package requirements ($2) were not met:
 
703
 
 
704
$$1_PKG_ERRORS
 
705
 
 
706
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
707
installed software in a non-standard prefix.
 
708
 
 
709
_PKG_TEXT])
 
710
        ])
 
711
elif test $pkg_failed = untried; then
 
712
        AC_MSG_RESULT([no])
 
713
        m4_default([$4], [AC_MSG_FAILURE(
 
714
[The pkg-config script could not be found or is too old.  Make sure it
 
715
is in your PATH or set the PKG_CONFIG environment variable to the full
 
716
path to pkg-config.
 
717
 
 
718
_PKG_TEXT
 
719
 
 
720
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
 
721
        ])
 
722
else
 
723
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
724
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
725
        AC_MSG_RESULT([yes])
 
726
        $3
 
727
fi[]dnl
 
728
])# PKG_CHECK_MODULES
 
729
 
22
730
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23
731
#
24
732
# This file is free software; the Free Software Foundation
1028
1736
AC_SUBST([am__untar])
1029
1737
]) # _AM_PROG_TAR
1030
1738
 
1031
 
# nls.m4 serial 5 (gettext-0.18)
1032
 
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1033
 
dnl Inc.
1034
 
dnl This file is free software; the Free Software Foundation
1035
 
dnl gives unlimited permission to copy and/or distribute it,
1036
 
dnl with or without modifications, as long as this notice is preserved.
1037
 
dnl
1038
 
dnl This file can can be used in projects which are not available under
1039
 
dnl the GNU General Public License or the GNU Library General Public
1040
 
dnl License but which still want to provide support for the GNU gettext
1041
 
dnl functionality.
1042
 
dnl Please note that the actual code of the GNU gettext library is covered
1043
 
dnl by the GNU Library General Public License, and the rest of the GNU
1044
 
dnl gettext package package is covered by the GNU General Public License.
1045
 
dnl They are *not* in the public domain.
1046
 
 
1047
 
dnl Authors:
1048
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1049
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1050
 
 
1051
 
AC_PREREQ([2.50])
1052
 
 
1053
 
AC_DEFUN([AM_NLS],
1054
 
[
1055
 
  AC_MSG_CHECKING([whether NLS is requested])
1056
 
  dnl Default is enabled NLS
1057
 
  AC_ARG_ENABLE([nls],
1058
 
    [  --disable-nls           do not use Native Language Support],
1059
 
    USE_NLS=$enableval, USE_NLS=yes)
1060
 
  AC_MSG_RESULT([$USE_NLS])
1061
 
  AC_SUBST([USE_NLS])
1062
 
])
1063
 
 
1064
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1065
 
# serial 1 (pkg-config-0.24)
1066
 
1067
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1068
 
#
1069
 
# This program is free software; you can redistribute it and/or modify
1070
 
# it under the terms of the GNU General Public License as published by
1071
 
# the Free Software Foundation; either version 2 of the License, or
1072
 
# (at your option) any later version.
1073
 
#
1074
 
# This program is distributed in the hope that it will be useful, but
1075
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1076
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1077
 
# General Public License for more details.
1078
 
#
1079
 
# You should have received a copy of the GNU General Public License
1080
 
# along with this program; if not, write to the Free Software
1081
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1082
 
#
1083
 
# As a special exception to the GNU General Public License, if you
1084
 
# distribute this file as part of a program that contains a
1085
 
# configuration script generated by Autoconf, you may include it under
1086
 
# the same distribution terms that you use for the rest of that program.
1087
 
 
1088
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1089
 
# ----------------------------------
1090
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1091
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1092
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1093
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1094
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1095
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1096
 
 
1097
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1098
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1099
 
fi
1100
 
if test -n "$PKG_CONFIG"; then
1101
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1102
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1103
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1104
 
                AC_MSG_RESULT([yes])
1105
 
        else
1106
 
                AC_MSG_RESULT([no])
1107
 
                PKG_CONFIG=""
1108
 
        fi
1109
 
fi[]dnl
1110
 
])# PKG_PROG_PKG_CONFIG
1111
 
 
1112
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1113
 
#
1114
 
# Check to see whether a particular set of modules exists.  Similar
1115
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1116
 
#
1117
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1118
 
# only at the first occurence in configure.ac, so if the first place
1119
 
# it's called might be skipped (such as if it is within an "if", you
1120
 
# have to call PKG_CHECK_EXISTS manually
1121
 
# --------------------------------------------------------------
1122
 
AC_DEFUN([PKG_CHECK_EXISTS],
1123
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1124
 
if test -n "$PKG_CONFIG" && \
1125
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1126
 
  m4_default([$2], [:])
1127
 
m4_ifvaln([$3], [else
1128
 
  $3])dnl
1129
 
fi])
1130
 
 
1131
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1132
 
# ---------------------------------------------
1133
 
m4_define([_PKG_CONFIG],
1134
 
[if test -n "$$1"; then
1135
 
    pkg_cv_[]$1="$$1"
1136
 
 elif test -n "$PKG_CONFIG"; then
1137
 
    PKG_CHECK_EXISTS([$3],
1138
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1139
 
                     [pkg_failed=yes])
1140
 
 else
1141
 
    pkg_failed=untried
1142
 
fi[]dnl
1143
 
])# _PKG_CONFIG
1144
 
 
1145
 
# _PKG_SHORT_ERRORS_SUPPORTED
1146
 
# -----------------------------
1147
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1148
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1149
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1150
 
        _pkg_short_errors_supported=yes
1151
 
else
1152
 
        _pkg_short_errors_supported=no
1153
 
fi[]dnl
1154
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1155
 
 
1156
 
 
1157
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1158
 
# [ACTION-IF-NOT-FOUND])
1159
 
#
1160
 
#
1161
 
# Note that if there is a possibility the first call to
1162
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1163
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1164
 
#
1165
 
#
1166
 
# --------------------------------------------------------------
1167
 
AC_DEFUN([PKG_CHECK_MODULES],
1168
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1169
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1170
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1171
 
 
1172
 
pkg_failed=no
1173
 
AC_MSG_CHECKING([for $1])
1174
 
 
1175
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1176
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1177
 
 
1178
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1179
 
and $1[]_LIBS to avoid the need to call pkg-config.
1180
 
See the pkg-config man page for more details.])
1181
 
 
1182
 
if test $pkg_failed = yes; then
1183
 
        AC_MSG_RESULT([no])
1184
 
        _PKG_SHORT_ERRORS_SUPPORTED
1185
 
        if test $_pkg_short_errors_supported = yes; then
1186
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1187
 
        else 
1188
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1189
 
        fi
1190
 
        # Put the nasty error message in config.log where it belongs
1191
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1192
 
 
1193
 
        m4_default([$4], [AC_MSG_ERROR(
1194
 
[Package requirements ($2) were not met:
1195
 
 
1196
 
$$1_PKG_ERRORS
1197
 
 
1198
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1199
 
installed software in a non-standard prefix.
1200
 
 
1201
 
_PKG_TEXT])
1202
 
        ])
1203
 
elif test $pkg_failed = untried; then
1204
 
        AC_MSG_RESULT([no])
1205
 
        m4_default([$4], [AC_MSG_FAILURE(
1206
 
[The pkg-config script could not be found or is too old.  Make sure it
1207
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1208
 
path to pkg-config.
1209
 
 
1210
 
_PKG_TEXT
1211
 
 
1212
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
1213
 
        ])
1214
 
else
1215
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1216
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1217
 
        AC_MSG_RESULT([yes])
1218
 
        $3
1219
 
fi[]dnl
1220
 
])# PKG_CHECK_MODULES
1221
 
 
1222
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1223
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1224
 
#
1225
 
# This file is free software, distributed under the terms of the GNU
1226
 
# General Public License.  As a special exception to the GNU General
1227
 
# Public License, this file may be distributed as part of a program
1228
 
# that contains a configuration script generated by Autoconf, under
1229
 
# the same distribution terms as the rest of that program.
1230
 
#
1231
 
# This file can be copied and used freely without restrictions.  It can
1232
 
# be used in projects which are not available under the GNU Public License
1233
 
# but which still want to provide support for the GNU gettext functionality.
1234
 
#
1235
 
# Macro to add for using GNU gettext.
1236
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1237
 
#
1238
 
# Modified to never use included libintl. 
1239
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1240
 
#
1241
 
# Major rework to remove unused code
1242
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1243
 
#
1244
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
1245
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1246
 
#
1247
 
# Modified to require ngettext
1248
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1249
 
#
1250
 
# We need this here as well, since someone might use autoconf-2.5x
1251
 
# to configure GLib then an older version to configure a package
1252
 
# using AM_GLIB_GNU_GETTEXT
1253
 
AC_PREREQ(2.53)
1254
 
 
1255
 
dnl
1256
 
dnl We go to great lengths to make sure that aclocal won't 
1257
 
dnl try to pull in the installed version of these macros
1258
 
dnl when running aclocal in the glib directory.
1259
 
dnl
1260
 
m4_copy([AC_DEFUN],[glib_DEFUN])
1261
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1262
 
dnl
1263
 
dnl At the end, if we're not within glib, we'll define the public
1264
 
dnl definitions in terms of our private definitions.
1265
 
dnl
1266
 
 
1267
 
# GLIB_LC_MESSAGES
1268
 
#--------------------
1269
 
glib_DEFUN([GLIB_LC_MESSAGES],
1270
 
  [AC_CHECK_HEADERS([locale.h])
1271
 
    if test $ac_cv_header_locale_h = yes; then
1272
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1273
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1274
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1275
 
    if test $am_cv_val_LC_MESSAGES = yes; then
1276
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1277
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
1278
 
    fi
1279
 
  fi])
1280
 
 
1281
 
# GLIB_PATH_PROG_WITH_TEST
1282
 
#----------------------------
1283
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1284
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1285
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1286
 
[# Extract the first word of "$2", so it can be a program name with args.
1287
 
set dummy $2; ac_word=[$]2
1288
 
AC_MSG_CHECKING([for $ac_word])
1289
 
AC_CACHE_VAL(ac_cv_path_$1,
1290
 
[case "[$]$1" in
1291
 
  /*)
1292
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1293
 
  ;;
1294
 
  *)
1295
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1296
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1297
 
    test -z "$ac_dir" && ac_dir=.
1298
 
    if test -f $ac_dir/$ac_word; then
1299
 
      if [$3]; then
1300
 
        ac_cv_path_$1="$ac_dir/$ac_word"
1301
 
        break
1302
 
      fi
1303
 
    fi
1304
 
  done
1305
 
  IFS="$ac_save_ifs"
1306
 
dnl If no 4th arg is given, leave the cache variable unset,
1307
 
dnl so AC_PATH_PROGS will keep looking.
1308
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1309
 
])dnl
1310
 
  ;;
1311
 
esac])dnl
1312
 
$1="$ac_cv_path_$1"
1313
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1314
 
  AC_MSG_RESULT([$]$1)
1315
 
else
1316
 
  AC_MSG_RESULT(no)
1317
 
fi
1318
 
AC_SUBST($1)dnl
1319
 
])
1320
 
 
1321
 
# GLIB_WITH_NLS
1322
 
#-----------------
1323
 
glib_DEFUN([GLIB_WITH_NLS],
1324
 
  dnl NLS is obligatory
1325
 
  [USE_NLS=yes
1326
 
    AC_SUBST(USE_NLS)
1327
 
 
1328
 
    gt_cv_have_gettext=no
1329
 
 
1330
 
    CATOBJEXT=NONE
1331
 
    XGETTEXT=:
1332
 
    INTLLIBS=
1333
 
 
1334
 
    AC_CHECK_HEADER(libintl.h,
1335
 
     [gt_cv_func_dgettext_libintl="no"
1336
 
      libintl_extra_libs=""
1337
 
 
1338
 
      #
1339
 
      # First check in libc
1340
 
      #
1341
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1342
 
        [AC_TRY_LINK([
1343
 
#include <libintl.h>
1344
 
],
1345
 
         [return !ngettext ("","", 1)],
1346
 
          gt_cv_func_ngettext_libc=yes,
1347
 
          gt_cv_func_ngettext_libc=no)
1348
 
        ])
1349
 
  
1350
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1351
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1352
 
                [AC_TRY_LINK([
1353
 
#include <libintl.h>
1354
 
],
1355
 
                  [return !dgettext ("","")],
1356
 
                  gt_cv_func_dgettext_libc=yes,
1357
 
                  gt_cv_func_dgettext_libc=no)
1358
 
                ])
1359
 
      fi
1360
 
  
1361
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1362
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
1363
 
      fi
1364
 
 
1365
 
      #
1366
 
      # If we don't have everything we want, check in libintl
1367
 
      #
1368
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
1369
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
1370
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1371
 
        
1372
 
        AC_CHECK_LIB(intl, bindtextdomain,
1373
 
            [AC_CHECK_LIB(intl, ngettext,
1374
 
                    [AC_CHECK_LIB(intl, dgettext,
1375
 
                                  gt_cv_func_dgettext_libintl=yes)])])
1376
 
 
1377
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1378
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
1379
 
          AC_MSG_RESULT([])
1380
 
          AC_CHECK_LIB(intl, ngettext,
1381
 
                [AC_CHECK_LIB(intl, dcgettext,
1382
 
                       [gt_cv_func_dgettext_libintl=yes
1383
 
                        libintl_extra_libs=-liconv],
1384
 
                        :,-liconv)],
1385
 
                :,-liconv)
1386
 
        fi
1387
 
 
1388
 
        #
1389
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
1390
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
1391
 
        # and both have dgettext and ngettext
1392
 
        #
1393
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1394
 
          glib_save_LIBS="$LIBS"
1395
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
1396
 
          unset ac_cv_func_bind_textdomain_codeset
1397
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
1398
 
          LIBS="$glib_save_LIBS"
1399
 
 
1400
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1401
 
            gt_cv_func_dgettext_libc=no
1402
 
          else
1403
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
1404
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
1405
 
              gt_cv_func_dgettext_libintl=no
1406
 
            fi
1407
 
          fi
1408
 
        fi
1409
 
      fi
1410
 
 
1411
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
1412
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1413
 
        gt_cv_have_gettext=yes
1414
 
      fi
1415
 
  
1416
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1417
 
        INTLLIBS="-lintl $libintl_extra_libs"
1418
 
      fi
1419
 
  
1420
 
      if test "$gt_cv_have_gettext" = "yes"; then
1421
 
        AC_DEFINE(HAVE_GETTEXT,1,
1422
 
          [Define if the GNU gettext() function is already present or preinstalled.])
1423
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1424
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1425
 
        if test "$MSGFMT" != "no"; then
1426
 
          glib_save_LIBS="$LIBS"
1427
 
          LIBS="$LIBS $INTLLIBS"
1428
 
          AC_CHECK_FUNCS(dcgettext)
1429
 
          MSGFMT_OPTS=
1430
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
1431
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1432
 
msgid ""
1433
 
msgstr ""
1434
 
"Content-Type: text/plain; charset=UTF-8\n"
1435
 
"Project-Id-Version: test 1.0\n"
1436
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1437
 
"Last-Translator: test <foo@bar.xx>\n"
1438
 
"Language-Team: C <LL@li.org>\n"
1439
 
"MIME-Version: 1.0\n"
1440
 
"Content-Transfer-Encoding: 8bit\n"
1441
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1442
 
          AC_SUBST(MSGFMT_OPTS)
1443
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1444
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1445
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1446
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1447
 
                         return _nl_msg_cat_cntr],
1448
 
            [CATOBJEXT=.gmo 
1449
 
             DATADIRNAME=share],
1450
 
            [case $host in
1451
 
            *-*-solaris*)
1452
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
1453
 
            dnl GNU format message catalog is always supported,
1454
 
            dnl since both are added to the libc all together.
1455
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
1456
 
            dnl and CATOBJEXT=.gmo in this case.
1457
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
1458
 
              [CATOBJEXT=.gmo 
1459
 
               DATADIRNAME=share],
1460
 
              [CATOBJEXT=.mo
1461
 
               DATADIRNAME=lib])
1462
 
            ;;
1463
 
            *)
1464
 
            CATOBJEXT=.mo
1465
 
            DATADIRNAME=lib
1466
 
            ;;
1467
 
            esac])
1468
 
          LIBS="$glib_save_LIBS"
1469
 
          INSTOBJEXT=.mo
1470
 
        else
1471
 
          gt_cv_have_gettext=no
1472
 
        fi
1473
 
      fi
1474
 
    ])
1475
 
 
1476
 
    if test "$gt_cv_have_gettext" = "yes" ; then
1477
 
      AC_DEFINE(ENABLE_NLS, 1,
1478
 
        [always defined to indicate that i18n is enabled])
1479
 
    fi
1480
 
 
1481
 
    dnl Test whether we really found GNU xgettext.
1482
 
    if test "$XGETTEXT" != ":"; then
1483
 
      dnl If it is not GNU xgettext we define it as : so that the
1484
 
      dnl Makefiles still can work.
1485
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1486
 
        : ;
1487
 
      else
1488
 
        AC_MSG_RESULT(
1489
 
          [found xgettext program is not GNU xgettext; ignore it])
1490
 
        XGETTEXT=":"
1491
 
      fi
1492
 
    fi
1493
 
 
1494
 
    # We need to process the po/ directory.
1495
 
    POSUB=po
1496
 
 
1497
 
    AC_OUTPUT_COMMANDS(
1498
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
1499
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1500
 
      esac])
1501
 
 
1502
 
    dnl These rules are solely for the distribution goal.  While doing this
1503
 
    dnl we only have to keep exactly one list of the available catalogs
1504
 
    dnl in configure.ac.
1505
 
    for lang in $ALL_LINGUAS; do
1506
 
      GMOFILES="$GMOFILES $lang.gmo"
1507
 
      POFILES="$POFILES $lang.po"
1508
 
    done
1509
 
 
1510
 
    dnl Make all variables we use known to autoconf.
1511
 
    AC_SUBST(CATALOGS)
1512
 
    AC_SUBST(CATOBJEXT)
1513
 
    AC_SUBST(DATADIRNAME)
1514
 
    AC_SUBST(GMOFILES)
1515
 
    AC_SUBST(INSTOBJEXT)
1516
 
    AC_SUBST(INTLLIBS)
1517
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
1518
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
1519
 
    AC_SUBST(POFILES)
1520
 
    AC_SUBST(POSUB)
1521
 
  ])
1522
 
 
1523
 
# AM_GLIB_GNU_GETTEXT
1524
 
# -------------------
1525
 
# Do checks necessary for use of gettext. If a suitable implementation 
1526
 
# of gettext is found in either in libintl or in the C library,
1527
 
# it will set INTLLIBS to the libraries needed for use of gettext
1528
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1529
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1530
 
# on various variables needed by the Makefile.in.in installed by 
1531
 
# glib-gettextize.
1532
 
dnl
1533
 
glib_DEFUN([GLIB_GNU_GETTEXT],
1534
 
  [AC_REQUIRE([AC_PROG_CC])dnl
1535
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
1536
 
   
1537
 
   GLIB_LC_MESSAGES
1538
 
   GLIB_WITH_NLS
1539
 
 
1540
 
   if test "$gt_cv_have_gettext" = "yes"; then
1541
 
     if test "x$ALL_LINGUAS" = "x"; then
1542
 
       LINGUAS=
1543
 
     else
1544
 
       AC_MSG_CHECKING(for catalogs to be installed)
1545
 
       NEW_LINGUAS=
1546
 
       for presentlang in $ALL_LINGUAS; do
1547
 
         useit=no
1548
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1549
 
           desiredlanguages="$LINGUAS"
1550
 
         else
1551
 
           desiredlanguages="$ALL_LINGUAS"
1552
 
         fi
1553
 
         for desiredlang in $desiredlanguages; do
1554
 
           # Use the presentlang catalog if desiredlang is
1555
 
           #   a. equal to presentlang, or
1556
 
           #   b. a variant of presentlang (because in this case,
1557
 
           #      presentlang can be used as a fallback for messages
1558
 
           #      which are not translated in the desiredlang catalog).
1559
 
           case "$desiredlang" in
1560
 
             "$presentlang"*) useit=yes;;
1561
 
           esac
1562
 
         done
1563
 
         if test $useit = yes; then
1564
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1565
 
         fi
1566
 
       done
1567
 
       LINGUAS=$NEW_LINGUAS
1568
 
       AC_MSG_RESULT($LINGUAS)
1569
 
     fi
1570
 
 
1571
 
     dnl Construct list of names of catalog files to be constructed.
1572
 
     if test -n "$LINGUAS"; then
1573
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1574
 
     fi
1575
 
   fi
1576
 
 
1577
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1578
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1579
 
   dnl Try to locate is.
1580
 
   MKINSTALLDIRS=
1581
 
   if test -n "$ac_aux_dir"; then
1582
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1583
 
   fi
1584
 
   if test -z "$MKINSTALLDIRS"; then
1585
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1586
 
   fi
1587
 
   AC_SUBST(MKINSTALLDIRS)
1588
 
 
1589
 
   dnl Generate list of files to be processed by xgettext which will
1590
 
   dnl be included in po/Makefile.
1591
 
   test -d po || mkdir po
1592
 
   if test "x$srcdir" != "x."; then
1593
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1594
 
       posrcprefix="$srcdir/"
1595
 
     else
1596
 
       posrcprefix="../$srcdir/"
1597
 
     fi
1598
 
   else
1599
 
     posrcprefix="../"
1600
 
   fi
1601
 
   rm -f po/POTFILES
1602
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1603
 
        < $srcdir/po/POTFILES.in > po/POTFILES
1604
 
  ])
1605
 
 
1606
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1607
 
# -------------------------------
1608
 
# Define VARIABLE to the location where catalog files will
1609
 
# be installed by po/Makefile.
1610
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1611
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1612
 
glib_save_prefix="$prefix"
1613
 
glib_save_exec_prefix="$exec_prefix"
1614
 
glib_save_datarootdir="$datarootdir"
1615
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1616
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1617
 
datarootdir=`eval echo "${datarootdir}"`
1618
 
if test "x$CATOBJEXT" = "x.mo" ; then
1619
 
  localedir=`eval echo "${libdir}/locale"`
1620
 
else
1621
 
  localedir=`eval echo "${datadir}/locale"`
1622
 
fi
1623
 
prefix="$glib_save_prefix"
1624
 
exec_prefix="$glib_save_exec_prefix"
1625
 
datarootdir="$glib_save_datarootdir"
1626
 
AC_DEFINE_UNQUOTED($1, "$localedir",
1627
 
  [Define the location where the catalogs will be installed])
1628
 
])
1629
 
 
1630
 
dnl
1631
 
dnl Now the definitions that aclocal will find
1632
 
dnl
1633
 
ifdef(glib_configure_ac,[],[
1634
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1635
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1636
 
])dnl
1637
 
 
1638
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1639
 
1640
 
# Create a temporary file with TEST-FILE as its contents and pass the
1641
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1642
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
1643
 
AC_DEFUN([GLIB_RUN_PROG],
1644
 
[cat >conftest.foo <<_ACEOF
1645
 
$2
1646
 
_ACEOF
1647
 
if AC_RUN_LOG([$1 conftest.foo]); then
1648
 
  m4_ifval([$3], [$3], [:])
1649
 
m4_ifvaln([$4], [else $4])dnl
1650
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1651
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1652
 
fi])
1653
 
 
1654
 
 
1655
 
dnl GLIB_GSETTINGS
1656
 
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1657
 
dnl the schema should be compiled
1658
 
dnl
1659
 
 
1660
 
AC_DEFUN([GLIB_GSETTINGS],
1661
 
[
1662
 
  m4_pattern_allow([AM_V_GEN])
1663
 
  AC_ARG_ENABLE(schemas-compile,
1664
 
                AS_HELP_STRING([--disable-schemas-compile],
1665
 
                               [Disable regeneration of gschemas.compiled on install]),
1666
 
                [case ${enableval} in
1667
 
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
1668
 
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1669
 
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1670
 
                 esac])
1671
 
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1672
 
  PKG_PROG_PKG_CONFIG([0.16])
1673
 
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1674
 
  if test x$cross_compiling != xyes; then
1675
 
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1676
 
  else
1677
 
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1678
 
  fi
1679
 
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
1680
 
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1681
 
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1682
 
  else
1683
 
    ifelse([$1],,[:],[$1])
1684
 
  fi
1685
 
 
1686
 
  GSETTINGS_RULES='
1687
 
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1688
 
 
1689
 
mostlyclean-am: clean-gsettings-schemas
1690
 
 
1691
 
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1692
 
 
1693
 
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1694
 
        $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1695
 
 
1696
 
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1697
 
uninstall-am: uninstall-gsettings-schemas
1698
 
install-data-am: install-gsettings-schemas
1699
 
 
1700
 
.SECONDARY: $(gsettings_SCHEMAS)
1701
 
 
1702
 
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1703
 
        @$(NORMAL_INSTALL)
1704
 
        if test -n "$^"; then \
1705
 
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1706
 
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1707
 
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1708
 
        fi
1709
 
 
1710
 
uninstall-gsettings-schemas:
1711
 
        @$(NORMAL_UNINSTALL)
1712
 
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1713
 
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1714
 
        test -n "$$files" || exit 0; \
1715
 
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1716
 
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1717
 
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1718
 
 
1719
 
clean-gsettings-schemas:
1720
 
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1721
 
 
1722
 
ifdef gsettings_ENUM_NAMESPACE
1723
 
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1724
 
        $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1725
 
endif
1726
 
'
1727
 
  _GSETTINGS_SUBST(GSETTINGS_RULES)
1728
 
])
1729
 
 
1730
 
dnl _GSETTINGS_SUBST(VARIABLE)
1731
 
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1732
 
AC_DEFUN([_GSETTINGS_SUBST],
1733
 
[
1734
 
AC_SUBST([$1])
1735
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1736
 
]
1737
 
)
1738
 
 
1739
1739
m4_include([m4/gnome-doc-utils.m4])
1740
1740
m4_include([m4/intltool.m4])
1741
1741
m4_include([m4/libtool.m4])