From http://www.jwz.org/xscreensaver/xscreensaver-5.40.tar.gz
[xscreensaver] / aclocal.m4
1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2018 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 dnl Checks for special options needed on Mac OS X.
115 dnl Defines INTL_MACOSX_LIBS.
116 dnl
117 dnl Copied from intlmacosx.m4 in gettext, GPL.
118 dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
119 glib_DEFUN([glib_gt_INTL_MACOSX],
120 [
121   dnl Check for API introduced in Mac OS X 10.2.
122   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
123     [gt_cv_func_CFPreferencesCopyAppValue],
124     [gt_save_LIBS="$LIBS"
125      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
126      AC_LINK_IFELSE(
127        [AC_LANG_PROGRAM(
128           [[#include <CoreFoundation/CFPreferences.h>]],
129           [[CFPreferencesCopyAppValue(NULL, NULL)]])],
130        [gt_cv_func_CFPreferencesCopyAppValue=yes],
131        [gt_cv_func_CFPreferencesCopyAppValue=no])
132      LIBS="$gt_save_LIBS"])
133   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
134     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
135       [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
136   fi
137   dnl Check for API introduced in Mac OS X 10.3.
138   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
139     [gt_save_LIBS="$LIBS"
140      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
141      AC_LINK_IFELSE(
142        [AC_LANG_PROGRAM(
143           [[#include <CoreFoundation/CFLocale.h>]],
144           [[CFLocaleCopyCurrent();]])],
145        [gt_cv_func_CFLocaleCopyCurrent=yes],
146        [gt_cv_func_CFLocaleCopyCurrent=no])
147      LIBS="$gt_save_LIBS"])
148   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
149     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
150       [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
151   fi
152   INTL_MACOSX_LIBS=
153   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
154     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
155   fi
156   AC_SUBST([INTL_MACOSX_LIBS])
157 ])
158
159 # GLIB_WITH_NLS
160 #-----------------
161 glib_DEFUN([GLIB_WITH_NLS],
162   dnl NLS is obligatory
163   [USE_NLS=yes
164     AC_SUBST(USE_NLS)
165
166     gt_cv_have_gettext=no
167
168     CATOBJEXT=NONE
169     XGETTEXT=:
170     INTLLIBS=
171
172     glib_gt_INTL_MACOSX
173
174     AC_CHECK_HEADER(libintl.h,
175      [gt_cv_func_dgettext_libintl="no"
176       libintl_extra_libs=""
177
178       #
179       # First check in libc
180       #
181       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
182         [AC_TRY_LINK([
183 #include <libintl.h>
184 ],
185          [return !ngettext ("","", 1)],
186           gt_cv_func_ngettext_libc=yes,
187           gt_cv_func_ngettext_libc=no)
188         ])
189   
190       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
191               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
192                 [AC_TRY_LINK([
193 #include <libintl.h>
194 ],
195                   [return !dgettext ("","")],
196                   gt_cv_func_dgettext_libc=yes,
197                   gt_cv_func_dgettext_libc=no)
198                 ])
199       fi
200   
201       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
202         AC_CHECK_FUNCS(bind_textdomain_codeset)
203       fi
204
205       #
206       # If we don't have everything we want, check in libintl
207       #
208       if test "$gt_cv_func_dgettext_libc" != "yes" \
209          || test "$gt_cv_func_ngettext_libc" != "yes" \
210          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
211         
212         AC_CHECK_LIB(intl, bindtextdomain,
213             [AC_CHECK_LIB(intl, ngettext,
214                     [AC_CHECK_LIB(intl, dgettext,
215                                   gt_cv_func_dgettext_libintl=yes)])])
216
217         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
218           AC_MSG_CHECKING([if -liconv is needed to use gettext])
219           AC_MSG_RESULT([])
220           AC_CHECK_LIB(intl, ngettext,
221                 [AC_CHECK_LIB(intl, dcgettext,
222                        [gt_cv_func_dgettext_libintl=yes
223                         libintl_extra_libs=-liconv],
224                         :,-liconv)],
225                 :,-liconv)
226         fi
227
228         #
229         # If we found libintl, then check in it for bind_textdomain_codeset();
230         # we'll prefer libc if neither have bind_textdomain_codeset(),
231         # and both have dgettext and ngettext
232         #
233         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
234           glib_save_LIBS="$LIBS"
235           LIBS="$LIBS -lintl $libintl_extra_libs"
236           unset ac_cv_func_bind_textdomain_codeset
237           AC_CHECK_FUNCS(bind_textdomain_codeset)
238           LIBS="$glib_save_LIBS"
239
240           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
241             gt_cv_func_dgettext_libc=no
242           else
243             if test "$gt_cv_func_dgettext_libc" = "yes" \
244                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
245               gt_cv_func_dgettext_libintl=no
246             fi
247           fi
248         fi
249       fi
250
251       if test "$gt_cv_func_dgettext_libc" = "yes" \
252         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
253         gt_cv_have_gettext=yes
254       fi
255   
256       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
257         INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
258       fi
259   
260       if test "$gt_cv_have_gettext" = "yes"; then
261         AC_DEFINE(HAVE_GETTEXT,1,
262           [Define if the GNU gettext() function is already present or preinstalled.])
263         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
264           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
265         if test "$MSGFMT" != "no"; then
266           glib_save_LIBS="$LIBS"
267           LIBS="$LIBS $INTLLIBS"
268           AC_CHECK_FUNCS(dcgettext)
269           MSGFMT_OPTS=
270           AC_MSG_CHECKING([if msgfmt accepts -c])
271           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
272 msgid ""
273 msgstr ""
274 "Content-Type: text/plain; charset=UTF-8\n"
275 "Project-Id-Version: test 1.0\n"
276 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
277 "Last-Translator: test <foo@bar.xx>\n"
278 "Language-Team: C <LL@li.org>\n"
279 "MIME-Version: 1.0\n"
280 "Content-Transfer-Encoding: 8bit\n"
281 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
282           AC_SUBST(MSGFMT_OPTS)
283           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
284           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
285             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
286           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
287                          return _nl_msg_cat_cntr],
288             [CATOBJEXT=.gmo 
289              DATADIRNAME=share],
290             [case $host in
291             *-*-solaris*)
292             dnl On Solaris, if bind_textdomain_codeset is in libc,
293             dnl GNU format message catalog is always supported,
294             dnl since both are added to the libc all together.
295             dnl Hence, we'd like to go with DATADIRNAME=share and
296             dnl and CATOBJEXT=.gmo in this case.
297             AC_CHECK_FUNC(bind_textdomain_codeset,
298               [CATOBJEXT=.gmo 
299                DATADIRNAME=share],
300               [CATOBJEXT=.mo
301                DATADIRNAME=lib])
302             ;;
303             *-*-openbsd*)
304             CATOBJEXT=.mo
305             DATADIRNAME=share
306             ;;
307             *)
308             CATOBJEXT=.mo
309             DATADIRNAME=lib
310             ;;
311             esac])
312           LIBS="$glib_save_LIBS"
313           INSTOBJEXT=.mo
314         else
315           gt_cv_have_gettext=no
316         fi
317       fi
318     ])
319
320     if test "$gt_cv_have_gettext" = "yes" ; then
321       AC_DEFINE(ENABLE_NLS, 1,
322         [always defined to indicate that i18n is enabled])
323     fi
324
325     dnl Test whether we really found GNU xgettext.
326     if test "$XGETTEXT" != ":"; then
327       dnl If it is not GNU xgettext we define it as : so that the
328       dnl Makefiles still can work.
329       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
330         : ;
331       else
332         AC_MSG_RESULT(
333           [found xgettext program is not GNU xgettext; ignore it])
334         XGETTEXT=":"
335       fi
336     fi
337
338     # We need to process the po/ directory.
339     POSUB=po
340
341     AC_OUTPUT_COMMANDS(
342       [case "$CONFIG_FILES" in *po/Makefile.in*)
343         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
344       esac])
345
346     dnl These rules are solely for the distribution goal.  While doing this
347     dnl we only have to keep exactly one list of the available catalogs
348     dnl in configure.ac.
349     for lang in $ALL_LINGUAS; do
350       GMOFILES="$GMOFILES $lang.gmo"
351       POFILES="$POFILES $lang.po"
352     done
353
354     dnl Make all variables we use known to autoconf.
355     AC_SUBST(CATALOGS)
356     AC_SUBST(CATOBJEXT)
357     AC_SUBST(DATADIRNAME)
358     AC_SUBST(GMOFILES)
359     AC_SUBST(INSTOBJEXT)
360     AC_SUBST(INTLLIBS)
361     AC_SUBST(PO_IN_DATADIR_TRUE)
362     AC_SUBST(PO_IN_DATADIR_FALSE)
363     AC_SUBST(POFILES)
364     AC_SUBST(POSUB)
365   ])
366
367 # AM_GLIB_GNU_GETTEXT
368 # -------------------
369 # Do checks necessary for use of gettext. If a suitable implementation 
370 # of gettext is found in either in libintl or in the C library,
371 # it will set INTLLIBS to the libraries needed for use of gettext
372 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
373 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
374 # on various variables needed by the Makefile.in.in installed by 
375 # glib-gettextize.
376 dnl
377 AU_DEFUN([GLIB_GNU_GETTEXT],
378   [AC_REQUIRE([AC_PROG_CC])dnl
379    
380    GLIB_LC_MESSAGES
381    GLIB_WITH_NLS
382
383    if test "$gt_cv_have_gettext" = "yes"; then
384      if test "x$ALL_LINGUAS" = "x"; then
385        LINGUAS=
386      else
387        AC_MSG_CHECKING(for catalogs to be installed)
388        NEW_LINGUAS=
389        for presentlang in $ALL_LINGUAS; do
390          useit=no
391          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
392            desiredlanguages="$LINGUAS"
393          else
394            desiredlanguages="$ALL_LINGUAS"
395          fi
396          for desiredlang in $desiredlanguages; do
397            # Use the presentlang catalog if desiredlang is
398            #   a. equal to presentlang, or
399            #   b. a variant of presentlang (because in this case,
400            #      presentlang can be used as a fallback for messages
401            #      which are not translated in the desiredlang catalog).
402            case "$desiredlang" in
403              "$presentlang"*) useit=yes;;
404            esac
405          done
406          if test $useit = yes; then
407            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
408          fi
409        done
410        LINGUAS=$NEW_LINGUAS
411        AC_MSG_RESULT($LINGUAS)
412      fi
413
414      dnl Construct list of names of catalog files to be constructed.
415      if test -n "$LINGUAS"; then
416        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
417      fi
418    fi
419
420    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
421    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
422    dnl Try to locate is.
423    MKINSTALLDIRS=
424    if test -n "$ac_aux_dir"; then
425      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
426    fi
427    if test -z "$MKINSTALLDIRS"; then
428      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
429    fi
430    AC_SUBST(MKINSTALLDIRS)
431
432    dnl Generate list of files to be processed by xgettext which will
433    dnl be included in po/Makefile.
434    test -d po || mkdir po
435    if test "x$srcdir" != "x."; then
436      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
437        posrcprefix="$srcdir/"
438      else
439        posrcprefix="../$srcdir/"
440      fi
441    else
442      posrcprefix="../"
443    fi
444    rm -f po/POTFILES
445    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
446         < $srcdir/po/POTFILES.in > po/POTFILES
447   ],
448   [[$0: This macro is deprecated. You should use upstream gettext instead.]])
449
450 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
451 # -------------------------------
452 # Define VARIABLE to the location where catalog files will
453 # be installed by po/Makefile.
454 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
455 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
456 glib_save_prefix="$prefix"
457 glib_save_exec_prefix="$exec_prefix"
458 glib_save_datarootdir="$datarootdir"
459 test "x$prefix" = xNONE && prefix=$ac_default_prefix
460 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
461 datarootdir=`eval echo "${datarootdir}"`
462 if test "x$CATOBJEXT" = "x.mo" ; then
463   localedir=`eval echo "${libdir}/locale"`
464 else
465   localedir=`eval echo "${datadir}/locale"`
466 fi
467 prefix="$glib_save_prefix"
468 exec_prefix="$glib_save_exec_prefix"
469 datarootdir="$glib_save_datarootdir"
470 AC_DEFINE_UNQUOTED($1, "$localedir",
471   [Define the location where the catalogs will be installed])
472 ])
473
474 dnl
475 dnl Now the definitions that aclocal will find
476 dnl
477 ifdef(glib_configure_ac,[],[
478 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
479 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
480 ])dnl
481
482 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
483
484 # Create a temporary file with TEST-FILE as its contents and pass the
485 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
486 # 0 and perform ACTION-IF-FAIL for any other exit status.
487 AC_DEFUN([GLIB_RUN_PROG],
488 [cat >conftest.foo <<_ACEOF
489 $2
490 _ACEOF
491 if AC_RUN_LOG([$1 conftest.foo]); then
492   m4_ifval([$3], [$3], [:])
493 m4_ifvaln([$4], [else $4])dnl
494 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
495 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
496 fi])
497
498
499
500 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
501 # serial 42 IT_PROG_INTLTOOL
502 AC_DEFUN([IT_PROG_INTLTOOL], [
503 AC_PREREQ([2.50])dnl
504 AC_REQUIRE([AM_NLS])dnl
505
506 case "$am__api_version" in
507     1.[01234])
508         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
509     ;;
510     *)
511     ;;
512 esac
513
514 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
515 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
516 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
517 if test -n "$1"; then
518     AC_MSG_CHECKING([for intltool >= $1])
519     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
520     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
521         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
522 fi
523
524 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
525 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
526 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
527 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
528     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
529 fi
530
531 if test -z "$AM_DEFAULT_VERBOSITY"; then
532   AM_DEFAULT_VERBOSITY=1
533 fi
534 AC_SUBST([AM_DEFAULT_VERBOSITY])
535
536 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
537 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
538 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
539 AC_SUBST(INTLTOOL_V_MERGE)
540 AC_SUBST(INTLTOOL__v_MERGE_)
541 AC_SUBST(INTLTOOL__v_MERGE_0)
542
543 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
544 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
545 intltool__v_merge_options_0='-q'
546 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
547 AC_SUBST(intltool__v_merge_options_)
548 AC_SUBST(intltool__v_merge_options_0)
549
550   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 $< [$]@' 
551 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 $< [$]@' 
552      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 $< [$]@' 
553      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 $< [$]@' 
554       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 $< [$]@'
555      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 $< [$]@' 
556    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 $< [$]@' 
557     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 $< [$]@' 
558 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 $< [$]@' 
559        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 $< [$]@' 
560       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 $< [$]@' 
561 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
562       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 $< [$]@'
563 else
564       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'
565 fi
566       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 $< [$]@' 
567       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 $< [$]@' 
568     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 $< [$]@' 
569   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 $< [$]@' 
570     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 $< [$]@' 
571     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 $< [$]@'
572    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 $< [$]@'
573
574 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
575 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
576 _IT_SUBST(INTLTOOL_KEYS_RULE)
577 _IT_SUBST(INTLTOOL_PROP_RULE)
578 _IT_SUBST(INTLTOOL_OAF_RULE)
579 _IT_SUBST(INTLTOOL_PONG_RULE)
580 _IT_SUBST(INTLTOOL_SERVER_RULE)
581 _IT_SUBST(INTLTOOL_SHEET_RULE)
582 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
583 _IT_SUBST(INTLTOOL_UI_RULE)
584 _IT_SUBST(INTLTOOL_XAM_RULE)
585 _IT_SUBST(INTLTOOL_KBD_RULE)
586 _IT_SUBST(INTLTOOL_XML_RULE)
587 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
588 _IT_SUBST(INTLTOOL_CAVES_RULE)
589 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
590 _IT_SUBST(INTLTOOL_THEME_RULE)
591 _IT_SUBST(INTLTOOL_SERVICE_RULE)
592 _IT_SUBST(INTLTOOL_POLICY_RULE)
593
594 # Check the gettext tools to make sure they are GNU
595 AC_PATH_PROG(XGETTEXT, xgettext)
596 AC_PATH_PROG(MSGMERGE, msgmerge)
597 AC_PATH_PROG(MSGFMT, msgfmt)
598 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
599 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
600     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
601 fi
602 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
603 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
604 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
605 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
606     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
607 fi
608
609 # Substitute ALL_LINGUAS so we can use it in po/Makefile
610 AC_SUBST(ALL_LINGUAS)
611
612 IT_PO_SUBDIR([po])
613
614 ])
615
616
617 # IT_PO_SUBDIR(DIRNAME)
618 # ---------------------
619 # All po subdirs have to be declared with this macro; the subdir "po" is
620 # declared by IT_PROG_INTLTOOL.
621 #
622 AC_DEFUN([IT_PO_SUBDIR],
623 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
624 dnl
625 dnl The following CONFIG_COMMANDS should be executed at the very end
626 dnl of config.status.
627 AC_CONFIG_COMMANDS_PRE([
628   AC_CONFIG_COMMANDS([$1/stamp-it], [
629     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
630        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
631     fi
632     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
633     >"$1/stamp-it.tmp"
634     [sed '/^#/d
635          s/^[[].*] *//
636          /^[    ]*$/d
637         '"s|^|  $ac_top_srcdir/|" \
638       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
639     ]
640     [sed '/^POTFILES =/,/[^\\]$/ {
641                 /^POTFILES =/!d
642                 r $1/POTFILES
643           }
644          ' "$1/Makefile.in" >"$1/Makefile"]
645     rm -f "$1/Makefile.tmp"
646     mv "$1/stamp-it.tmp" "$1/stamp-it"
647   ])
648 ])dnl
649 ])
650
651 # _IT_SUBST(VARIABLE)
652 # -------------------
653 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
654 #
655 AC_DEFUN([_IT_SUBST],
656 [
657 AC_SUBST([$1])
658 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
659 ]
660 )
661
662 # deprecated macros
663 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
664 # A hint is needed for aclocal from Automake <= 1.9.4:
665 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
666
667
668 # nls.m4 serial 5 (gettext-0.18)
669 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
670 dnl Foundation, Inc.
671 dnl This file is free software; the Free Software Foundation
672 dnl gives unlimited permission to copy and/or distribute it,
673 dnl with or without modifications, as long as this notice is preserved.
674 dnl
675 dnl This file can be used in projects which are not available under
676 dnl the GNU General Public License or the GNU Library General Public
677 dnl License but which still want to provide support for the GNU gettext
678 dnl functionality.
679 dnl Please note that the actual code of the GNU gettext library is covered
680 dnl by the GNU Library General Public License, and the rest of the GNU
681 dnl gettext package is covered by the GNU General Public License.
682 dnl They are *not* in the public domain.
683
684 dnl Authors:
685 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
686 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
687
688 AC_PREREQ([2.50])
689
690 AC_DEFUN([AM_NLS],
691 [
692   AC_MSG_CHECKING([whether NLS is requested])
693   dnl Default is enabled NLS
694   AC_ARG_ENABLE([nls],
695     [  --disable-nls           do not use Native Language Support],
696     USE_NLS=$enableval, USE_NLS=yes)
697   AC_MSG_RESULT([$USE_NLS])
698   AC_SUBST([USE_NLS])
699 ])
700
701 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
702 #
703 # This file is free software; the Free Software Foundation
704 # gives unlimited permission to copy and/or distribute it,
705 # with or without modifications, as long as this notice is preserved.
706
707 # _AM_SUBST_NOTMAKE(VARIABLE)
708 # ---------------------------
709 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
710 # This macro is traced by Automake.
711 AC_DEFUN([_AM_SUBST_NOTMAKE])
712
713 # AM_SUBST_NOTMAKE(VARIABLE)
714 # --------------------------
715 # Public sister of _AM_SUBST_NOTMAKE.
716 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
717