source: trunk/third/gnome-icon-theme/aclocal.m4 @ 20832

Revision 20832, 52.9 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20831, which included commits to RCS files with non-trunk default branches.
Line 
1# generated automatically by aclocal 1.8.2 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4# Free Software Foundation, Inc.
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# Copyright (C) 1995-2002 Free Software Foundation, Inc.
15# Copyright (C) 2001-2003 Red Hat, Inc.
16#
17# This file is free software, distributed under the terms of the GNU
18# General Public License.  As a special exception to the GNU General
19# Public License, this file may be distributed as part of a program
20# that contains a configuration script generated by Autoconf, under
21# the same distribution terms as the rest of that program.
22#
23# This file can be copied and used freely without restrictions.  It can
24# be used in projects which are not available under the GNU Public License
25# but which still want to provide support for the GNU gettext functionality.
26#
27# Macro to add for using GNU gettext.
28# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
29#
30# Modified to never use included libintl.
31# Owen Taylor <otaylor@redhat.com>, 12/15/1998
32#
33# Major rework to remove unused code
34# Owen Taylor <otaylor@redhat.com>, 12/11/2002
35#
36# Added better handling of ALL_LINGUAS from GNU gettext version
37# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
38
39#
40# We need this here as well, since someone might use autoconf-2.5x
41# to configure GLib then an older version to configure a package
42# using AM_GLIB_GNU_GETTEXT
43AC_PREREQ(2.53)
44
45dnl
46dnl We go to great lengths to make sure that aclocal won't
47dnl try to pull in the installed version of these macros
48dnl when running aclocal in the glib directory.
49dnl
50m4_copy([AC_DEFUN],[glib_DEFUN])
51m4_copy([AC_REQUIRE],[glib_REQUIRE])
52dnl
53dnl At the end, if we're not within glib, we'll define the public
54dnl definitions in terms of our private definitions.
55dnl
56
57# GLIB_LC_MESSAGES
58#--------------------
59glib_DEFUN([GLIB_LC_MESSAGES],
60  [AC_CHECK_HEADERS([locale.h])
61    if test $ac_cv_header_locale_h = yes; then
62    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
63      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
64       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
65    if test $am_cv_val_LC_MESSAGES = yes; then
66      AC_DEFINE(HAVE_LC_MESSAGES, 1,
67        [Define if your <locale.h> file defines LC_MESSAGES.])
68    fi
69  fi])
70
71# GLIB_PATH_PROG_WITH_TEST
72#----------------------------
73dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
74dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
75glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
76[# Extract the first word of "$2", so it can be a program name with args.
77set dummy $2; ac_word=[$]2
78AC_MSG_CHECKING([for $ac_word])
79AC_CACHE_VAL(ac_cv_path_$1,
80[case "[$]$1" in
81  /*)
82  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
83  ;;
84  *)
85  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
86  for ac_dir in ifelse([$5], , $PATH, [$5]); do
87    test -z "$ac_dir" && ac_dir=.
88    if test -f $ac_dir/$ac_word; then
89      if [$3]; then
90        ac_cv_path_$1="$ac_dir/$ac_word"
91        break
92      fi
93    fi
94  done
95  IFS="$ac_save_ifs"
96dnl If no 4th arg is given, leave the cache variable unset,
97dnl so AC_PATH_PROGS will keep looking.
98ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
99])dnl
100  ;;
101esac])dnl
102$1="$ac_cv_path_$1"
103if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
104  AC_MSG_RESULT([$]$1)
105else
106  AC_MSG_RESULT(no)
107fi
108AC_SUBST($1)dnl
109])
110
111# GLIB_WITH_NLS
112#-----------------
113glib_DEFUN([GLIB_WITH_NLS],
114  dnl NLS is obligatory
115  [USE_NLS=yes
116    AC_SUBST(USE_NLS)
117
118    gt_cv_have_gettext=no
119
120    CATOBJEXT=NONE
121    XGETTEXT=:
122    INTLLIBS=
123
124    AC_CHECK_HEADER(libintl.h,
125     [gt_cv_func_dgettext_libintl="no"
126      libintl_extra_libs=""
127
128      #
129      # First check in libc
130      #
131      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
132        [AC_TRY_LINK([
133#include <libintl.h>
134],
135          [return (int) dgettext ("","")],
136          gt_cv_func_dgettext_libc=yes,
137          gt_cv_func_dgettext_libc=no)
138        ])
139 
140      if test "$gt_cv_func_dgettext_libc" = "yes" ; then
141        AC_CHECK_FUNCS(bind_textdomain_codeset)
142      fi
143
144      #
145      # If we don't have everything we want, check in libintl
146      #
147      if test "$gt_cv_func_dgettext_libc" != "yes" \
148         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
149       
150        AC_CHECK_LIB(intl, bindtextdomain,
151            [AC_CHECK_LIB(intl, dgettext,
152                          gt_cv_func_dgettext_libintl=yes)])
153
154        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
155          AC_MSG_CHECKING([if -liconv is needed to use gettext])
156          AC_MSG_RESULT([])
157          AC_CHECK_LIB(intl, dcgettext,
158                       [gt_cv_func_dgettext_libintl=yes
159                        libintl_extra_libs=-liconv],
160                        :,-liconv)
161        fi
162
163        #
164        # If we found libintl, then check in it for bind_textdomain_codeset();
165        # we'll prefer libc if neither have bind_textdomain_codeset(),
166        # and both have dgettext
167        #
168        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
169          glib_save_LIBS="$LIBS"
170          LIBS="$LIBS -lintl $libintl_extra_libs"
171          unset ac_cv_func_bind_textdomain_codeset
172          AC_CHECK_FUNCS(bind_textdomain_codeset)
173          LIBS="$glib_save_LIBS"
174
175          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
176            gt_cv_func_dgettext_libc=no
177          else
178            if test "$gt_cv_func_dgettext_libc" = "yes"; then
179              gt_cv_func_dgettext_libintl=no
180            fi
181          fi
182        fi
183      fi
184
185      if test "$gt_cv_func_dgettext_libc" = "yes" \
186        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
187        gt_cv_have_gettext=yes
188      fi
189 
190      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
191        INTLLIBS="-lintl $libintl_extra_libs"
192      fi
193 
194      if test "$gt_cv_have_gettext" = "yes"; then
195        AC_DEFINE(HAVE_GETTEXT,1,
196          [Define if the GNU gettext() function is already present or preinstalled.])
197        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
198          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
199        if test "$MSGFMT" != "no"; then
200          glib_save_LIBS="$LIBS"
201          LIBS="$LIBS $INTLLIBS"
202          AC_CHECK_FUNCS(dcgettext)
203          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
204          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
205            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
206          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
207                         return _nl_msg_cat_cntr],
208            [CATOBJEXT=.gmo
209             DATADIRNAME=share],
210            [case $host in
211            *-*-solaris*)
212            dnl On Solaris, if bind_textdomain_codeset is in libc,
213            dnl GNU format message catalog is always supported,
214            dnl since both are added to the libc all together.
215            dnl Hence, we'd like to go with DATADIRNAME=share and
216            dnl and CATOBJEXT=.gmo in this case.
217            AC_CHECK_FUNC(bind_textdomain_codeset,
218              [CATOBJEXT=.gmo
219               DATADIRNAME=share],
220              [CATOBJEXT=.mo
221               DATADIRNAME=lib])
222            ;;
223            *)
224            CATOBJEXT=.mo
225            DATADIRNAME=lib
226            ;;
227            esac])
228          LIBS="$glib_save_LIBS"
229          INSTOBJEXT=.mo
230        else
231          gt_cv_have_gettext=no
232        fi
233      fi
234    ])
235
236    if test "$gt_cv_have_gettext" = "yes" ; then
237      AC_DEFINE(ENABLE_NLS, 1,
238        [always defined to indicate that i18n is enabled])
239    fi
240
241    dnl Test whether we really found GNU xgettext.
242    if test "$XGETTEXT" != ":"; then
243      dnl If it is not GNU xgettext we define it as : so that the
244      dnl Makefiles still can work.
245      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
246        : ;
247      else
248        AC_MSG_RESULT(
249          [found xgettext program is not GNU xgettext; ignore it])
250        XGETTEXT=":"
251      fi
252    fi
253
254    # We need to process the po/ directory.
255    POSUB=po
256
257    AC_OUTPUT_COMMANDS(
258      [case "$CONFIG_FILES" in *po/Makefile.in*)
259        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
260      esac])
261
262    dnl These rules are solely for the distribution goal.  While doing this
263    dnl we only have to keep exactly one list of the available catalogs
264    dnl in configure.in.
265    for lang in $ALL_LINGUAS; do
266      GMOFILES="$GMOFILES $lang.gmo"
267      POFILES="$POFILES $lang.po"
268    done
269
270    dnl Make all variables we use known to autoconf.
271    AC_SUBST(CATALOGS)
272    AC_SUBST(CATOBJEXT)
273    AC_SUBST(DATADIRNAME)
274    AC_SUBST(GMOFILES)
275    AC_SUBST(INSTOBJEXT)
276    AC_SUBST(INTLLIBS)
277    AC_SUBST(PO_IN_DATADIR_TRUE)
278    AC_SUBST(PO_IN_DATADIR_FALSE)
279    AC_SUBST(POFILES)
280    AC_SUBST(POSUB)
281  ])
282
283# AM_GLIB_GNU_GETTEXT
284# -------------------
285# Do checks necessary for use of gettext. If a suitable implementation
286# of gettext is found in either in libintl or in the C library,
287# it will set INTLLIBS to the libraries needed for use of gettext
288# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
289# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
290# on various variables needed by the Makefile.in.in installed by
291# glib-gettextize.
292dnl
293glib_DEFUN([GLIB_GNU_GETTEXT],
294  [AC_REQUIRE([AC_PROG_CC])dnl
295   AC_REQUIRE([AC_HEADER_STDC])dnl
296   
297   GLIB_LC_MESSAGES
298   GLIB_WITH_NLS
299
300   if test "$gt_cv_have_gettext" = "yes"; then
301     if test "x$ALL_LINGUAS" = "x"; then
302       LINGUAS=
303     else
304       AC_MSG_CHECKING(for catalogs to be installed)
305       NEW_LINGUAS=
306       for presentlang in $ALL_LINGUAS; do
307         useit=no
308         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
309           desiredlanguages="$LINGUAS"
310         else
311           desiredlanguages="$ALL_LINGUAS"
312         fi
313         for desiredlang in $desiredlanguages; do
314           # Use the presentlang catalog if desiredlang is
315           #   a. equal to presentlang, or
316           #   b. a variant of presentlang (because in this case,
317           #      presentlang can be used as a fallback for messages
318           #      which are not translated in the desiredlang catalog).
319           case "$desiredlang" in
320             "$presentlang"*) useit=yes;;
321           esac
322         done
323         if test $useit = yes; then
324           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
325         fi
326       done
327       LINGUAS=$NEW_LINGUAS
328       AC_MSG_RESULT($LINGUAS)
329     fi
330
331     dnl Construct list of names of catalog files to be constructed.
332     if test -n "$LINGUAS"; then
333       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
334     fi
335   fi
336
337   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
338   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
339   dnl Try to locate is.
340   MKINSTALLDIRS=
341   if test -n "$ac_aux_dir"; then
342     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
343   fi
344   if test -z "$MKINSTALLDIRS"; then
345     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
346   fi
347   AC_SUBST(MKINSTALLDIRS)
348
349   dnl Generate list of files to be processed by xgettext which will
350   dnl be included in po/Makefile.
351   test -d po || mkdir po
352   if test "x$srcdir" != "x."; then
353     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
354       posrcprefix="$srcdir/"
355     else
356       posrcprefix="../$srcdir/"
357     fi
358   else
359     posrcprefix="../"
360   fi
361   rm -f po/POTFILES
362   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
363        < $srcdir/po/POTFILES.in > po/POTFILES
364  ])
365
366# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
367# -------------------------------
368# Define VARIABLE to the location where catalog files will
369# be installed by po/Makefile.
370glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
371[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
372glib_save_prefix="$prefix"
373glib_save_exec_prefix="$exec_prefix"
374test "x$prefix" = xNONE && prefix=$ac_default_prefix
375test "x$exec_prefix" = xNONE && exec_prefix=$prefix
376if test "x$CATOBJEXT" = "x.mo" ; then
377  localedir=`eval echo "${libdir}/locale"`
378else
379  localedir=`eval echo "${datadir}/locale"`
380fi
381prefix="$glib_save_prefix"
382exec_prefix="$glib_save_exec_prefix"
383AC_DEFINE_UNQUOTED($1, "$localedir",
384  [Define the location where the catalogs will be installed])
385])
386
387dnl
388dnl Now the definitions that aclocal will find
389dnl
390ifdef(glib_configure_in,[],[
391AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
392AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
393])dnl
394
395ll## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
396
397dnl AC_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
398# serial 1 AC_PROG_INTLTOOL
399AC_DEFUN([AC_PROG_INTLTOOL],
400[
401
402if test -n "$1"; then
403    AC_MSG_CHECKING(for intltool >= $1)
404
405    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
406    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${ac_aux_dir}/intltool-update.in`
407    changequote({{,}})
408    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
409    changequote([,])
410
411    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
412        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
413    else
414        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
415        exit 1
416    fi
417fi
418
419  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
420INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
421     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
422     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
423      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
424     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
425   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
426    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
427INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
428       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
429      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
430      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
431      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
432    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
433  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
434    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
435
436AC_SUBST(INTLTOOL_DESKTOP_RULE)
437AC_SUBST(INTLTOOL_DIRECTORY_RULE)
438AC_SUBST(INTLTOOL_KEYS_RULE)
439AC_SUBST(INTLTOOL_PROP_RULE)
440AC_SUBST(INTLTOOL_OAF_RULE)
441AC_SUBST(INTLTOOL_PONG_RULE)
442AC_SUBST(INTLTOOL_SERVER_RULE)
443AC_SUBST(INTLTOOL_SHEET_RULE)
444AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
445AC_SUBST(INTLTOOL_UI_RULE)
446AC_SUBST(INTLTOOL_XAM_RULE)
447AC_SUBST(INTLTOOL_KBD_RULE)
448AC_SUBST(INTLTOOL_XML_RULE)
449AC_SUBST(INTLTOOL_CAVES_RULE)
450AC_SUBST(INTLTOOL_SCHEMAS_RULE)
451AC_SUBST(INTLTOOL_THEME_RULE)
452
453# Use the tools built into the package, not the ones that are installed.
454
455INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
456INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
457INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
458
459AC_SUBST(INTLTOOL_EXTRACT)
460AC_SUBST(INTLTOOL_MERGE)
461AC_SUBST(INTLTOOL_UPDATE)
462
463AC_PATH_PROG(INTLTOOL_PERL, perl)
464if test -z "$INTLTOOL_PERL"; then
465   AC_MSG_ERROR([perl not found; required for intltool])
466fi
467if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
468   AC_MSG_ERROR([perl 5.x required for intltool])
469fi
470if test "x$2" != "xno-xml"; then
471   AC_MSG_CHECKING([for XML::Parser])
472   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
473       AC_MSG_RESULT([ok])
474   else
475       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
476   fi
477fi
478
479# Remove file type tags (using []) from po/POTFILES.
480
481ifdef([AC_DIVERSION_ICMDS],[
482  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
483      changequote(,)
484      mv -f po/POTFILES po/POTFILES.tmp
485      sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
486      rm -f po/POTFILES.tmp
487      changequote([,])
488  AC_DIVERT_POP()
489],[
490  ifdef([AC_CONFIG_COMMANDS_PRE],[
491    AC_CONFIG_COMMANDS_PRE([
492        changequote(,)
493        mv -f po/POTFILES po/POTFILES.tmp
494        sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
495        rm -f po/POTFILES.tmp
496        changequote([,])
497    ])
498  ])
499])
500
501# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
502
503AC_OUTPUT_COMMANDS([
504
505sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-extract.in > intltool-extract.out
506if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
507  rm -f intltool-extract.out
508else
509  mv -f intltool-extract.out intltool-extract
510fi
511chmod ugo+x intltool-extract
512chmod u+w intltool-extract
513
514sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" \
515    < ${ac_aux_dir}/intltool-merge.in > intltool-merge.out
516if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
517  rm -f intltool-merge.out
518else
519  mv -f intltool-merge.out intltool-merge
520fi
521chmod ugo+x intltool-merge
522chmod u+w intltool-merge
523
524sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-update.in > intltool-update.out
525if cmp -s intltool-update intltool-update.out 2>/dev/null; then
526  rm -f intltool-update.out
527else
528  mv -f intltool-update.out intltool-update
529fi
530chmod ugo+x intltool-update
531chmod u+w intltool-update
532
533], INTLTOOL_PERL=${INTLTOOL_PERL} ac_aux_dir=${ac_aux_dir})
534
535])
536
537#                                                        -*- Autoconf -*-
538# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
539# Generated from amversion.in; do not edit by hand.
540
541# This program is free software; you can redistribute it and/or modify
542# it under the terms of the GNU General Public License as published by
543# the Free Software Foundation; either version 2, or (at your option)
544# any later version.
545
546# This program is distributed in the hope that it will be useful,
547# but WITHOUT ANY WARRANTY; without even the implied warranty of
548# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
549# GNU General Public License for more details.
550
551# You should have received a copy of the GNU General Public License
552# along with this program; if not, write to the Free Software
553# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
554
555# AM_AUTOMAKE_VERSION(VERSION)
556# ----------------------------
557# Automake X.Y traces this macro to ensure aclocal.m4 has been
558# generated from the m4 files accompanying Automake X.Y.
559AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
560
561# AM_SET_CURRENT_AUTOMAKE_VERSION
562# -------------------------------
563# Call AM_AUTOMAKE_VERSION so it can be traced.
564# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
565AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
566         [AM_AUTOMAKE_VERSION([1.8.2])])
567
568# AM_AUX_DIR_EXPAND
569
570# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
571
572# This program is free software; you can redistribute it and/or modify
573# it under the terms of the GNU General Public License as published by
574# the Free Software Foundation; either version 2, or (at your option)
575# any later version.
576
577# This program is distributed in the hope that it will be useful,
578# but WITHOUT ANY WARRANTY; without even the implied warranty of
579# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
580# GNU General Public License for more details.
581
582# You should have received a copy of the GNU General Public License
583# along with this program; if not, write to the Free Software
584# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
585# 02111-1307, USA.
586
587# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
588# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
589# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
590#
591# Of course, Automake must honor this variable whenever it calls a
592# tool from the auxiliary directory.  The problem is that $srcdir (and
593# therefore $ac_aux_dir as well) can be either absolute or relative,
594# depending on how configure is run.  This is pretty annoying, since
595# it makes $ac_aux_dir quite unusable in subdirectories: in the top
596# source directory, any form will work fine, but in subdirectories a
597# relative path needs to be adjusted first.
598#
599# $ac_aux_dir/missing
600#    fails when called from a subdirectory if $ac_aux_dir is relative
601# $top_srcdir/$ac_aux_dir/missing
602#    fails if $ac_aux_dir is absolute,
603#    fails when called from a subdirectory in a VPATH build with
604#          a relative $ac_aux_dir
605#
606# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
607# are both prefixed by $srcdir.  In an in-source build this is usually
608# harmless because $srcdir is `.', but things will broke when you
609# start a VPATH build or use an absolute $srcdir.
610#
611# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
612# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
613#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
614# and then we would define $MISSING as
615#   MISSING="\${SHELL} $am_aux_dir/missing"
616# This will work as long as MISSING is not called from configure, because
617# unfortunately $(top_srcdir) has no meaning in configure.
618# However there are other variables, like CC, which are often used in
619# configure, and could therefore not use this "fixed" $ac_aux_dir.
620#
621# Another solution, used here, is to always expand $ac_aux_dir to an
622# absolute PATH.  The drawback is that using absolute paths prevent a
623# configured tree to be moved without reconfiguration.
624
625AC_DEFUN([AM_AUX_DIR_EXPAND],
626[dnl Rely on autoconf to set up CDPATH properly.
627AC_PREREQ([2.50])dnl
628# expand $ac_aux_dir to an absolute path
629am_aux_dir=`cd $ac_aux_dir && pwd`
630])
631
632# AM_CONDITIONAL                                              -*- Autoconf -*-
633
634# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
635
636# This program is free software; you can redistribute it and/or modify
637# it under the terms of the GNU General Public License as published by
638# the Free Software Foundation; either version 2, or (at your option)
639# any later version.
640
641# This program is distributed in the hope that it will be useful,
642# but WITHOUT ANY WARRANTY; without even the implied warranty of
643# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
644# GNU General Public License for more details.
645
646# You should have received a copy of the GNU General Public License
647# along with this program; if not, write to the Free Software
648# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
649# 02111-1307, USA.
650
651# serial 6
652
653# AM_CONDITIONAL(NAME, SHELL-CONDITION)
654# -------------------------------------
655# Define a conditional.
656AC_DEFUN([AM_CONDITIONAL],
657[AC_PREREQ(2.52)dnl
658 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
659        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
660AC_SUBST([$1_TRUE])
661AC_SUBST([$1_FALSE])
662if $2; then
663  $1_TRUE=
664  $1_FALSE='#'
665else
666  $1_TRUE='#'
667  $1_FALSE=
668fi
669AC_CONFIG_COMMANDS_PRE(
670[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
671  AC_MSG_ERROR([conditional "$1" was never defined.
672Usually this means the macro was only invoked conditionally.])
673fi])])
674
675# serial 6                                              -*- Autoconf -*-
676
677# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
678# Free Software Foundation, Inc.
679
680# This program is free software; you can redistribute it and/or modify
681# it under the terms of the GNU General Public License as published by
682# the Free Software Foundation; either version 2, or (at your option)
683# any later version.
684
685# This program is distributed in the hope that it will be useful,
686# but WITHOUT ANY WARRANTY; without even the implied warranty of
687# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
688# GNU General Public License for more details.
689
690# You should have received a copy of the GNU General Public License
691# along with this program; if not, write to the Free Software
692# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
693# 02111-1307, USA.
694
695
696# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
697# written in clear, in which case automake, when reading aclocal.m4,
698# will think it sees a *use*, and therefore will trigger all it's
699# C support machinery.  Also note that it means that autoscan, seeing
700# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
701
702
703
704# _AM_DEPENDENCIES(NAME)
705# ----------------------
706# See how the compiler implements dependency checking.
707# NAME is "CC", "CXX", "GCJ", or "OBJC".
708# We try a few techniques and use that to set a single cache variable.
709#
710# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
711# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
712# dependency, and given that the user is not expected to run this macro,
713# just rely on AC_PROG_CC.
714AC_DEFUN([_AM_DEPENDENCIES],
715[AC_REQUIRE([AM_SET_DEPDIR])dnl
716AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
717AC_REQUIRE([AM_MAKE_INCLUDE])dnl
718AC_REQUIRE([AM_DEP_TRACK])dnl
719
720ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
721       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
722       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
723       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
724                   [depcc="$$1"   am_compiler_list=])
725
726AC_CACHE_CHECK([dependency style of $depcc],
727               [am_cv_$1_dependencies_compiler_type],
728[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
729  # We make a subdir and do the tests there.  Otherwise we can end up
730  # making bogus files that we don't know about and never remove.  For
731  # instance it was reported that on HP-UX the gcc test will end up
732  # making a dummy file named `D' -- because `-MD' means `put the output
733  # in D'.
734  mkdir conftest.dir
735  # Copy depcomp to subdir because otherwise we won't find it if we're
736  # using a relative directory.
737  cp "$am_depcomp" conftest.dir
738  cd conftest.dir
739  # We will build objects and dependencies in a subdirectory because
740  # it helps to detect inapplicable dependency modes.  For instance
741  # both Tru64's cc and ICC support -MD to output dependencies as a
742  # side effect of compilation, but ICC will put the dependencies in
743  # the current directory while Tru64 will put them in the object
744  # directory.
745  mkdir sub
746
747  am_cv_$1_dependencies_compiler_type=none
748  if test "$am_compiler_list" = ""; then
749     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
750  fi
751  for depmode in $am_compiler_list; do
752    # Setup a source with many dependencies, because some compilers
753    # like to wrap large dependency lists on column 80 (with \), and
754    # we should not choose a depcomp mode which is confused by this.
755    #
756    # We need to recreate these files for each test, as the compiler may
757    # overwrite some of them when testing with obscure command lines.
758    # This happens at least with the AIX C compiler.
759    : > sub/conftest.c
760    for i in 1 2 3 4 5 6; do
761      echo '#include "conftst'$i'.h"' >> sub/conftest.c
762      : > sub/conftst$i.h
763    done
764    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
765
766    case $depmode in
767    nosideeffect)
768      # after this tag, mechanisms are not by side-effect, so they'll
769      # only be used when explicitly requested
770      if test "x$enable_dependency_tracking" = xyes; then
771        continue
772      else
773        break
774      fi
775      ;;
776    none) break ;;
777    esac
778    # We check with `-c' and `-o' for the sake of the "dashmstdout"
779    # mode.  It turns out that the SunPro C++ compiler does not properly
780    # handle `-M -o', and we need to detect this.
781    if depmode=$depmode \
782       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
783       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
784       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
785         >/dev/null 2>conftest.err &&
786       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
787       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
788       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
789      # icc doesn't choke on unknown options, it will just issue warnings
790      # (even with -Werror).  So we grep stderr for any message
791      # that says an option was ignored.
792      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
793        am_cv_$1_dependencies_compiler_type=$depmode
794        break
795      fi
796    fi
797  done
798
799  cd ..
800  rm -rf conftest.dir
801else
802  am_cv_$1_dependencies_compiler_type=none
803fi
804])
805AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
806AM_CONDITIONAL([am__fastdep$1], [
807  test "x$enable_dependency_tracking" != xno \
808  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
809])
810
811
812# AM_SET_DEPDIR
813# -------------
814# Choose a directory name for dependency files.
815# This macro is AC_REQUIREd in _AM_DEPENDENCIES
816AC_DEFUN([AM_SET_DEPDIR],
817[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
818AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
819])
820
821
822# AM_DEP_TRACK
823# ------------
824AC_DEFUN([AM_DEP_TRACK],
825[AC_ARG_ENABLE(dependency-tracking,
826[  --disable-dependency-tracking  speeds up one-time build
827  --enable-dependency-tracking   do not reject slow dependency extractors])
828if test "x$enable_dependency_tracking" != xno; then
829  am_depcomp="$ac_aux_dir/depcomp"
830  AMDEPBACKSLASH='\'
831fi
832AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
833AC_SUBST([AMDEPBACKSLASH])
834])
835
836# Generate code to set up dependency tracking.   -*- Autoconf -*-
837
838# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
839
840# This program is free software; you can redistribute it and/or modify
841# it under the terms of the GNU General Public License as published by
842# the Free Software Foundation; either version 2, or (at your option)
843# any later version.
844
845# This program is distributed in the hope that it will be useful,
846# but WITHOUT ANY WARRANTY; without even the implied warranty of
847# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
848# GNU General Public License for more details.
849
850# You should have received a copy of the GNU General Public License
851# along with this program; if not, write to the Free Software
852# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
853# 02111-1307, USA.
854
855#serial 2
856
857# _AM_OUTPUT_DEPENDENCY_COMMANDS
858# ------------------------------
859AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
860[for mf in $CONFIG_FILES; do
861  # Strip MF so we end up with the name of the file.
862  mf=`echo "$mf" | sed -e 's/:.*$//'`
863  # Check whether this is an Automake generated Makefile or not.
864  # We used to match only the files named `Makefile.in', but
865  # some people rename them; so instead we look at the file content.
866  # Grep'ing the first line is not enough: some people post-process
867  # each Makefile.in and add a new line on top of each file to say so.
868  # So let's grep whole file.
869  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
870    dirpart=`AS_DIRNAME("$mf")`
871  else
872    continue
873  fi
874  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
875  # Extract the definition of DEP_FILES from the Makefile without
876  # running `make'.
877  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
878  test -z "$DEPDIR" && continue
879  # When using ansi2knr, U may be empty or an underscore; expand it
880  U=`sed -n -e '/^U = / s///p' < "$mf"`
881  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
882  # We invoke sed twice because it is the simplest approach to
883  # changing $(DEPDIR) to its actual value in the expansion.
884  for file in `sed -n -e '
885    /^DEP_FILES = .*\\\\$/ {
886      s/^DEP_FILES = //
887      :loop
888        s/\\\\$//
889        p
890        n
891        /\\\\$/ b loop
892      p
893    }
894    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
895       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
896    # Make sure the directory exists.
897    test -f "$dirpart/$file" && continue
898    fdir=`AS_DIRNAME(["$file"])`
899    AS_MKDIR_P([$dirpart/$fdir])
900    # echo "creating $dirpart/$file"
901    echo '# dummy' > "$dirpart/$file"
902  done
903done
904])# _AM_OUTPUT_DEPENDENCY_COMMANDS
905
906
907# AM_OUTPUT_DEPENDENCY_COMMANDS
908# -----------------------------
909# This macro should only be invoked once -- use via AC_REQUIRE.
910#
911# This code is only required when automatic dependency tracking
912# is enabled.  FIXME.  This creates each `.P' file that we will
913# need in order to bootstrap the dependency handling code.
914AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
915[AC_CONFIG_COMMANDS([depfiles],
916     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
917     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
918])
919
920# Do all the work for Automake.                            -*- Autoconf -*-
921
922# This macro actually does too much some checks are only needed if
923# your package does certain things.  But this isn't really a big deal.
924
925# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
926# Free Software Foundation, Inc.
927
928# This program is free software; you can redistribute it and/or modify
929# it under the terms of the GNU General Public License as published by
930# the Free Software Foundation; either version 2, or (at your option)
931# any later version.
932
933# This program is distributed in the hope that it will be useful,
934# but WITHOUT ANY WARRANTY; without even the implied warranty of
935# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
936# GNU General Public License for more details.
937
938# You should have received a copy of the GNU General Public License
939# along with this program; if not, write to the Free Software
940# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
941# 02111-1307, USA.
942
943# serial 11
944
945# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
946# AM_INIT_AUTOMAKE([OPTIONS])
947# -----------------------------------------------
948# The call with PACKAGE and VERSION arguments is the old style
949# call (pre autoconf-2.50), which is being phased out.  PACKAGE
950# and VERSION should now be passed to AC_INIT and removed from
951# the call to AM_INIT_AUTOMAKE.
952# We support both call styles for the transition.  After
953# the next Automake release, Autoconf can make the AC_INIT
954# arguments mandatory, and then we can depend on a new Autoconf
955# release and drop the old call support.
956AC_DEFUN([AM_INIT_AUTOMAKE],
957[AC_PREREQ([2.58])dnl
958dnl Autoconf wants to disallow AM_ names.  We explicitly allow
959dnl the ones we care about.
960m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
961AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
962AC_REQUIRE([AC_PROG_INSTALL])dnl
963# test to see if srcdir already configured
964if test "`cd $srcdir && pwd`" != "`pwd`" &&
965   test -f $srcdir/config.status; then
966  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
967fi
968
969# test whether we have cygpath
970if test -z "$CYGPATH_W"; then
971  if (cygpath --version) >/dev/null 2>/dev/null; then
972    CYGPATH_W='cygpath -w'
973  else
974    CYGPATH_W=echo
975  fi
976fi
977AC_SUBST([CYGPATH_W])
978
979# Define the identity of the package.
980dnl Distinguish between old-style and new-style calls.
981m4_ifval([$2],
982[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
983 AC_SUBST([PACKAGE], [$1])dnl
984 AC_SUBST([VERSION], [$2])],
985[_AM_SET_OPTIONS([$1])dnl
986 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
987 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
988
989_AM_IF_OPTION([no-define],,
990[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
991 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
992
993# Some tools Automake needs.
994AC_REQUIRE([AM_SANITY_CHECK])dnl
995AC_REQUIRE([AC_ARG_PROGRAM])dnl
996AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
997AM_MISSING_PROG(AUTOCONF, autoconf)
998AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
999AM_MISSING_PROG(AUTOHEADER, autoheader)
1000AM_MISSING_PROG(MAKEINFO, makeinfo)
1001AM_MISSING_PROG(AMTAR, tar)
1002AM_PROG_INSTALL_SH
1003AM_PROG_INSTALL_STRIP
1004AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1005# We need awk for the "check" target.  The system "awk" is bad on
1006# some platforms.
1007AC_REQUIRE([AC_PROG_AWK])dnl
1008AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1009AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1010
1011_AM_IF_OPTION([no-dependencies],,
1012[AC_PROVIDE_IFELSE([AC_PROG_CC],
1013                  [_AM_DEPENDENCIES(CC)],
1014                  [define([AC_PROG_CC],
1015                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1016AC_PROVIDE_IFELSE([AC_PROG_CXX],
1017                  [_AM_DEPENDENCIES(CXX)],
1018                  [define([AC_PROG_CXX],
1019                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1020])
1021])
1022
1023
1024# When config.status generates a header, we must update the stamp-h file.
1025# This file resides in the same directory as the config header
1026# that is generated.  The stamp files are numbered to have different names.
1027
1028# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1029# loop where config.status creates the headers, so we can generate
1030# our stamp files there.
1031AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1032[# Compute $1's index in $config_headers.
1033_am_stamp_count=1
1034for _am_header in $config_headers :; do
1035  case $_am_header in
1036    $1 | $1:* )
1037      break ;;
1038    * )
1039      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1040  esac
1041done
1042echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1043
1044# AM_PROG_INSTALL_SH
1045# ------------------
1046# Define $install_sh.
1047
1048# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1049
1050# This program is free software; you can redistribute it and/or modify
1051# it under the terms of the GNU General Public License as published by
1052# the Free Software Foundation; either version 2, or (at your option)
1053# any later version.
1054
1055# This program is distributed in the hope that it will be useful,
1056# but WITHOUT ANY WARRANTY; without even the implied warranty of
1057# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1058# GNU General Public License for more details.
1059
1060# You should have received a copy of the GNU General Public License
1061# along with this program; if not, write to the Free Software
1062# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1063# 02111-1307, USA.
1064
1065AC_DEFUN([AM_PROG_INSTALL_SH],
1066[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1067install_sh=${install_sh-"$am_aux_dir/install-sh"}
1068AC_SUBST(install_sh)])
1069
1070#                                                          -*- Autoconf -*-
1071# Copyright (C) 2003  Free Software Foundation, Inc.
1072
1073# This program is free software; you can redistribute it and/or modify
1074# it under the terms of the GNU General Public License as published by
1075# the Free Software Foundation; either version 2, or (at your option)
1076# any later version.
1077
1078# This program is distributed in the hope that it will be useful,
1079# but WITHOUT ANY WARRANTY; without even the implied warranty of
1080# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1081# GNU General Public License for more details.
1082
1083# You should have received a copy of the GNU General Public License
1084# along with this program; if not, write to the Free Software
1085# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1086# 02111-1307, USA.
1087
1088# serial 1
1089
1090# Check whether the underlying file-system supports filenames
1091# with a leading dot.  For instance MS-DOS doesn't.
1092AC_DEFUN([AM_SET_LEADING_DOT],
1093[rm -rf .tst 2>/dev/null
1094mkdir .tst 2>/dev/null
1095if test -d .tst; then
1096  am__leading_dot=.
1097else
1098  am__leading_dot=_
1099fi
1100rmdir .tst 2>/dev/null
1101AC_SUBST([am__leading_dot])])
1102
1103# Add --enable-maintainer-mode option to configure.
1104# From Jim Meyering
1105
1106# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
1107# Free Software Foundation, Inc.
1108
1109# This program is free software; you can redistribute it and/or modify
1110# it under the terms of the GNU General Public License as published by
1111# the Free Software Foundation; either version 2, or (at your option)
1112# any later version.
1113
1114# This program is distributed in the hope that it will be useful,
1115# but WITHOUT ANY WARRANTY; without even the implied warranty of
1116# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1117# GNU General Public License for more details.
1118
1119# You should have received a copy of the GNU General Public License
1120# along with this program; if not, write to the Free Software
1121# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1122# 02111-1307, USA.
1123
1124# serial 3
1125
1126AC_DEFUN([AM_MAINTAINER_MODE],
1127[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1128  dnl maintainer-mode is disabled by default
1129  AC_ARG_ENABLE(maintainer-mode,
1130[  --enable-maintainer-mode  enable make rules and dependencies not useful
1131                          (and sometimes confusing) to the casual installer],
1132      USE_MAINTAINER_MODE=$enableval,
1133      USE_MAINTAINER_MODE=no)
1134  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1135  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1136  MAINT=$MAINTAINER_MODE_TRUE
1137  AC_SUBST(MAINT)dnl
1138]
1139)
1140
1141AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1142
1143# Check to see how 'make' treats includes.      -*- Autoconf -*-
1144
1145# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1146
1147# This program is free software; you can redistribute it and/or modify
1148# it under the terms of the GNU General Public License as published by
1149# the Free Software Foundation; either version 2, or (at your option)
1150# any later version.
1151
1152# This program is distributed in the hope that it will be useful,
1153# but WITHOUT ANY WARRANTY; without even the implied warranty of
1154# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1155# GNU General Public License for more details.
1156
1157# You should have received a copy of the GNU General Public License
1158# along with this program; if not, write to the Free Software
1159# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1160# 02111-1307, USA.
1161
1162# serial 2
1163
1164# AM_MAKE_INCLUDE()
1165# -----------------
1166# Check to see how make treats includes.
1167AC_DEFUN([AM_MAKE_INCLUDE],
1168[am_make=${MAKE-make}
1169cat > confinc << 'END'
1170am__doit:
1171        @echo done
1172.PHONY: am__doit
1173END
1174# If we don't find an include directive, just comment out the code.
1175AC_MSG_CHECKING([for style of include used by $am_make])
1176am__include="#"
1177am__quote=
1178_am_result=none
1179# First try GNU make style include.
1180echo "include confinc" > confmf
1181# We grep out `Entering directory' and `Leaving directory'
1182# messages which can occur if `w' ends up in MAKEFLAGS.
1183# In particular we don't look at `^make:' because GNU make might
1184# be invoked under some other name (usually "gmake"), in which
1185# case it prints its new name instead of `make'.
1186if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1187   am__include=include
1188   am__quote=
1189   _am_result=GNU
1190fi
1191# Now try BSD make style include.
1192if test "$am__include" = "#"; then
1193   echo '.include "confinc"' > confmf
1194   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1195      am__include=.include
1196      am__quote="\""
1197      _am_result=BSD
1198   fi
1199fi
1200AC_SUBST([am__include])
1201AC_SUBST([am__quote])
1202AC_MSG_RESULT([$_am_result])
1203rm -f confinc confmf
1204])
1205
1206#  -*- Autoconf -*-
1207
1208
1209# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
1210
1211# This program is free software; you can redistribute it and/or modify
1212# it under the terms of the GNU General Public License as published by
1213# the Free Software Foundation; either version 2, or (at your option)
1214# any later version.
1215
1216# This program is distributed in the hope that it will be useful,
1217# but WITHOUT ANY WARRANTY; without even the implied warranty of
1218# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1219# GNU General Public License for more details.
1220
1221# You should have received a copy of the GNU General Public License
1222# along with this program; if not, write to the Free Software
1223# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1224# 02111-1307, USA.
1225
1226# serial 3
1227
1228# AM_MISSING_PROG(NAME, PROGRAM)
1229# ------------------------------
1230AC_DEFUN([AM_MISSING_PROG],
1231[AC_REQUIRE([AM_MISSING_HAS_RUN])
1232$1=${$1-"${am_missing_run}$2"}
1233AC_SUBST($1)])
1234
1235
1236# AM_MISSING_HAS_RUN
1237# ------------------
1238# Define MISSING if not defined so far and test if it supports --run.
1239# If it does, set am_missing_run to use it, otherwise, to nothing.
1240AC_DEFUN([AM_MISSING_HAS_RUN],
1241[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1242test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1243# Use eval to expand $SHELL
1244if eval "$MISSING --run true"; then
1245  am_missing_run="$MISSING --run "
1246else
1247  am_missing_run=
1248  AC_MSG_WARN([`missing' script is too old or missing])
1249fi
1250])
1251
1252# AM_PROG_MKDIR_P
1253# ---------------
1254# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
1255
1256# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
1257
1258# This program is free software; you can redistribute it and/or modify
1259# it under the terms of the GNU General Public License as published by
1260# the Free Software Foundation; either version 2, or (at your option)
1261# any later version.
1262
1263# This program is distributed in the hope that it will be useful,
1264# but WITHOUT ANY WARRANTY; without even the implied warranty of
1265# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1266# GNU General Public License for more details.
1267
1268# You should have received a copy of the GNU General Public License
1269# along with this program; if not, write to the Free Software
1270# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1271# 02111-1307, USA.
1272
1273# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
1274# created by `make install' are always world readable, even if the
1275# installer happens to have an overly restrictive umask (e.g. 077).
1276# This was a mistake.  There are at least two reasons why we must not
1277# use `-m 0755':
1278#   - it causes special bits like SGID to be ignored,
1279#   - it may be too restrictive (some setups expect 775 directories).
1280#
1281# Do not use -m 0755 and let people choose whatever they expect by
1282# setting umask.
1283AC_DEFUN([AM_PROG_MKDIR_P],
1284[if mkdir -p -- . 2>/dev/null; then
1285  # Keeping the `.' argument allows $(mkdir_p) to be used without
1286  # argument.  Indeed, we sometimes output rules like
1287  #   $(mkdir_p) $(somedir)
1288  # where $(somedir) is conditionally defined.
1289  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
1290  # expensive solution, as it forces Make to start a sub-shell.)
1291  mkdir_p='mkdir -p -- .'
1292else
1293  # On NextStep and OpenStep, the `mkdir' command does not
1294  # recognize any option.  It will interpret all options as
1295  # directories to create, and then abort because `.' already
1296  # exists.
1297  for d in ./-p ./--;
1298  do
1299    test -d $d && rmdir $d
1300  done
1301  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1302  if test -f "$ac_aux_dir/mkinstalldirs"; then
1303    mkdir_p='$(mkinstalldirs)'
1304  else
1305    mkdir_p='$(install_sh) -d'
1306  fi
1307fi
1308AC_SUBST([mkdir_p])])
1309
1310# Helper functions for option handling.                    -*- Autoconf -*-
1311
1312# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
1313
1314# This program is free software; you can redistribute it and/or modify
1315# it under the terms of the GNU General Public License as published by
1316# the Free Software Foundation; either version 2, or (at your option)
1317# any later version.
1318
1319# This program is distributed in the hope that it will be useful,
1320# but WITHOUT ANY WARRANTY; without even the implied warranty of
1321# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1322# GNU General Public License for more details.
1323
1324# You should have received a copy of the GNU General Public License
1325# along with this program; if not, write to the Free Software
1326# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1327# 02111-1307, USA.
1328
1329# serial 2
1330
1331# _AM_MANGLE_OPTION(NAME)
1332# -----------------------
1333AC_DEFUN([_AM_MANGLE_OPTION],
1334[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1335
1336# _AM_SET_OPTION(NAME)
1337# ------------------------------
1338# Set option NAME.  Presently that only means defining a flag for this option.
1339AC_DEFUN([_AM_SET_OPTION],
1340[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1341
1342# _AM_SET_OPTIONS(OPTIONS)
1343# ----------------------------------
1344# OPTIONS is a space-separated list of Automake options.
1345AC_DEFUN([_AM_SET_OPTIONS],
1346[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1347
1348# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1349# -------------------------------------------
1350# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1351AC_DEFUN([_AM_IF_OPTION],
1352[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1353
1354#
1355# Check to make sure that the build environment is sane.
1356#
1357
1358# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
1359
1360# This program is free software; you can redistribute it and/or modify
1361# it under the terms of the GNU General Public License as published by
1362# the Free Software Foundation; either version 2, or (at your option)
1363# any later version.
1364
1365# This program is distributed in the hope that it will be useful,
1366# but WITHOUT ANY WARRANTY; without even the implied warranty of
1367# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1368# GNU General Public License for more details.
1369
1370# You should have received a copy of the GNU General Public License
1371# along with this program; if not, write to the Free Software
1372# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1373# 02111-1307, USA.
1374
1375# serial 3
1376
1377# AM_SANITY_CHECK
1378# ---------------
1379AC_DEFUN([AM_SANITY_CHECK],
1380[AC_MSG_CHECKING([whether build environment is sane])
1381# Just in case
1382sleep 1
1383echo timestamp > conftest.file
1384# Do `set' in a subshell so we don't clobber the current shell's
1385# arguments.  Must try -L first in case configure is actually a
1386# symlink; some systems play weird games with the mod time of symlinks
1387# (eg FreeBSD returns the mod time of the symlink's containing
1388# directory).
1389if (
1390   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1391   if test "$[*]" = "X"; then
1392      # -L didn't work.
1393      set X `ls -t $srcdir/configure conftest.file`
1394   fi
1395   rm -f conftest.file
1396   if test "$[*]" != "X $srcdir/configure conftest.file" \
1397      && test "$[*]" != "X conftest.file $srcdir/configure"; then
1398
1399      # If neither matched, then we have a broken ls.  This can happen
1400      # if, for instance, CONFIG_SHELL is bash and it inherits a
1401      # broken ls alias from the environment.  This has actually
1402      # happened.  Such a system could not be considered "sane".
1403      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1404alias in your environment])
1405   fi
1406
1407   test "$[2]" = conftest.file
1408   )
1409then
1410   # Ok.
1411   :
1412else
1413   AC_MSG_ERROR([newly created file is older than distributed files!
1414Check your system clock])
1415fi
1416AC_MSG_RESULT(yes)])
1417
1418# AM_PROG_INSTALL_STRIP
1419
1420# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1421
1422# This program is free software; you can redistribute it and/or modify
1423# it under the terms of the GNU General Public License as published by
1424# the Free Software Foundation; either version 2, or (at your option)
1425# any later version.
1426
1427# This program is distributed in the hope that it will be useful,
1428# but WITHOUT ANY WARRANTY; without even the implied warranty of
1429# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1430# GNU General Public License for more details.
1431
1432# You should have received a copy of the GNU General Public License
1433# along with this program; if not, write to the Free Software
1434# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1435# 02111-1307, USA.
1436
1437# One issue with vendor `install' (even GNU) is that you can't
1438# specify the program used to strip binaries.  This is especially
1439# annoying in cross-compiling environments, where the build's strip
1440# is unlikely to handle the host's binaries.
1441# Fortunately install-sh will honor a STRIPPROG variable, so we
1442# always use install-sh in `make install-strip', and initialize
1443# STRIPPROG with the value of the STRIP variable (set by the user).
1444AC_DEFUN([AM_PROG_INSTALL_STRIP],
1445[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1446# Installed binaries are usually stripped using `strip' when the user
1447# run `make install-strip'.  However `strip' might not be the right
1448# tool to use in cross-compilation environments, therefore Automake
1449# will honor the `STRIP' environment variable to overrule this program.
1450dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1451if test "$cross_compiling" != no; then
1452  AC_CHECK_TOOL([STRIP], [strip], :)
1453fi
1454INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1455AC_SUBST([INSTALL_STRIP_PROGRAM])])
1456
Note: See TracBrowser for help on using the repository browser.