"Fossies" - the Fresh Open Source Software Archive

Member "regexxer-0.10/aclocal.m4" (6 Oct 2011, 73599 Bytes) of package /linux/privat/old/regexxer-0.10.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
    4 # 2005, 2006, 2007, 2008, 2009  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 m4_ifndef([AC_AUTOCONF_VERSION],
   15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
   16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
   17 [m4_warning([this file was generated for autoconf 2.68.
   18 You have another version of autoconf.  It may work, but is not guaranteed to.
   19 If you have problems, you may need to regenerate the build system entirely.
   20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
   21 
   22 # gettext.m4 serial 63 (gettext-0.18)
   23 dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
   24 dnl This file is free software; the Free Software Foundation
   25 dnl gives unlimited permission to copy and/or distribute it,
   26 dnl with or without modifications, as long as this notice is preserved.
   27 dnl
   28 dnl This file can can be used in projects which are not available under
   29 dnl the GNU General Public License or the GNU Library General Public
   30 dnl License but which still want to provide support for the GNU gettext
   31 dnl functionality.
   32 dnl Please note that the actual code of the GNU gettext library is covered
   33 dnl by the GNU Library General Public License, and the rest of the GNU
   34 dnl gettext package package is covered by the GNU General Public License.
   35 dnl They are *not* in the public domain.
   36 
   37 dnl Authors:
   38 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
   39 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
   40 
   41 dnl Macro to add for using GNU gettext.
   42 
   43 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
   44 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
   45 dnl    default (if it is not specified or empty) is 'no-libtool'.
   46 dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
   47 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
   48 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
   49 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
   50 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
   51 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
   52 dnl    $(top_builddir)/intl/libintl.a will be created.
   53 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
   54 dnl    implementations (in libc or libintl) without the ngettext() function
   55 dnl    will be ignored.  If NEEDSYMBOL is specified and is
   56 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
   57 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
   58 dnl INTLDIR is used to find the intl libraries.  If empty,
   59 dnl    the value `$(top_builddir)/intl/' is used.
   60 dnl
   61 dnl The result of the configuration is one of three cases:
   62 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
   63 dnl    and used.
   64 dnl    Catalog format: GNU --> install in $(datadir)
   65 dnl    Catalog extension: .mo after installation, .gmo in source tree
   66 dnl 2) GNU gettext has been found in the system's C library.
   67 dnl    Catalog format: GNU --> install in $(datadir)
   68 dnl    Catalog extension: .mo after installation, .gmo in source tree
   69 dnl 3) No internationalization, always use English msgid.
   70 dnl    Catalog format: none
   71 dnl    Catalog extension: none
   72 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
   73 dnl The use of .gmo is historical (it was needed to avoid overwriting the
   74 dnl GNU format catalogs when building on a platform with an X/Open gettext),
   75 dnl but we keep it in order not to force irrelevant filename changes on the
   76 dnl maintainers.
   77 dnl
   78 AC_DEFUN([AM_GNU_GETTEXT],
   79 [
   80   dnl Argument checking.
   81   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
   82     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
   83 ])])])])])
   84   ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
   85     [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
   86   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
   87     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
   88 ])])])])
   89   define([gt_included_intl],
   90     ifelse([$1], [external],
   91       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
   92       [yes]))
   93   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
   94   gt_NEEDS_INIT
   95   AM_GNU_GETTEXT_NEED([$2])
   96 
   97   AC_REQUIRE([AM_PO_SUBDIRS])dnl
   98   ifelse(gt_included_intl, yes, [
   99     AC_REQUIRE([AM_INTL_SUBDIR])dnl
  100   ])
  101 
  102   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  103   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  104   AC_REQUIRE([AC_LIB_RPATH])
  105 
  106   dnl Sometimes libintl requires libiconv, so first search for libiconv.
  107   dnl Ideally we would do this search only after the
  108   dnl      if test "$USE_NLS" = "yes"; then
  109   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  110   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
  111   dnl the configure script would need to contain the same shell code
  112   dnl again, outside any 'if'. There are two solutions:
  113   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
  114   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
  115   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
  116   dnl documented, we avoid it.
  117   ifelse(gt_included_intl, yes, , [
  118     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  119   ])
  120 
  121   dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
  122   gt_INTL_MACOSX
  123 
  124   dnl Set USE_NLS.
  125   AC_REQUIRE([AM_NLS])
  126 
  127   ifelse(gt_included_intl, yes, [
  128     BUILD_INCLUDED_LIBINTL=no
  129     USE_INCLUDED_LIBINTL=no
  130   ])
  131   LIBINTL=
  132   LTLIBINTL=
  133   POSUB=
  134 
  135   dnl Add a version number to the cache macros.
  136   case " $gt_needs " in
  137     *" need-formatstring-macros "*) gt_api_version=3 ;;
  138     *" need-ngettext "*) gt_api_version=2 ;;
  139     *) gt_api_version=1 ;;
  140   esac
  141   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
  142   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
  143 
  144   dnl If we use NLS figure out what method
  145   if test "$USE_NLS" = "yes"; then
  146     gt_use_preinstalled_gnugettext=no
  147     ifelse(gt_included_intl, yes, [
  148       AC_MSG_CHECKING([whether included gettext is requested])
  149       AC_ARG_WITH([included-gettext],
  150         [  --with-included-gettext use the GNU gettext library included here],
  151         nls_cv_force_use_gnu_gettext=$withval,
  152         nls_cv_force_use_gnu_gettext=no)
  153       AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
  154 
  155       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  156       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  157     ])
  158         dnl User does not insist on using GNU NLS library.  Figure out what
  159         dnl to use.  If GNU gettext is available we use this.  Else we have
  160         dnl to fall back to GNU NLS library.
  161 
  162         if test $gt_api_version -ge 3; then
  163           gt_revision_test_code='
  164 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  165 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  166 #endif
  167 changequote(,)dnl
  168 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  169 changequote([,])dnl
  170 '
  171         else
  172           gt_revision_test_code=
  173         fi
  174         if test $gt_api_version -ge 2; then
  175           gt_expression_test_code=' + * ngettext ("", "", 0)'
  176         else
  177           gt_expression_test_code=
  178         fi
  179 
  180         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
  181          [AC_TRY_LINK([#include <libintl.h>
  182 $gt_revision_test_code
  183 extern int _nl_msg_cat_cntr;
  184 extern int *_nl_domain_bindings;],
  185             [bindtextdomain ("", "");
  186 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
  187             [eval "$gt_func_gnugettext_libc=yes"],
  188             [eval "$gt_func_gnugettext_libc=no"])])
  189 
  190         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  191           dnl Sometimes libintl requires libiconv, so first search for libiconv.
  192           ifelse(gt_included_intl, yes, , [
  193             AM_ICONV_LINK
  194           ])
  195           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
  196           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
  197           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
  198           dnl even if libiconv doesn't exist.
  199           AC_LIB_LINKFLAGS_BODY([intl])
  200           AC_CACHE_CHECK([for GNU gettext in libintl],
  201             [$gt_func_gnugettext_libintl],
  202            [gt_save_CPPFLAGS="$CPPFLAGS"
  203             CPPFLAGS="$CPPFLAGS $INCINTL"
  204             gt_save_LIBS="$LIBS"
  205             LIBS="$LIBS $LIBINTL"
  206             dnl Now see whether libintl exists and does not depend on libiconv.
  207             AC_TRY_LINK([#include <libintl.h>
  208 $gt_revision_test_code
  209 extern int _nl_msg_cat_cntr;
  210 extern
  211 #ifdef __cplusplus
  212 "C"
  213 #endif
  214 const char *_nl_expand_alias (const char *);],
  215               [bindtextdomain ("", "");
  216 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
  217               [eval "$gt_func_gnugettext_libintl=yes"],
  218               [eval "$gt_func_gnugettext_libintl=no"])
  219             dnl Now see whether libintl exists and depends on libiconv.
  220             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
  221               LIBS="$LIBS $LIBICONV"
  222               AC_TRY_LINK([#include <libintl.h>
  223 $gt_revision_test_code
  224 extern int _nl_msg_cat_cntr;
  225 extern
  226 #ifdef __cplusplus
  227 "C"
  228 #endif
  229 const char *_nl_expand_alias (const char *);],
  230                 [bindtextdomain ("", "");
  231 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
  232                [LIBINTL="$LIBINTL $LIBICONV"
  233                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
  234                 eval "$gt_func_gnugettext_libintl=yes"
  235                ])
  236             fi
  237             CPPFLAGS="$gt_save_CPPFLAGS"
  238             LIBS="$gt_save_LIBS"])
  239         fi
  240 
  241         dnl If an already present or preinstalled GNU gettext() is found,
  242         dnl use it.  But if this macro is used in GNU gettext, and GNU
  243         dnl gettext is already preinstalled in libintl, we update this
  244         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
  245         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
  246            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
  247                 && test "$PACKAGE" != gettext-runtime \
  248                 && test "$PACKAGE" != gettext-tools; }; then
  249           gt_use_preinstalled_gnugettext=yes
  250         else
  251           dnl Reset the values set by searching for libintl.
  252           LIBINTL=
  253           LTLIBINTL=
  254           INCINTL=
  255         fi
  256 
  257     ifelse(gt_included_intl, yes, [
  258         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
  259           dnl GNU gettext is not found in the C library.
  260           dnl Fall back on included GNU gettext library.
  261           nls_cv_use_gnu_gettext=yes
  262         fi
  263       fi
  264 
  265       if test "$nls_cv_use_gnu_gettext" = "yes"; then
  266         dnl Mark actions used to generate GNU NLS library.
  267         BUILD_INCLUDED_LIBINTL=yes
  268         USE_INCLUDED_LIBINTL=yes
  269         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
  270         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
  271         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
  272       fi
  273 
  274       CATOBJEXT=
  275       if test "$gt_use_preinstalled_gnugettext" = "yes" \
  276          || test "$nls_cv_use_gnu_gettext" = "yes"; then
  277         dnl Mark actions to use GNU gettext tools.
  278         CATOBJEXT=.gmo
  279       fi
  280     ])
  281 
  282     if test -n "$INTL_MACOSX_LIBS"; then
  283       if test "$gt_use_preinstalled_gnugettext" = "yes" \
  284          || test "$nls_cv_use_gnu_gettext" = "yes"; then
  285         dnl Some extra flags are needed during linking.
  286         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
  287         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
  288       fi
  289     fi
  290 
  291     if test "$gt_use_preinstalled_gnugettext" = "yes" \
  292        || test "$nls_cv_use_gnu_gettext" = "yes"; then
  293       AC_DEFINE([ENABLE_NLS], [1],
  294         [Define to 1 if translation of program messages to the user's native language
  295    is requested.])
  296     else
  297       USE_NLS=no
  298     fi
  299   fi
  300 
  301   AC_MSG_CHECKING([whether to use NLS])
  302   AC_MSG_RESULT([$USE_NLS])
  303   if test "$USE_NLS" = "yes"; then
  304     AC_MSG_CHECKING([where the gettext function comes from])
  305     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  306       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  307         gt_source="external libintl"
  308       else
  309         gt_source="libc"
  310       fi
  311     else
  312       gt_source="included intl directory"
  313     fi
  314     AC_MSG_RESULT([$gt_source])
  315   fi
  316 
  317   if test "$USE_NLS" = "yes"; then
  318 
  319     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  320       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  321         AC_MSG_CHECKING([how to link with libintl])
  322         AC_MSG_RESULT([$LIBINTL])
  323         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
  324       fi
  325 
  326       dnl For backward compatibility. Some packages may be using this.
  327       AC_DEFINE([HAVE_GETTEXT], [1],
  328        [Define if the GNU gettext() function is already present or preinstalled.])
  329       AC_DEFINE([HAVE_DCGETTEXT], [1],
  330        [Define if the GNU dcgettext() function is already present or preinstalled.])
  331     fi
  332 
  333     dnl We need to process the po/ directory.
  334     POSUB=po
  335   fi
  336 
  337   ifelse(gt_included_intl, yes, [
  338     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
  339     dnl to 'yes' because some of the testsuite requires it.
  340     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
  341       BUILD_INCLUDED_LIBINTL=yes
  342     fi
  343 
  344     dnl Make all variables we use known to autoconf.
  345     AC_SUBST([BUILD_INCLUDED_LIBINTL])
  346     AC_SUBST([USE_INCLUDED_LIBINTL])
  347     AC_SUBST([CATOBJEXT])
  348 
  349     dnl For backward compatibility. Some configure.ins may be using this.
  350     nls_cv_header_intl=
  351     nls_cv_header_libgt=
  352 
  353     dnl For backward compatibility. Some Makefiles may be using this.
  354     DATADIRNAME=share
  355     AC_SUBST([DATADIRNAME])
  356 
  357     dnl For backward compatibility. Some Makefiles may be using this.
  358     INSTOBJEXT=.mo
  359     AC_SUBST([INSTOBJEXT])
  360 
  361     dnl For backward compatibility. Some Makefiles may be using this.
  362     GENCAT=gencat
  363     AC_SUBST([GENCAT])
  364 
  365     dnl For backward compatibility. Some Makefiles may be using this.
  366     INTLOBJS=
  367     if test "$USE_INCLUDED_LIBINTL" = yes; then
  368       INTLOBJS="\$(GETTOBJS)"
  369     fi
  370     AC_SUBST([INTLOBJS])
  371 
  372     dnl Enable libtool support if the surrounding package wishes it.
  373     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
  374     AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
  375   ])
  376 
  377   dnl For backward compatibility. Some Makefiles may be using this.
  378   INTLLIBS="$LIBINTL"
  379   AC_SUBST([INTLLIBS])
  380 
  381   dnl Make all documented variables known to autoconf.
  382   AC_SUBST([LIBINTL])
  383   AC_SUBST([LTLIBINTL])
  384   AC_SUBST([POSUB])
  385 ])
  386 
  387 
  388 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
  389 m4_define([gt_NEEDS_INIT],
  390 [
  391   m4_divert_text([DEFAULTS], [gt_needs=])
  392   m4_define([gt_NEEDS_INIT], [])
  393 ])
  394 
  395 
  396 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
  397 AC_DEFUN([AM_GNU_GETTEXT_NEED],
  398 [
  399   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
  400 ])
  401 
  402 
  403 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
  404 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
  405 
  406 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
  407 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
  408 #
  409 # This file is free software, distributed under the terms of the GNU
  410 # General Public License.  As a special exception to the GNU General
  411 # Public License, this file may be distributed as part of a program
  412 # that contains a configuration script generated by Autoconf, under
  413 # the same distribution terms as the rest of that program.
  414 #
  415 # This file can be copied and used freely without restrictions.  It can
  416 # be used in projects which are not available under the GNU Public License
  417 # but which still want to provide support for the GNU gettext functionality.
  418 #
  419 # Macro to add for using GNU gettext.
  420 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
  421 #
  422 # Modified to never use included libintl. 
  423 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
  424 #
  425 # Major rework to remove unused code
  426 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
  427 #
  428 # Added better handling of ALL_LINGUAS from GNU gettext version 
  429 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
  430 #
  431 # Modified to require ngettext
  432 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
  433 #
  434 # We need this here as well, since someone might use autoconf-2.5x
  435 # to configure GLib then an older version to configure a package
  436 # using AM_GLIB_GNU_GETTEXT
  437 AC_PREREQ(2.53)
  438 
  439 dnl
  440 dnl We go to great lengths to make sure that aclocal won't 
  441 dnl try to pull in the installed version of these macros
  442 dnl when running aclocal in the glib directory.
  443 dnl
  444 m4_copy([AC_DEFUN],[glib_DEFUN])
  445 m4_copy([AC_REQUIRE],[glib_REQUIRE])
  446 dnl
  447 dnl At the end, if we're not within glib, we'll define the public
  448 dnl definitions in terms of our private definitions.
  449 dnl
  450 
  451 # GLIB_LC_MESSAGES
  452 #--------------------
  453 glib_DEFUN([GLIB_LC_MESSAGES],
  454   [AC_CHECK_HEADERS([locale.h])
  455     if test $ac_cv_header_locale_h = yes; then
  456     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  457       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  458        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  459     if test $am_cv_val_LC_MESSAGES = yes; then
  460       AC_DEFINE(HAVE_LC_MESSAGES, 1,
  461         [Define if your <locale.h> file defines LC_MESSAGES.])
  462     fi
  463   fi])
  464 
  465 # GLIB_PATH_PROG_WITH_TEST
  466 #----------------------------
  467 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  468 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  469 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
  470 [# Extract the first word of "$2", so it can be a program name with args.
  471 set dummy $2; ac_word=[$]2
  472 AC_MSG_CHECKING([for $ac_word])
  473 AC_CACHE_VAL(ac_cv_path_$1,
  474 [case "[$]$1" in
  475   /*)
  476   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  477   ;;
  478   *)
  479   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  480   for ac_dir in ifelse([$5], , $PATH, [$5]); do
  481     test -z "$ac_dir" && ac_dir=.
  482     if test -f $ac_dir/$ac_word; then
  483       if [$3]; then
  484 	ac_cv_path_$1="$ac_dir/$ac_word"
  485 	break
  486       fi
  487     fi
  488   done
  489   IFS="$ac_save_ifs"
  490 dnl If no 4th arg is given, leave the cache variable unset,
  491 dnl so AC_PATH_PROGS will keep looking.
  492 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  493 ])dnl
  494   ;;
  495 esac])dnl
  496 $1="$ac_cv_path_$1"
  497 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  498   AC_MSG_RESULT([$]$1)
  499 else
  500   AC_MSG_RESULT(no)
  501 fi
  502 AC_SUBST($1)dnl
  503 ])
  504 
  505 # GLIB_WITH_NLS
  506 #-----------------
  507 glib_DEFUN([GLIB_WITH_NLS],
  508   dnl NLS is obligatory
  509   [USE_NLS=yes
  510     AC_SUBST(USE_NLS)
  511 
  512     gt_cv_have_gettext=no
  513 
  514     CATOBJEXT=NONE
  515     XGETTEXT=:
  516     INTLLIBS=
  517 
  518     AC_CHECK_HEADER(libintl.h,
  519      [gt_cv_func_dgettext_libintl="no"
  520       libintl_extra_libs=""
  521 
  522       #
  523       # First check in libc
  524       #
  525       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
  526         [AC_TRY_LINK([
  527 #include <libintl.h>
  528 ],
  529          [return !ngettext ("","", 1)],
  530 	  gt_cv_func_ngettext_libc=yes,
  531           gt_cv_func_ngettext_libc=no)
  532         ])
  533   
  534       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  535 	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
  536         	[AC_TRY_LINK([
  537 #include <libintl.h>
  538 ],
  539 	          [return !dgettext ("","")],
  540 		  gt_cv_func_dgettext_libc=yes,
  541 	          gt_cv_func_dgettext_libc=no)
  542         	])
  543       fi
  544   
  545       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  546         AC_CHECK_FUNCS(bind_textdomain_codeset)
  547       fi
  548 
  549       #
  550       # If we don't have everything we want, check in libintl
  551       #
  552       if test "$gt_cv_func_dgettext_libc" != "yes" \
  553 	 || test "$gt_cv_func_ngettext_libc" != "yes" \
  554          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
  555         
  556         AC_CHECK_LIB(intl, bindtextdomain,
  557 	    [AC_CHECK_LIB(intl, ngettext,
  558 		    [AC_CHECK_LIB(intl, dgettext,
  559 			          gt_cv_func_dgettext_libintl=yes)])])
  560 
  561 	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
  562 	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
  563 	  AC_MSG_RESULT([])
  564   	  AC_CHECK_LIB(intl, ngettext,
  565           	[AC_CHECK_LIB(intl, dcgettext,
  566 		       [gt_cv_func_dgettext_libintl=yes
  567 			libintl_extra_libs=-liconv],
  568 			:,-liconv)],
  569 		:,-liconv)
  570         fi
  571 
  572         #
  573         # If we found libintl, then check in it for bind_textdomain_codeset();
  574         # we'll prefer libc if neither have bind_textdomain_codeset(),
  575         # and both have dgettext and ngettext
  576         #
  577         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
  578           glib_save_LIBS="$LIBS"
  579           LIBS="$LIBS -lintl $libintl_extra_libs"
  580           unset ac_cv_func_bind_textdomain_codeset
  581           AC_CHECK_FUNCS(bind_textdomain_codeset)
  582           LIBS="$glib_save_LIBS"
  583 
  584           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
  585             gt_cv_func_dgettext_libc=no
  586           else
  587             if test "$gt_cv_func_dgettext_libc" = "yes" \
  588 		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
  589               gt_cv_func_dgettext_libintl=no
  590             fi
  591           fi
  592         fi
  593       fi
  594 
  595       if test "$gt_cv_func_dgettext_libc" = "yes" \
  596 	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
  597         gt_cv_have_gettext=yes
  598       fi
  599   
  600       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
  601         INTLLIBS="-lintl $libintl_extra_libs"
  602       fi
  603   
  604       if test "$gt_cv_have_gettext" = "yes"; then
  605 	AC_DEFINE(HAVE_GETTEXT,1,
  606 	  [Define if the GNU gettext() function is already present or preinstalled.])
  607 	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  608 	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
  609 	if test "$MSGFMT" != "no"; then
  610           glib_save_LIBS="$LIBS"
  611           LIBS="$LIBS $INTLLIBS"
  612 	  AC_CHECK_FUNCS(dcgettext)
  613 	  MSGFMT_OPTS=
  614 	  AC_MSG_CHECKING([if msgfmt accepts -c])
  615 	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
  616 msgid ""
  617 msgstr ""
  618 "Content-Type: text/plain; charset=UTF-8\n"
  619 "Project-Id-Version: test 1.0\n"
  620 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
  621 "Last-Translator: test <foo@bar.xx>\n"
  622 "Language-Team: C <LL@li.org>\n"
  623 "MIME-Version: 1.0\n"
  624 "Content-Transfer-Encoding: 8bit\n"
  625 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
  626 	  AC_SUBST(MSGFMT_OPTS)
  627 	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  628 	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  629 	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
  630 	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
  631 			 return _nl_msg_cat_cntr],
  632 	    [CATOBJEXT=.gmo 
  633              DATADIRNAME=share],
  634 	    [case $host in
  635 	    *-*-solaris*)
  636 	    dnl On Solaris, if bind_textdomain_codeset is in libc,
  637 	    dnl GNU format message catalog is always supported,
  638             dnl since both are added to the libc all together.
  639 	    dnl Hence, we'd like to go with DATADIRNAME=share and
  640 	    dnl and CATOBJEXT=.gmo in this case.
  641             AC_CHECK_FUNC(bind_textdomain_codeset,
  642 	      [CATOBJEXT=.gmo 
  643                DATADIRNAME=share],
  644 	      [CATOBJEXT=.mo
  645                DATADIRNAME=lib])
  646 	    ;;
  647 	    *)
  648 	    CATOBJEXT=.mo
  649             DATADIRNAME=lib
  650 	    ;;
  651 	    esac])
  652           LIBS="$glib_save_LIBS"
  653 	  INSTOBJEXT=.mo
  654 	else
  655 	  gt_cv_have_gettext=no
  656 	fi
  657       fi
  658     ])
  659 
  660     if test "$gt_cv_have_gettext" = "yes" ; then
  661       AC_DEFINE(ENABLE_NLS, 1,
  662         [always defined to indicate that i18n is enabled])
  663     fi
  664 
  665     dnl Test whether we really found GNU xgettext.
  666     if test "$XGETTEXT" != ":"; then
  667       dnl If it is not GNU xgettext we define it as : so that the
  668       dnl Makefiles still can work.
  669       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  670         : ;
  671       else
  672         AC_MSG_RESULT(
  673 	  [found xgettext program is not GNU xgettext; ignore it])
  674         XGETTEXT=":"
  675       fi
  676     fi
  677 
  678     # We need to process the po/ directory.
  679     POSUB=po
  680 
  681     AC_OUTPUT_COMMANDS(
  682       [case "$CONFIG_FILES" in *po/Makefile.in*)
  683         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  684       esac])
  685 
  686     dnl These rules are solely for the distribution goal.  While doing this
  687     dnl we only have to keep exactly one list of the available catalogs
  688     dnl in configure.ac.
  689     for lang in $ALL_LINGUAS; do
  690       GMOFILES="$GMOFILES $lang.gmo"
  691       POFILES="$POFILES $lang.po"
  692     done
  693 
  694     dnl Make all variables we use known to autoconf.
  695     AC_SUBST(CATALOGS)
  696     AC_SUBST(CATOBJEXT)
  697     AC_SUBST(DATADIRNAME)
  698     AC_SUBST(GMOFILES)
  699     AC_SUBST(INSTOBJEXT)
  700     AC_SUBST(INTLLIBS)
  701     AC_SUBST(PO_IN_DATADIR_TRUE)
  702     AC_SUBST(PO_IN_DATADIR_FALSE)
  703     AC_SUBST(POFILES)
  704     AC_SUBST(POSUB)
  705   ])
  706 
  707 # AM_GLIB_GNU_GETTEXT
  708 # -------------------
  709 # Do checks necessary for use of gettext. If a suitable implementation 
  710 # of gettext is found in either in libintl or in the C library,
  711 # it will set INTLLIBS to the libraries needed for use of gettext
  712 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
  713 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
  714 # on various variables needed by the Makefile.in.in installed by 
  715 # glib-gettextize.
  716 dnl
  717 glib_DEFUN([GLIB_GNU_GETTEXT],
  718   [AC_REQUIRE([AC_PROG_CC])dnl
  719    AC_REQUIRE([AC_HEADER_STDC])dnl
  720    
  721    GLIB_LC_MESSAGES
  722    GLIB_WITH_NLS
  723 
  724    if test "$gt_cv_have_gettext" = "yes"; then
  725      if test "x$ALL_LINGUAS" = "x"; then
  726        LINGUAS=
  727      else
  728        AC_MSG_CHECKING(for catalogs to be installed)
  729        NEW_LINGUAS=
  730        for presentlang in $ALL_LINGUAS; do
  731          useit=no
  732          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
  733            desiredlanguages="$LINGUAS"
  734          else
  735            desiredlanguages="$ALL_LINGUAS"
  736          fi
  737          for desiredlang in $desiredlanguages; do
  738  	   # Use the presentlang catalog if desiredlang is
  739            #   a. equal to presentlang, or
  740            #   b. a variant of presentlang (because in this case,
  741            #      presentlang can be used as a fallback for messages
  742            #      which are not translated in the desiredlang catalog).
  743            case "$desiredlang" in
  744              "$presentlang"*) useit=yes;;
  745            esac
  746          done
  747          if test $useit = yes; then
  748            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
  749          fi
  750        done
  751        LINGUAS=$NEW_LINGUAS
  752        AC_MSG_RESULT($LINGUAS)
  753      fi
  754 
  755      dnl Construct list of names of catalog files to be constructed.
  756      if test -n "$LINGUAS"; then
  757        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  758      fi
  759    fi
  760 
  761    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
  762    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
  763    dnl Try to locate is.
  764    MKINSTALLDIRS=
  765    if test -n "$ac_aux_dir"; then
  766      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  767    fi
  768    if test -z "$MKINSTALLDIRS"; then
  769      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  770    fi
  771    AC_SUBST(MKINSTALLDIRS)
  772 
  773    dnl Generate list of files to be processed by xgettext which will
  774    dnl be included in po/Makefile.
  775    test -d po || mkdir po
  776    if test "x$srcdir" != "x."; then
  777      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  778        posrcprefix="$srcdir/"
  779      else
  780        posrcprefix="../$srcdir/"
  781      fi
  782    else
  783      posrcprefix="../"
  784    fi
  785    rm -f po/POTFILES
  786    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  787 	< $srcdir/po/POTFILES.in > po/POTFILES
  788   ])
  789 
  790 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
  791 # -------------------------------
  792 # Define VARIABLE to the location where catalog files will
  793 # be installed by po/Makefile.
  794 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
  795 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
  796 glib_save_prefix="$prefix"
  797 glib_save_exec_prefix="$exec_prefix"
  798 glib_save_datarootdir="$datarootdir"
  799 test "x$prefix" = xNONE && prefix=$ac_default_prefix
  800 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  801 datarootdir=`eval echo "${datarootdir}"`
  802 if test "x$CATOBJEXT" = "x.mo" ; then
  803   localedir=`eval echo "${libdir}/locale"`
  804 else
  805   localedir=`eval echo "${datadir}/locale"`
  806 fi
  807 prefix="$glib_save_prefix"
  808 exec_prefix="$glib_save_exec_prefix"
  809 datarootdir="$glib_save_datarootdir"
  810 AC_DEFINE_UNQUOTED($1, "$localedir",
  811   [Define the location where the catalogs will be installed])
  812 ])
  813 
  814 dnl
  815 dnl Now the definitions that aclocal will find
  816 dnl
  817 ifdef(glib_configure_ac,[],[
  818 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
  819 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
  820 ])dnl
  821 
  822 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
  823 # 
  824 # Create a temporary file with TEST-FILE as its contents and pass the
  825 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
  826 # 0 and perform ACTION-IF-FAIL for any other exit status.
  827 AC_DEFUN([GLIB_RUN_PROG],
  828 [cat >conftest.foo <<_ACEOF
  829 $2
  830 _ACEOF
  831 if AC_RUN_LOG([$1 conftest.foo]); then
  832   m4_ifval([$3], [$3], [:])
  833 m4_ifvaln([$4], [else $4])dnl
  834 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
  835 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
  836 fi])
  837 
  838 
  839 dnl GLIB_GSETTINGS
  840 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
  841 dnl the schema should be compiled
  842 dnl
  843 
  844 AC_DEFUN([GLIB_GSETTINGS],
  845 [
  846   m4_pattern_allow([AM_V_GEN])
  847   AC_ARG_ENABLE(schemas-compile,
  848                 AC_HELP_STRING([--disable-schemas-compile],
  849                                [Disable regeneration of gschemas.compiled on install]),
  850                 [case ${enableval} in
  851                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
  852                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
  853                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
  854                  esac])
  855   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
  856   PKG_PROG_PKG_CONFIG([0.16])
  857   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
  858   if test x$cross_compiling != xyes; then
  859     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
  860   else
  861     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
  862   fi
  863   AC_SUBST(GLIB_COMPILE_SCHEMAS)
  864   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
  865     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
  866   else
  867     ifelse([$1],,[:],[$1])
  868   fi
  869 
  870   GSETTINGS_RULES='
  871 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
  872 
  873 mostlyclean-am: clean-gsettings-schemas
  874 
  875 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
  876 
  877 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
  878 	$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
  879 
  880 all-am: $(gsettings_SCHEMAS:.xml=.valid)
  881 uninstall-am: uninstall-gsettings-schemas
  882 install-data-am: install-gsettings-schemas
  883 
  884 .SECONDARY: $(gsettings_SCHEMAS)
  885 
  886 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
  887 	@$(NORMAL_INSTALL)
  888 	if test -n "$^"; then \
  889 		test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
  890 		$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
  891 		test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
  892 	fi
  893 
  894 uninstall-gsettings-schemas:
  895 	@$(NORMAL_UNINSTALL)
  896 	@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
  897 	files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
  898 	test -n "$$files" || exit 0; \
  899 	echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
  900 	cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
  901 	test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
  902 
  903 clean-gsettings-schemas:
  904 	rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
  905 
  906 ifdef gsettings_ENUM_NAMESPACE
  907 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
  908 	$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
  909 endif
  910 '
  911   _GSETTINGS_SUBST(GSETTINGS_RULES)
  912 ])
  913 
  914 dnl _GSETTINGS_SUBST(VARIABLE)
  915 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
  916 AC_DEFUN([_GSETTINGS_SUBST],
  917 [
  918 AC_SUBST([$1])
  919 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
  920 ]
  921 )
  922 
  923 # nls.m4 serial 5 (gettext-0.18)
  924 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
  925 dnl Inc.
  926 dnl This file is free software; the Free Software Foundation
  927 dnl gives unlimited permission to copy and/or distribute it,
  928 dnl with or without modifications, as long as this notice is preserved.
  929 dnl
  930 dnl This file can can be used in projects which are not available under
  931 dnl the GNU General Public License or the GNU Library General Public
  932 dnl License but which still want to provide support for the GNU gettext
  933 dnl functionality.
  934 dnl Please note that the actual code of the GNU gettext library is covered
  935 dnl by the GNU Library General Public License, and the rest of the GNU
  936 dnl gettext package package is covered by the GNU General Public License.
  937 dnl They are *not* in the public domain.
  938 
  939 dnl Authors:
  940 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  941 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  942 
  943 AC_PREREQ([2.50])
  944 
  945 AC_DEFUN([AM_NLS],
  946 [
  947   AC_MSG_CHECKING([whether NLS is requested])
  948   dnl Default is enabled NLS
  949   AC_ARG_ENABLE([nls],
  950     [  --disable-nls           do not use Native Language Support],
  951     USE_NLS=$enableval, USE_NLS=yes)
  952   AC_MSG_RESULT([$USE_NLS])
  953   AC_SUBST([USE_NLS])
  954 ])
  955 
  956 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
  957 # serial 1 (pkg-config-0.24)
  958 # 
  959 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  960 #
  961 # This program is free software; you can redistribute it and/or modify
  962 # it under the terms of the GNU General Public License as published by
  963 # the Free Software Foundation; either version 2 of the License, or
  964 # (at your option) any later version.
  965 #
  966 # This program is distributed in the hope that it will be useful, but
  967 # WITHOUT ANY WARRANTY; without even the implied warranty of
  968 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  969 # General Public License for more details.
  970 #
  971 # You should have received a copy of the GNU General Public License
  972 # along with this program; if not, write to the Free Software
  973 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  974 #
  975 # As a special exception to the GNU General Public License, if you
  976 # distribute this file as part of a program that contains a
  977 # configuration script generated by Autoconf, you may include it under
  978 # the same distribution terms that you use for the rest of that program.
  979 
  980 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  981 # ----------------------------------
  982 AC_DEFUN([PKG_PROG_PKG_CONFIG],
  983 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  984 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  985 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  986 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  987 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  988 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  989 
  990 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  991 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  992 fi
  993 if test -n "$PKG_CONFIG"; then
  994 	_pkg_min_version=m4_default([$1], [0.9.0])
  995 	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  996 	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  997 		AC_MSG_RESULT([yes])
  998 	else
  999 		AC_MSG_RESULT([no])
 1000 		PKG_CONFIG=""
 1001 	fi
 1002 fi[]dnl
 1003 ])# PKG_PROG_PKG_CONFIG
 1004 
 1005 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 1006 #
 1007 # Check to see whether a particular set of modules exists.  Similar
 1008 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 1009 #
 1010 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 1011 # only at the first occurence in configure.ac, so if the first place
 1012 # it's called might be skipped (such as if it is within an "if", you
 1013 # have to call PKG_CHECK_EXISTS manually
 1014 # --------------------------------------------------------------
 1015 AC_DEFUN([PKG_CHECK_EXISTS],
 1016 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1017 if test -n "$PKG_CONFIG" && \
 1018     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 1019   m4_default([$2], [:])
 1020 m4_ifvaln([$3], [else
 1021   $3])dnl
 1022 fi])
 1023 
 1024 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 1025 # ---------------------------------------------
 1026 m4_define([_PKG_CONFIG],
 1027 [if test -n "$$1"; then
 1028     pkg_cv_[]$1="$$1"
 1029  elif test -n "$PKG_CONFIG"; then
 1030     PKG_CHECK_EXISTS([$3],
 1031                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 1032 		      test "x$?" != "x0" && pkg_failed=yes ],
 1033 		     [pkg_failed=yes])
 1034  else
 1035     pkg_failed=untried
 1036 fi[]dnl
 1037 ])# _PKG_CONFIG
 1038 
 1039 # _PKG_SHORT_ERRORS_SUPPORTED
 1040 # -----------------------------
 1041 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 1042 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 1043 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 1044         _pkg_short_errors_supported=yes
 1045 else
 1046         _pkg_short_errors_supported=no
 1047 fi[]dnl
 1048 ])# _PKG_SHORT_ERRORS_SUPPORTED
 1049 
 1050 
 1051 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 1052 # [ACTION-IF-NOT-FOUND])
 1053 #
 1054 #
 1055 # Note that if there is a possibility the first call to
 1056 # PKG_CHECK_MODULES might not happen, you should be sure to include an
 1057 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 1058 #
 1059 #
 1060 # --------------------------------------------------------------
 1061 AC_DEFUN([PKG_CHECK_MODULES],
 1062 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 1063 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 1064 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 1065 
 1066 pkg_failed=no
 1067 AC_MSG_CHECKING([for $1])
 1068 
 1069 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 1070 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
 1071 
 1072 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 1073 and $1[]_LIBS to avoid the need to call pkg-config.
 1074 See the pkg-config man page for more details.])
 1075 
 1076 if test $pkg_failed = yes; then
 1077    	AC_MSG_RESULT([no])
 1078         _PKG_SHORT_ERRORS_SUPPORTED
 1079         if test $_pkg_short_errors_supported = yes; then
 1080 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 1081         else 
 1082 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 1083         fi
 1084 	# Put the nasty error message in config.log where it belongs
 1085 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 1086 
 1087 	m4_default([$4], [AC_MSG_ERROR(
 1088 [Package requirements ($2) were not met:
 1089 
 1090 $$1_PKG_ERRORS
 1091 
 1092 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 1093 installed software in a non-standard prefix.
 1094 
 1095 _PKG_TEXT])[]dnl
 1096         ])
 1097 elif test $pkg_failed = untried; then
 1098      	AC_MSG_RESULT([no])
 1099 	m4_default([$4], [AC_MSG_FAILURE(
 1100 [The pkg-config script could not be found or is too old.  Make sure it
 1101 is in your PATH or set the PKG_CONFIG environment variable to the full
 1102 path to pkg-config.
 1103 
 1104 _PKG_TEXT
 1105 
 1106 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 1107         ])
 1108 else
 1109 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 1110 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 1111         AC_MSG_RESULT([yes])
 1112 	$3
 1113 fi[]dnl
 1114 ])# PKG_CHECK_MODULES
 1115 
 1116 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 1117 #
 1118 # This file is free software; the Free Software Foundation
 1119 # gives unlimited permission to copy and/or distribute it,
 1120 # with or without modifications, as long as this notice is preserved.
 1121 
 1122 # AM_AUTOMAKE_VERSION(VERSION)
 1123 # ----------------------------
 1124 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 1125 # generated from the m4 files accompanying Automake X.Y.
 1126 # (This private macro should not be called outside this file.)
 1127 AC_DEFUN([AM_AUTOMAKE_VERSION],
 1128 [am__api_version='1.11'
 1129 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 1130 dnl require some minimum version.  Point them to the right macro.
 1131 m4_if([$1], [1.11.1], [],
 1132       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 1133 ])
 1134 
 1135 # _AM_AUTOCONF_VERSION(VERSION)
 1136 # -----------------------------
 1137 # aclocal traces this macro to find the Autoconf version.
 1138 # This is a private macro too.  Using m4_define simplifies
 1139 # the logic in aclocal, which can simply ignore this definition.
 1140 m4_define([_AM_AUTOCONF_VERSION], [])
 1141 
 1142 # AM_SET_CURRENT_AUTOMAKE_VERSION
 1143 # -------------------------------
 1144 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 1145 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 1146 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 1147 [AM_AUTOMAKE_VERSION([1.11.1])dnl
 1148 m4_ifndef([AC_AUTOCONF_VERSION],
 1149   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 1150 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 1151 
 1152 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 1153 
 1154 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 1155 #
 1156 # This file is free software; the Free Software Foundation
 1157 # gives unlimited permission to copy and/or distribute it,
 1158 # with or without modifications, as long as this notice is preserved.
 1159 
 1160 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 1161 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 1162 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 1163 #
 1164 # Of course, Automake must honor this variable whenever it calls a
 1165 # tool from the auxiliary directory.  The problem is that $srcdir (and
 1166 # therefore $ac_aux_dir as well) can be either absolute or relative,
 1167 # depending on how configure is run.  This is pretty annoying, since
 1168 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
 1169 # source directory, any form will work fine, but in subdirectories a
 1170 # relative path needs to be adjusted first.
 1171 #
 1172 # $ac_aux_dir/missing
 1173 #    fails when called from a subdirectory if $ac_aux_dir is relative
 1174 # $top_srcdir/$ac_aux_dir/missing
 1175 #    fails if $ac_aux_dir is absolute,
 1176 #    fails when called from a subdirectory in a VPATH build with
 1177 #          a relative $ac_aux_dir
 1178 #
 1179 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 1180 # are both prefixed by $srcdir.  In an in-source build this is usually
 1181 # harmless because $srcdir is `.', but things will broke when you
 1182 # start a VPATH build or use an absolute $srcdir.
 1183 #
 1184 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 1185 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 1186 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 1187 # and then we would define $MISSING as
 1188 #   MISSING="\${SHELL} $am_aux_dir/missing"
 1189 # This will work as long as MISSING is not called from configure, because
 1190 # unfortunately $(top_srcdir) has no meaning in configure.
 1191 # However there are other variables, like CC, which are often used in
 1192 # configure, and could therefore not use this "fixed" $ac_aux_dir.
 1193 #
 1194 # Another solution, used here, is to always expand $ac_aux_dir to an
 1195 # absolute PATH.  The drawback is that using absolute paths prevent a
 1196 # configured tree to be moved without reconfiguration.
 1197 
 1198 AC_DEFUN([AM_AUX_DIR_EXPAND],
 1199 [dnl Rely on autoconf to set up CDPATH properly.
 1200 AC_PREREQ([2.50])dnl
 1201 # expand $ac_aux_dir to an absolute path
 1202 am_aux_dir=`cd $ac_aux_dir && pwd`
 1203 ])
 1204 
 1205 # AM_CONDITIONAL                                            -*- Autoconf -*-
 1206 
 1207 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 1208 # Free Software Foundation, Inc.
 1209 #
 1210 # This file is free software; the Free Software Foundation
 1211 # gives unlimited permission to copy and/or distribute it,
 1212 # with or without modifications, as long as this notice is preserved.
 1213 
 1214 # serial 9
 1215 
 1216 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 1217 # -------------------------------------
 1218 # Define a conditional.
 1219 AC_DEFUN([AM_CONDITIONAL],
 1220 [AC_PREREQ(2.52)dnl
 1221  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 1222 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 1223 AC_SUBST([$1_TRUE])dnl
 1224 AC_SUBST([$1_FALSE])dnl
 1225 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 1226 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
 1227 m4_define([_AM_COND_VALUE_$1], [$2])dnl
 1228 if $2; then
 1229   $1_TRUE=
 1230   $1_FALSE='#'
 1231 else
 1232   $1_TRUE='#'
 1233   $1_FALSE=
 1234 fi
 1235 AC_CONFIG_COMMANDS_PRE(
 1236 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 1237   AC_MSG_ERROR([[conditional "$1" was never defined.
 1238 Usually this means the macro was only invoked conditionally.]])
 1239 fi])])
 1240 
 1241 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 1242 # Free Software Foundation, Inc.
 1243 #
 1244 # This file is free software; the Free Software Foundation
 1245 # gives unlimited permission to copy and/or distribute it,
 1246 # with or without modifications, as long as this notice is preserved.
 1247 
 1248 # serial 10
 1249 
 1250 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 1251 # written in clear, in which case automake, when reading aclocal.m4,
 1252 # will think it sees a *use*, and therefore will trigger all it's
 1253 # C support machinery.  Also note that it means that autoscan, seeing
 1254 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 1255 
 1256 
 1257 # _AM_DEPENDENCIES(NAME)
 1258 # ----------------------
 1259 # See how the compiler implements dependency checking.
 1260 # NAME is "CC", "CXX", "GCJ", or "OBJC".
 1261 # We try a few techniques and use that to set a single cache variable.
 1262 #
 1263 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 1264 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 1265 # dependency, and given that the user is not expected to run this macro,
 1266 # just rely on AC_PROG_CC.
 1267 AC_DEFUN([_AM_DEPENDENCIES],
 1268 [AC_REQUIRE([AM_SET_DEPDIR])dnl
 1269 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 1270 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 1271 AC_REQUIRE([AM_DEP_TRACK])dnl
 1272 
 1273 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 1274        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 1275        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 1276        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 1277        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 1278                    [depcc="$$1"   am_compiler_list=])
 1279 
 1280 AC_CACHE_CHECK([dependency style of $depcc],
 1281                [am_cv_$1_dependencies_compiler_type],
 1282 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 1283   # We make a subdir and do the tests there.  Otherwise we can end up
 1284   # making bogus files that we don't know about and never remove.  For
 1285   # instance it was reported that on HP-UX the gcc test will end up
 1286   # making a dummy file named `D' -- because `-MD' means `put the output
 1287   # in D'.
 1288   mkdir conftest.dir
 1289   # Copy depcomp to subdir because otherwise we won't find it if we're
 1290   # using a relative directory.
 1291   cp "$am_depcomp" conftest.dir
 1292   cd conftest.dir
 1293   # We will build objects and dependencies in a subdirectory because
 1294   # it helps to detect inapplicable dependency modes.  For instance
 1295   # both Tru64's cc and ICC support -MD to output dependencies as a
 1296   # side effect of compilation, but ICC will put the dependencies in
 1297   # the current directory while Tru64 will put them in the object
 1298   # directory.
 1299   mkdir sub
 1300 
 1301   am_cv_$1_dependencies_compiler_type=none
 1302   if test "$am_compiler_list" = ""; then
 1303      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 1304   fi
 1305   am__universal=false
 1306   m4_case([$1], [CC],
 1307     [case " $depcc " in #(
 1308      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1309      esac],
 1310     [CXX],
 1311     [case " $depcc " in #(
 1312      *\ -arch\ *\ -arch\ *) am__universal=true ;;
 1313      esac])
 1314 
 1315   for depmode in $am_compiler_list; do
 1316     # Setup a source with many dependencies, because some compilers
 1317     # like to wrap large dependency lists on column 80 (with \), and
 1318     # we should not choose a depcomp mode which is confused by this.
 1319     #
 1320     # We need to recreate these files for each test, as the compiler may
 1321     # overwrite some of them when testing with obscure command lines.
 1322     # This happens at least with the AIX C compiler.
 1323     : > sub/conftest.c
 1324     for i in 1 2 3 4 5 6; do
 1325       echo '#include "conftst'$i'.h"' >> sub/conftest.c
 1326       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 1327       # Solaris 8's {/usr,}/bin/sh.
 1328       touch sub/conftst$i.h
 1329     done
 1330     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 1331 
 1332     # We check with `-c' and `-o' for the sake of the "dashmstdout"
 1333     # mode.  It turns out that the SunPro C++ compiler does not properly
 1334     # handle `-M -o', and we need to detect this.  Also, some Intel
 1335     # versions had trouble with output in subdirs
 1336     am__obj=sub/conftest.${OBJEXT-o}
 1337     am__minus_obj="-o $am__obj"
 1338     case $depmode in
 1339     gcc)
 1340       # This depmode causes a compiler race in universal mode.
 1341       test "$am__universal" = false || continue
 1342       ;;
 1343     nosideeffect)
 1344       # after this tag, mechanisms are not by side-effect, so they'll
 1345       # only be used when explicitly requested
 1346       if test "x$enable_dependency_tracking" = xyes; then
 1347 	continue
 1348       else
 1349 	break
 1350       fi
 1351       ;;
 1352     msvisualcpp | msvcmsys)
 1353       # This compiler won't grok `-c -o', but also, the minuso test has
 1354       # not run yet.  These depmodes are late enough in the game, and
 1355       # so weak that their functioning should not be impacted.
 1356       am__obj=conftest.${OBJEXT-o}
 1357       am__minus_obj=
 1358       ;;
 1359     none) break ;;
 1360     esac
 1361     if depmode=$depmode \
 1362        source=sub/conftest.c object=$am__obj \
 1363        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 1364        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 1365          >/dev/null 2>conftest.err &&
 1366        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 1367        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 1368        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 1369        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 1370       # icc doesn't choke on unknown options, it will just issue warnings
 1371       # or remarks (even with -Werror).  So we grep stderr for any message
 1372       # that says an option was ignored or not supported.
 1373       # When given -MP, icc 7.0 and 7.1 complain thusly:
 1374       #   icc: Command line warning: ignoring option '-M'; no argument required
 1375       # The diagnosis changed in icc 8.0:
 1376       #   icc: Command line remark: option '-MP' not supported
 1377       if (grep 'ignoring option' conftest.err ||
 1378           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 1379         am_cv_$1_dependencies_compiler_type=$depmode
 1380         break
 1381       fi
 1382     fi
 1383   done
 1384 
 1385   cd ..
 1386   rm -rf conftest.dir
 1387 else
 1388   am_cv_$1_dependencies_compiler_type=none
 1389 fi
 1390 ])
 1391 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 1392 AM_CONDITIONAL([am__fastdep$1], [
 1393   test "x$enable_dependency_tracking" != xno \
 1394   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 1395 ])
 1396 
 1397 
 1398 # AM_SET_DEPDIR
 1399 # -------------
 1400 # Choose a directory name for dependency files.
 1401 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
 1402 AC_DEFUN([AM_SET_DEPDIR],
 1403 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 1404 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 1405 ])
 1406 
 1407 
 1408 # AM_DEP_TRACK
 1409 # ------------
 1410 AC_DEFUN([AM_DEP_TRACK],
 1411 [AC_ARG_ENABLE(dependency-tracking,
 1412 [  --disable-dependency-tracking  speeds up one-time build
 1413   --enable-dependency-tracking   do not reject slow dependency extractors])
 1414 if test "x$enable_dependency_tracking" != xno; then
 1415   am_depcomp="$ac_aux_dir/depcomp"
 1416   AMDEPBACKSLASH='\'
 1417 fi
 1418 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 1419 AC_SUBST([AMDEPBACKSLASH])dnl
 1420 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 1421 ])
 1422 
 1423 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 1424 
 1425 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 1426 # Free Software Foundation, Inc.
 1427 #
 1428 # This file is free software; the Free Software Foundation
 1429 # gives unlimited permission to copy and/or distribute it,
 1430 # with or without modifications, as long as this notice is preserved.
 1431 
 1432 #serial 5
 1433 
 1434 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 1435 # ------------------------------
 1436 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 1437 [{
 1438   # Autoconf 2.62 quotes --file arguments for eval, but not when files
 1439   # are listed without --file.  Let's play safe and only enable the eval
 1440   # if we detect the quoting.
 1441   case $CONFIG_FILES in
 1442   *\'*) eval set x "$CONFIG_FILES" ;;
 1443   *)   set x $CONFIG_FILES ;;
 1444   esac
 1445   shift
 1446   for mf
 1447   do
 1448     # Strip MF so we end up with the name of the file.
 1449     mf=`echo "$mf" | sed -e 's/:.*$//'`
 1450     # Check whether this is an Automake generated Makefile or not.
 1451     # We used to match only the files named `Makefile.in', but
 1452     # some people rename them; so instead we look at the file content.
 1453     # Grep'ing the first line is not enough: some people post-process
 1454     # each Makefile.in and add a new line on top of each file to say so.
 1455     # Grep'ing the whole file is not good either: AIX grep has a line
 1456     # limit of 2048, but all sed's we know have understand at least 4000.
 1457     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 1458       dirpart=`AS_DIRNAME("$mf")`
 1459     else
 1460       continue
 1461     fi
 1462     # Extract the definition of DEPDIR, am__include, and am__quote
 1463     # from the Makefile without running `make'.
 1464     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 1465     test -z "$DEPDIR" && continue
 1466     am__include=`sed -n 's/^am__include = //p' < "$mf"`
 1467     test -z "am__include" && continue
 1468     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 1469     # When using ansi2knr, U may be empty or an underscore; expand it
 1470     U=`sed -n 's/^U = //p' < "$mf"`
 1471     # Find all dependency output files, they are included files with
 1472     # $(DEPDIR) in their names.  We invoke sed twice because it is the
 1473     # simplest approach to changing $(DEPDIR) to its actual value in the
 1474     # expansion.
 1475     for file in `sed -n "
 1476       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 1477 	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 1478       # Make sure the directory exists.
 1479       test -f "$dirpart/$file" && continue
 1480       fdir=`AS_DIRNAME(["$file"])`
 1481       AS_MKDIR_P([$dirpart/$fdir])
 1482       # echo "creating $dirpart/$file"
 1483       echo '# dummy' > "$dirpart/$file"
 1484     done
 1485   done
 1486 }
 1487 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 1488 
 1489 
 1490 # AM_OUTPUT_DEPENDENCY_COMMANDS
 1491 # -----------------------------
 1492 # This macro should only be invoked once -- use via AC_REQUIRE.
 1493 #
 1494 # This code is only required when automatic dependency tracking
 1495 # is enabled.  FIXME.  This creates each `.P' file that we will
 1496 # need in order to bootstrap the dependency handling code.
 1497 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 1498 [AC_CONFIG_COMMANDS([depfiles],
 1499      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 1500      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 1501 ])
 1502 
 1503 # Do all the work for Automake.                             -*- Autoconf -*-
 1504 
 1505 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 1506 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 1507 #
 1508 # This file is free software; the Free Software Foundation
 1509 # gives unlimited permission to copy and/or distribute it,
 1510 # with or without modifications, as long as this notice is preserved.
 1511 
 1512 # serial 16
 1513 
 1514 # This macro actually does too much.  Some checks are only needed if
 1515 # your package does certain things.  But this isn't really a big deal.
 1516 
 1517 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 1518 # AM_INIT_AUTOMAKE([OPTIONS])
 1519 # -----------------------------------------------
 1520 # The call with PACKAGE and VERSION arguments is the old style
 1521 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
 1522 # and VERSION should now be passed to AC_INIT and removed from
 1523 # the call to AM_INIT_AUTOMAKE.
 1524 # We support both call styles for the transition.  After
 1525 # the next Automake release, Autoconf can make the AC_INIT
 1526 # arguments mandatory, and then we can depend on a new Autoconf
 1527 # release and drop the old call support.
 1528 AC_DEFUN([AM_INIT_AUTOMAKE],
 1529 [AC_PREREQ([2.62])dnl
 1530 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 1531 dnl the ones we care about.
 1532 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 1533 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 1534 AC_REQUIRE([AC_PROG_INSTALL])dnl
 1535 if test "`cd $srcdir && pwd`" != "`pwd`"; then
 1536   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 1537   # is not polluted with repeated "-I."
 1538   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 1539   # test to see if srcdir already configured
 1540   if test -f $srcdir/config.status; then
 1541     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 1542   fi
 1543 fi
 1544 
 1545 # test whether we have cygpath
 1546 if test -z "$CYGPATH_W"; then
 1547   if (cygpath --version) >/dev/null 2>/dev/null; then
 1548     CYGPATH_W='cygpath -w'
 1549   else
 1550     CYGPATH_W=echo
 1551   fi
 1552 fi
 1553 AC_SUBST([CYGPATH_W])
 1554 
 1555 # Define the identity of the package.
 1556 dnl Distinguish between old-style and new-style calls.
 1557 m4_ifval([$2],
 1558 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 1559  AC_SUBST([PACKAGE], [$1])dnl
 1560  AC_SUBST([VERSION], [$2])],
 1561 [_AM_SET_OPTIONS([$1])dnl
 1562 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 1563 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 1564   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 1565  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 1566  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 1567 
 1568 _AM_IF_OPTION([no-define],,
 1569 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 1570  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 1571 
 1572 # Some tools Automake needs.
 1573 AC_REQUIRE([AM_SANITY_CHECK])dnl
 1574 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 1575 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 1576 AM_MISSING_PROG(AUTOCONF, autoconf)
 1577 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 1578 AM_MISSING_PROG(AUTOHEADER, autoheader)
 1579 AM_MISSING_PROG(MAKEINFO, makeinfo)
 1580 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 1581 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 1582 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 1583 # We need awk for the "check" target.  The system "awk" is bad on
 1584 # some platforms.
 1585 AC_REQUIRE([AC_PROG_AWK])dnl
 1586 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 1587 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 1588 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 1589 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 1590 			     [_AM_PROG_TAR([v7])])])
 1591 _AM_IF_OPTION([no-dependencies],,
 1592 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 1593 		  [_AM_DEPENDENCIES(CC)],
 1594 		  [define([AC_PROG_CC],
 1595 			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 1596 AC_PROVIDE_IFELSE([AC_PROG_CXX],
 1597 		  [_AM_DEPENDENCIES(CXX)],
 1598 		  [define([AC_PROG_CXX],
 1599 			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 1600 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 1601 		  [_AM_DEPENDENCIES(OBJC)],
 1602 		  [define([AC_PROG_OBJC],
 1603 			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 1604 ])
 1605 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 1606 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 1607 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 1608 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 1609 AC_CONFIG_COMMANDS_PRE(dnl
 1610 [m4_provide_if([_AM_COMPILER_EXEEXT],
 1611   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 1612 ])
 1613 
 1614 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 1615 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 1616 dnl mangled by Autoconf and run in a shell conditional statement.
 1617 m4_define([_AC_COMPILER_EXEEXT],
 1618 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 1619 
 1620 
 1621 # When config.status generates a header, we must update the stamp-h file.
 1622 # This file resides in the same directory as the config header
 1623 # that is generated.  The stamp files are numbered to have different names.
 1624 
 1625 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 1626 # loop where config.status creates the headers, so we can generate
 1627 # our stamp files there.
 1628 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 1629 [# Compute $1's index in $config_headers.
 1630 _am_arg=$1
 1631 _am_stamp_count=1
 1632 for _am_header in $config_headers :; do
 1633   case $_am_header in
 1634     $_am_arg | $_am_arg:* )
 1635       break ;;
 1636     * )
 1637       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 1638   esac
 1639 done
 1640 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 1641 
 1642 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 1643 #
 1644 # This file is free software; the Free Software Foundation
 1645 # gives unlimited permission to copy and/or distribute it,
 1646 # with or without modifications, as long as this notice is preserved.
 1647 
 1648 # AM_PROG_INSTALL_SH
 1649 # ------------------
 1650 # Define $install_sh.
 1651 AC_DEFUN([AM_PROG_INSTALL_SH],
 1652 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 1653 if test x"${install_sh}" != xset; then
 1654   case $am_aux_dir in
 1655   *\ * | *\	*)
 1656     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 1657   *)
 1658     install_sh="\${SHELL} $am_aux_dir/install-sh"
 1659   esac
 1660 fi
 1661 AC_SUBST(install_sh)])
 1662 
 1663 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 1664 #
 1665 # This file is free software; the Free Software Foundation
 1666 # gives unlimited permission to copy and/or distribute it,
 1667 # with or without modifications, as long as this notice is preserved.
 1668 
 1669 # serial 2
 1670 
 1671 # Check whether the underlying file-system supports filenames
 1672 # with a leading dot.  For instance MS-DOS doesn't.
 1673 AC_DEFUN([AM_SET_LEADING_DOT],
 1674 [rm -rf .tst 2>/dev/null
 1675 mkdir .tst 2>/dev/null
 1676 if test -d .tst; then
 1677   am__leading_dot=.
 1678 else
 1679   am__leading_dot=_
 1680 fi
 1681 rmdir .tst 2>/dev/null
 1682 AC_SUBST([am__leading_dot])])
 1683 
 1684 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 1685 
 1686 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 1687 #
 1688 # This file is free software; the Free Software Foundation
 1689 # gives unlimited permission to copy and/or distribute it,
 1690 # with or without modifications, as long as this notice is preserved.
 1691 
 1692 # serial 4
 1693 
 1694 # AM_MAKE_INCLUDE()
 1695 # -----------------
 1696 # Check to see how make treats includes.
 1697 AC_DEFUN([AM_MAKE_INCLUDE],
 1698 [am_make=${MAKE-make}
 1699 cat > confinc << 'END'
 1700 am__doit:
 1701 	@echo this is the am__doit target
 1702 .PHONY: am__doit
 1703 END
 1704 # If we don't find an include directive, just comment out the code.
 1705 AC_MSG_CHECKING([for style of include used by $am_make])
 1706 am__include="#"
 1707 am__quote=
 1708 _am_result=none
 1709 # First try GNU make style include.
 1710 echo "include confinc" > confmf
 1711 # Ignore all kinds of additional output from `make'.
 1712 case `$am_make -s -f confmf 2> /dev/null` in #(
 1713 *the\ am__doit\ target*)
 1714   am__include=include
 1715   am__quote=
 1716   _am_result=GNU
 1717   ;;
 1718 esac
 1719 # Now try BSD make style include.
 1720 if test "$am__include" = "#"; then
 1721    echo '.include "confinc"' > confmf
 1722    case `$am_make -s -f confmf 2> /dev/null` in #(
 1723    *the\ am__doit\ target*)
 1724      am__include=.include
 1725      am__quote="\""
 1726      _am_result=BSD
 1727      ;;
 1728    esac
 1729 fi
 1730 AC_SUBST([am__include])
 1731 AC_SUBST([am__quote])
 1732 AC_MSG_RESULT([$_am_result])
 1733 rm -f confinc confmf
 1734 ])
 1735 
 1736 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 1737 
 1738 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 1739 # Free Software Foundation, Inc.
 1740 #
 1741 # This file is free software; the Free Software Foundation
 1742 # gives unlimited permission to copy and/or distribute it,
 1743 # with or without modifications, as long as this notice is preserved.
 1744 
 1745 # serial 6
 1746 
 1747 # AM_MISSING_PROG(NAME, PROGRAM)
 1748 # ------------------------------
 1749 AC_DEFUN([AM_MISSING_PROG],
 1750 [AC_REQUIRE([AM_MISSING_HAS_RUN])
 1751 $1=${$1-"${am_missing_run}$2"}
 1752 AC_SUBST($1)])
 1753 
 1754 
 1755 # AM_MISSING_HAS_RUN
 1756 # ------------------
 1757 # Define MISSING if not defined so far and test if it supports --run.
 1758 # If it does, set am_missing_run to use it, otherwise, to nothing.
 1759 AC_DEFUN([AM_MISSING_HAS_RUN],
 1760 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 1761 AC_REQUIRE_AUX_FILE([missing])dnl
 1762 if test x"${MISSING+set}" != xset; then
 1763   case $am_aux_dir in
 1764   *\ * | *\	*)
 1765     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 1766   *)
 1767     MISSING="\${SHELL} $am_aux_dir/missing" ;;
 1768   esac
 1769 fi
 1770 # Use eval to expand $SHELL
 1771 if eval "$MISSING --run true"; then
 1772   am_missing_run="$MISSING --run "
 1773 else
 1774   am_missing_run=
 1775   AC_MSG_WARN([`missing' script is too old or missing])
 1776 fi
 1777 ])
 1778 
 1779 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 1780 #
 1781 # This file is free software; the Free Software Foundation
 1782 # gives unlimited permission to copy and/or distribute it,
 1783 # with or without modifications, as long as this notice is preserved.
 1784 
 1785 # AM_PROG_MKDIR_P
 1786 # ---------------
 1787 # Check for `mkdir -p'.
 1788 AC_DEFUN([AM_PROG_MKDIR_P],
 1789 [AC_PREREQ([2.60])dnl
 1790 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 1791 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 1792 dnl while keeping a definition of mkdir_p for backward compatibility.
 1793 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 1794 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 1795 dnl Makefile.ins that do not define MKDIR_P, so we do our own
 1796 dnl adjustment using top_builddir (which is defined more often than
 1797 dnl MKDIR_P).
 1798 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 1799 case $mkdir_p in
 1800   [[\\/$]]* | ?:[[\\/]]*) ;;
 1801   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 1802 esac
 1803 ])
 1804 
 1805 # Helper functions for option handling.                     -*- Autoconf -*-
 1806 
 1807 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 1808 #
 1809 # This file is free software; the Free Software Foundation
 1810 # gives unlimited permission to copy and/or distribute it,
 1811 # with or without modifications, as long as this notice is preserved.
 1812 
 1813 # serial 4
 1814 
 1815 # _AM_MANGLE_OPTION(NAME)
 1816 # -----------------------
 1817 AC_DEFUN([_AM_MANGLE_OPTION],
 1818 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 1819 
 1820 # _AM_SET_OPTION(NAME)
 1821 # ------------------------------
 1822 # Set option NAME.  Presently that only means defining a flag for this option.
 1823 AC_DEFUN([_AM_SET_OPTION],
 1824 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 1825 
 1826 # _AM_SET_OPTIONS(OPTIONS)
 1827 # ----------------------------------
 1828 # OPTIONS is a space-separated list of Automake options.
 1829 AC_DEFUN([_AM_SET_OPTIONS],
 1830 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 1831 
 1832 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 1833 # -------------------------------------------
 1834 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 1835 AC_DEFUN([_AM_IF_OPTION],
 1836 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 1837 
 1838 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 1839 
 1840 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 1841 # Free Software Foundation, Inc.
 1842 #
 1843 # This file is free software; the Free Software Foundation
 1844 # gives unlimited permission to copy and/or distribute it,
 1845 # with or without modifications, as long as this notice is preserved.
 1846 
 1847 # serial 5
 1848 
 1849 # AM_SANITY_CHECK
 1850 # ---------------
 1851 AC_DEFUN([AM_SANITY_CHECK],
 1852 [AC_MSG_CHECKING([whether build environment is sane])
 1853 # Just in case
 1854 sleep 1
 1855 echo timestamp > conftest.file
 1856 # Reject unsafe characters in $srcdir or the absolute working directory
 1857 # name.  Accept space and tab only in the latter.
 1858 am_lf='
 1859 '
 1860 case `pwd` in
 1861   *[[\\\"\#\$\&\'\`$am_lf]]*)
 1862     AC_MSG_ERROR([unsafe absolute working directory name]);;
 1863 esac
 1864 case $srcdir in
 1865   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
 1866     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 1867 esac
 1868 
 1869 # Do `set' in a subshell so we don't clobber the current shell's
 1870 # arguments.  Must try -L first in case configure is actually a
 1871 # symlink; some systems play weird games with the mod time of symlinks
 1872 # (eg FreeBSD returns the mod time of the symlink's containing
 1873 # directory).
 1874 if (
 1875    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 1876    if test "$[*]" = "X"; then
 1877       # -L didn't work.
 1878       set X `ls -t "$srcdir/configure" conftest.file`
 1879    fi
 1880    rm -f conftest.file
 1881    if test "$[*]" != "X $srcdir/configure conftest.file" \
 1882       && test "$[*]" != "X conftest.file $srcdir/configure"; then
 1883 
 1884       # If neither matched, then we have a broken ls.  This can happen
 1885       # if, for instance, CONFIG_SHELL is bash and it inherits a
 1886       # broken ls alias from the environment.  This has actually
 1887       # happened.  Such a system could not be considered "sane".
 1888       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 1889 alias in your environment])
 1890    fi
 1891 
 1892    test "$[2]" = conftest.file
 1893    )
 1894 then
 1895    # Ok.
 1896    :
 1897 else
 1898    AC_MSG_ERROR([newly created file is older than distributed files!
 1899 Check your system clock])
 1900 fi
 1901 AC_MSG_RESULT(yes)])
 1902 
 1903 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 1904 #
 1905 # This file is free software; the Free Software Foundation
 1906 # gives unlimited permission to copy and/or distribute it,
 1907 # with or without modifications, as long as this notice is preserved.
 1908 
 1909 # AM_PROG_INSTALL_STRIP
 1910 # ---------------------
 1911 # One issue with vendor `install' (even GNU) is that you can't
 1912 # specify the program used to strip binaries.  This is especially
 1913 # annoying in cross-compiling environments, where the build's strip
 1914 # is unlikely to handle the host's binaries.
 1915 # Fortunately install-sh will honor a STRIPPROG variable, so we
 1916 # always use install-sh in `make install-strip', and initialize
 1917 # STRIPPROG with the value of the STRIP variable (set by the user).
 1918 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 1919 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 1920 # Installed binaries are usually stripped using `strip' when the user
 1921 # run `make install-strip'.  However `strip' might not be the right
 1922 # tool to use in cross-compilation environments, therefore Automake
 1923 # will honor the `STRIP' environment variable to overrule this program.
 1924 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 1925 if test "$cross_compiling" != no; then
 1926   AC_CHECK_TOOL([STRIP], [strip], :)
 1927 fi
 1928 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 1929 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 1930 
 1931 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 1932 #
 1933 # This file is free software; the Free Software Foundation
 1934 # gives unlimited permission to copy and/or distribute it,
 1935 # with or without modifications, as long as this notice is preserved.
 1936 
 1937 # serial 2
 1938 
 1939 # _AM_SUBST_NOTMAKE(VARIABLE)
 1940 # ---------------------------
 1941 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 1942 # This macro is traced by Automake.
 1943 AC_DEFUN([_AM_SUBST_NOTMAKE])
 1944 
 1945 # AM_SUBST_NOTMAKE(VARIABLE)
 1946 # ---------------------------
 1947 # Public sister of _AM_SUBST_NOTMAKE.
 1948 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 1949 
 1950 # Check how to create a tarball.                            -*- Autoconf -*-
 1951 
 1952 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 1953 #
 1954 # This file is free software; the Free Software Foundation
 1955 # gives unlimited permission to copy and/or distribute it,
 1956 # with or without modifications, as long as this notice is preserved.
 1957 
 1958 # serial 2
 1959 
 1960 # _AM_PROG_TAR(FORMAT)
 1961 # --------------------
 1962 # Check how to create a tarball in format FORMAT.
 1963 # FORMAT should be one of `v7', `ustar', or `pax'.
 1964 #
 1965 # Substitute a variable $(am__tar) that is a command
 1966 # writing to stdout a FORMAT-tarball containing the directory
 1967 # $tardir.
 1968 #     tardir=directory && $(am__tar) > result.tar
 1969 #
 1970 # Substitute a variable $(am__untar) that extract such
 1971 # a tarball read from stdin.
 1972 #     $(am__untar) < result.tar
 1973 AC_DEFUN([_AM_PROG_TAR],
 1974 [# Always define AMTAR for backward compatibility.
 1975 AM_MISSING_PROG([AMTAR], [tar])
 1976 m4_if([$1], [v7],
 1977      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 1978      [m4_case([$1], [ustar],, [pax],,
 1979               [m4_fatal([Unknown tar format])])
 1980 AC_MSG_CHECKING([how to create a $1 tar archive])
 1981 # Loop over all known methods to create a tar archive until one works.
 1982 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 1983 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 1984 # Do not fold the above two line into one, because Tru64 sh and
 1985 # Solaris sh will not grok spaces in the rhs of `-'.
 1986 for _am_tool in $_am_tools
 1987 do
 1988   case $_am_tool in
 1989   gnutar)
 1990     for _am_tar in tar gnutar gtar;
 1991     do
 1992       AM_RUN_LOG([$_am_tar --version]) && break
 1993     done
 1994     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 1995     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 1996     am__untar="$_am_tar -xf -"
 1997     ;;
 1998   plaintar)
 1999     # Must skip GNU tar: if it does not support --format= it doesn't create
 2000     # ustar tarball either.
 2001     (tar --version) >/dev/null 2>&1 && continue
 2002     am__tar='tar chf - "$$tardir"'
 2003     am__tar_='tar chf - "$tardir"'
 2004     am__untar='tar xf -'
 2005     ;;
 2006   pax)
 2007     am__tar='pax -L -x $1 -w "$$tardir"'
 2008     am__tar_='pax -L -x $1 -w "$tardir"'
 2009     am__untar='pax -r'
 2010     ;;
 2011   cpio)
 2012     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 2013     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 2014     am__untar='cpio -i -H $1 -d'
 2015     ;;
 2016   none)
 2017     am__tar=false
 2018     am__tar_=false
 2019     am__untar=false
 2020     ;;
 2021   esac
 2022 
 2023   # If the value was cached, stop now.  We just wanted to have am__tar
 2024   # and am__untar set.
 2025   test -n "${am_cv_prog_tar_$1}" && break
 2026 
 2027   # tar/untar a dummy directory, and stop if the command works
 2028   rm -rf conftest.dir
 2029   mkdir conftest.dir
 2030   echo GrepMe > conftest.dir/file
 2031   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 2032   rm -rf conftest.dir
 2033   if test -s conftest.tar; then
 2034     AM_RUN_LOG([$am__untar <conftest.tar])
 2035     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 2036   fi
 2037 done
 2038 rm -rf conftest.dir
 2039 
 2040 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 2041 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 2042 AC_SUBST([am__tar])
 2043 AC_SUBST([am__untar])
 2044 ]) # _AM_PROG_TAR
 2045 
 2046 m4_include([m4/dk-pkgprog.m4])
 2047 m4_include([m4/dk-warn.m4])
 2048 m4_include([m4/intltool.m4])