Home | History | Annotate | Line # | Download | only in dist
aclocal.m4 revision 1.1.1.2
      1  1.1.1.2  christos # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
      2      1.1  christos 
      3      1.1  christos # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
      4  1.1.1.2  christos # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
      5      1.1  christos # This file is free software; the Free Software Foundation
      6      1.1  christos # gives unlimited permission to copy and/or distribute it,
      7      1.1  christos # with or without modifications, as long as this notice is preserved.
      8      1.1  christos 
      9      1.1  christos # This program is distributed in the hope that it will be useful,
     10      1.1  christos # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
     11      1.1  christos # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     12      1.1  christos # PARTICULAR PURPOSE.
     13      1.1  christos 
     14  1.1.1.2  christos m4_ifndef([AC_AUTOCONF_VERSION],
     15  1.1.1.2  christos   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
     16  1.1.1.2  christos m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
     17  1.1.1.2  christos [m4_warning([this file was generated for autoconf 2.65.
     18  1.1.1.2  christos You have another version of autoconf.  It may work, but is not guaranteed to.
     19  1.1.1.2  christos If you have problems, you may need to regenerate the build system entirely.
     20  1.1.1.2  christos To do so, use the procedure documented by the package, typically `autoreconf'.])])
     21  1.1.1.2  christos 
     22  1.1.1.2  christos # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
     23      1.1  christos #
     24      1.1  christos # This file is free software; the Free Software Foundation
     25      1.1  christos # gives unlimited permission to copy and/or distribute it,
     26      1.1  christos # with or without modifications, as long as this notice is preserved.
     27      1.1  christos 
     28      1.1  christos # AM_AUTOMAKE_VERSION(VERSION)
     29      1.1  christos # ----------------------------
     30      1.1  christos # Automake X.Y traces this macro to ensure aclocal.m4 has been
     31      1.1  christos # generated from the m4 files accompanying Automake X.Y.
     32  1.1.1.2  christos # (This private macro should not be called outside this file.)
     33  1.1.1.2  christos AC_DEFUN([AM_AUTOMAKE_VERSION],
     34  1.1.1.2  christos [am__api_version='1.11'
     35  1.1.1.2  christos dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
     36  1.1.1.2  christos dnl require some minimum version.  Point them to the right macro.
     37  1.1.1.2  christos m4_if([$1], [1.11.1], [],
     38  1.1.1.2  christos       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
     39  1.1.1.2  christos ])
     40  1.1.1.2  christos 
     41  1.1.1.2  christos # _AM_AUTOCONF_VERSION(VERSION)
     42  1.1.1.2  christos # -----------------------------
     43  1.1.1.2  christos # aclocal traces this macro to find the Autoconf version.
     44  1.1.1.2  christos # This is a private macro too.  Using m4_define simplifies
     45  1.1.1.2  christos # the logic in aclocal, which can simply ignore this definition.
     46  1.1.1.2  christos m4_define([_AM_AUTOCONF_VERSION], [])
     47      1.1  christos 
     48      1.1  christos # AM_SET_CURRENT_AUTOMAKE_VERSION
     49      1.1  christos # -------------------------------
     50  1.1.1.2  christos # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
     51  1.1.1.2  christos # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
     52      1.1  christos AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
     53  1.1.1.2  christos [AM_AUTOMAKE_VERSION([1.11.1])dnl
     54  1.1.1.2  christos m4_ifndef([AC_AUTOCONF_VERSION],
     55  1.1.1.2  christos   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
     56  1.1.1.2  christos _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
     57      1.1  christos 
     58      1.1  christos # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
     59      1.1  christos 
     60      1.1  christos # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
     61      1.1  christos #
     62      1.1  christos # This file is free software; the Free Software Foundation
     63      1.1  christos # gives unlimited permission to copy and/or distribute it,
     64      1.1  christos # with or without modifications, as long as this notice is preserved.
     65      1.1  christos 
     66      1.1  christos # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
     67      1.1  christos # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
     68      1.1  christos # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
     69      1.1  christos #
     70      1.1  christos # Of course, Automake must honor this variable whenever it calls a
     71      1.1  christos # tool from the auxiliary directory.  The problem is that $srcdir (and
     72      1.1  christos # therefore $ac_aux_dir as well) can be either absolute or relative,
     73      1.1  christos # depending on how configure is run.  This is pretty annoying, since
     74      1.1  christos # it makes $ac_aux_dir quite unusable in subdirectories: in the top
     75      1.1  christos # source directory, any form will work fine, but in subdirectories a
     76      1.1  christos # relative path needs to be adjusted first.
     77      1.1  christos #
     78      1.1  christos # $ac_aux_dir/missing
     79      1.1  christos #    fails when called from a subdirectory if $ac_aux_dir is relative
     80      1.1  christos # $top_srcdir/$ac_aux_dir/missing
     81      1.1  christos #    fails if $ac_aux_dir is absolute,
     82      1.1  christos #    fails when called from a subdirectory in a VPATH build with
     83      1.1  christos #          a relative $ac_aux_dir
     84      1.1  christos #
     85      1.1  christos # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
     86      1.1  christos # are both prefixed by $srcdir.  In an in-source build this is usually
     87      1.1  christos # harmless because $srcdir is `.', but things will broke when you
     88      1.1  christos # start a VPATH build or use an absolute $srcdir.
     89      1.1  christos #
     90      1.1  christos # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
     91      1.1  christos # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
     92      1.1  christos #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
     93      1.1  christos # and then we would define $MISSING as
     94      1.1  christos #   MISSING="\${SHELL} $am_aux_dir/missing"
     95      1.1  christos # This will work as long as MISSING is not called from configure, because
     96      1.1  christos # unfortunately $(top_srcdir) has no meaning in configure.
     97      1.1  christos # However there are other variables, like CC, which are often used in
     98      1.1  christos # configure, and could therefore not use this "fixed" $ac_aux_dir.
     99      1.1  christos #
    100      1.1  christos # Another solution, used here, is to always expand $ac_aux_dir to an
    101      1.1  christos # absolute PATH.  The drawback is that using absolute paths prevent a
    102      1.1  christos # configured tree to be moved without reconfiguration.
    103      1.1  christos 
    104      1.1  christos AC_DEFUN([AM_AUX_DIR_EXPAND],
    105      1.1  christos [dnl Rely on autoconf to set up CDPATH properly.
    106      1.1  christos AC_PREREQ([2.50])dnl
    107      1.1  christos # expand $ac_aux_dir to an absolute path
    108      1.1  christos am_aux_dir=`cd $ac_aux_dir && pwd`
    109      1.1  christos ])
    110      1.1  christos 
    111      1.1  christos # AM_CONDITIONAL                                            -*- Autoconf -*-
    112      1.1  christos 
    113  1.1.1.2  christos # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
    114      1.1  christos # Free Software Foundation, Inc.
    115      1.1  christos #
    116      1.1  christos # This file is free software; the Free Software Foundation
    117      1.1  christos # gives unlimited permission to copy and/or distribute it,
    118      1.1  christos # with or without modifications, as long as this notice is preserved.
    119      1.1  christos 
    120  1.1.1.2  christos # serial 9
    121      1.1  christos 
    122      1.1  christos # AM_CONDITIONAL(NAME, SHELL-CONDITION)
    123      1.1  christos # -------------------------------------
    124      1.1  christos # Define a conditional.
    125      1.1  christos AC_DEFUN([AM_CONDITIONAL],
    126      1.1  christos [AC_PREREQ(2.52)dnl
    127      1.1  christos  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
    128      1.1  christos 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
    129  1.1.1.2  christos AC_SUBST([$1_TRUE])dnl
    130  1.1.1.2  christos AC_SUBST([$1_FALSE])dnl
    131  1.1.1.2  christos _AM_SUBST_NOTMAKE([$1_TRUE])dnl
    132  1.1.1.2  christos _AM_SUBST_NOTMAKE([$1_FALSE])dnl
    133  1.1.1.2  christos m4_define([_AM_COND_VALUE_$1], [$2])dnl
    134      1.1  christos if $2; then
    135      1.1  christos   $1_TRUE=
    136      1.1  christos   $1_FALSE='#'
    137      1.1  christos else
    138      1.1  christos   $1_TRUE='#'
    139      1.1  christos   $1_FALSE=
    140      1.1  christos fi
    141      1.1  christos AC_CONFIG_COMMANDS_PRE(
    142      1.1  christos [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
    143      1.1  christos   AC_MSG_ERROR([[conditional "$1" was never defined.
    144      1.1  christos Usually this means the macro was only invoked conditionally.]])
    145      1.1  christos fi])])
    146      1.1  christos 
    147  1.1.1.2  christos # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
    148      1.1  christos # Free Software Foundation, Inc.
    149      1.1  christos #
    150      1.1  christos # This file is free software; the Free Software Foundation
    151      1.1  christos # gives unlimited permission to copy and/or distribute it,
    152      1.1  christos # with or without modifications, as long as this notice is preserved.
    153      1.1  christos 
    154  1.1.1.2  christos # serial 10
    155      1.1  christos 
    156      1.1  christos # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
    157      1.1  christos # written in clear, in which case automake, when reading aclocal.m4,
    158      1.1  christos # will think it sees a *use*, and therefore will trigger all it's
    159      1.1  christos # C support machinery.  Also note that it means that autoscan, seeing
    160      1.1  christos # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
    161      1.1  christos 
    162      1.1  christos 
    163      1.1  christos # _AM_DEPENDENCIES(NAME)
    164      1.1  christos # ----------------------
    165      1.1  christos # See how the compiler implements dependency checking.
    166      1.1  christos # NAME is "CC", "CXX", "GCJ", or "OBJC".
    167      1.1  christos # We try a few techniques and use that to set a single cache variable.
    168      1.1  christos #
    169      1.1  christos # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
    170      1.1  christos # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
    171      1.1  christos # dependency, and given that the user is not expected to run this macro,
    172      1.1  christos # just rely on AC_PROG_CC.
    173      1.1  christos AC_DEFUN([_AM_DEPENDENCIES],
    174      1.1  christos [AC_REQUIRE([AM_SET_DEPDIR])dnl
    175      1.1  christos AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
    176      1.1  christos AC_REQUIRE([AM_MAKE_INCLUDE])dnl
    177      1.1  christos AC_REQUIRE([AM_DEP_TRACK])dnl
    178      1.1  christos 
    179      1.1  christos ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
    180      1.1  christos        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
    181      1.1  christos        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
    182  1.1.1.2  christos        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
    183      1.1  christos        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
    184      1.1  christos                    [depcc="$$1"   am_compiler_list=])
    185      1.1  christos 
    186      1.1  christos AC_CACHE_CHECK([dependency style of $depcc],
    187      1.1  christos                [am_cv_$1_dependencies_compiler_type],
    188      1.1  christos [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
    189      1.1  christos   # We make a subdir and do the tests there.  Otherwise we can end up
    190      1.1  christos   # making bogus files that we don't know about and never remove.  For
    191      1.1  christos   # instance it was reported that on HP-UX the gcc test will end up
    192      1.1  christos   # making a dummy file named `D' -- because `-MD' means `put the output
    193      1.1  christos   # in D'.
    194      1.1  christos   mkdir conftest.dir
    195      1.1  christos   # Copy depcomp to subdir because otherwise we won't find it if we're
    196      1.1  christos   # using a relative directory.
    197      1.1  christos   cp "$am_depcomp" conftest.dir
    198      1.1  christos   cd conftest.dir
    199      1.1  christos   # We will build objects and dependencies in a subdirectory because
    200      1.1  christos   # it helps to detect inapplicable dependency modes.  For instance
    201      1.1  christos   # both Tru64's cc and ICC support -MD to output dependencies as a
    202      1.1  christos   # side effect of compilation, but ICC will put the dependencies in
    203      1.1  christos   # the current directory while Tru64 will put them in the object
    204      1.1  christos   # directory.
    205      1.1  christos   mkdir sub
    206      1.1  christos 
    207      1.1  christos   am_cv_$1_dependencies_compiler_type=none
    208      1.1  christos   if test "$am_compiler_list" = ""; then
    209      1.1  christos      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
    210      1.1  christos   fi
    211  1.1.1.2  christos   am__universal=false
    212  1.1.1.2  christos   m4_case([$1], [CC],
    213  1.1.1.2  christos     [case " $depcc " in #(
    214  1.1.1.2  christos      *\ -arch\ *\ -arch\ *) am__universal=true ;;
    215  1.1.1.2  christos      esac],
    216  1.1.1.2  christos     [CXX],
    217  1.1.1.2  christos     [case " $depcc " in #(
    218  1.1.1.2  christos      *\ -arch\ *\ -arch\ *) am__universal=true ;;
    219  1.1.1.2  christos      esac])
    220  1.1.1.2  christos 
    221      1.1  christos   for depmode in $am_compiler_list; do
    222      1.1  christos     # Setup a source with many dependencies, because some compilers
    223      1.1  christos     # like to wrap large dependency lists on column 80 (with \), and
    224      1.1  christos     # we should not choose a depcomp mode which is confused by this.
    225      1.1  christos     #
    226      1.1  christos     # We need to recreate these files for each test, as the compiler may
    227      1.1  christos     # overwrite some of them when testing with obscure command lines.
    228      1.1  christos     # This happens at least with the AIX C compiler.
    229      1.1  christos     : > sub/conftest.c
    230      1.1  christos     for i in 1 2 3 4 5 6; do
    231      1.1  christos       echo '#include "conftst'$i'.h"' >> sub/conftest.c
    232      1.1  christos       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
    233      1.1  christos       # Solaris 8's {/usr,}/bin/sh.
    234      1.1  christos       touch sub/conftst$i.h
    235      1.1  christos     done
    236      1.1  christos     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
    237      1.1  christos 
    238  1.1.1.2  christos     # We check with `-c' and `-o' for the sake of the "dashmstdout"
    239  1.1.1.2  christos     # mode.  It turns out that the SunPro C++ compiler does not properly
    240  1.1.1.2  christos     # handle `-M -o', and we need to detect this.  Also, some Intel
    241  1.1.1.2  christos     # versions had trouble with output in subdirs
    242  1.1.1.2  christos     am__obj=sub/conftest.${OBJEXT-o}
    243  1.1.1.2  christos     am__minus_obj="-o $am__obj"
    244      1.1  christos     case $depmode in
    245  1.1.1.2  christos     gcc)
    246  1.1.1.2  christos       # This depmode causes a compiler race in universal mode.
    247  1.1.1.2  christos       test "$am__universal" = false || continue
    248  1.1.1.2  christos       ;;
    249      1.1  christos     nosideeffect)
    250      1.1  christos       # after this tag, mechanisms are not by side-effect, so they'll
    251      1.1  christos       # only be used when explicitly requested
    252      1.1  christos       if test "x$enable_dependency_tracking" = xyes; then
    253      1.1  christos 	continue
    254      1.1  christos       else
    255      1.1  christos 	break
    256      1.1  christos       fi
    257      1.1  christos       ;;
    258  1.1.1.2  christos     msvisualcpp | msvcmsys)
    259  1.1.1.2  christos       # This compiler won't grok `-c -o', but also, the minuso test has
    260  1.1.1.2  christos       # not run yet.  These depmodes are late enough in the game, and
    261  1.1.1.2  christos       # so weak that their functioning should not be impacted.
    262  1.1.1.2  christos       am__obj=conftest.${OBJEXT-o}
    263  1.1.1.2  christos       am__minus_obj=
    264  1.1.1.2  christos       ;;
    265      1.1  christos     none) break ;;
    266      1.1  christos     esac
    267      1.1  christos     if depmode=$depmode \
    268  1.1.1.2  christos        source=sub/conftest.c object=$am__obj \
    269      1.1  christos        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
    270  1.1.1.2  christos        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
    271      1.1  christos          >/dev/null 2>conftest.err &&
    272  1.1.1.2  christos        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
    273      1.1  christos        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
    274  1.1.1.2  christos        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
    275      1.1  christos        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    276      1.1  christos       # icc doesn't choke on unknown options, it will just issue warnings
    277      1.1  christos       # or remarks (even with -Werror).  So we grep stderr for any message
    278      1.1  christos       # that says an option was ignored or not supported.
    279      1.1  christos       # When given -MP, icc 7.0 and 7.1 complain thusly:
    280      1.1  christos       #   icc: Command line warning: ignoring option '-M'; no argument required
    281      1.1  christos       # The diagnosis changed in icc 8.0:
    282      1.1  christos       #   icc: Command line remark: option '-MP' not supported
    283      1.1  christos       if (grep 'ignoring option' conftest.err ||
    284      1.1  christos           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    285      1.1  christos         am_cv_$1_dependencies_compiler_type=$depmode
    286      1.1  christos         break
    287      1.1  christos       fi
    288      1.1  christos     fi
    289      1.1  christos   done
    290      1.1  christos 
    291      1.1  christos   cd ..
    292      1.1  christos   rm -rf conftest.dir
    293      1.1  christos else
    294      1.1  christos   am_cv_$1_dependencies_compiler_type=none
    295      1.1  christos fi
    296      1.1  christos ])
    297      1.1  christos AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
    298      1.1  christos AM_CONDITIONAL([am__fastdep$1], [
    299      1.1  christos   test "x$enable_dependency_tracking" != xno \
    300      1.1  christos   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
    301      1.1  christos ])
    302      1.1  christos 
    303      1.1  christos 
    304      1.1  christos # AM_SET_DEPDIR
    305      1.1  christos # -------------
    306      1.1  christos # Choose a directory name for dependency files.
    307      1.1  christos # This macro is AC_REQUIREd in _AM_DEPENDENCIES
    308      1.1  christos AC_DEFUN([AM_SET_DEPDIR],
    309      1.1  christos [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
    310      1.1  christos AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
    311      1.1  christos ])
    312      1.1  christos 
    313      1.1  christos 
    314      1.1  christos # AM_DEP_TRACK
    315      1.1  christos # ------------
    316      1.1  christos AC_DEFUN([AM_DEP_TRACK],
    317      1.1  christos [AC_ARG_ENABLE(dependency-tracking,
    318      1.1  christos [  --disable-dependency-tracking  speeds up one-time build
    319      1.1  christos   --enable-dependency-tracking   do not reject slow dependency extractors])
    320      1.1  christos if test "x$enable_dependency_tracking" != xno; then
    321      1.1  christos   am_depcomp="$ac_aux_dir/depcomp"
    322      1.1  christos   AMDEPBACKSLASH='\'
    323      1.1  christos fi
    324      1.1  christos AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
    325  1.1.1.2  christos AC_SUBST([AMDEPBACKSLASH])dnl
    326  1.1.1.2  christos _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
    327      1.1  christos ])
    328      1.1  christos 
    329      1.1  christos # Generate code to set up dependency tracking.              -*- Autoconf -*-
    330      1.1  christos 
    331  1.1.1.2  christos # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
    332      1.1  christos # Free Software Foundation, Inc.
    333      1.1  christos #
    334      1.1  christos # This file is free software; the Free Software Foundation
    335      1.1  christos # gives unlimited permission to copy and/or distribute it,
    336      1.1  christos # with or without modifications, as long as this notice is preserved.
    337      1.1  christos 
    338  1.1.1.2  christos #serial 5
    339      1.1  christos 
    340      1.1  christos # _AM_OUTPUT_DEPENDENCY_COMMANDS
    341      1.1  christos # ------------------------------
    342      1.1  christos AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
    343  1.1.1.2  christos [{
    344  1.1.1.2  christos   # Autoconf 2.62 quotes --file arguments for eval, but not when files
    345  1.1.1.2  christos   # are listed without --file.  Let's play safe and only enable the eval
    346  1.1.1.2  christos   # if we detect the quoting.
    347  1.1.1.2  christos   case $CONFIG_FILES in
    348  1.1.1.2  christos   *\'*) eval set x "$CONFIG_FILES" ;;
    349  1.1.1.2  christos   *)   set x $CONFIG_FILES ;;
    350  1.1.1.2  christos   esac
    351  1.1.1.2  christos   shift
    352  1.1.1.2  christos   for mf
    353  1.1.1.2  christos   do
    354  1.1.1.2  christos     # Strip MF so we end up with the name of the file.
    355  1.1.1.2  christos     mf=`echo "$mf" | sed -e 's/:.*$//'`
    356  1.1.1.2  christos     # Check whether this is an Automake generated Makefile or not.
    357  1.1.1.2  christos     # We used to match only the files named `Makefile.in', but
    358  1.1.1.2  christos     # some people rename them; so instead we look at the file content.
    359  1.1.1.2  christos     # Grep'ing the first line is not enough: some people post-process
    360  1.1.1.2  christos     # each Makefile.in and add a new line on top of each file to say so.
    361  1.1.1.2  christos     # Grep'ing the whole file is not good either: AIX grep has a line
    362  1.1.1.2  christos     # limit of 2048, but all sed's we know have understand at least 4000.
    363  1.1.1.2  christos     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
    364  1.1.1.2  christos       dirpart=`AS_DIRNAME("$mf")`
    365  1.1.1.2  christos     else
    366  1.1.1.2  christos       continue
    367  1.1.1.2  christos     fi
    368  1.1.1.2  christos     # Extract the definition of DEPDIR, am__include, and am__quote
    369  1.1.1.2  christos     # from the Makefile without running `make'.
    370  1.1.1.2  christos     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    371  1.1.1.2  christos     test -z "$DEPDIR" && continue
    372  1.1.1.2  christos     am__include=`sed -n 's/^am__include = //p' < "$mf"`
    373  1.1.1.2  christos     test -z "am__include" && continue
    374  1.1.1.2  christos     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
    375  1.1.1.2  christos     # When using ansi2knr, U may be empty or an underscore; expand it
    376  1.1.1.2  christos     U=`sed -n 's/^U = //p' < "$mf"`
    377  1.1.1.2  christos     # Find all dependency output files, they are included files with
    378  1.1.1.2  christos     # $(DEPDIR) in their names.  We invoke sed twice because it is the
    379  1.1.1.2  christos     # simplest approach to changing $(DEPDIR) to its actual value in the
    380  1.1.1.2  christos     # expansion.
    381  1.1.1.2  christos     for file in `sed -n "
    382  1.1.1.2  christos       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
    383  1.1.1.2  christos 	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    384  1.1.1.2  christos       # Make sure the directory exists.
    385  1.1.1.2  christos       test -f "$dirpart/$file" && continue
    386  1.1.1.2  christos       fdir=`AS_DIRNAME(["$file"])`
    387  1.1.1.2  christos       AS_MKDIR_P([$dirpart/$fdir])
    388  1.1.1.2  christos       # echo "creating $dirpart/$file"
    389  1.1.1.2  christos       echo '# dummy' > "$dirpart/$file"
    390  1.1.1.2  christos     done
    391      1.1  christos   done
    392  1.1.1.2  christos }
    393      1.1  christos ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
    394      1.1  christos 
    395      1.1  christos 
    396      1.1  christos # AM_OUTPUT_DEPENDENCY_COMMANDS
    397      1.1  christos # -----------------------------
    398      1.1  christos # This macro should only be invoked once -- use via AC_REQUIRE.
    399      1.1  christos #
    400      1.1  christos # This code is only required when automatic dependency tracking
    401      1.1  christos # is enabled.  FIXME.  This creates each `.P' file that we will
    402      1.1  christos # need in order to bootstrap the dependency handling code.
    403      1.1  christos AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
    404      1.1  christos [AC_CONFIG_COMMANDS([depfiles],
    405      1.1  christos      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
    406      1.1  christos      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
    407      1.1  christos ])
    408      1.1  christos 
    409      1.1  christos # Do all the work for Automake.                             -*- Autoconf -*-
    410      1.1  christos 
    411  1.1.1.2  christos # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
    412  1.1.1.2  christos # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
    413      1.1  christos #
    414      1.1  christos # This file is free software; the Free Software Foundation
    415      1.1  christos # gives unlimited permission to copy and/or distribute it,
    416      1.1  christos # with or without modifications, as long as this notice is preserved.
    417      1.1  christos 
    418  1.1.1.2  christos # serial 16
    419      1.1  christos 
    420      1.1  christos # This macro actually does too much.  Some checks are only needed if
    421      1.1  christos # your package does certain things.  But this isn't really a big deal.
    422      1.1  christos 
    423      1.1  christos # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
    424      1.1  christos # AM_INIT_AUTOMAKE([OPTIONS])
    425      1.1  christos # -----------------------------------------------
    426      1.1  christos # The call with PACKAGE and VERSION arguments is the old style
    427      1.1  christos # call (pre autoconf-2.50), which is being phased out.  PACKAGE
    428      1.1  christos # and VERSION should now be passed to AC_INIT and removed from
    429      1.1  christos # the call to AM_INIT_AUTOMAKE.
    430      1.1  christos # We support both call styles for the transition.  After
    431      1.1  christos # the next Automake release, Autoconf can make the AC_INIT
    432      1.1  christos # arguments mandatory, and then we can depend on a new Autoconf
    433      1.1  christos # release and drop the old call support.
    434      1.1  christos AC_DEFUN([AM_INIT_AUTOMAKE],
    435  1.1.1.2  christos [AC_PREREQ([2.62])dnl
    436      1.1  christos dnl Autoconf wants to disallow AM_ names.  We explicitly allow
    437      1.1  christos dnl the ones we care about.
    438      1.1  christos m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
    439      1.1  christos AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
    440      1.1  christos AC_REQUIRE([AC_PROG_INSTALL])dnl
    441  1.1.1.2  christos if test "`cd $srcdir && pwd`" != "`pwd`"; then
    442  1.1.1.2  christos   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
    443  1.1.1.2  christos   # is not polluted with repeated "-I."
    444  1.1.1.2  christos   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
    445  1.1.1.2  christos   # test to see if srcdir already configured
    446  1.1.1.2  christos   if test -f $srcdir/config.status; then
    447  1.1.1.2  christos     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
    448  1.1.1.2  christos   fi
    449      1.1  christos fi
    450      1.1  christos 
    451      1.1  christos # test whether we have cygpath
    452      1.1  christos if test -z "$CYGPATH_W"; then
    453      1.1  christos   if (cygpath --version) >/dev/null 2>/dev/null; then
    454      1.1  christos     CYGPATH_W='cygpath -w'
    455      1.1  christos   else
    456      1.1  christos     CYGPATH_W=echo
    457      1.1  christos   fi
    458      1.1  christos fi
    459      1.1  christos AC_SUBST([CYGPATH_W])
    460      1.1  christos 
    461      1.1  christos # Define the identity of the package.
    462      1.1  christos dnl Distinguish between old-style and new-style calls.
    463      1.1  christos m4_ifval([$2],
    464      1.1  christos [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
    465      1.1  christos  AC_SUBST([PACKAGE], [$1])dnl
    466      1.1  christos  AC_SUBST([VERSION], [$2])],
    467      1.1  christos [_AM_SET_OPTIONS([$1])dnl
    468  1.1.1.2  christos dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
    469  1.1.1.2  christos m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
    470  1.1.1.2  christos   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
    471      1.1  christos  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
    472      1.1  christos  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
    473      1.1  christos 
    474      1.1  christos _AM_IF_OPTION([no-define],,
    475      1.1  christos [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
    476      1.1  christos  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
    477      1.1  christos 
    478      1.1  christos # Some tools Automake needs.
    479      1.1  christos AC_REQUIRE([AM_SANITY_CHECK])dnl
    480      1.1  christos AC_REQUIRE([AC_ARG_PROGRAM])dnl
    481      1.1  christos AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
    482      1.1  christos AM_MISSING_PROG(AUTOCONF, autoconf)
    483      1.1  christos AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
    484      1.1  christos AM_MISSING_PROG(AUTOHEADER, autoheader)
    485      1.1  christos AM_MISSING_PROG(MAKEINFO, makeinfo)
    486  1.1.1.2  christos AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
    487  1.1.1.2  christos AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
    488      1.1  christos AC_REQUIRE([AM_PROG_MKDIR_P])dnl
    489      1.1  christos # We need awk for the "check" target.  The system "awk" is bad on
    490      1.1  christos # some platforms.
    491      1.1  christos AC_REQUIRE([AC_PROG_AWK])dnl
    492      1.1  christos AC_REQUIRE([AC_PROG_MAKE_SET])dnl
    493      1.1  christos AC_REQUIRE([AM_SET_LEADING_DOT])dnl
    494      1.1  christos _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
    495  1.1.1.2  christos 	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
    496  1.1.1.2  christos 			     [_AM_PROG_TAR([v7])])])
    497      1.1  christos _AM_IF_OPTION([no-dependencies],,
    498      1.1  christos [AC_PROVIDE_IFELSE([AC_PROG_CC],
    499  1.1.1.2  christos 		  [_AM_DEPENDENCIES(CC)],
    500  1.1.1.2  christos 		  [define([AC_PROG_CC],
    501  1.1.1.2  christos 			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
    502      1.1  christos AC_PROVIDE_IFELSE([AC_PROG_CXX],
    503  1.1.1.2  christos 		  [_AM_DEPENDENCIES(CXX)],
    504  1.1.1.2  christos 		  [define([AC_PROG_CXX],
    505  1.1.1.2  christos 			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
    506  1.1.1.2  christos AC_PROVIDE_IFELSE([AC_PROG_OBJC],
    507  1.1.1.2  christos 		  [_AM_DEPENDENCIES(OBJC)],
    508  1.1.1.2  christos 		  [define([AC_PROG_OBJC],
    509  1.1.1.2  christos 			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
    510      1.1  christos ])
    511  1.1.1.2  christos _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
    512  1.1.1.2  christos dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
    513  1.1.1.2  christos dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
    514  1.1.1.2  christos dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
    515  1.1.1.2  christos AC_CONFIG_COMMANDS_PRE(dnl
    516  1.1.1.2  christos [m4_provide_if([_AM_COMPILER_EXEEXT],
    517  1.1.1.2  christos   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
    518      1.1  christos ])
    519      1.1  christos 
    520  1.1.1.2  christos dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
    521  1.1.1.2  christos dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
    522  1.1.1.2  christos dnl mangled by Autoconf and run in a shell conditional statement.
    523  1.1.1.2  christos m4_define([_AC_COMPILER_EXEEXT],
    524  1.1.1.2  christos m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
    525  1.1.1.2  christos 
    526      1.1  christos 
    527      1.1  christos # When config.status generates a header, we must update the stamp-h file.
    528      1.1  christos # This file resides in the same directory as the config header
    529      1.1  christos # that is generated.  The stamp files are numbered to have different names.
    530      1.1  christos 
    531      1.1  christos # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
    532      1.1  christos # loop where config.status creates the headers, so we can generate
    533      1.1  christos # our stamp files there.
    534      1.1  christos AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
    535      1.1  christos [# Compute $1's index in $config_headers.
    536  1.1.1.2  christos _am_arg=$1
    537      1.1  christos _am_stamp_count=1
    538      1.1  christos for _am_header in $config_headers :; do
    539      1.1  christos   case $_am_header in
    540  1.1.1.2  christos     $_am_arg | $_am_arg:* )
    541      1.1  christos       break ;;
    542      1.1  christos     * )
    543      1.1  christos       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
    544      1.1  christos   esac
    545      1.1  christos done
    546  1.1.1.2  christos echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
    547      1.1  christos 
    548  1.1.1.2  christos # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
    549      1.1  christos #
    550      1.1  christos # This file is free software; the Free Software Foundation
    551      1.1  christos # gives unlimited permission to copy and/or distribute it,
    552      1.1  christos # with or without modifications, as long as this notice is preserved.
    553      1.1  christos 
    554      1.1  christos # AM_PROG_INSTALL_SH
    555      1.1  christos # ------------------
    556      1.1  christos # Define $install_sh.
    557      1.1  christos AC_DEFUN([AM_PROG_INSTALL_SH],
    558      1.1  christos [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    559  1.1.1.2  christos if test x"${install_sh}" != xset; then
    560  1.1.1.2  christos   case $am_aux_dir in
    561  1.1.1.2  christos   *\ * | *\	*)
    562  1.1.1.2  christos     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
    563  1.1.1.2  christos   *)
    564  1.1.1.2  christos     install_sh="\${SHELL} $am_aux_dir/install-sh"
    565  1.1.1.2  christos   esac
    566  1.1.1.2  christos fi
    567      1.1  christos AC_SUBST(install_sh)])
    568      1.1  christos 
    569      1.1  christos # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
    570      1.1  christos #
    571      1.1  christos # This file is free software; the Free Software Foundation
    572      1.1  christos # gives unlimited permission to copy and/or distribute it,
    573      1.1  christos # with or without modifications, as long as this notice is preserved.
    574      1.1  christos 
    575      1.1  christos # serial 2
    576      1.1  christos 
    577      1.1  christos # Check whether the underlying file-system supports filenames
    578      1.1  christos # with a leading dot.  For instance MS-DOS doesn't.
    579      1.1  christos AC_DEFUN([AM_SET_LEADING_DOT],
    580      1.1  christos [rm -rf .tst 2>/dev/null
    581      1.1  christos mkdir .tst 2>/dev/null
    582      1.1  christos if test -d .tst; then
    583      1.1  christos   am__leading_dot=.
    584      1.1  christos else
    585      1.1  christos   am__leading_dot=_
    586      1.1  christos fi
    587      1.1  christos rmdir .tst 2>/dev/null
    588      1.1  christos AC_SUBST([am__leading_dot])])
    589      1.1  christos 
    590      1.1  christos # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
    591      1.1  christos # Free Software Foundation, Inc.
    592      1.1  christos #
    593      1.1  christos # This file is free software; the Free Software Foundation
    594      1.1  christos # gives unlimited permission to copy and/or distribute it,
    595      1.1  christos # with or without modifications, as long as this notice is preserved.
    596      1.1  christos 
    597      1.1  christos # serial 5
    598      1.1  christos 
    599      1.1  christos # AM_PROG_LEX
    600      1.1  christos # -----------
    601      1.1  christos # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
    602      1.1  christos # "missing" invocation, for better error output.
    603      1.1  christos AC_DEFUN([AM_PROG_LEX],
    604      1.1  christos [AC_PREREQ(2.50)dnl
    605      1.1  christos AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
    606      1.1  christos AC_REQUIRE([AC_PROG_LEX])dnl
    607      1.1  christos if test "$LEX" = :; then
    608      1.1  christos   LEX=${am_missing_run}flex
    609      1.1  christos fi])
    610      1.1  christos 
    611      1.1  christos # Check to see how 'make' treats includes.	            -*- Autoconf -*-
    612      1.1  christos 
    613  1.1.1.2  christos # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
    614      1.1  christos #
    615      1.1  christos # This file is free software; the Free Software Foundation
    616      1.1  christos # gives unlimited permission to copy and/or distribute it,
    617      1.1  christos # with or without modifications, as long as this notice is preserved.
    618      1.1  christos 
    619  1.1.1.2  christos # serial 4
    620      1.1  christos 
    621      1.1  christos # AM_MAKE_INCLUDE()
    622      1.1  christos # -----------------
    623      1.1  christos # Check to see how make treats includes.
    624      1.1  christos AC_DEFUN([AM_MAKE_INCLUDE],
    625      1.1  christos [am_make=${MAKE-make}
    626      1.1  christos cat > confinc << 'END'
    627      1.1  christos am__doit:
    628  1.1.1.2  christos 	@echo this is the am__doit target
    629      1.1  christos .PHONY: am__doit
    630      1.1  christos END
    631      1.1  christos # If we don't find an include directive, just comment out the code.
    632      1.1  christos AC_MSG_CHECKING([for style of include used by $am_make])
    633      1.1  christos am__include="#"
    634      1.1  christos am__quote=
    635      1.1  christos _am_result=none
    636      1.1  christos # First try GNU make style include.
    637      1.1  christos echo "include confinc" > confmf
    638  1.1.1.2  christos # Ignore all kinds of additional output from `make'.
    639  1.1.1.2  christos case `$am_make -s -f confmf 2> /dev/null` in #(
    640  1.1.1.2  christos *the\ am__doit\ target*)
    641  1.1.1.2  christos   am__include=include
    642  1.1.1.2  christos   am__quote=
    643  1.1.1.2  christos   _am_result=GNU
    644  1.1.1.2  christos   ;;
    645  1.1.1.2  christos esac
    646      1.1  christos # Now try BSD make style include.
    647      1.1  christos if test "$am__include" = "#"; then
    648      1.1  christos    echo '.include "confinc"' > confmf
    649  1.1.1.2  christos    case `$am_make -s -f confmf 2> /dev/null` in #(
    650  1.1.1.2  christos    *the\ am__doit\ target*)
    651  1.1.1.2  christos      am__include=.include
    652  1.1.1.2  christos      am__quote="\""
    653  1.1.1.2  christos      _am_result=BSD
    654  1.1.1.2  christos      ;;
    655  1.1.1.2  christos    esac
    656      1.1  christos fi
    657      1.1  christos AC_SUBST([am__include])
    658      1.1  christos AC_SUBST([am__quote])
    659      1.1  christos AC_MSG_RESULT([$_am_result])
    660      1.1  christos rm -f confinc confmf
    661      1.1  christos ])
    662      1.1  christos 
    663  1.1.1.2  christos # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
    664  1.1.1.2  christos # Free Software Foundation, Inc.
    665  1.1.1.2  christos #
    666  1.1.1.2  christos # This file is free software; the Free Software Foundation
    667  1.1.1.2  christos # gives unlimited permission to copy and/or distribute it,
    668  1.1.1.2  christos # with or without modifications, as long as this notice is preserved.
    669  1.1.1.2  christos 
    670  1.1.1.2  christos # serial 6
    671  1.1.1.2  christos 
    672  1.1.1.2  christos # AM_PROG_CC_C_O
    673  1.1.1.2  christos # --------------
    674  1.1.1.2  christos # Like AC_PROG_CC_C_O, but changed for automake.
    675  1.1.1.2  christos AC_DEFUN([AM_PROG_CC_C_O],
    676  1.1.1.2  christos [AC_REQUIRE([AC_PROG_CC_C_O])dnl
    677  1.1.1.2  christos AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    678  1.1.1.2  christos AC_REQUIRE_AUX_FILE([compile])dnl
    679  1.1.1.2  christos # FIXME: we rely on the cache variable name because
    680  1.1.1.2  christos # there is no other way.
    681  1.1.1.2  christos set dummy $CC
    682  1.1.1.2  christos am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
    683  1.1.1.2  christos eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
    684  1.1.1.2  christos if test "$am_t" != yes; then
    685  1.1.1.2  christos    # Losing compiler, so override with the script.
    686  1.1.1.2  christos    # FIXME: It is wrong to rewrite CC.
    687  1.1.1.2  christos    # But if we don't then we get into trouble of one sort or another.
    688  1.1.1.2  christos    # A longer-term fix would be to have automake use am__CC in this case,
    689  1.1.1.2  christos    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
    690  1.1.1.2  christos    CC="$am_aux_dir/compile $CC"
    691  1.1.1.2  christos fi
    692  1.1.1.2  christos dnl Make sure AC_PROG_CC is never called again, or it will override our
    693  1.1.1.2  christos dnl setting of CC.
    694  1.1.1.2  christos m4_define([AC_PROG_CC],
    695  1.1.1.2  christos           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
    696  1.1.1.2  christos ])
    697  1.1.1.2  christos 
    698      1.1  christos # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
    699      1.1  christos 
    700  1.1.1.2  christos # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
    701      1.1  christos # Free Software Foundation, Inc.
    702      1.1  christos #
    703      1.1  christos # This file is free software; the Free Software Foundation
    704      1.1  christos # gives unlimited permission to copy and/or distribute it,
    705      1.1  christos # with or without modifications, as long as this notice is preserved.
    706      1.1  christos 
    707  1.1.1.2  christos # serial 6
    708      1.1  christos 
    709      1.1  christos # AM_MISSING_PROG(NAME, PROGRAM)
    710      1.1  christos # ------------------------------
    711      1.1  christos AC_DEFUN([AM_MISSING_PROG],
    712      1.1  christos [AC_REQUIRE([AM_MISSING_HAS_RUN])
    713      1.1  christos $1=${$1-"${am_missing_run}$2"}
    714      1.1  christos AC_SUBST($1)])
    715      1.1  christos 
    716      1.1  christos 
    717      1.1  christos # AM_MISSING_HAS_RUN
    718      1.1  christos # ------------------
    719      1.1  christos # Define MISSING if not defined so far and test if it supports --run.
    720      1.1  christos # If it does, set am_missing_run to use it, otherwise, to nothing.
    721      1.1  christos AC_DEFUN([AM_MISSING_HAS_RUN],
    722      1.1  christos [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    723  1.1.1.2  christos AC_REQUIRE_AUX_FILE([missing])dnl
    724  1.1.1.2  christos if test x"${MISSING+set}" != xset; then
    725  1.1.1.2  christos   case $am_aux_dir in
    726  1.1.1.2  christos   *\ * | *\	*)
    727  1.1.1.2  christos     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
    728  1.1.1.2  christos   *)
    729  1.1.1.2  christos     MISSING="\${SHELL} $am_aux_dir/missing" ;;
    730  1.1.1.2  christos   esac
    731  1.1.1.2  christos fi
    732      1.1  christos # Use eval to expand $SHELL
    733      1.1  christos if eval "$MISSING --run true"; then
    734      1.1  christos   am_missing_run="$MISSING --run "
    735      1.1  christos else
    736      1.1  christos   am_missing_run=
    737      1.1  christos   AC_MSG_WARN([`missing' script is too old or missing])
    738      1.1  christos fi
    739      1.1  christos ])
    740      1.1  christos 
    741  1.1.1.2  christos # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
    742      1.1  christos #
    743      1.1  christos # This file is free software; the Free Software Foundation
    744      1.1  christos # gives unlimited permission to copy and/or distribute it,
    745      1.1  christos # with or without modifications, as long as this notice is preserved.
    746      1.1  christos 
    747      1.1  christos # AM_PROG_MKDIR_P
    748      1.1  christos # ---------------
    749  1.1.1.2  christos # Check for `mkdir -p'.
    750      1.1  christos AC_DEFUN([AM_PROG_MKDIR_P],
    751  1.1.1.2  christos [AC_PREREQ([2.60])dnl
    752  1.1.1.2  christos AC_REQUIRE([AC_PROG_MKDIR_P])dnl
    753  1.1.1.2  christos dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
    754  1.1.1.2  christos dnl while keeping a definition of mkdir_p for backward compatibility.
    755  1.1.1.2  christos dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
    756  1.1.1.2  christos dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
    757  1.1.1.2  christos dnl Makefile.ins that do not define MKDIR_P, so we do our own
    758  1.1.1.2  christos dnl adjustment using top_builddir (which is defined more often than
    759  1.1.1.2  christos dnl MKDIR_P).
    760  1.1.1.2  christos AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
    761  1.1.1.2  christos case $mkdir_p in
    762  1.1.1.2  christos   [[\\/$]]* | ?:[[\\/]]*) ;;
    763  1.1.1.2  christos   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
    764  1.1.1.2  christos esac
    765  1.1.1.2  christos ])
    766      1.1  christos 
    767      1.1  christos # Helper functions for option handling.                     -*- Autoconf -*-
    768      1.1  christos 
    769  1.1.1.2  christos # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
    770      1.1  christos #
    771      1.1  christos # This file is free software; the Free Software Foundation
    772      1.1  christos # gives unlimited permission to copy and/or distribute it,
    773      1.1  christos # with or without modifications, as long as this notice is preserved.
    774      1.1  christos 
    775  1.1.1.2  christos # serial 4
    776      1.1  christos 
    777      1.1  christos # _AM_MANGLE_OPTION(NAME)
    778      1.1  christos # -----------------------
    779      1.1  christos AC_DEFUN([_AM_MANGLE_OPTION],
    780      1.1  christos [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
    781      1.1  christos 
    782      1.1  christos # _AM_SET_OPTION(NAME)
    783      1.1  christos # ------------------------------
    784      1.1  christos # Set option NAME.  Presently that only means defining a flag for this option.
    785      1.1  christos AC_DEFUN([_AM_SET_OPTION],
    786      1.1  christos [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
    787      1.1  christos 
    788      1.1  christos # _AM_SET_OPTIONS(OPTIONS)
    789      1.1  christos # ----------------------------------
    790      1.1  christos # OPTIONS is a space-separated list of Automake options.
    791      1.1  christos AC_DEFUN([_AM_SET_OPTIONS],
    792  1.1.1.2  christos [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
    793      1.1  christos 
    794      1.1  christos # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
    795      1.1  christos # -------------------------------------------
    796      1.1  christos # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
    797      1.1  christos AC_DEFUN([_AM_IF_OPTION],
    798      1.1  christos [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
    799      1.1  christos 
    800      1.1  christos # Check to make sure that the build environment is sane.    -*- Autoconf -*-
    801      1.1  christos 
    802  1.1.1.2  christos # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
    803      1.1  christos # Free Software Foundation, Inc.
    804      1.1  christos #
    805      1.1  christos # This file is free software; the Free Software Foundation
    806      1.1  christos # gives unlimited permission to copy and/or distribute it,
    807      1.1  christos # with or without modifications, as long as this notice is preserved.
    808      1.1  christos 
    809  1.1.1.2  christos # serial 5
    810      1.1  christos 
    811      1.1  christos # AM_SANITY_CHECK
    812      1.1  christos # ---------------
    813      1.1  christos AC_DEFUN([AM_SANITY_CHECK],
    814      1.1  christos [AC_MSG_CHECKING([whether build environment is sane])
    815      1.1  christos # Just in case
    816      1.1  christos sleep 1
    817      1.1  christos echo timestamp > conftest.file
    818  1.1.1.2  christos # Reject unsafe characters in $srcdir or the absolute working directory
    819  1.1.1.2  christos # name.  Accept space and tab only in the latter.
    820  1.1.1.2  christos am_lf='
    821  1.1.1.2  christos '
    822  1.1.1.2  christos case `pwd` in
    823  1.1.1.2  christos   *[[\\\"\#\$\&\'\`$am_lf]]*)
    824  1.1.1.2  christos     AC_MSG_ERROR([unsafe absolute working directory name]);;
    825  1.1.1.2  christos esac
    826  1.1.1.2  christos case $srcdir in
    827  1.1.1.2  christos   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
    828  1.1.1.2  christos     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
    829  1.1.1.2  christos esac
    830  1.1.1.2  christos 
    831      1.1  christos # Do `set' in a subshell so we don't clobber the current shell's
    832      1.1  christos # arguments.  Must try -L first in case configure is actually a
    833      1.1  christos # symlink; some systems play weird games with the mod time of symlinks
    834      1.1  christos # (eg FreeBSD returns the mod time of the symlink's containing
    835      1.1  christos # directory).
    836      1.1  christos if (
    837  1.1.1.2  christos    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    838      1.1  christos    if test "$[*]" = "X"; then
    839      1.1  christos       # -L didn't work.
    840  1.1.1.2  christos       set X `ls -t "$srcdir/configure" conftest.file`
    841      1.1  christos    fi
    842      1.1  christos    rm -f conftest.file
    843      1.1  christos    if test "$[*]" != "X $srcdir/configure conftest.file" \
    844      1.1  christos       && test "$[*]" != "X conftest.file $srcdir/configure"; then
    845      1.1  christos 
    846      1.1  christos       # If neither matched, then we have a broken ls.  This can happen
    847      1.1  christos       # if, for instance, CONFIG_SHELL is bash and it inherits a
    848      1.1  christos       # broken ls alias from the environment.  This has actually
    849      1.1  christos       # happened.  Such a system could not be considered "sane".
    850      1.1  christos       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
    851      1.1  christos alias in your environment])
    852      1.1  christos    fi
    853      1.1  christos 
    854      1.1  christos    test "$[2]" = conftest.file
    855      1.1  christos    )
    856      1.1  christos then
    857      1.1  christos    # Ok.
    858      1.1  christos    :
    859      1.1  christos else
    860      1.1  christos    AC_MSG_ERROR([newly created file is older than distributed files!
    861      1.1  christos Check your system clock])
    862      1.1  christos fi
    863      1.1  christos AC_MSG_RESULT(yes)])
    864      1.1  christos 
    865      1.1  christos # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
    866      1.1  christos #
    867      1.1  christos # This file is free software; the Free Software Foundation
    868      1.1  christos # gives unlimited permission to copy and/or distribute it,
    869      1.1  christos # with or without modifications, as long as this notice is preserved.
    870      1.1  christos 
    871      1.1  christos # AM_PROG_INSTALL_STRIP
    872      1.1  christos # ---------------------
    873      1.1  christos # One issue with vendor `install' (even GNU) is that you can't
    874      1.1  christos # specify the program used to strip binaries.  This is especially
    875      1.1  christos # annoying in cross-compiling environments, where the build's strip
    876      1.1  christos # is unlikely to handle the host's binaries.
    877      1.1  christos # Fortunately install-sh will honor a STRIPPROG variable, so we
    878      1.1  christos # always use install-sh in `make install-strip', and initialize
    879      1.1  christos # STRIPPROG with the value of the STRIP variable (set by the user).
    880      1.1  christos AC_DEFUN([AM_PROG_INSTALL_STRIP],
    881      1.1  christos [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
    882      1.1  christos # Installed binaries are usually stripped using `strip' when the user
    883      1.1  christos # run `make install-strip'.  However `strip' might not be the right
    884      1.1  christos # tool to use in cross-compilation environments, therefore Automake
    885      1.1  christos # will honor the `STRIP' environment variable to overrule this program.
    886      1.1  christos dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
    887      1.1  christos if test "$cross_compiling" != no; then
    888      1.1  christos   AC_CHECK_TOOL([STRIP], [strip], :)
    889      1.1  christos fi
    890  1.1.1.2  christos INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
    891      1.1  christos AC_SUBST([INSTALL_STRIP_PROGRAM])])
    892      1.1  christos 
    893  1.1.1.2  christos # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
    894  1.1.1.2  christos #
    895  1.1.1.2  christos # This file is free software; the Free Software Foundation
    896  1.1.1.2  christos # gives unlimited permission to copy and/or distribute it,
    897  1.1.1.2  christos # with or without modifications, as long as this notice is preserved.
    898  1.1.1.2  christos 
    899  1.1.1.2  christos # serial 2
    900  1.1.1.2  christos 
    901  1.1.1.2  christos # _AM_SUBST_NOTMAKE(VARIABLE)
    902  1.1.1.2  christos # ---------------------------
    903  1.1.1.2  christos # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
    904  1.1.1.2  christos # This macro is traced by Automake.
    905  1.1.1.2  christos AC_DEFUN([_AM_SUBST_NOTMAKE])
    906  1.1.1.2  christos 
    907  1.1.1.2  christos # AM_SUBST_NOTMAKE(VARIABLE)
    908  1.1.1.2  christos # ---------------------------
    909  1.1.1.2  christos # Public sister of _AM_SUBST_NOTMAKE.
    910  1.1.1.2  christos AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
    911  1.1.1.2  christos 
    912      1.1  christos # Check how to create a tarball.                            -*- Autoconf -*-
    913      1.1  christos 
    914      1.1  christos # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
    915      1.1  christos #
    916      1.1  christos # This file is free software; the Free Software Foundation
    917      1.1  christos # gives unlimited permission to copy and/or distribute it,
    918      1.1  christos # with or without modifications, as long as this notice is preserved.
    919      1.1  christos 
    920      1.1  christos # serial 2
    921      1.1  christos 
    922      1.1  christos # _AM_PROG_TAR(FORMAT)
    923      1.1  christos # --------------------
    924      1.1  christos # Check how to create a tarball in format FORMAT.
    925      1.1  christos # FORMAT should be one of `v7', `ustar', or `pax'.
    926      1.1  christos #
    927      1.1  christos # Substitute a variable $(am__tar) that is a command
    928      1.1  christos # writing to stdout a FORMAT-tarball containing the directory
    929      1.1  christos # $tardir.
    930      1.1  christos #     tardir=directory && $(am__tar) > result.tar
    931      1.1  christos #
    932      1.1  christos # Substitute a variable $(am__untar) that extract such
    933      1.1  christos # a tarball read from stdin.
    934      1.1  christos #     $(am__untar) < result.tar
    935      1.1  christos AC_DEFUN([_AM_PROG_TAR],
    936      1.1  christos [# Always define AMTAR for backward compatibility.
    937      1.1  christos AM_MISSING_PROG([AMTAR], [tar])
    938      1.1  christos m4_if([$1], [v7],
    939      1.1  christos      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
    940      1.1  christos      [m4_case([$1], [ustar],, [pax],,
    941      1.1  christos               [m4_fatal([Unknown tar format])])
    942      1.1  christos AC_MSG_CHECKING([how to create a $1 tar archive])
    943      1.1  christos # Loop over all known methods to create a tar archive until one works.
    944      1.1  christos _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
    945      1.1  christos _am_tools=${am_cv_prog_tar_$1-$_am_tools}
    946      1.1  christos # Do not fold the above two line into one, because Tru64 sh and
    947      1.1  christos # Solaris sh will not grok spaces in the rhs of `-'.
    948      1.1  christos for _am_tool in $_am_tools
    949      1.1  christos do
    950      1.1  christos   case $_am_tool in
    951      1.1  christos   gnutar)
    952      1.1  christos     for _am_tar in tar gnutar gtar;
    953      1.1  christos     do
    954      1.1  christos       AM_RUN_LOG([$_am_tar --version]) && break
    955      1.1  christos     done
    956      1.1  christos     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
    957      1.1  christos     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
    958      1.1  christos     am__untar="$_am_tar -xf -"
    959      1.1  christos     ;;
    960      1.1  christos   plaintar)
    961      1.1  christos     # Must skip GNU tar: if it does not support --format= it doesn't create
    962      1.1  christos     # ustar tarball either.
    963      1.1  christos     (tar --version) >/dev/null 2>&1 && continue
    964      1.1  christos     am__tar='tar chf - "$$tardir"'
    965      1.1  christos     am__tar_='tar chf - "$tardir"'
    966      1.1  christos     am__untar='tar xf -'
    967      1.1  christos     ;;
    968      1.1  christos   pax)
    969      1.1  christos     am__tar='pax -L -x $1 -w "$$tardir"'
    970      1.1  christos     am__tar_='pax -L -x $1 -w "$tardir"'
    971      1.1  christos     am__untar='pax -r'
    972      1.1  christos     ;;
    973      1.1  christos   cpio)
    974      1.1  christos     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
    975      1.1  christos     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
    976      1.1  christos     am__untar='cpio -i -H $1 -d'
    977      1.1  christos     ;;
    978      1.1  christos   none)
    979      1.1  christos     am__tar=false
    980      1.1  christos     am__tar_=false
    981      1.1  christos     am__untar=false
    982      1.1  christos     ;;
    983      1.1  christos   esac
    984      1.1  christos 
    985      1.1  christos   # If the value was cached, stop now.  We just wanted to have am__tar
    986      1.1  christos   # and am__untar set.
    987      1.1  christos   test -n "${am_cv_prog_tar_$1}" && break
    988      1.1  christos 
    989      1.1  christos   # tar/untar a dummy directory, and stop if the command works
    990      1.1  christos   rm -rf conftest.dir
    991      1.1  christos   mkdir conftest.dir
    992      1.1  christos   echo GrepMe > conftest.dir/file
    993      1.1  christos   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
    994      1.1  christos   rm -rf conftest.dir
    995      1.1  christos   if test -s conftest.tar; then
    996      1.1  christos     AM_RUN_LOG([$am__untar <conftest.tar])
    997      1.1  christos     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
    998      1.1  christos   fi
    999      1.1  christos done
   1000      1.1  christos rm -rf conftest.dir
   1001      1.1  christos 
   1002      1.1  christos AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
   1003      1.1  christos AC_MSG_RESULT([$am_cv_prog_tar_$1])])
   1004      1.1  christos AC_SUBST([am__tar])
   1005      1.1  christos AC_SUBST([am__untar])
   1006      1.1  christos ]) # _AM_PROG_TAR
   1007      1.1  christos 
   1008      1.1  christos m4_include([m4/gettext.m4])
   1009      1.1  christos m4_include([m4/iconv.m4])
   1010      1.1  christos m4_include([m4/lib-ld.m4])
   1011      1.1  christos m4_include([m4/lib-link.m4])
   1012      1.1  christos m4_include([m4/lib-prefix.m4])
   1013      1.1  christos m4_include([m4/nls.m4])
   1014      1.1  christos m4_include([m4/po.m4])
   1015      1.1  christos m4_include([m4/progtest.m4])
   1016