added io
[gpiv.git] / aclocal.m4
blobff164b0457ee9123bfa35bfb5ab55cc99e012111
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005  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.
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.
14 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
15 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
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.
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.
27 # Macro to add for using GNU gettext.
28 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
30 # Modified to never use included libintl. 
31 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
33 # Major rework to remove unused code
34 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
36 # Added better handling of ALL_LINGUAS from GNU gettext version 
37 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
39 # Modified to require ngettext
40 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
42 # We need this here as well, since someone might use autoconf-2.5x
43 # to configure GLib then an older version to configure a package
44 # using AM_GLIB_GNU_GETTEXT
45 AC_PREREQ(2.53)
47 dnl
48 dnl We go to great lengths to make sure that aclocal won't 
49 dnl try to pull in the installed version of these macros
50 dnl when running aclocal in the glib directory.
51 dnl
52 m4_copy([AC_DEFUN],[glib_DEFUN])
53 m4_copy([AC_REQUIRE],[glib_REQUIRE])
54 dnl
55 dnl At the end, if we're not within glib, we'll define the public
56 dnl definitions in terms of our private definitions.
57 dnl
59 # GLIB_LC_MESSAGES
60 #--------------------
61 glib_DEFUN([GLIB_LC_MESSAGES],
62   [AC_CHECK_HEADERS([locale.h])
63     if test $ac_cv_header_locale_h = yes; then
64     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
65       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
66        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
67     if test $am_cv_val_LC_MESSAGES = yes; then
68       AC_DEFINE(HAVE_LC_MESSAGES, 1,
69         [Define if your <locale.h> file defines LC_MESSAGES.])
70     fi
71   fi])
73 # GLIB_PATH_PROG_WITH_TEST
74 #----------------------------
75 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
76 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
77 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
78 [# Extract the first word of "$2", so it can be a program name with args.
79 set dummy $2; ac_word=[$]2
80 AC_MSG_CHECKING([for $ac_word])
81 AC_CACHE_VAL(ac_cv_path_$1,
82 [case "[$]$1" in
83   /*)
84   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
85   ;;
86   *)
87   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
88   for ac_dir in ifelse([$5], , $PATH, [$5]); do
89     test -z "$ac_dir" && ac_dir=.
90     if test -f $ac_dir/$ac_word; then
91       if [$3]; then
92         ac_cv_path_$1="$ac_dir/$ac_word"
93         break
94       fi
95     fi
96   done
97   IFS="$ac_save_ifs"
98 dnl If no 4th arg is given, leave the cache variable unset,
99 dnl so AC_PATH_PROGS will keep looking.
100 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
101 ])dnl
102   ;;
103 esac])dnl
104 $1="$ac_cv_path_$1"
105 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
106   AC_MSG_RESULT([$]$1)
107 else
108   AC_MSG_RESULT(no)
110 AC_SUBST($1)dnl
113 # GLIB_WITH_NLS
114 #-----------------
115 glib_DEFUN([GLIB_WITH_NLS],
116   dnl NLS is obligatory
117   [USE_NLS=yes
118     AC_SUBST(USE_NLS)
120     gt_cv_have_gettext=no
122     CATOBJEXT=NONE
123     XGETTEXT=:
124     INTLLIBS=
126     AC_CHECK_HEADER(libintl.h,
127      [gt_cv_func_dgettext_libintl="no"
128       libintl_extra_libs=""
130       #
131       # First check in libc
132       #
133       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
134         [AC_TRY_LINK([
135 #include <libintl.h>
137          [return !ngettext ("","", 1)],
138           gt_cv_func_ngettext_libc=yes,
139           gt_cv_func_ngettext_libc=no)
140         ])
141   
142       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
143               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
144                 [AC_TRY_LINK([
145 #include <libintl.h>
147                   [return !dgettext ("","")],
148                   gt_cv_func_dgettext_libc=yes,
149                   gt_cv_func_dgettext_libc=no)
150                 ])
151       fi
152   
153       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
154         AC_CHECK_FUNCS(bind_textdomain_codeset)
155       fi
157       #
158       # If we don't have everything we want, check in libintl
159       #
160       if test "$gt_cv_func_dgettext_libc" != "yes" \
161          || test "$gt_cv_func_ngettext_libc" != "yes" \
162          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
163         
164         AC_CHECK_LIB(intl, bindtextdomain,
165             [AC_CHECK_LIB(intl, ngettext,
166                     [AC_CHECK_LIB(intl, dgettext,
167                                   gt_cv_func_dgettext_libintl=yes)])])
169         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
170           AC_MSG_CHECKING([if -liconv is needed to use gettext])
171           AC_MSG_RESULT([])
172           AC_CHECK_LIB(intl, ngettext,
173                 [AC_CHECK_LIB(intl, dcgettext,
174                        [gt_cv_func_dgettext_libintl=yes
175                         libintl_extra_libs=-liconv],
176                         :,-liconv)],
177                 :,-liconv)
178         fi
180         #
181         # If we found libintl, then check in it for bind_textdomain_codeset();
182         # we'll prefer libc if neither have bind_textdomain_codeset(),
183         # and both have dgettext and ngettext
184         #
185         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
186           glib_save_LIBS="$LIBS"
187           LIBS="$LIBS -lintl $libintl_extra_libs"
188           unset ac_cv_func_bind_textdomain_codeset
189           AC_CHECK_FUNCS(bind_textdomain_codeset)
190           LIBS="$glib_save_LIBS"
192           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
193             gt_cv_func_dgettext_libc=no
194           else
195             if test "$gt_cv_func_dgettext_libc" = "yes" \
196                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
197               gt_cv_func_dgettext_libintl=no
198             fi
199           fi
200         fi
201       fi
203       if test "$gt_cv_func_dgettext_libc" = "yes" \
204         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
205         gt_cv_have_gettext=yes
206       fi
207   
208       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
209         INTLLIBS="-lintl $libintl_extra_libs"
210       fi
211   
212       if test "$gt_cv_have_gettext" = "yes"; then
213         AC_DEFINE(HAVE_GETTEXT,1,
214           [Define if the GNU gettext() function is already present or preinstalled.])
215         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
216           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
217         if test "$MSGFMT" != "no"; then
218           glib_save_LIBS="$LIBS"
219           LIBS="$LIBS $INTLLIBS"
220           AC_CHECK_FUNCS(dcgettext)
221           MSGFMT_OPTS=
222           AC_MSG_CHECKING([if msgfmt accepts -c])
223           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
224 msgid ""
225 msgstr ""
226 "Content-Type: text/plain; charset=UTF-8\n"
227 "Project-Id-Version: test 1.0\n"
228 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
229 "Last-Translator: test <foo@bar.xx>\n"
230 "Language-Team: C <LL@li.org>\n"
231 "MIME-Version: 1.0\n"
232 "Content-Transfer-Encoding: 8bit\n"
233 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
234           AC_SUBST(MSGFMT_OPTS)
235           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
236           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
237             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
238           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
239                          return _nl_msg_cat_cntr],
240             [CATOBJEXT=.gmo 
241              DATADIRNAME=share],
242             [case $host in
243             *-*-solaris*)
244             dnl On Solaris, if bind_textdomain_codeset is in libc,
245             dnl GNU format message catalog is always supported,
246             dnl since both are added to the libc all together.
247             dnl Hence, we'd like to go with DATADIRNAME=share and
248             dnl and CATOBJEXT=.gmo in this case.
249             AC_CHECK_FUNC(bind_textdomain_codeset,
250               [CATOBJEXT=.gmo 
251                DATADIRNAME=share],
252               [CATOBJEXT=.mo
253                DATADIRNAME=lib])
254             ;;
255             *)
256             CATOBJEXT=.mo
257             DATADIRNAME=lib
258             ;;
259             esac])
260           LIBS="$glib_save_LIBS"
261           INSTOBJEXT=.mo
262         else
263           gt_cv_have_gettext=no
264         fi
265       fi
266     ])
268     if test "$gt_cv_have_gettext" = "yes" ; then
269       AC_DEFINE(ENABLE_NLS, 1,
270         [always defined to indicate that i18n is enabled])
271     fi
273     dnl Test whether we really found GNU xgettext.
274     if test "$XGETTEXT" != ":"; then
275       dnl If it is not GNU xgettext we define it as : so that the
276       dnl Makefiles still can work.
277       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
278         : ;
279       else
280         AC_MSG_RESULT(
281           [found xgettext program is not GNU xgettext; ignore it])
282         XGETTEXT=":"
283       fi
284     fi
286     # We need to process the po/ directory.
287     POSUB=po
289     AC_OUTPUT_COMMANDS(
290       [case "$CONFIG_FILES" in *po/Makefile.in*)
291         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
292       esac])
294     dnl These rules are solely for the distribution goal.  While doing this
295     dnl we only have to keep exactly one list of the available catalogs
296     dnl in configure.in.
297     for lang in $ALL_LINGUAS; do
298       GMOFILES="$GMOFILES $lang.gmo"
299       POFILES="$POFILES $lang.po"
300     done
302     dnl Make all variables we use known to autoconf.
303     AC_SUBST(CATALOGS)
304     AC_SUBST(CATOBJEXT)
305     AC_SUBST(DATADIRNAME)
306     AC_SUBST(GMOFILES)
307     AC_SUBST(INSTOBJEXT)
308     AC_SUBST(INTLLIBS)
309     AC_SUBST(PO_IN_DATADIR_TRUE)
310     AC_SUBST(PO_IN_DATADIR_FALSE)
311     AC_SUBST(POFILES)
312     AC_SUBST(POSUB)
313   ])
315 # AM_GLIB_GNU_GETTEXT
316 # -------------------
317 # Do checks necessary for use of gettext. If a suitable implementation 
318 # of gettext is found in either in libintl or in the C library,
319 # it will set INTLLIBS to the libraries needed for use of gettext
320 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
321 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
322 # on various variables needed by the Makefile.in.in installed by 
323 # glib-gettextize.
325 glib_DEFUN([GLIB_GNU_GETTEXT],
326   [AC_REQUIRE([AC_PROG_CC])dnl
327    AC_REQUIRE([AC_HEADER_STDC])dnl
328    
329    GLIB_LC_MESSAGES
330    GLIB_WITH_NLS
332    if test "$gt_cv_have_gettext" = "yes"; then
333      if test "x$ALL_LINGUAS" = "x"; then
334        LINGUAS=
335      else
336        AC_MSG_CHECKING(for catalogs to be installed)
337        NEW_LINGUAS=
338        for presentlang in $ALL_LINGUAS; do
339          useit=no
340          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
341            desiredlanguages="$LINGUAS"
342          else
343            desiredlanguages="$ALL_LINGUAS"
344          fi
345          for desiredlang in $desiredlanguages; do
346            # Use the presentlang catalog if desiredlang is
347            #   a. equal to presentlang, or
348            #   b. a variant of presentlang (because in this case,
349            #      presentlang can be used as a fallback for messages
350            #      which are not translated in the desiredlang catalog).
351            case "$desiredlang" in
352              "$presentlang"*) useit=yes;;
353            esac
354          done
355          if test $useit = yes; then
356            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
357          fi
358        done
359        LINGUAS=$NEW_LINGUAS
360        AC_MSG_RESULT($LINGUAS)
361      fi
363      dnl Construct list of names of catalog files to be constructed.
364      if test -n "$LINGUAS"; then
365        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
366      fi
367    fi
369    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
370    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
371    dnl Try to locate is.
372    MKINSTALLDIRS=
373    if test -n "$ac_aux_dir"; then
374      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
375    fi
376    if test -z "$MKINSTALLDIRS"; then
377      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
378    fi
379    AC_SUBST(MKINSTALLDIRS)
381    dnl Generate list of files to be processed by xgettext which will
382    dnl be included in po/Makefile.
383    test -d po || mkdir po
384    if test "x$srcdir" != "x."; then
385      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
386        posrcprefix="$srcdir/"
387      else
388        posrcprefix="../$srcdir/"
389      fi
390    else
391      posrcprefix="../"
392    fi
393    rm -f po/POTFILES
394    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
395         < $srcdir/po/POTFILES.in > po/POTFILES
396   ])
398 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
399 # -------------------------------
400 # Define VARIABLE to the location where catalog files will
401 # be installed by po/Makefile.
402 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
403 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
404 glib_save_prefix="$prefix"
405 glib_save_exec_prefix="$exec_prefix"
406 glib_save_datarootdir="$datarootdir"
407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
408 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
409 datarootdir=`eval echo "${datarootdir}"`
410 if test "x$CATOBJEXT" = "x.mo" ; then
411   localedir=`eval echo "${libdir}/locale"`
412 else
413   localedir=`eval echo "${datadir}/locale"`
415 prefix="$glib_save_prefix"
416 exec_prefix="$glib_save_exec_prefix"
417 datarootdir="$glib_save_datarootdir"
418 AC_DEFINE_UNQUOTED($1, "$localedir",
419   [Define the location where the catalogs will be installed])
423 dnl Now the definitions that aclocal will find
425 ifdef(glib_configure_in,[],[
426 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
427 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
428 ])dnl
430 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
432 # Create a temporary file with TEST-FILE as its contents and pass the
433 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
434 # 0 and perform ACTION-IF-FAIL for any other exit status.
435 AC_DEFUN([GLIB_RUN_PROG],
436 [cat >conftest.foo <<_ACEOF
438 _ACEOF
439 if AC_RUN_LOG([$1 conftest.foo]); then
440   m4_ifval([$3], [$3], [:])
441 m4_ifvaln([$4], [else $4])dnl
442 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
443 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
444 fi])
448 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
449 # serial 36 IT_PROG_INTLTOOL
450 AC_DEFUN([IT_PROG_INTLTOOL],
451 [AC_PREREQ([2.50])dnl
453 case "$am__api_version" in
454     1.[01234])
455         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
456     ;;
457     *)
458     ;;
459 esac
461 if test -n "$1"; then
462     AC_MSG_CHECKING([for intltool >= $1])
464     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
465     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
466     [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
467     ]
468     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
469     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
470         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
473   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 $< [$]@' 
474 INTLTOOL_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 $< [$]@' 
475      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 $< [$]@' 
476      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 $< [$]@' 
477       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
478      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 $< [$]@' 
479    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 $< [$]@' 
480     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 $< [$]@' 
481 INTLTOOL_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 $< [$]@' 
482        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 $< [$]@' 
483       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 $< [$]@' 
484       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
485       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 $< [$]@' 
486       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 $< [$]@' 
487     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 $< [$]@' 
488   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 $< [$]@' 
489     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 $< [$]@' 
490     INTLTOOL_SERVICE_RULE='%.service: %.service.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 $< [$]@'
491    INTLTOOL_POLICY_RULE='%.policy:    %.policy.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 $< [$]@'
493 AC_SUBST(INTLTOOL_DESKTOP_RULE)
494 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
495 AC_SUBST(INTLTOOL_KEYS_RULE)
496 AC_SUBST(INTLTOOL_PROP_RULE)
497 AC_SUBST(INTLTOOL_OAF_RULE)
498 AC_SUBST(INTLTOOL_PONG_RULE)
499 AC_SUBST(INTLTOOL_SERVER_RULE)
500 AC_SUBST(INTLTOOL_SHEET_RULE)
501 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
502 AC_SUBST(INTLTOOL_UI_RULE)
503 AC_SUBST(INTLTOOL_XAM_RULE)
504 AC_SUBST(INTLTOOL_KBD_RULE)
505 AC_SUBST(INTLTOOL_XML_RULE)
506 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
507 AC_SUBST(INTLTOOL_CAVES_RULE)
508 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
509 AC_SUBST(INTLTOOL_THEME_RULE)
510 AC_SUBST(INTLTOOL_SERVICE_RULE)
511 AC_SUBST(INTLTOOL_POLICY_RULE)
513 # Check the gettext tools to make sure they are GNU
514 AC_PATH_PROG(XGETTEXT, xgettext)
515 AC_PATH_PROG(MSGMERGE, msgmerge)
516 AC_PATH_PROG(MSGFMT, msgfmt)
517 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
518     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
520 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
521 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
522 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
523 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
524     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
527 # Use the tools built into the package, not the ones that are installed.
528 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
529 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
530 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
532 AC_PATH_PROG(INTLTOOL_PERL, perl)
533 if test -z "$INTLTOOL_PERL"; then
534    AC_MSG_ERROR([perl not found; required for intltool])
536 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
537    AC_MSG_ERROR([perl 5.x required for intltool])
539 if test "x$2" != "xno-xml"; then
540    AC_MSG_CHECKING([for XML::Parser])
541    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
542        AC_MSG_RESULT([ok])
543    else
544        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
545    fi
548 # Substitute ALL_LINGUAS so we can use it in po/Makefile
549 AC_SUBST(ALL_LINGUAS)
551 # Set DATADIRNAME correctly if it is not set yet
552 # (copied from glib-gettext.m4)
553 if test -z "$DATADIRNAME"; then
554   AC_LINK_IFELSE(
555     [AC_LANG_PROGRAM([[]],
556                      [[extern int _nl_msg_cat_cntr;
557                        return _nl_msg_cat_cntr]])],
558     [DATADIRNAME=share],
559     [case $host in
560     *-*-solaris*)
561     dnl On Solaris, if bind_textdomain_codeset is in libc,
562     dnl GNU format message catalog is always supported,
563     dnl since both are added to the libc all together.
564     dnl Hence, we'd like to go with DATADIRNAME=share
565     dnl in this case.
566     AC_CHECK_FUNC(bind_textdomain_codeset,
567       [DATADIRNAME=share], [DATADIRNAME=lib])
568     ;;
569     *)
570     [DATADIRNAME=lib]
571     ;;
572     esac])
574 AC_SUBST(DATADIRNAME)
576 IT_PO_SUBDIR([po])
578 dnl The following is very similar to
580 dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
582 dnl with the following slight differences:
583 dnl  - the *.in files are in ac_aux_dir,
584 dnl  - if the file haven't changed upon reconfigure, it's not touched,
585 dnl  - the evaluation of the third parameter enables a hack which computes
586 dnl    the actual value of $libdir,
587 dnl  - the user sees "executing intltool commands", instead of
588 dnl    "creating intltool-extract" and such.
590 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
591 dnl a reason for it.
593 AC_CONFIG_COMMANDS([intltool], [
595 for file in intltool-extract intltool-merge intltool-update; do
596   sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
597       -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
598       -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
599         < ${ac_aux_dir}/${file}.in > ${file}.out
600   if cmp -s ${file} ${file}.out 2>/dev/null; then
601     rm -f ${file}.out
602   else
603     mv -f ${file}.out ${file}
604   fi
605   chmod ugo+x ${file}
606   chmod u+w ${file}
607 done
610 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
611 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
612 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
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.
622 AC_DEFUN([IT_PO_SUBDIR],
623 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
625 dnl The following CONFIG_COMMANDS should be exetuted at the very end
626 dnl of config.status.
627 AC_CONFIG_COMMANDS_PRE([
628   AC_CONFIG_COMMANDS([$1/stamp-it], [
629     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
630     >"$1/stamp-it.tmp"
631     [sed '/^#/d
632          s/^[[].*] *//
633          /^[    ]*$/d
634         '"s|^|  $ac_top_srcdir/|" \
635       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
636     ]
637     if test ! -f "$1/Makefile"; then
638       AC_MSG_ERROR([$1/Makefile is not ready.])
639     fi
640     mv "$1/Makefile" "$1/Makefile.tmp"
641     [sed '/^POTFILES =/,/[^\\]$/ {
642                 /^POTFILES =/!d
643                 r $1/POTFILES
644           }
645          ' "$1/Makefile.tmp" >"$1/Makefile"]
646     rm -f "$1/Makefile.tmp"
647     mv "$1/stamp-it.tmp" "$1/stamp-it"
648   ])
649 ])dnl
653 # deprecated macros
654 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
655 # A hint is needed for aclocal from Automake <= 1.9.4:
656 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
659 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
661 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
663 # This program is free software; you can redistribute it and/or modify
664 # it under the terms of the GNU General Public License as published by
665 # the Free Software Foundation; either version 2 of the License, or
666 # (at your option) any later version.
668 # This program is distributed in the hope that it will be useful, but
669 # WITHOUT ANY WARRANTY; without even the implied warranty of
670 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
671 # General Public License for more details.
673 # You should have received a copy of the GNU General Public License
674 # along with this program; if not, write to the Free Software
675 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
677 # As a special exception to the GNU General Public License, if you
678 # distribute this file as part of a program that contains a
679 # configuration script generated by Autoconf, you may include it under
680 # the same distribution terms that you use for the rest of that program.
682 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
683 # ----------------------------------
684 AC_DEFUN([PKG_PROG_PKG_CONFIG],
685 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
686 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
687 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
688 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
689         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
691 if test -n "$PKG_CONFIG"; then
692         _pkg_min_version=m4_default([$1], [0.9.0])
693         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
694         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
695                 AC_MSG_RESULT([yes])
696         else
697                 AC_MSG_RESULT([no])
698                 PKG_CONFIG=""
699         fi
700                 
701 fi[]dnl
702 ])# PKG_PROG_PKG_CONFIG
704 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
706 # Check to see whether a particular set of modules exists.  Similar
707 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
710 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
711 # this or PKG_CHECK_MODULES is called, or make sure to call
712 # PKG_CHECK_EXISTS manually
713 # --------------------------------------------------------------
714 AC_DEFUN([PKG_CHECK_EXISTS],
715 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
716 if test -n "$PKG_CONFIG" && \
717     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
718   m4_ifval([$2], [$2], [:])
719 m4_ifvaln([$3], [else
720   $3])dnl
721 fi])
724 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
725 # ---------------------------------------------
726 m4_define([_PKG_CONFIG],
727 [if test -n "$PKG_CONFIG"; then
728     if test -n "$$1"; then
729         pkg_cv_[]$1="$$1"
730     else
731         PKG_CHECK_EXISTS([$3],
732                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
733                          [pkg_failed=yes])
734     fi
735 else
736         pkg_failed=untried
737 fi[]dnl
738 ])# _PKG_CONFIG
740 # _PKG_SHORT_ERRORS_SUPPORTED
741 # -----------------------------
742 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
743 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
744 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
745         _pkg_short_errors_supported=yes
746 else
747         _pkg_short_errors_supported=no
748 fi[]dnl
749 ])# _PKG_SHORT_ERRORS_SUPPORTED
752 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
753 # [ACTION-IF-NOT-FOUND])
756 # Note that if there is a possibility the first call to
757 # PKG_CHECK_MODULES might not happen, you should be sure to include an
758 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
761 # --------------------------------------------------------------
762 AC_DEFUN([PKG_CHECK_MODULES],
763 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
764 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
765 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
767 pkg_failed=no
768 AC_MSG_CHECKING([for $1])
770 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
771 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
773 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
774 and $1[]_LIBS to avoid the need to call pkg-config.
775 See the pkg-config man page for more details.])
777 if test $pkg_failed = yes; then
778         _PKG_SHORT_ERRORS_SUPPORTED
779         if test $_pkg_short_errors_supported = yes; then
780                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
781         else 
782                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
783         fi
784         # Put the nasty error message in config.log where it belongs
785         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
787         ifelse([$4], , [AC_MSG_ERROR(dnl
788 [Package requirements ($2) were not met:
790 $$1_PKG_ERRORS
792 Consider adjusting the PKG_CONFIG_PATH environment variable if you
793 installed software in a non-standard prefix.
795 _PKG_TEXT
796 ])],
797                 [AC_MSG_RESULT([no])
798                 $4])
799 elif test $pkg_failed = untried; then
800         ifelse([$4], , [AC_MSG_FAILURE(dnl
801 [The pkg-config script could not be found or is too old.  Make sure it
802 is in your PATH or set the PKG_CONFIG environment variable to the full
803 path to pkg-config.
805 _PKG_TEXT
807 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
808                 [$4])
809 else
810         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
811         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
812         AC_MSG_RESULT([yes])
813         ifelse([$3], , :, [$3])
814 fi[]dnl
815 ])# PKG_CHECK_MODULES
817 # Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
819 # This file is free software; the Free Software Foundation
820 # gives unlimited permission to copy and/or distribute it,
821 # with or without modifications, as long as this notice is preserved.
823 # AM_AUTOMAKE_VERSION(VERSION)
824 # ----------------------------
825 # Automake X.Y traces this macro to ensure aclocal.m4 has been
826 # generated from the m4 files accompanying Automake X.Y.
827 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
829 # AM_SET_CURRENT_AUTOMAKE_VERSION
830 # -------------------------------
831 # Call AM_AUTOMAKE_VERSION so it can be traced.
832 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
833 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
834          [AM_AUTOMAKE_VERSION([1.9.6])])
836 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
838 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
840 # This file is free software; the Free Software Foundation
841 # gives unlimited permission to copy and/or distribute it,
842 # with or without modifications, as long as this notice is preserved.
844 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
845 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
846 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
848 # Of course, Automake must honor this variable whenever it calls a
849 # tool from the auxiliary directory.  The problem is that $srcdir (and
850 # therefore $ac_aux_dir as well) can be either absolute or relative,
851 # depending on how configure is run.  This is pretty annoying, since
852 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
853 # source directory, any form will work fine, but in subdirectories a
854 # relative path needs to be adjusted first.
856 # $ac_aux_dir/missing
857 #    fails when called from a subdirectory if $ac_aux_dir is relative
858 # $top_srcdir/$ac_aux_dir/missing
859 #    fails if $ac_aux_dir is absolute,
860 #    fails when called from a subdirectory in a VPATH build with
861 #          a relative $ac_aux_dir
863 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
864 # are both prefixed by $srcdir.  In an in-source build this is usually
865 # harmless because $srcdir is `.', but things will broke when you
866 # start a VPATH build or use an absolute $srcdir.
868 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
869 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
870 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
871 # and then we would define $MISSING as
872 #   MISSING="\${SHELL} $am_aux_dir/missing"
873 # This will work as long as MISSING is not called from configure, because
874 # unfortunately $(top_srcdir) has no meaning in configure.
875 # However there are other variables, like CC, which are often used in
876 # configure, and could therefore not use this "fixed" $ac_aux_dir.
878 # Another solution, used here, is to always expand $ac_aux_dir to an
879 # absolute PATH.  The drawback is that using absolute paths prevent a
880 # configured tree to be moved without reconfiguration.
882 AC_DEFUN([AM_AUX_DIR_EXPAND],
883 [dnl Rely on autoconf to set up CDPATH properly.
884 AC_PREREQ([2.50])dnl
885 # expand $ac_aux_dir to an absolute path
886 am_aux_dir=`cd $ac_aux_dir && pwd`
890 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
891 # Free Software Foundation, Inc.
893 # This file is free software; the Free Software Foundation
894 # gives unlimited permission to copy and/or distribute it,
895 # with or without modifications, as long as this notice is preserved.
897 # serial 4
899 # This was merged into AC_PROG_CC in Autoconf.
901 AU_DEFUN([AM_PROG_CC_STDC],
902 [AC_PROG_CC
903 AC_DIAGNOSE([obsolete], [$0:
904         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
905         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
906         you adjust the code.  You can also remove the above call to
907         AC_PROG_CC if you already called it elsewhere.])
908 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
910 AU_DEFUN([fp_PROG_CC_STDC])
912 # AM_CONDITIONAL                                            -*- Autoconf -*-
914 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
915 # Free Software Foundation, Inc.
917 # This file is free software; the Free Software Foundation
918 # gives unlimited permission to copy and/or distribute it,
919 # with or without modifications, as long as this notice is preserved.
921 # serial 7
923 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
924 # -------------------------------------
925 # Define a conditional.
926 AC_DEFUN([AM_CONDITIONAL],
927 [AC_PREREQ(2.52)dnl
928  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
929         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
930 AC_SUBST([$1_TRUE])
931 AC_SUBST([$1_FALSE])
932 if $2; then
933   $1_TRUE=
934   $1_FALSE='#'
935 else
936   $1_TRUE='#'
937   $1_FALSE=
939 AC_CONFIG_COMMANDS_PRE(
940 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
941   AC_MSG_ERROR([[conditional "$1" was never defined.
942 Usually this means the macro was only invoked conditionally.]])
943 fi])])
946 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
947 # Free Software Foundation, Inc.
949 # This file is free software; the Free Software Foundation
950 # gives unlimited permission to copy and/or distribute it,
951 # with or without modifications, as long as this notice is preserved.
953 # serial 8
955 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
956 # written in clear, in which case automake, when reading aclocal.m4,
957 # will think it sees a *use*, and therefore will trigger all it's
958 # C support machinery.  Also note that it means that autoscan, seeing
959 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
962 # _AM_DEPENDENCIES(NAME)
963 # ----------------------
964 # See how the compiler implements dependency checking.
965 # NAME is "CC", "CXX", "GCJ", or "OBJC".
966 # We try a few techniques and use that to set a single cache variable.
968 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
969 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
970 # dependency, and given that the user is not expected to run this macro,
971 # just rely on AC_PROG_CC.
972 AC_DEFUN([_AM_DEPENDENCIES],
973 [AC_REQUIRE([AM_SET_DEPDIR])dnl
974 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
975 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
976 AC_REQUIRE([AM_DEP_TRACK])dnl
978 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
979        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
980        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
981        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
982                    [depcc="$$1"   am_compiler_list=])
984 AC_CACHE_CHECK([dependency style of $depcc],
985                [am_cv_$1_dependencies_compiler_type],
986 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
987   # We make a subdir and do the tests there.  Otherwise we can end up
988   # making bogus files that we don't know about and never remove.  For
989   # instance it was reported that on HP-UX the gcc test will end up
990   # making a dummy file named `D' -- because `-MD' means `put the output
991   # in D'.
992   mkdir conftest.dir
993   # Copy depcomp to subdir because otherwise we won't find it if we're
994   # using a relative directory.
995   cp "$am_depcomp" conftest.dir
996   cd conftest.dir
997   # We will build objects and dependencies in a subdirectory because
998   # it helps to detect inapplicable dependency modes.  For instance
999   # both Tru64's cc and ICC support -MD to output dependencies as a
1000   # side effect of compilation, but ICC will put the dependencies in
1001   # the current directory while Tru64 will put them in the object
1002   # directory.
1003   mkdir sub
1005   am_cv_$1_dependencies_compiler_type=none
1006   if test "$am_compiler_list" = ""; then
1007      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1008   fi
1009   for depmode in $am_compiler_list; do
1010     # Setup a source with many dependencies, because some compilers
1011     # like to wrap large dependency lists on column 80 (with \), and
1012     # we should not choose a depcomp mode which is confused by this.
1013     #
1014     # We need to recreate these files for each test, as the compiler may
1015     # overwrite some of them when testing with obscure command lines.
1016     # This happens at least with the AIX C compiler.
1017     : > sub/conftest.c
1018     for i in 1 2 3 4 5 6; do
1019       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1020       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1021       # Solaris 8's {/usr,}/bin/sh.
1022       touch sub/conftst$i.h
1023     done
1024     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1026     case $depmode in
1027     nosideeffect)
1028       # after this tag, mechanisms are not by side-effect, so they'll
1029       # only be used when explicitly requested
1030       if test "x$enable_dependency_tracking" = xyes; then
1031         continue
1032       else
1033         break
1034       fi
1035       ;;
1036     none) break ;;
1037     esac
1038     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1039     # mode.  It turns out that the SunPro C++ compiler does not properly
1040     # handle `-M -o', and we need to detect this.
1041     if depmode=$depmode \
1042        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1043        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1044        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1045          >/dev/null 2>conftest.err &&
1046        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1047        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1048        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1049       # icc doesn't choke on unknown options, it will just issue warnings
1050       # or remarks (even with -Werror).  So we grep stderr for any message
1051       # that says an option was ignored or not supported.
1052       # When given -MP, icc 7.0 and 7.1 complain thusly:
1053       #   icc: Command line warning: ignoring option '-M'; no argument required
1054       # The diagnosis changed in icc 8.0:
1055       #   icc: Command line remark: option '-MP' not supported
1056       if (grep 'ignoring option' conftest.err ||
1057           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1058         am_cv_$1_dependencies_compiler_type=$depmode
1059         break
1060       fi
1061     fi
1062   done
1064   cd ..
1065   rm -rf conftest.dir
1066 else
1067   am_cv_$1_dependencies_compiler_type=none
1070 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1071 AM_CONDITIONAL([am__fastdep$1], [
1072   test "x$enable_dependency_tracking" != xno \
1073   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1077 # AM_SET_DEPDIR
1078 # -------------
1079 # Choose a directory name for dependency files.
1080 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1081 AC_DEFUN([AM_SET_DEPDIR],
1082 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1083 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1087 # AM_DEP_TRACK
1088 # ------------
1089 AC_DEFUN([AM_DEP_TRACK],
1090 [AC_ARG_ENABLE(dependency-tracking,
1091 [  --disable-dependency-tracking  speeds up one-time build
1092   --enable-dependency-tracking   do not reject slow dependency extractors])
1093 if test "x$enable_dependency_tracking" != xno; then
1094   am_depcomp="$ac_aux_dir/depcomp"
1095   AMDEPBACKSLASH='\'
1097 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1098 AC_SUBST([AMDEPBACKSLASH])
1101 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1103 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1104 # Free Software Foundation, Inc.
1106 # This file is free software; the Free Software Foundation
1107 # gives unlimited permission to copy and/or distribute it,
1108 # with or without modifications, as long as this notice is preserved.
1110 #serial 3
1112 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1113 # ------------------------------
1114 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1115 [for mf in $CONFIG_FILES; do
1116   # Strip MF so we end up with the name of the file.
1117   mf=`echo "$mf" | sed -e 's/:.*$//'`
1118   # Check whether this is an Automake generated Makefile or not.
1119   # We used to match only the files named `Makefile.in', but
1120   # some people rename them; so instead we look at the file content.
1121   # Grep'ing the first line is not enough: some people post-process
1122   # each Makefile.in and add a new line on top of each file to say so.
1123   # So let's grep whole file.
1124   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1125     dirpart=`AS_DIRNAME("$mf")`
1126   else
1127     continue
1128   fi
1129   # Extract the definition of DEPDIR, am__include, and am__quote
1130   # from the Makefile without running `make'.
1131   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1132   test -z "$DEPDIR" && continue
1133   am__include=`sed -n 's/^am__include = //p' < "$mf"`
1134   test -z "am__include" && continue
1135   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1136   # When using ansi2knr, U may be empty or an underscore; expand it
1137   U=`sed -n 's/^U = //p' < "$mf"`
1138   # Find all dependency output files, they are included files with
1139   # $(DEPDIR) in their names.  We invoke sed twice because it is the
1140   # simplest approach to changing $(DEPDIR) to its actual value in the
1141   # expansion.
1142   for file in `sed -n "
1143     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1144        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1145     # Make sure the directory exists.
1146     test -f "$dirpart/$file" && continue
1147     fdir=`AS_DIRNAME(["$file"])`
1148     AS_MKDIR_P([$dirpart/$fdir])
1149     # echo "creating $dirpart/$file"
1150     echo '# dummy' > "$dirpart/$file"
1151   done
1152 done
1153 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1156 # AM_OUTPUT_DEPENDENCY_COMMANDS
1157 # -----------------------------
1158 # This macro should only be invoked once -- use via AC_REQUIRE.
1160 # This code is only required when automatic dependency tracking
1161 # is enabled.  FIXME.  This creates each `.P' file that we will
1162 # need in order to bootstrap the dependency handling code.
1163 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1164 [AC_CONFIG_COMMANDS([depfiles],
1165      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1166      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1169 # Do all the work for Automake.                             -*- Autoconf -*-
1171 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1172 # Free Software Foundation, Inc.
1174 # This file is free software; the Free Software Foundation
1175 # gives unlimited permission to copy and/or distribute it,
1176 # with or without modifications, as long as this notice is preserved.
1178 # serial 12
1180 # This macro actually does too much.  Some checks are only needed if
1181 # your package does certain things.  But this isn't really a big deal.
1183 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1184 # AM_INIT_AUTOMAKE([OPTIONS])
1185 # -----------------------------------------------
1186 # The call with PACKAGE and VERSION arguments is the old style
1187 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1188 # and VERSION should now be passed to AC_INIT and removed from
1189 # the call to AM_INIT_AUTOMAKE.
1190 # We support both call styles for the transition.  After
1191 # the next Automake release, Autoconf can make the AC_INIT
1192 # arguments mandatory, and then we can depend on a new Autoconf
1193 # release and drop the old call support.
1194 AC_DEFUN([AM_INIT_AUTOMAKE],
1195 [AC_PREREQ([2.58])dnl
1196 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1197 dnl the ones we care about.
1198 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1199 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1200 AC_REQUIRE([AC_PROG_INSTALL])dnl
1201 # test to see if srcdir already configured
1202 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1203    test -f $srcdir/config.status; then
1204   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1207 # test whether we have cygpath
1208 if test -z "$CYGPATH_W"; then
1209   if (cygpath --version) >/dev/null 2>/dev/null; then
1210     CYGPATH_W='cygpath -w'
1211   else
1212     CYGPATH_W=echo
1213   fi
1215 AC_SUBST([CYGPATH_W])
1217 # Define the identity of the package.
1218 dnl Distinguish between old-style and new-style calls.
1219 m4_ifval([$2],
1220 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1221  AC_SUBST([PACKAGE], [$1])dnl
1222  AC_SUBST([VERSION], [$2])],
1223 [_AM_SET_OPTIONS([$1])dnl
1224  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1225  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1227 _AM_IF_OPTION([no-define],,
1228 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1229  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1231 # Some tools Automake needs.
1232 AC_REQUIRE([AM_SANITY_CHECK])dnl
1233 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1234 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1235 AM_MISSING_PROG(AUTOCONF, autoconf)
1236 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1237 AM_MISSING_PROG(AUTOHEADER, autoheader)
1238 AM_MISSING_PROG(MAKEINFO, makeinfo)
1239 AM_PROG_INSTALL_SH
1240 AM_PROG_INSTALL_STRIP
1241 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1242 # We need awk for the "check" target.  The system "awk" is bad on
1243 # some platforms.
1244 AC_REQUIRE([AC_PROG_AWK])dnl
1245 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1246 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1247 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1248               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1249                              [_AM_PROG_TAR([v7])])])
1250 _AM_IF_OPTION([no-dependencies],,
1251 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1252                   [_AM_DEPENDENCIES(CC)],
1253                   [define([AC_PROG_CC],
1254                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1255 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1256                   [_AM_DEPENDENCIES(CXX)],
1257                   [define([AC_PROG_CXX],
1258                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1263 # When config.status generates a header, we must update the stamp-h file.
1264 # This file resides in the same directory as the config header
1265 # that is generated.  The stamp files are numbered to have different names.
1267 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1268 # loop where config.status creates the headers, so we can generate
1269 # our stamp files there.
1270 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1271 [# Compute $1's index in $config_headers.
1272 _am_stamp_count=1
1273 for _am_header in $config_headers :; do
1274   case $_am_header in
1275     $1 | $1:* )
1276       break ;;
1277     * )
1278       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1279   esac
1280 done
1281 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1283 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1285 # This file is free software; the Free Software Foundation
1286 # gives unlimited permission to copy and/or distribute it,
1287 # with or without modifications, as long as this notice is preserved.
1289 # AM_PROG_INSTALL_SH
1290 # ------------------
1291 # Define $install_sh.
1292 AC_DEFUN([AM_PROG_INSTALL_SH],
1293 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1294 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1295 AC_SUBST(install_sh)])
1297 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1299 # This file is free software; the Free Software Foundation
1300 # gives unlimited permission to copy and/or distribute it,
1301 # with or without modifications, as long as this notice is preserved.
1303 # serial 2
1305 # Check whether the underlying file-system supports filenames
1306 # with a leading dot.  For instance MS-DOS doesn't.
1307 AC_DEFUN([AM_SET_LEADING_DOT],
1308 [rm -rf .tst 2>/dev/null
1309 mkdir .tst 2>/dev/null
1310 if test -d .tst; then
1311   am__leading_dot=.
1312 else
1313   am__leading_dot=_
1315 rmdir .tst 2>/dev/null
1316 AC_SUBST([am__leading_dot])])
1318 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1319 # From Jim Meyering
1321 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
1322 # Free Software Foundation, Inc.
1324 # This file is free software; the Free Software Foundation
1325 # gives unlimited permission to copy and/or distribute it,
1326 # with or without modifications, as long as this notice is preserved.
1328 # serial 4
1330 AC_DEFUN([AM_MAINTAINER_MODE],
1331 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1332   dnl maintainer-mode is disabled by default
1333   AC_ARG_ENABLE(maintainer-mode,
1334 [  --enable-maintainer-mode  enable make rules and dependencies not useful
1335                           (and sometimes confusing) to the casual installer],
1336       USE_MAINTAINER_MODE=$enableval,
1337       USE_MAINTAINER_MODE=no)
1338   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1339   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1340   MAINT=$MAINTAINER_MODE_TRUE
1341   AC_SUBST(MAINT)dnl
1345 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1347 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1349 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
1351 # This file is free software; the Free Software Foundation
1352 # gives unlimited permission to copy and/or distribute it,
1353 # with or without modifications, as long as this notice is preserved.
1355 # serial 3
1357 # AM_MAKE_INCLUDE()
1358 # -----------------
1359 # Check to see how make treats includes.
1360 AC_DEFUN([AM_MAKE_INCLUDE],
1361 [am_make=${MAKE-make}
1362 cat > confinc << 'END'
1363 am__doit:
1364         @echo done
1365 .PHONY: am__doit
1367 # If we don't find an include directive, just comment out the code.
1368 AC_MSG_CHECKING([for style of include used by $am_make])
1369 am__include="#"
1370 am__quote=
1371 _am_result=none
1372 # First try GNU make style include.
1373 echo "include confinc" > confmf
1374 # We grep out `Entering directory' and `Leaving directory'
1375 # messages which can occur if `w' ends up in MAKEFLAGS.
1376 # In particular we don't look at `^make:' because GNU make might
1377 # be invoked under some other name (usually "gmake"), in which
1378 # case it prints its new name instead of `make'.
1379 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1380    am__include=include
1381    am__quote=
1382    _am_result=GNU
1384 # Now try BSD make style include.
1385 if test "$am__include" = "#"; then
1386    echo '.include "confinc"' > confmf
1387    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1388       am__include=.include
1389       am__quote="\""
1390       _am_result=BSD
1391    fi
1393 AC_SUBST([am__include])
1394 AC_SUBST([am__quote])
1395 AC_MSG_RESULT([$_am_result])
1396 rm -f confinc confmf
1399 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1401 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
1402 # Free Software Foundation, Inc.
1404 # This file is free software; the Free Software Foundation
1405 # gives unlimited permission to copy and/or distribute it,
1406 # with or without modifications, as long as this notice is preserved.
1408 # serial 4
1410 # AM_MISSING_PROG(NAME, PROGRAM)
1411 # ------------------------------
1412 AC_DEFUN([AM_MISSING_PROG],
1413 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1414 $1=${$1-"${am_missing_run}$2"}
1415 AC_SUBST($1)])
1418 # AM_MISSING_HAS_RUN
1419 # ------------------
1420 # Define MISSING if not defined so far and test if it supports --run.
1421 # If it does, set am_missing_run to use it, otherwise, to nothing.
1422 AC_DEFUN([AM_MISSING_HAS_RUN],
1423 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1424 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1425 # Use eval to expand $SHELL
1426 if eval "$MISSING --run true"; then
1427   am_missing_run="$MISSING --run "
1428 else
1429   am_missing_run=
1430   AC_MSG_WARN([`missing' script is too old or missing])
1434 # Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
1436 # This file is free software; the Free Software Foundation
1437 # gives unlimited permission to copy and/or distribute it,
1438 # with or without modifications, as long as this notice is preserved.
1440 # AM_PROG_MKDIR_P
1441 # ---------------
1442 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
1444 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
1445 # created by `make install' are always world readable, even if the
1446 # installer happens to have an overly restrictive umask (e.g. 077).
1447 # This was a mistake.  There are at least two reasons why we must not
1448 # use `-m 0755':
1449 #   - it causes special bits like SGID to be ignored,
1450 #   - it may be too restrictive (some setups expect 775 directories).
1452 # Do not use -m 0755 and let people choose whatever they expect by
1453 # setting umask.
1455 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
1456 # Some implementations (such as Solaris 8's) are not thread-safe: if a
1457 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
1458 # concurrently, both version can detect that a/ is missing, but only
1459 # one can create it and the other will error out.  Consequently we
1460 # restrict ourselves to GNU make (using the --version option ensures
1461 # this.)
1462 AC_DEFUN([AM_PROG_MKDIR_P],
1463 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1464   # We used to keeping the `.' as first argument, in order to
1465   # allow $(mkdir_p) to be used without argument.  As in
1466   #   $(mkdir_p) $(somedir)
1467   # where $(somedir) is conditionally defined.  However this is wrong
1468   # for two reasons:
1469   #  1. if the package is installed by a user who cannot write `.'
1470   #     make install will fail,
1471   #  2. the above comment should most certainly read
1472   #     $(mkdir_p) $(DESTDIR)$(somedir)
1473   #     so it does not work when $(somedir) is undefined and
1474   #     $(DESTDIR) is not.
1475   #  To support the latter case, we have to write
1476   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1477   #  so the `.' trick is pointless.
1478   mkdir_p='mkdir -p --'
1479 else
1480   # On NextStep and OpenStep, the `mkdir' command does not
1481   # recognize any option.  It will interpret all options as
1482   # directories to create, and then abort because `.' already
1483   # exists.
1484   for d in ./-p ./--version;
1485   do
1486     test -d $d && rmdir $d
1487   done
1488   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1489   if test -f "$ac_aux_dir/mkinstalldirs"; then
1490     mkdir_p='$(mkinstalldirs)'
1491   else
1492     mkdir_p='$(install_sh) -d'
1493   fi
1495 AC_SUBST([mkdir_p])])
1497 # Helper functions for option handling.                     -*- Autoconf -*-
1499 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
1501 # This file is free software; the Free Software Foundation
1502 # gives unlimited permission to copy and/or distribute it,
1503 # with or without modifications, as long as this notice is preserved.
1505 # serial 3
1507 # _AM_MANGLE_OPTION(NAME)
1508 # -----------------------
1509 AC_DEFUN([_AM_MANGLE_OPTION],
1510 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1512 # _AM_SET_OPTION(NAME)
1513 # ------------------------------
1514 # Set option NAME.  Presently that only means defining a flag for this option.
1515 AC_DEFUN([_AM_SET_OPTION],
1516 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1518 # _AM_SET_OPTIONS(OPTIONS)
1519 # ----------------------------------
1520 # OPTIONS is a space-separated list of Automake options.
1521 AC_DEFUN([_AM_SET_OPTIONS],
1522 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1524 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1525 # -------------------------------------------
1526 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1527 AC_DEFUN([_AM_IF_OPTION],
1528 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1530 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1532 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1533 # Free Software Foundation, Inc.
1535 # This file is free software; the Free Software Foundation
1536 # gives unlimited permission to copy and/or distribute it,
1537 # with or without modifications, as long as this notice is preserved.
1539 # serial 4
1541 # AM_SANITY_CHECK
1542 # ---------------
1543 AC_DEFUN([AM_SANITY_CHECK],
1544 [AC_MSG_CHECKING([whether build environment is sane])
1545 # Just in case
1546 sleep 1
1547 echo timestamp > conftest.file
1548 # Do `set' in a subshell so we don't clobber the current shell's
1549 # arguments.  Must try -L first in case configure is actually a
1550 # symlink; some systems play weird games with the mod time of symlinks
1551 # (eg FreeBSD returns the mod time of the symlink's containing
1552 # directory).
1553 if (
1554    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1555    if test "$[*]" = "X"; then
1556       # -L didn't work.
1557       set X `ls -t $srcdir/configure conftest.file`
1558    fi
1559    rm -f conftest.file
1560    if test "$[*]" != "X $srcdir/configure conftest.file" \
1561       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1563       # If neither matched, then we have a broken ls.  This can happen
1564       # if, for instance, CONFIG_SHELL is bash and it inherits a
1565       # broken ls alias from the environment.  This has actually
1566       # happened.  Such a system could not be considered "sane".
1567       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1568 alias in your environment])
1569    fi
1571    test "$[2]" = conftest.file
1572    )
1573 then
1574    # Ok.
1575    :
1576 else
1577    AC_MSG_ERROR([newly created file is older than distributed files!
1578 Check your system clock])
1580 AC_MSG_RESULT(yes)])
1582 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1584 # This file is free software; the Free Software Foundation
1585 # gives unlimited permission to copy and/or distribute it,
1586 # with or without modifications, as long as this notice is preserved.
1588 # AM_PROG_INSTALL_STRIP
1589 # ---------------------
1590 # One issue with vendor `install' (even GNU) is that you can't
1591 # specify the program used to strip binaries.  This is especially
1592 # annoying in cross-compiling environments, where the build's strip
1593 # is unlikely to handle the host's binaries.
1594 # Fortunately install-sh will honor a STRIPPROG variable, so we
1595 # always use install-sh in `make install-strip', and initialize
1596 # STRIPPROG with the value of the STRIP variable (set by the user).
1597 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1598 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1599 # Installed binaries are usually stripped using `strip' when the user
1600 # run `make install-strip'.  However `strip' might not be the right
1601 # tool to use in cross-compilation environments, therefore Automake
1602 # will honor the `STRIP' environment variable to overrule this program.
1603 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1604 if test "$cross_compiling" != no; then
1605   AC_CHECK_TOOL([STRIP], [strip], :)
1607 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1608 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1610 # Check how to create a tarball.                            -*- Autoconf -*-
1612 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1614 # This file is free software; the Free Software Foundation
1615 # gives unlimited permission to copy and/or distribute it,
1616 # with or without modifications, as long as this notice is preserved.
1618 # serial 2
1620 # _AM_PROG_TAR(FORMAT)
1621 # --------------------
1622 # Check how to create a tarball in format FORMAT.
1623 # FORMAT should be one of `v7', `ustar', or `pax'.
1625 # Substitute a variable $(am__tar) that is a command
1626 # writing to stdout a FORMAT-tarball containing the directory
1627 # $tardir.
1628 #     tardir=directory && $(am__tar) > result.tar
1630 # Substitute a variable $(am__untar) that extract such
1631 # a tarball read from stdin.
1632 #     $(am__untar) < result.tar
1633 AC_DEFUN([_AM_PROG_TAR],
1634 [# Always define AMTAR for backward compatibility.
1635 AM_MISSING_PROG([AMTAR], [tar])
1636 m4_if([$1], [v7],
1637      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1638      [m4_case([$1], [ustar],, [pax],,
1639               [m4_fatal([Unknown tar format])])
1640 AC_MSG_CHECKING([how to create a $1 tar archive])
1641 # Loop over all known methods to create a tar archive until one works.
1642 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1643 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1644 # Do not fold the above two line into one, because Tru64 sh and
1645 # Solaris sh will not grok spaces in the rhs of `-'.
1646 for _am_tool in $_am_tools
1648   case $_am_tool in
1649   gnutar)
1650     for _am_tar in tar gnutar gtar;
1651     do
1652       AM_RUN_LOG([$_am_tar --version]) && break
1653     done
1654     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1655     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1656     am__untar="$_am_tar -xf -"
1657     ;;
1658   plaintar)
1659     # Must skip GNU tar: if it does not support --format= it doesn't create
1660     # ustar tarball either.
1661     (tar --version) >/dev/null 2>&1 && continue
1662     am__tar='tar chf - "$$tardir"'
1663     am__tar_='tar chf - "$tardir"'
1664     am__untar='tar xf -'
1665     ;;
1666   pax)
1667     am__tar='pax -L -x $1 -w "$$tardir"'
1668     am__tar_='pax -L -x $1 -w "$tardir"'
1669     am__untar='pax -r'
1670     ;;
1671   cpio)
1672     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1673     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1674     am__untar='cpio -i -H $1 -d'
1675     ;;
1676   none)
1677     am__tar=false
1678     am__tar_=false
1679     am__untar=false
1680     ;;
1681   esac
1683   # If the value was cached, stop now.  We just wanted to have am__tar
1684   # and am__untar set.
1685   test -n "${am_cv_prog_tar_$1}" && break
1687   # tar/untar a dummy directory, and stop if the command works
1688   rm -rf conftest.dir
1689   mkdir conftest.dir
1690   echo GrepMe > conftest.dir/file
1691   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1692   rm -rf conftest.dir
1693   if test -s conftest.tar; then
1694     AM_RUN_LOG([$am__untar <conftest.tar])
1695     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1696   fi
1697 done
1698 rm -rf conftest.dir
1700 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1701 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1702 AC_SUBST([am__tar])
1703 AC_SUBST([am__untar])
1704 ]) # _AM_PROG_TAR