From http://www.jwz.org/xscreensaver/xscreensaver-5.35.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 glib_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
402 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
403 # -------------------------------
404 # Define VARIABLE to the location where catalog files will
405 # be installed by po/Makefile.
406 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
407 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
408 glib_save_prefix="$prefix"
409 glib_save_exec_prefix="$exec_prefix"
410 glib_save_datarootdir="$datarootdir"
411 test "x$prefix" = xNONE && prefix=$ac_default_prefix
412 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
413 datarootdir=`eval echo "${datarootdir}"`
414 if test "x$CATOBJEXT" = "x.mo" ; then
415   localedir=`eval echo "${libdir}/locale"`
416 else
417   localedir=`eval echo "${datadir}/locale"`
418 fi
419 prefix="$glib_save_prefix"
420 exec_prefix="$glib_save_exec_prefix"
421 datarootdir="$glib_save_datarootdir"
422 AC_DEFINE_UNQUOTED($1, "$localedir",
423   [Define the location where the catalogs will be installed])
424 ])
425
426 dnl
427 dnl Now the definitions that aclocal will find
428 dnl
429 ifdef(glib_configure_ac,[],[
430 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
431 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
432 ])dnl
433
434 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
435
436 # Create a temporary file with TEST-FILE as its contents and pass the
437 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
438 # 0 and perform ACTION-IF-FAIL for any other exit status.
439 AC_DEFUN([GLIB_RUN_PROG],
440 [cat >conftest.foo <<_ACEOF
441 $2
442 _ACEOF
443 if AC_RUN_LOG([$1 conftest.foo]); then
444   m4_ifval([$3], [$3], [:])
445 m4_ifvaln([$4], [else $4])dnl
446 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
447 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
448 fi])
449
450
451
452 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
453 # serial 42 IT_PROG_INTLTOOL
454 AC_DEFUN([IT_PROG_INTLTOOL], [
455 AC_PREREQ([2.50])dnl
456 AC_REQUIRE([AM_NLS])dnl
457
458 case "$am__api_version" in
459     1.[01234])
460         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
461     ;;
462     *)
463     ;;
464 esac
465
466 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
467 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
468 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
469 if test -n "$1"; then
470     AC_MSG_CHECKING([for intltool >= $1])
471     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
472     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
473         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
474 fi
475
476 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
477 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
478 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
479 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
480     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
481 fi
482
483 if test -z "$AM_DEFAULT_VERBOSITY"; then
484   AM_DEFAULT_VERBOSITY=1
485 fi
486 AC_SUBST([AM_DEFAULT_VERBOSITY])
487
488 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
489 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
490 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
491 AC_SUBST(INTLTOOL_V_MERGE)
492 AC_SUBST(INTLTOOL__v_MERGE_)
493 AC_SUBST(INTLTOOL__v_MERGE_0)
494
495 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
496 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
497 intltool__v_merge_options_0='-q'
498 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
499 AC_SUBST(intltool__v_merge_options_)
500 AC_SUBST(intltool__v_merge_options_0)
501
502   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 $< [$]@' 
503 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 $< [$]@' 
504      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 $< [$]@' 
505      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 $< [$]@' 
506       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 $< [$]@'
507      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 $< [$]@' 
508    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 $< [$]@' 
509     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 $< [$]@' 
510 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 $< [$]@' 
511        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 $< [$]@' 
512       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 $< [$]@' 
513 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
514       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 $< [$]@'
515 else
516       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'
517 fi
518       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 $< [$]@' 
519       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 $< [$]@' 
520     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 $< [$]@' 
521   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 $< [$]@' 
522     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 $< [$]@' 
523     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 $< [$]@'
524    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 $< [$]@'
525
526 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
527 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
528 _IT_SUBST(INTLTOOL_KEYS_RULE)
529 _IT_SUBST(INTLTOOL_PROP_RULE)
530 _IT_SUBST(INTLTOOL_OAF_RULE)
531 _IT_SUBST(INTLTOOL_PONG_RULE)
532 _IT_SUBST(INTLTOOL_SERVER_RULE)
533 _IT_SUBST(INTLTOOL_SHEET_RULE)
534 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
535 _IT_SUBST(INTLTOOL_UI_RULE)
536 _IT_SUBST(INTLTOOL_XAM_RULE)
537 _IT_SUBST(INTLTOOL_KBD_RULE)
538 _IT_SUBST(INTLTOOL_XML_RULE)
539 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
540 _IT_SUBST(INTLTOOL_CAVES_RULE)
541 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
542 _IT_SUBST(INTLTOOL_THEME_RULE)
543 _IT_SUBST(INTLTOOL_SERVICE_RULE)
544 _IT_SUBST(INTLTOOL_POLICY_RULE)
545
546 # Check the gettext tools to make sure they are GNU
547 AC_PATH_PROG(XGETTEXT, xgettext)
548 AC_PATH_PROG(MSGMERGE, msgmerge)
549 AC_PATH_PROG(MSGFMT, msgfmt)
550 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
551 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
552     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
553 fi
554 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
555 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
556 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
557 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
558     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
559 fi
560
561 # Substitute ALL_LINGUAS so we can use it in po/Makefile
562 AC_SUBST(ALL_LINGUAS)
563
564 IT_PO_SUBDIR([po])
565
566 ])
567
568
569 # IT_PO_SUBDIR(DIRNAME)
570 # ---------------------
571 # All po subdirs have to be declared with this macro; the subdir "po" is
572 # declared by IT_PROG_INTLTOOL.
573 #
574 AC_DEFUN([IT_PO_SUBDIR],
575 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
576 dnl
577 dnl The following CONFIG_COMMANDS should be executed at the very end
578 dnl of config.status.
579 AC_CONFIG_COMMANDS_PRE([
580   AC_CONFIG_COMMANDS([$1/stamp-it], [
581     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
582        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
583     fi
584     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
585     >"$1/stamp-it.tmp"
586     [sed '/^#/d
587          s/^[[].*] *//
588          /^[    ]*$/d
589         '"s|^|  $ac_top_srcdir/|" \
590       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
591     ]
592     [sed '/^POTFILES =/,/[^\\]$/ {
593                 /^POTFILES =/!d
594                 r $1/POTFILES
595           }
596          ' "$1/Makefile.in" >"$1/Makefile"]
597     rm -f "$1/Makefile.tmp"
598     mv "$1/stamp-it.tmp" "$1/stamp-it"
599   ])
600 ])dnl
601 ])
602
603 # _IT_SUBST(VARIABLE)
604 # -------------------
605 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
606 #
607 AC_DEFUN([_IT_SUBST],
608 [
609 AC_SUBST([$1])
610 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
611 ]
612 )
613
614 # deprecated macros
615 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
616 # A hint is needed for aclocal from Automake <= 1.9.4:
617 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
618
619
620 # nls.m4 serial 5 (gettext-0.18)
621 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
622 dnl Inc.
623 dnl This file is free software; the Free Software Foundation
624 dnl gives unlimited permission to copy and/or distribute it,
625 dnl with or without modifications, as long as this notice is preserved.
626 dnl
627 dnl This file can be used in projects which are not available under
628 dnl the GNU General Public License or the GNU Library General Public
629 dnl License but which still want to provide support for the GNU gettext
630 dnl functionality.
631 dnl Please note that the actual code of the GNU gettext library is covered
632 dnl by the GNU Library General Public License, and the rest of the GNU
633 dnl gettext package is covered by the GNU General Public License.
634 dnl They are *not* in the public domain.
635
636 dnl Authors:
637 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
638 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
639
640 AC_PREREQ([2.50])
641
642 AC_DEFUN([AM_NLS],
643 [
644   AC_MSG_CHECKING([whether NLS is requested])
645   dnl Default is enabled NLS
646   AC_ARG_ENABLE([nls],
647     [  --disable-nls           do not use Native Language Support],
648     USE_NLS=$enableval, USE_NLS=yes)
649   AC_MSG_RESULT([$USE_NLS])
650   AC_SUBST([USE_NLS])
651 ])
652
653 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
654 #
655 # This file is free software; the Free Software Foundation
656 # gives unlimited permission to copy and/or distribute it,
657 # with or without modifications, as long as this notice is preserved.
658
659 # _AM_SUBST_NOTMAKE(VARIABLE)
660 # ---------------------------
661 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
662 # This macro is traced by Automake.
663 AC_DEFUN([_AM_SUBST_NOTMAKE])
664
665 # AM_SUBST_NOTMAKE(VARIABLE)
666 # --------------------------
667 # Public sister of _AM_SUBST_NOTMAKE.
668 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
669