From http://www.jwz.org/xscreensaver/xscreensaver-5.36.tar.gz
[xscreensaver] / aclocal.m4
1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
16 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
17 #
18 # This file is free software, distributed under the terms of the GNU
19 # General Public License.  As a special exception to the GNU General
20 # Public License, this file may be distributed as part of a program
21 # that contains a configuration script generated by Autoconf, under
22 # the same distribution terms as the rest of that program.
23 #
24 # This file can be copied and used freely without restrictions.  It can
25 # be used in projects which are not available under the GNU Public License
26 # but which still want to provide support for the GNU gettext functionality.
27 #
28 # Macro to add for using GNU gettext.
29 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
30 #
31 # Modified to never use included libintl. 
32 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
33 #
34 # Major rework to remove unused code
35 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
36 #
37 # Added better handling of ALL_LINGUAS from GNU gettext version 
38 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
39 #
40 # Modified to require ngettext
41 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
42 #
43 # We need this here as well, since someone might use autoconf-2.5x
44 # to configure GLib then an older version to configure a package
45 # using AM_GLIB_GNU_GETTEXT
46 AC_PREREQ(2.53)
47
48 dnl
49 dnl We go to great lengths to make sure that aclocal won't 
50 dnl try to pull in the installed version of these macros
51 dnl when running aclocal in the glib directory.
52 dnl
53 m4_copy([AC_DEFUN],[glib_DEFUN])
54 m4_copy([AC_REQUIRE],[glib_REQUIRE])
55 dnl
56 dnl At the end, if we're not within glib, we'll define the public
57 dnl definitions in terms of our private definitions.
58 dnl
59
60 # GLIB_LC_MESSAGES
61 #--------------------
62 glib_DEFUN([GLIB_LC_MESSAGES],
63   [AC_CHECK_HEADERS([locale.h])
64     if test $ac_cv_header_locale_h = yes; then
65     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
66       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
67        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
68     if test $am_cv_val_LC_MESSAGES = yes; then
69       AC_DEFINE(HAVE_LC_MESSAGES, 1,
70         [Define if your <locale.h> file defines LC_MESSAGES.])
71     fi
72   fi])
73
74 # GLIB_PATH_PROG_WITH_TEST
75 #----------------------------
76 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
77 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
78 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
79 [# Extract the first word of "$2", so it can be a program name with args.
80 set dummy $2; ac_word=[$]2
81 AC_MSG_CHECKING([for $ac_word])
82 AC_CACHE_VAL(ac_cv_path_$1,
83 [case "[$]$1" in
84   /*)
85   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
86   ;;
87   *)
88   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
89   for ac_dir in ifelse([$5], , $PATH, [$5]); do
90     test -z "$ac_dir" && ac_dir=.
91     if test -f $ac_dir/$ac_word; then
92       if [$3]; then
93         ac_cv_path_$1="$ac_dir/$ac_word"
94         break
95       fi
96     fi
97   done
98   IFS="$ac_save_ifs"
99 dnl If no 4th arg is given, leave the cache variable unset,
100 dnl so AC_PATH_PROGS will keep looking.
101 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
102 ])dnl
103   ;;
104 esac])dnl
105 $1="$ac_cv_path_$1"
106 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
107   AC_MSG_RESULT([$]$1)
108 else
109   AC_MSG_RESULT(no)
110 fi
111 AC_SUBST($1)dnl
112 ])
113
114 # GLIB_WITH_NLS
115 #-----------------
116 glib_DEFUN([GLIB_WITH_NLS],
117   dnl NLS is obligatory
118   [USE_NLS=yes
119     AC_SUBST(USE_NLS)
120
121     gt_cv_have_gettext=no
122
123     CATOBJEXT=NONE
124     XGETTEXT=:
125     INTLLIBS=
126
127     AC_CHECK_HEADER(libintl.h,
128      [gt_cv_func_dgettext_libintl="no"
129       libintl_extra_libs=""
130
131       #
132       # First check in libc
133       #
134       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
135         [AC_TRY_LINK([
136 #include <libintl.h>
137 ],
138          [return !ngettext ("","", 1)],
139           gt_cv_func_ngettext_libc=yes,
140           gt_cv_func_ngettext_libc=no)
141         ])
142   
143       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
144               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
145                 [AC_TRY_LINK([
146 #include <libintl.h>
147 ],
148                   [return !dgettext ("","")],
149                   gt_cv_func_dgettext_libc=yes,
150                   gt_cv_func_dgettext_libc=no)
151                 ])
152       fi
153   
154       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
155         AC_CHECK_FUNCS(bind_textdomain_codeset)
156       fi
157
158       #
159       # If we don't have everything we want, check in libintl
160       #
161       if test "$gt_cv_func_dgettext_libc" != "yes" \
162          || test "$gt_cv_func_ngettext_libc" != "yes" \
163          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
164         
165         AC_CHECK_LIB(intl, bindtextdomain,
166             [AC_CHECK_LIB(intl, ngettext,
167                     [AC_CHECK_LIB(intl, dgettext,
168                                   gt_cv_func_dgettext_libintl=yes)])])
169
170         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
171           AC_MSG_CHECKING([if -liconv is needed to use gettext])
172           AC_MSG_RESULT([])
173           AC_CHECK_LIB(intl, ngettext,
174                 [AC_CHECK_LIB(intl, dcgettext,
175                        [gt_cv_func_dgettext_libintl=yes
176                         libintl_extra_libs=-liconv],
177                         :,-liconv)],
178                 :,-liconv)
179         fi
180
181         #
182         # If we found libintl, then check in it for bind_textdomain_codeset();
183         # we'll prefer libc if neither have bind_textdomain_codeset(),
184         # and both have dgettext and ngettext
185         #
186         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
187           glib_save_LIBS="$LIBS"
188           LIBS="$LIBS -lintl $libintl_extra_libs"
189           unset ac_cv_func_bind_textdomain_codeset
190           AC_CHECK_FUNCS(bind_textdomain_codeset)
191           LIBS="$glib_save_LIBS"
192
193           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
194             gt_cv_func_dgettext_libc=no
195           else
196             if test "$gt_cv_func_dgettext_libc" = "yes" \
197                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
198               gt_cv_func_dgettext_libintl=no
199             fi
200           fi
201         fi
202       fi
203
204       if test "$gt_cv_func_dgettext_libc" = "yes" \
205         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
206         gt_cv_have_gettext=yes
207       fi
208   
209       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
210         INTLLIBS="-lintl $libintl_extra_libs"
211       fi
212   
213       if test "$gt_cv_have_gettext" = "yes"; then
214         AC_DEFINE(HAVE_GETTEXT,1,
215           [Define if the GNU gettext() function is already present or preinstalled.])
216         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
217           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
218         if test "$MSGFMT" != "no"; then
219           glib_save_LIBS="$LIBS"
220           LIBS="$LIBS $INTLLIBS"
221           AC_CHECK_FUNCS(dcgettext)
222           MSGFMT_OPTS=
223           AC_MSG_CHECKING([if msgfmt accepts -c])
224           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
225 msgid ""
226 msgstr ""
227 "Content-Type: text/plain; charset=UTF-8\n"
228 "Project-Id-Version: test 1.0\n"
229 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
230 "Last-Translator: test <foo@bar.xx>\n"
231 "Language-Team: C <LL@li.org>\n"
232 "MIME-Version: 1.0\n"
233 "Content-Transfer-Encoding: 8bit\n"
234 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
235           AC_SUBST(MSGFMT_OPTS)
236           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
237           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
238             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
239           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
240                          return _nl_msg_cat_cntr],
241             [CATOBJEXT=.gmo 
242              DATADIRNAME=share],
243             [case $host in
244             *-*-solaris*)
245             dnl On Solaris, if bind_textdomain_codeset is in libc,
246             dnl GNU format message catalog is always supported,
247             dnl since both are added to the libc all together.
248             dnl Hence, we'd like to go with DATADIRNAME=share and
249             dnl and CATOBJEXT=.gmo in this case.
250             AC_CHECK_FUNC(bind_textdomain_codeset,
251               [CATOBJEXT=.gmo 
252                DATADIRNAME=share],
253               [CATOBJEXT=.mo
254                DATADIRNAME=lib])
255             ;;
256             *-*-openbsd*)
257             CATOBJEXT=.mo
258             DATADIRNAME=share
259             ;;
260             *)
261             CATOBJEXT=.mo
262             DATADIRNAME=lib
263             ;;
264             esac])
265           LIBS="$glib_save_LIBS"
266           INSTOBJEXT=.mo
267         else
268           gt_cv_have_gettext=no
269         fi
270       fi
271     ])
272
273     if test "$gt_cv_have_gettext" = "yes" ; then
274       AC_DEFINE(ENABLE_NLS, 1,
275         [always defined to indicate that i18n is enabled])
276     fi
277
278     dnl Test whether we really found GNU xgettext.
279     if test "$XGETTEXT" != ":"; then
280       dnl If it is not GNU xgettext we define it as : so that the
281       dnl Makefiles still can work.
282       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
283         : ;
284       else
285         AC_MSG_RESULT(
286           [found xgettext program is not GNU xgettext; ignore it])
287         XGETTEXT=":"
288       fi
289     fi
290
291     # We need to process the po/ directory.
292     POSUB=po
293
294     AC_OUTPUT_COMMANDS(
295       [case "$CONFIG_FILES" in *po/Makefile.in*)
296         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
297       esac])
298
299     dnl These rules are solely for the distribution goal.  While doing this
300     dnl we only have to keep exactly one list of the available catalogs
301     dnl in configure.ac.
302     for lang in $ALL_LINGUAS; do
303       GMOFILES="$GMOFILES $lang.gmo"
304       POFILES="$POFILES $lang.po"
305     done
306
307     dnl Make all variables we use known to autoconf.
308     AC_SUBST(CATALOGS)
309     AC_SUBST(CATOBJEXT)
310     AC_SUBST(DATADIRNAME)
311     AC_SUBST(GMOFILES)
312     AC_SUBST(INSTOBJEXT)
313     AC_SUBST(INTLLIBS)
314     AC_SUBST(PO_IN_DATADIR_TRUE)
315     AC_SUBST(PO_IN_DATADIR_FALSE)
316     AC_SUBST(POFILES)
317     AC_SUBST(POSUB)
318   ])
319
320 # AM_GLIB_GNU_GETTEXT
321 # -------------------
322 # Do checks necessary for use of gettext. If a suitable implementation 
323 # of gettext is found in either in libintl or in the C library,
324 # it will set INTLLIBS to the libraries needed for use of gettext
325 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
326 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
327 # on various variables needed by the Makefile.in.in installed by 
328 # glib-gettextize.
329 dnl
330 AU_DEFUN([GLIB_GNU_GETTEXT],
331   [AC_REQUIRE([AC_PROG_CC])dnl
332    
333    GLIB_LC_MESSAGES
334    GLIB_WITH_NLS
335
336    if test "$gt_cv_have_gettext" = "yes"; then
337      if test "x$ALL_LINGUAS" = "x"; then
338        LINGUAS=
339      else
340        AC_MSG_CHECKING(for catalogs to be installed)
341        NEW_LINGUAS=
342        for presentlang in $ALL_LINGUAS; do
343          useit=no
344          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
345            desiredlanguages="$LINGUAS"
346          else
347            desiredlanguages="$ALL_LINGUAS"
348          fi
349          for desiredlang in $desiredlanguages; do
350            # Use the presentlang catalog if desiredlang is
351            #   a. equal to presentlang, or
352            #   b. a variant of presentlang (because in this case,
353            #      presentlang can be used as a fallback for messages
354            #      which are not translated in the desiredlang catalog).
355            case "$desiredlang" in
356              "$presentlang"*) useit=yes;;
357            esac
358          done
359          if test $useit = yes; then
360            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
361          fi
362        done
363        LINGUAS=$NEW_LINGUAS
364        AC_MSG_RESULT($LINGUAS)
365      fi
366
367      dnl Construct list of names of catalog files to be constructed.
368      if test -n "$LINGUAS"; then
369        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
370      fi
371    fi
372
373    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
374    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
375    dnl Try to locate is.
376    MKINSTALLDIRS=
377    if test -n "$ac_aux_dir"; then
378      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
379    fi
380    if test -z "$MKINSTALLDIRS"; then
381      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
382    fi
383    AC_SUBST(MKINSTALLDIRS)
384
385    dnl Generate list of files to be processed by xgettext which will
386    dnl be included in po/Makefile.
387    test -d po || mkdir po
388    if test "x$srcdir" != "x."; then
389      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
390        posrcprefix="$srcdir/"
391      else
392        posrcprefix="../$srcdir/"
393      fi
394    else
395      posrcprefix="../"
396    fi
397    rm -f po/POTFILES
398    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
399         < $srcdir/po/POTFILES.in > po/POTFILES
400   ],
401   [[$0: This macro is deprecated. You should use upstream gettext instead.]])
402
403 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
404 # -------------------------------
405 # Define VARIABLE to the location where catalog files will
406 # be installed by po/Makefile.
407 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
408 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
409 glib_save_prefix="$prefix"
410 glib_save_exec_prefix="$exec_prefix"
411 glib_save_datarootdir="$datarootdir"
412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
413 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
414 datarootdir=`eval echo "${datarootdir}"`
415 if test "x$CATOBJEXT" = "x.mo" ; then
416   localedir=`eval echo "${libdir}/locale"`
417 else
418   localedir=`eval echo "${datadir}/locale"`
419 fi
420 prefix="$glib_save_prefix"
421 exec_prefix="$glib_save_exec_prefix"
422 datarootdir="$glib_save_datarootdir"
423 AC_DEFINE_UNQUOTED($1, "$localedir",
424   [Define the location where the catalogs will be installed])
425 ])
426
427 dnl
428 dnl Now the definitions that aclocal will find
429 dnl
430 ifdef(glib_configure_ac,[],[
431 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
432 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
433 ])dnl
434
435 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
436
437 # Create a temporary file with TEST-FILE as its contents and pass the
438 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
439 # 0 and perform ACTION-IF-FAIL for any other exit status.
440 AC_DEFUN([GLIB_RUN_PROG],
441 [cat >conftest.foo <<_ACEOF
442 $2
443 _ACEOF
444 if AC_RUN_LOG([$1 conftest.foo]); then
445   m4_ifval([$3], [$3], [:])
446 m4_ifvaln([$4], [else $4])dnl
447 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
448 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
449 fi])
450
451
452
453 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
454 # serial 42 IT_PROG_INTLTOOL
455 AC_DEFUN([IT_PROG_INTLTOOL], [
456 AC_PREREQ([2.50])dnl
457 AC_REQUIRE([AM_NLS])dnl
458
459 case "$am__api_version" in
460     1.[01234])
461         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
462     ;;
463     *)
464     ;;
465 esac
466
467 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
468 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
469 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
470 if test -n "$1"; then
471     AC_MSG_CHECKING([for intltool >= $1])
472     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
473     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
474         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
475 fi
476
477 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
478 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
479 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
480 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
481     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
482 fi
483
484 if test -z "$AM_DEFAULT_VERBOSITY"; then
485   AM_DEFAULT_VERBOSITY=1
486 fi
487 AC_SUBST([AM_DEFAULT_VERBOSITY])
488
489 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
490 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
491 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
492 AC_SUBST(INTLTOOL_V_MERGE)
493 AC_SUBST(INTLTOOL__v_MERGE_)
494 AC_SUBST(INTLTOOL__v_MERGE_0)
495
496 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
497 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
498 intltool__v_merge_options_0='-q'
499 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
500 AC_SUBST(intltool__v_merge_options_)
501 AC_SUBST(intltool__v_merge_options_0)
502
503   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
504 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
505      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
506      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
507       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
508      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
509    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
510     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
511 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
512        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
513       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
514 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
515       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
516 else
517       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
518 fi
519       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
520       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
521     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
522   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
523     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
524     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
525    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
526
527 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
528 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
529 _IT_SUBST(INTLTOOL_KEYS_RULE)
530 _IT_SUBST(INTLTOOL_PROP_RULE)
531 _IT_SUBST(INTLTOOL_OAF_RULE)
532 _IT_SUBST(INTLTOOL_PONG_RULE)
533 _IT_SUBST(INTLTOOL_SERVER_RULE)
534 _IT_SUBST(INTLTOOL_SHEET_RULE)
535 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
536 _IT_SUBST(INTLTOOL_UI_RULE)
537 _IT_SUBST(INTLTOOL_XAM_RULE)
538 _IT_SUBST(INTLTOOL_KBD_RULE)
539 _IT_SUBST(INTLTOOL_XML_RULE)
540 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
541 _IT_SUBST(INTLTOOL_CAVES_RULE)
542 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
543 _IT_SUBST(INTLTOOL_THEME_RULE)
544 _IT_SUBST(INTLTOOL_SERVICE_RULE)
545 _IT_SUBST(INTLTOOL_POLICY_RULE)
546
547 # Check the gettext tools to make sure they are GNU
548 AC_PATH_PROG(XGETTEXT, xgettext)
549 AC_PATH_PROG(MSGMERGE, msgmerge)
550 AC_PATH_PROG(MSGFMT, msgfmt)
551 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
552 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
553     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
554 fi
555 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
556 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
557 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
558 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
559     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
560 fi
561
562 # Substitute ALL_LINGUAS so we can use it in po/Makefile
563 AC_SUBST(ALL_LINGUAS)
564
565 IT_PO_SUBDIR([po])
566
567 ])
568
569
570 # IT_PO_SUBDIR(DIRNAME)
571 # ---------------------
572 # All po subdirs have to be declared with this macro; the subdir "po" is
573 # declared by IT_PROG_INTLTOOL.
574 #
575 AC_DEFUN([IT_PO_SUBDIR],
576 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
577 dnl
578 dnl The following CONFIG_COMMANDS should be executed at the very end
579 dnl of config.status.
580 AC_CONFIG_COMMANDS_PRE([
581   AC_CONFIG_COMMANDS([$1/stamp-it], [
582     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
583        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
584     fi
585     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
586     >"$1/stamp-it.tmp"
587     [sed '/^#/d
588          s/^[[].*] *//
589          /^[    ]*$/d
590         '"s|^|  $ac_top_srcdir/|" \
591       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
592     ]
593     [sed '/^POTFILES =/,/[^\\]$/ {
594                 /^POTFILES =/!d
595                 r $1/POTFILES
596           }
597          ' "$1/Makefile.in" >"$1/Makefile"]
598     rm -f "$1/Makefile.tmp"
599     mv "$1/stamp-it.tmp" "$1/stamp-it"
600   ])
601 ])dnl
602 ])
603
604 # _IT_SUBST(VARIABLE)
605 # -------------------
606 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
607 #
608 AC_DEFUN([_IT_SUBST],
609 [
610 AC_SUBST([$1])
611 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
612 ]
613 )
614
615 # deprecated macros
616 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
617 # A hint is needed for aclocal from Automake <= 1.9.4:
618 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
619
620
621 # nls.m4 serial 5 (gettext-0.18)
622 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
623 dnl Foundation, Inc.
624 dnl This file is free software; the Free Software Foundation
625 dnl gives unlimited permission to copy and/or distribute it,
626 dnl with or without modifications, as long as this notice is preserved.
627 dnl
628 dnl This file can be used in projects which are not available under
629 dnl the GNU General Public License or the GNU Library General Public
630 dnl License but which still want to provide support for the GNU gettext
631 dnl functionality.
632 dnl Please note that the actual code of the GNU gettext library is covered
633 dnl by the GNU Library General Public License, and the rest of the GNU
634 dnl gettext package is covered by the GNU General Public License.
635 dnl They are *not* in the public domain.
636
637 dnl Authors:
638 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
639 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
640
641 AC_PREREQ([2.50])
642
643 AC_DEFUN([AM_NLS],
644 [
645   AC_MSG_CHECKING([whether NLS is requested])
646   dnl Default is enabled NLS
647   AC_ARG_ENABLE([nls],
648     [  --disable-nls           do not use Native Language Support],
649     USE_NLS=$enableval, USE_NLS=yes)
650   AC_MSG_RESULT([$USE_NLS])
651   AC_SUBST([USE_NLS])
652 ])
653
654 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
655 #
656 # This file is free software; the Free Software Foundation
657 # gives unlimited permission to copy and/or distribute it,
658 # with or without modifications, as long as this notice is preserved.
659
660 # _AM_SUBST_NOTMAKE(VARIABLE)
661 # ---------------------------
662 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
663 # This macro is traced by Automake.
664 AC_DEFUN([_AM_SUBST_NOTMAKE])
665
666 # AM_SUBST_NOTMAKE(VARIABLE)
667 # --------------------------
668 # Public sister of _AM_SUBST_NOTMAKE.
669 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
670