michael@0: # generated automatically by aclocal 1.11.3 -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, michael@0: # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, michael@0: # Inc. michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # This program is distributed in the hope that it will be useful, michael@0: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without michael@0: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A michael@0: # PARTICULAR PURPOSE. michael@0: michael@0: m4_ifndef([AC_AUTOCONF_VERSION], michael@0: [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl michael@0: m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, michael@0: [m4_warning([this file was generated for autoconf 2.68. michael@0: You have another version of autoconf. It may work, but is not guaranteed to. michael@0: If you have problems, you may need to regenerate the build system entirely. michael@0: To do so, use the procedure documented by the package, typically `autoreconf'.])]) michael@0: michael@0: # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software michael@0: # Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # AM_AUTOMAKE_VERSION(VERSION) michael@0: # ---------------------------- michael@0: # Automake X.Y traces this macro to ensure aclocal.m4 has been michael@0: # generated from the m4 files accompanying Automake X.Y. michael@0: # (This private macro should not be called outside this file.) michael@0: AC_DEFUN([AM_AUTOMAKE_VERSION], michael@0: [am__api_version='1.11' michael@0: dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to michael@0: dnl require some minimum version. Point them to the right macro. michael@0: m4_if([$1], [1.11.3], [], michael@0: [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl michael@0: ]) michael@0: michael@0: # _AM_AUTOCONF_VERSION(VERSION) michael@0: # ----------------------------- michael@0: # aclocal traces this macro to find the Autoconf version. michael@0: # This is a private macro too. Using m4_define simplifies michael@0: # the logic in aclocal, which can simply ignore this definition. michael@0: m4_define([_AM_AUTOCONF_VERSION], []) michael@0: michael@0: # AM_SET_CURRENT_AUTOMAKE_VERSION michael@0: # ------------------------------- michael@0: # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. michael@0: # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. michael@0: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], michael@0: [AM_AUTOMAKE_VERSION([1.11.3])dnl michael@0: m4_ifndef([AC_AUTOCONF_VERSION], michael@0: [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl michael@0: _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) michael@0: michael@0: # Figure out how to run the assembler. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 5 michael@0: michael@0: # AM_PROG_AS michael@0: # ---------- michael@0: AC_DEFUN([AM_PROG_AS], michael@0: [# By default we simply use the C compiler to build assembly code. michael@0: AC_REQUIRE([AC_PROG_CC]) michael@0: test "${CCAS+set}" = set || CCAS=$CC michael@0: test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS michael@0: AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) michael@0: AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) michael@0: _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl michael@0: ]) michael@0: michael@0: # AM_AUX_DIR_EXPAND -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets michael@0: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to michael@0: # `$srcdir', `$srcdir/..', or `$srcdir/../..'. michael@0: # michael@0: # Of course, Automake must honor this variable whenever it calls a michael@0: # tool from the auxiliary directory. The problem is that $srcdir (and michael@0: # therefore $ac_aux_dir as well) can be either absolute or relative, michael@0: # depending on how configure is run. This is pretty annoying, since michael@0: # it makes $ac_aux_dir quite unusable in subdirectories: in the top michael@0: # source directory, any form will work fine, but in subdirectories a michael@0: # relative path needs to be adjusted first. michael@0: # michael@0: # $ac_aux_dir/missing michael@0: # fails when called from a subdirectory if $ac_aux_dir is relative michael@0: # $top_srcdir/$ac_aux_dir/missing michael@0: # fails if $ac_aux_dir is absolute, michael@0: # fails when called from a subdirectory in a VPATH build with michael@0: # a relative $ac_aux_dir michael@0: # michael@0: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir michael@0: # are both prefixed by $srcdir. In an in-source build this is usually michael@0: # harmless because $srcdir is `.', but things will broke when you michael@0: # start a VPATH build or use an absolute $srcdir. michael@0: # michael@0: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, michael@0: # iff we strip the leading $srcdir from $ac_aux_dir. That would be: michael@0: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` michael@0: # and then we would define $MISSING as michael@0: # MISSING="\${SHELL} $am_aux_dir/missing" michael@0: # This will work as long as MISSING is not called from configure, because michael@0: # unfortunately $(top_srcdir) has no meaning in configure. michael@0: # However there are other variables, like CC, which are often used in michael@0: # configure, and could therefore not use this "fixed" $ac_aux_dir. michael@0: # michael@0: # Another solution, used here, is to always expand $ac_aux_dir to an michael@0: # absolute PATH. The drawback is that using absolute paths prevent a michael@0: # configured tree to be moved without reconfiguration. michael@0: michael@0: AC_DEFUN([AM_AUX_DIR_EXPAND], michael@0: [dnl Rely on autoconf to set up CDPATH properly. michael@0: AC_PREREQ([2.50])dnl michael@0: # expand $ac_aux_dir to an absolute path michael@0: am_aux_dir=`cd $ac_aux_dir && pwd` michael@0: ]) michael@0: michael@0: # AM_CONDITIONAL -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 9 michael@0: michael@0: # AM_CONDITIONAL(NAME, SHELL-CONDITION) michael@0: # ------------------------------------- michael@0: # Define a conditional. michael@0: AC_DEFUN([AM_CONDITIONAL], michael@0: [AC_PREREQ(2.52)dnl michael@0: ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], michael@0: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl michael@0: AC_SUBST([$1_TRUE])dnl michael@0: AC_SUBST([$1_FALSE])dnl michael@0: _AM_SUBST_NOTMAKE([$1_TRUE])dnl michael@0: _AM_SUBST_NOTMAKE([$1_FALSE])dnl michael@0: m4_define([_AM_COND_VALUE_$1], [$2])dnl michael@0: if $2; then michael@0: $1_TRUE= michael@0: $1_FALSE='#' michael@0: else michael@0: $1_TRUE='#' michael@0: $1_FALSE= michael@0: fi michael@0: AC_CONFIG_COMMANDS_PRE( michael@0: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then michael@0: AC_MSG_ERROR([[conditional "$1" was never defined. michael@0: Usually this means the macro was only invoked conditionally.]]) michael@0: fi])]) michael@0: michael@0: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, michael@0: # 2010, 2011 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 12 michael@0: michael@0: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be michael@0: # written in clear, in which case automake, when reading aclocal.m4, michael@0: # will think it sees a *use*, and therefore will trigger all it's michael@0: # C support machinery. Also note that it means that autoscan, seeing michael@0: # CC etc. in the Makefile, will ask for an AC_PROG_CC use... michael@0: michael@0: michael@0: # _AM_DEPENDENCIES(NAME) michael@0: # ---------------------- michael@0: # See how the compiler implements dependency checking. michael@0: # NAME is "CC", "CXX", "GCJ", or "OBJC". michael@0: # We try a few techniques and use that to set a single cache variable. michael@0: # michael@0: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was michael@0: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular michael@0: # dependency, and given that the user is not expected to run this macro, michael@0: # just rely on AC_PROG_CC. michael@0: AC_DEFUN([_AM_DEPENDENCIES], michael@0: [AC_REQUIRE([AM_SET_DEPDIR])dnl michael@0: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl michael@0: AC_REQUIRE([AM_MAKE_INCLUDE])dnl michael@0: AC_REQUIRE([AM_DEP_TRACK])dnl michael@0: michael@0: ifelse([$1], CC, [depcc="$CC" am_compiler_list=], michael@0: [$1], CXX, [depcc="$CXX" am_compiler_list=], michael@0: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], michael@0: [$1], UPC, [depcc="$UPC" am_compiler_list=], michael@0: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], michael@0: [depcc="$$1" am_compiler_list=]) michael@0: michael@0: AC_CACHE_CHECK([dependency style of $depcc], michael@0: [am_cv_$1_dependencies_compiler_type], michael@0: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then michael@0: # We make a subdir and do the tests there. Otherwise we can end up michael@0: # making bogus files that we don't know about and never remove. For michael@0: # instance it was reported that on HP-UX the gcc test will end up michael@0: # making a dummy file named `D' -- because `-MD' means `put the output michael@0: # in D'. michael@0: rm -rf conftest.dir michael@0: mkdir conftest.dir michael@0: # Copy depcomp to subdir because otherwise we won't find it if we're michael@0: # using a relative directory. michael@0: cp "$am_depcomp" conftest.dir michael@0: cd conftest.dir michael@0: # We will build objects and dependencies in a subdirectory because michael@0: # it helps to detect inapplicable dependency modes. For instance michael@0: # both Tru64's cc and ICC support -MD to output dependencies as a michael@0: # side effect of compilation, but ICC will put the dependencies in michael@0: # the current directory while Tru64 will put them in the object michael@0: # directory. michael@0: mkdir sub michael@0: michael@0: am_cv_$1_dependencies_compiler_type=none michael@0: if test "$am_compiler_list" = ""; then michael@0: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` michael@0: fi michael@0: am__universal=false michael@0: m4_case([$1], [CC], michael@0: [case " $depcc " in #( michael@0: *\ -arch\ *\ -arch\ *) am__universal=true ;; michael@0: esac], michael@0: [CXX], michael@0: [case " $depcc " in #( michael@0: *\ -arch\ *\ -arch\ *) am__universal=true ;; michael@0: esac]) michael@0: michael@0: for depmode in $am_compiler_list; do michael@0: # Setup a source with many dependencies, because some compilers michael@0: # like to wrap large dependency lists on column 80 (with \), and michael@0: # we should not choose a depcomp mode which is confused by this. michael@0: # michael@0: # We need to recreate these files for each test, as the compiler may michael@0: # overwrite some of them when testing with obscure command lines. michael@0: # This happens at least with the AIX C compiler. michael@0: : > sub/conftest.c michael@0: for i in 1 2 3 4 5 6; do michael@0: echo '#include "conftst'$i'.h"' >> sub/conftest.c michael@0: # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with michael@0: # Solaris 8's {/usr,}/bin/sh. michael@0: touch sub/conftst$i.h michael@0: done michael@0: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf michael@0: michael@0: # We check with `-c' and `-o' for the sake of the "dashmstdout" michael@0: # mode. It turns out that the SunPro C++ compiler does not properly michael@0: # handle `-M -o', and we need to detect this. Also, some Intel michael@0: # versions had trouble with output in subdirs michael@0: am__obj=sub/conftest.${OBJEXT-o} michael@0: am__minus_obj="-o $am__obj" michael@0: case $depmode in michael@0: gcc) michael@0: # This depmode causes a compiler race in universal mode. michael@0: test "$am__universal" = false || continue michael@0: ;; michael@0: nosideeffect) michael@0: # after this tag, mechanisms are not by side-effect, so they'll michael@0: # only be used when explicitly requested michael@0: if test "x$enable_dependency_tracking" = xyes; then michael@0: continue michael@0: else michael@0: break michael@0: fi michael@0: ;; michael@0: msvc7 | msvc7msys | msvisualcpp | msvcmsys) michael@0: # This compiler won't grok `-c -o', but also, the minuso test has michael@0: # not run yet. These depmodes are late enough in the game, and michael@0: # so weak that their functioning should not be impacted. michael@0: am__obj=conftest.${OBJEXT-o} michael@0: am__minus_obj= michael@0: ;; michael@0: none) break ;; michael@0: esac michael@0: if depmode=$depmode \ michael@0: source=sub/conftest.c object=$am__obj \ michael@0: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ michael@0: $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ michael@0: >/dev/null 2>conftest.err && michael@0: grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && michael@0: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && michael@0: grep $am__obj sub/conftest.Po > /dev/null 2>&1 && michael@0: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then michael@0: # icc doesn't choke on unknown options, it will just issue warnings michael@0: # or remarks (even with -Werror). So we grep stderr for any message michael@0: # that says an option was ignored or not supported. michael@0: # When given -MP, icc 7.0 and 7.1 complain thusly: michael@0: # icc: Command line warning: ignoring option '-M'; no argument required michael@0: # The diagnosis changed in icc 8.0: michael@0: # icc: Command line remark: option '-MP' not supported michael@0: if (grep 'ignoring option' conftest.err || michael@0: grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else michael@0: am_cv_$1_dependencies_compiler_type=$depmode michael@0: break michael@0: fi michael@0: fi michael@0: done michael@0: michael@0: cd .. michael@0: rm -rf conftest.dir michael@0: else michael@0: am_cv_$1_dependencies_compiler_type=none michael@0: fi michael@0: ]) michael@0: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) michael@0: AM_CONDITIONAL([am__fastdep$1], [ michael@0: test "x$enable_dependency_tracking" != xno \ michael@0: && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) michael@0: ]) michael@0: michael@0: michael@0: # AM_SET_DEPDIR michael@0: # ------------- michael@0: # Choose a directory name for dependency files. michael@0: # This macro is AC_REQUIREd in _AM_DEPENDENCIES michael@0: AC_DEFUN([AM_SET_DEPDIR], michael@0: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl michael@0: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl michael@0: ]) michael@0: michael@0: michael@0: # AM_DEP_TRACK michael@0: # ------------ michael@0: AC_DEFUN([AM_DEP_TRACK], michael@0: [AC_ARG_ENABLE(dependency-tracking, michael@0: [ --disable-dependency-tracking speeds up one-time build michael@0: --enable-dependency-tracking do not reject slow dependency extractors]) michael@0: if test "x$enable_dependency_tracking" != xno; then michael@0: am_depcomp="$ac_aux_dir/depcomp" michael@0: AMDEPBACKSLASH='\' michael@0: am__nodep='_no' michael@0: fi michael@0: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) michael@0: AC_SUBST([AMDEPBACKSLASH])dnl michael@0: _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl michael@0: AC_SUBST([am__nodep])dnl michael@0: _AM_SUBST_NOTMAKE([am__nodep])dnl michael@0: ]) michael@0: michael@0: # Generate code to set up dependency tracking. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: #serial 5 michael@0: michael@0: # _AM_OUTPUT_DEPENDENCY_COMMANDS michael@0: # ------------------------------ michael@0: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], michael@0: [{ michael@0: # Autoconf 2.62 quotes --file arguments for eval, but not when files michael@0: # are listed without --file. Let's play safe and only enable the eval michael@0: # if we detect the quoting. michael@0: case $CONFIG_FILES in michael@0: *\'*) eval set x "$CONFIG_FILES" ;; michael@0: *) set x $CONFIG_FILES ;; michael@0: esac michael@0: shift michael@0: for mf michael@0: do michael@0: # Strip MF so we end up with the name of the file. michael@0: mf=`echo "$mf" | sed -e 's/:.*$//'` michael@0: # Check whether this is an Automake generated Makefile or not. michael@0: # We used to match only the files named `Makefile.in', but michael@0: # some people rename them; so instead we look at the file content. michael@0: # Grep'ing the first line is not enough: some people post-process michael@0: # each Makefile.in and add a new line on top of each file to say so. michael@0: # Grep'ing the whole file is not good either: AIX grep has a line michael@0: # limit of 2048, but all sed's we know have understand at least 4000. michael@0: if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then michael@0: dirpart=`AS_DIRNAME("$mf")` michael@0: else michael@0: continue michael@0: fi michael@0: # Extract the definition of DEPDIR, am__include, and am__quote michael@0: # from the Makefile without running `make'. michael@0: DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` michael@0: test -z "$DEPDIR" && continue michael@0: am__include=`sed -n 's/^am__include = //p' < "$mf"` michael@0: test -z "am__include" && continue michael@0: am__quote=`sed -n 's/^am__quote = //p' < "$mf"` michael@0: # When using ansi2knr, U may be empty or an underscore; expand it michael@0: U=`sed -n 's/^U = //p' < "$mf"` michael@0: # Find all dependency output files, they are included files with michael@0: # $(DEPDIR) in their names. We invoke sed twice because it is the michael@0: # simplest approach to changing $(DEPDIR) to its actual value in the michael@0: # expansion. michael@0: for file in `sed -n " michael@0: s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ michael@0: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do michael@0: # Make sure the directory exists. michael@0: test -f "$dirpart/$file" && continue michael@0: fdir=`AS_DIRNAME(["$file"])` michael@0: AS_MKDIR_P([$dirpart/$fdir]) michael@0: # echo "creating $dirpart/$file" michael@0: echo '# dummy' > "$dirpart/$file" michael@0: done michael@0: done michael@0: } michael@0: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS michael@0: michael@0: michael@0: # AM_OUTPUT_DEPENDENCY_COMMANDS michael@0: # ----------------------------- michael@0: # This macro should only be invoked once -- use via AC_REQUIRE. michael@0: # michael@0: # This code is only required when automatic dependency tracking michael@0: # is enabled. FIXME. This creates each `.P' file that we will michael@0: # need in order to bootstrap the dependency handling code. michael@0: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], michael@0: [AC_CONFIG_COMMANDS([depfiles], michael@0: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], michael@0: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) michael@0: ]) michael@0: michael@0: # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 8 michael@0: michael@0: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. michael@0: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) michael@0: michael@0: # Do all the work for Automake. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, michael@0: # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 16 michael@0: michael@0: # This macro actually does too much. Some checks are only needed if michael@0: # your package does certain things. But this isn't really a big deal. michael@0: michael@0: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) michael@0: # AM_INIT_AUTOMAKE([OPTIONS]) michael@0: # ----------------------------------------------- michael@0: # The call with PACKAGE and VERSION arguments is the old style michael@0: # call (pre autoconf-2.50), which is being phased out. PACKAGE michael@0: # and VERSION should now be passed to AC_INIT and removed from michael@0: # the call to AM_INIT_AUTOMAKE. michael@0: # We support both call styles for the transition. After michael@0: # the next Automake release, Autoconf can make the AC_INIT michael@0: # arguments mandatory, and then we can depend on a new Autoconf michael@0: # release and drop the old call support. michael@0: AC_DEFUN([AM_INIT_AUTOMAKE], michael@0: [AC_PREREQ([2.62])dnl michael@0: dnl Autoconf wants to disallow AM_ names. We explicitly allow michael@0: dnl the ones we care about. michael@0: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl michael@0: AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl michael@0: AC_REQUIRE([AC_PROG_INSTALL])dnl michael@0: if test "`cd $srcdir && pwd`" != "`pwd`"; then michael@0: # Use -I$(srcdir) only when $(srcdir) != ., so that make's output michael@0: # is not polluted with repeated "-I." michael@0: AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl michael@0: # test to see if srcdir already configured michael@0: if test -f $srcdir/config.status; then michael@0: AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) michael@0: fi michael@0: fi michael@0: michael@0: # test whether we have cygpath michael@0: if test -z "$CYGPATH_W"; then michael@0: if (cygpath --version) >/dev/null 2>/dev/null; then michael@0: CYGPATH_W='cygpath -w' michael@0: else michael@0: CYGPATH_W=echo michael@0: fi michael@0: fi michael@0: AC_SUBST([CYGPATH_W]) michael@0: michael@0: # Define the identity of the package. michael@0: dnl Distinguish between old-style and new-style calls. michael@0: m4_ifval([$2], michael@0: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl michael@0: AC_SUBST([PACKAGE], [$1])dnl michael@0: AC_SUBST([VERSION], [$2])], michael@0: [_AM_SET_OPTIONS([$1])dnl michael@0: dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. michael@0: m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, michael@0: [m4_fatal([AC_INIT should be called with package and version arguments])])dnl michael@0: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl michael@0: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl michael@0: michael@0: _AM_IF_OPTION([no-define],, michael@0: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) michael@0: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl michael@0: michael@0: # Some tools Automake needs. michael@0: AC_REQUIRE([AM_SANITY_CHECK])dnl michael@0: AC_REQUIRE([AC_ARG_PROGRAM])dnl michael@0: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) michael@0: AM_MISSING_PROG(AUTOCONF, autoconf) michael@0: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) michael@0: AM_MISSING_PROG(AUTOHEADER, autoheader) michael@0: AM_MISSING_PROG(MAKEINFO, makeinfo) michael@0: AC_REQUIRE([AM_PROG_INSTALL_SH])dnl michael@0: AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl michael@0: AC_REQUIRE([AM_PROG_MKDIR_P])dnl michael@0: # We need awk for the "check" target. The system "awk" is bad on michael@0: # some platforms. michael@0: AC_REQUIRE([AC_PROG_AWK])dnl michael@0: AC_REQUIRE([AC_PROG_MAKE_SET])dnl michael@0: AC_REQUIRE([AM_SET_LEADING_DOT])dnl michael@0: _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], michael@0: [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], michael@0: [_AM_PROG_TAR([v7])])]) michael@0: _AM_IF_OPTION([no-dependencies],, michael@0: [AC_PROVIDE_IFELSE([AC_PROG_CC], michael@0: [_AM_DEPENDENCIES(CC)], michael@0: [define([AC_PROG_CC], michael@0: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl michael@0: AC_PROVIDE_IFELSE([AC_PROG_CXX], michael@0: [_AM_DEPENDENCIES(CXX)], michael@0: [define([AC_PROG_CXX], michael@0: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl michael@0: AC_PROVIDE_IFELSE([AC_PROG_OBJC], michael@0: [_AM_DEPENDENCIES(OBJC)], michael@0: [define([AC_PROG_OBJC], michael@0: defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl michael@0: ]) michael@0: _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl michael@0: dnl The `parallel-tests' driver may need to know about EXEEXT, so add the michael@0: dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro michael@0: dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. michael@0: AC_CONFIG_COMMANDS_PRE(dnl michael@0: [m4_provide_if([_AM_COMPILER_EXEEXT], michael@0: [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl michael@0: ]) michael@0: michael@0: dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not michael@0: dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further michael@0: dnl mangled by Autoconf and run in a shell conditional statement. michael@0: m4_define([_AC_COMPILER_EXEEXT], michael@0: m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) michael@0: michael@0: michael@0: # When config.status generates a header, we must update the stamp-h file. michael@0: # This file resides in the same directory as the config header michael@0: # that is generated. The stamp files are numbered to have different names. michael@0: michael@0: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the michael@0: # loop where config.status creates the headers, so we can generate michael@0: # our stamp files there. michael@0: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], michael@0: [# Compute $1's index in $config_headers. michael@0: _am_arg=$1 michael@0: _am_stamp_count=1 michael@0: for _am_header in $config_headers :; do michael@0: case $_am_header in michael@0: $_am_arg | $_am_arg:* ) michael@0: break ;; michael@0: * ) michael@0: _am_stamp_count=`expr $_am_stamp_count + 1` ;; michael@0: esac michael@0: done michael@0: echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) michael@0: michael@0: # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, michael@0: # Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # AM_PROG_INSTALL_SH michael@0: # ------------------ michael@0: # Define $install_sh. michael@0: AC_DEFUN([AM_PROG_INSTALL_SH], michael@0: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl michael@0: if test x"${install_sh}" != xset; then michael@0: case $am_aux_dir in michael@0: *\ * | *\ *) michael@0: install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; michael@0: *) michael@0: install_sh="\${SHELL} $am_aux_dir/install-sh" michael@0: esac michael@0: fi michael@0: AC_SUBST(install_sh)]) michael@0: michael@0: # Copyright (C) 2003, 2005 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 2 michael@0: michael@0: # Check whether the underlying file-system supports filenames michael@0: # with a leading dot. For instance MS-DOS doesn't. michael@0: AC_DEFUN([AM_SET_LEADING_DOT], michael@0: [rm -rf .tst 2>/dev/null michael@0: mkdir .tst 2>/dev/null michael@0: if test -d .tst; then michael@0: am__leading_dot=. michael@0: else michael@0: am__leading_dot=_ michael@0: fi michael@0: rmdir .tst 2>/dev/null michael@0: AC_SUBST([am__leading_dot])]) michael@0: michael@0: # Check to see how 'make' treats includes. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 4 michael@0: michael@0: # AM_MAKE_INCLUDE() michael@0: # ----------------- michael@0: # Check to see how make treats includes. michael@0: AC_DEFUN([AM_MAKE_INCLUDE], michael@0: [am_make=${MAKE-make} michael@0: cat > confinc << 'END' michael@0: am__doit: michael@0: @echo this is the am__doit target michael@0: .PHONY: am__doit michael@0: END michael@0: # If we don't find an include directive, just comment out the code. michael@0: AC_MSG_CHECKING([for style of include used by $am_make]) michael@0: am__include="#" michael@0: am__quote= michael@0: _am_result=none michael@0: # First try GNU make style include. michael@0: echo "include confinc" > confmf michael@0: # Ignore all kinds of additional output from `make'. michael@0: case `$am_make -s -f confmf 2> /dev/null` in #( michael@0: *the\ am__doit\ target*) michael@0: am__include=include michael@0: am__quote= michael@0: _am_result=GNU michael@0: ;; michael@0: esac michael@0: # Now try BSD make style include. michael@0: if test "$am__include" = "#"; then michael@0: echo '.include "confinc"' > confmf michael@0: case `$am_make -s -f confmf 2> /dev/null` in #( michael@0: *the\ am__doit\ target*) michael@0: am__include=.include michael@0: am__quote="\"" michael@0: _am_result=BSD michael@0: ;; michael@0: esac michael@0: fi michael@0: AC_SUBST([am__include]) michael@0: AC_SUBST([am__quote]) michael@0: AC_MSG_RESULT([$_am_result]) michael@0: rm -f confinc confmf michael@0: ]) michael@0: michael@0: # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 6 michael@0: michael@0: # AM_PROG_CC_C_O michael@0: # -------------- michael@0: # Like AC_PROG_CC_C_O, but changed for automake. michael@0: AC_DEFUN([AM_PROG_CC_C_O], michael@0: [AC_REQUIRE([AC_PROG_CC_C_O])dnl michael@0: AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl michael@0: AC_REQUIRE_AUX_FILE([compile])dnl michael@0: # FIXME: we rely on the cache variable name because michael@0: # there is no other way. michael@0: set dummy $CC michael@0: am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` michael@0: eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o michael@0: if test "$am_t" != yes; then michael@0: # Losing compiler, so override with the script. michael@0: # FIXME: It is wrong to rewrite CC. michael@0: # But if we don't then we get into trouble of one sort or another. michael@0: # A longer-term fix would be to have automake use am__CC in this case, michael@0: # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" michael@0: CC="$am_aux_dir/compile $CC" michael@0: fi michael@0: dnl Make sure AC_PROG_CC is never called again, or it will override our michael@0: dnl setting of CC. michael@0: m4_define([AC_PROG_CC], michael@0: [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) michael@0: ]) michael@0: michael@0: # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 6 michael@0: michael@0: # AM_MISSING_PROG(NAME, PROGRAM) michael@0: # ------------------------------ michael@0: AC_DEFUN([AM_MISSING_PROG], michael@0: [AC_REQUIRE([AM_MISSING_HAS_RUN]) michael@0: $1=${$1-"${am_missing_run}$2"} michael@0: AC_SUBST($1)]) michael@0: michael@0: michael@0: # AM_MISSING_HAS_RUN michael@0: # ------------------ michael@0: # Define MISSING if not defined so far and test if it supports --run. michael@0: # If it does, set am_missing_run to use it, otherwise, to nothing. michael@0: AC_DEFUN([AM_MISSING_HAS_RUN], michael@0: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl michael@0: AC_REQUIRE_AUX_FILE([missing])dnl michael@0: if test x"${MISSING+set}" != xset; then michael@0: case $am_aux_dir in michael@0: *\ * | *\ *) michael@0: MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; michael@0: *) michael@0: MISSING="\${SHELL} $am_aux_dir/missing" ;; michael@0: esac michael@0: fi michael@0: # Use eval to expand $SHELL michael@0: if eval "$MISSING --run true"; then michael@0: am_missing_run="$MISSING --run " michael@0: else michael@0: am_missing_run= michael@0: AC_MSG_WARN([`missing' script is too old or missing]) michael@0: fi michael@0: ]) michael@0: michael@0: # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, michael@0: # Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # AM_PROG_MKDIR_P michael@0: # --------------- michael@0: # Check for `mkdir -p'. michael@0: AC_DEFUN([AM_PROG_MKDIR_P], michael@0: [AC_PREREQ([2.60])dnl michael@0: AC_REQUIRE([AC_PROG_MKDIR_P])dnl michael@0: dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, michael@0: dnl while keeping a definition of mkdir_p for backward compatibility. michael@0: dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. michael@0: dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of michael@0: dnl Makefile.ins that do not define MKDIR_P, so we do our own michael@0: dnl adjustment using top_builddir (which is defined more often than michael@0: dnl MKDIR_P). michael@0: AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl michael@0: case $mkdir_p in michael@0: [[\\/$]]* | ?:[[\\/]]*) ;; michael@0: */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; michael@0: esac michael@0: ]) michael@0: michael@0: # Helper functions for option handling. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software michael@0: # Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 5 michael@0: michael@0: # _AM_MANGLE_OPTION(NAME) michael@0: # ----------------------- michael@0: AC_DEFUN([_AM_MANGLE_OPTION], michael@0: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) michael@0: michael@0: # _AM_SET_OPTION(NAME) michael@0: # -------------------- michael@0: # Set option NAME. Presently that only means defining a flag for this option. michael@0: AC_DEFUN([_AM_SET_OPTION], michael@0: [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) michael@0: michael@0: # _AM_SET_OPTIONS(OPTIONS) michael@0: # ------------------------ michael@0: # OPTIONS is a space-separated list of Automake options. michael@0: AC_DEFUN([_AM_SET_OPTIONS], michael@0: [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) michael@0: michael@0: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) michael@0: # ------------------------------------------- michael@0: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. michael@0: AC_DEFUN([_AM_IF_OPTION], michael@0: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) michael@0: michael@0: # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # AM_RUN_LOG(COMMAND) michael@0: # ------------------- michael@0: # Run COMMAND, save the exit status in ac_status, and log it. michael@0: # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) michael@0: AC_DEFUN([AM_RUN_LOG], michael@0: [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD michael@0: ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD michael@0: ac_status=$? michael@0: echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD michael@0: (exit $ac_status); }]) michael@0: michael@0: # Check to make sure that the build environment is sane. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 michael@0: # Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 5 michael@0: michael@0: # AM_SANITY_CHECK michael@0: # --------------- michael@0: AC_DEFUN([AM_SANITY_CHECK], michael@0: [AC_MSG_CHECKING([whether build environment is sane]) michael@0: # Just in case michael@0: sleep 1 michael@0: echo timestamp > conftest.file michael@0: # Reject unsafe characters in $srcdir or the absolute working directory michael@0: # name. Accept space and tab only in the latter. michael@0: am_lf=' michael@0: ' michael@0: case `pwd` in michael@0: *[[\\\"\#\$\&\'\`$am_lf]]*) michael@0: AC_MSG_ERROR([unsafe absolute working directory name]);; michael@0: esac michael@0: case $srcdir in michael@0: *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) michael@0: AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; michael@0: esac michael@0: michael@0: # Do `set' in a subshell so we don't clobber the current shell's michael@0: # arguments. Must try -L first in case configure is actually a michael@0: # symlink; some systems play weird games with the mod time of symlinks michael@0: # (eg FreeBSD returns the mod time of the symlink's containing michael@0: # directory). michael@0: if ( michael@0: set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` michael@0: if test "$[*]" = "X"; then michael@0: # -L didn't work. michael@0: set X `ls -t "$srcdir/configure" conftest.file` michael@0: fi michael@0: rm -f conftest.file michael@0: if test "$[*]" != "X $srcdir/configure conftest.file" \ michael@0: && test "$[*]" != "X conftest.file $srcdir/configure"; then michael@0: michael@0: # If neither matched, then we have a broken ls. This can happen michael@0: # if, for instance, CONFIG_SHELL is bash and it inherits a michael@0: # broken ls alias from the environment. This has actually michael@0: # happened. Such a system could not be considered "sane". michael@0: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken michael@0: alias in your environment]) michael@0: fi michael@0: michael@0: test "$[2]" = conftest.file michael@0: ) michael@0: then michael@0: # Ok. michael@0: : michael@0: else michael@0: AC_MSG_ERROR([newly created file is older than distributed files! michael@0: Check your system clock]) michael@0: fi michael@0: AC_MSG_RESULT(yes)]) michael@0: michael@0: # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 1 michael@0: michael@0: # AM_PROG_INSTALL_STRIP michael@0: # --------------------- michael@0: # One issue with vendor `install' (even GNU) is that you can't michael@0: # specify the program used to strip binaries. This is especially michael@0: # annoying in cross-compiling environments, where the build's strip michael@0: # is unlikely to handle the host's binaries. michael@0: # Fortunately install-sh will honor a STRIPPROG variable, so we michael@0: # always use install-sh in `make install-strip', and initialize michael@0: # STRIPPROG with the value of the STRIP variable (set by the user). michael@0: AC_DEFUN([AM_PROG_INSTALL_STRIP], michael@0: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl michael@0: # Installed binaries are usually stripped using `strip' when the user michael@0: # run `make install-strip'. However `strip' might not be the right michael@0: # tool to use in cross-compilation environments, therefore Automake michael@0: # will honor the `STRIP' environment variable to overrule this program. michael@0: dnl Don't test for $cross_compiling = yes, because it might be `maybe'. michael@0: if test "$cross_compiling" != no; then michael@0: AC_CHECK_TOOL([STRIP], [strip], :) michael@0: fi michael@0: INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" michael@0: AC_SUBST([INSTALL_STRIP_PROGRAM])]) michael@0: michael@0: # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 3 michael@0: michael@0: # _AM_SUBST_NOTMAKE(VARIABLE) michael@0: # --------------------------- michael@0: # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. michael@0: # This macro is traced by Automake. michael@0: AC_DEFUN([_AM_SUBST_NOTMAKE]) michael@0: michael@0: # AM_SUBST_NOTMAKE(VARIABLE) michael@0: # -------------------------- michael@0: # Public sister of _AM_SUBST_NOTMAKE. michael@0: AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) michael@0: michael@0: # Check how to create a tarball. -*- Autoconf -*- michael@0: michael@0: # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. michael@0: # michael@0: # This file is free software; the Free Software Foundation michael@0: # gives unlimited permission to copy and/or distribute it, michael@0: # with or without modifications, as long as this notice is preserved. michael@0: michael@0: # serial 2 michael@0: michael@0: # _AM_PROG_TAR(FORMAT) michael@0: # -------------------- michael@0: # Check how to create a tarball in format FORMAT. michael@0: # FORMAT should be one of `v7', `ustar', or `pax'. michael@0: # michael@0: # Substitute a variable $(am__tar) that is a command michael@0: # writing to stdout a FORMAT-tarball containing the directory michael@0: # $tardir. michael@0: # tardir=directory && $(am__tar) > result.tar michael@0: # michael@0: # Substitute a variable $(am__untar) that extract such michael@0: # a tarball read from stdin. michael@0: # $(am__untar) < result.tar michael@0: AC_DEFUN([_AM_PROG_TAR], michael@0: [# Always define AMTAR for backward compatibility. Yes, it's still used michael@0: # in the wild :-( We should find a proper way to deprecate it ... michael@0: AC_SUBST([AMTAR], ['$${TAR-tar}']) michael@0: m4_if([$1], [v7], michael@0: [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], michael@0: [m4_case([$1], [ustar],, [pax],, michael@0: [m4_fatal([Unknown tar format])]) michael@0: AC_MSG_CHECKING([how to create a $1 tar archive]) michael@0: # Loop over all known methods to create a tar archive until one works. michael@0: _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' michael@0: _am_tools=${am_cv_prog_tar_$1-$_am_tools} michael@0: # Do not fold the above two line into one, because Tru64 sh and michael@0: # Solaris sh will not grok spaces in the rhs of `-'. michael@0: for _am_tool in $_am_tools michael@0: do michael@0: case $_am_tool in michael@0: gnutar) michael@0: for _am_tar in tar gnutar gtar; michael@0: do michael@0: AM_RUN_LOG([$_am_tar --version]) && break michael@0: done michael@0: am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' michael@0: am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' michael@0: am__untar="$_am_tar -xf -" michael@0: ;; michael@0: plaintar) michael@0: # Must skip GNU tar: if it does not support --format= it doesn't create michael@0: # ustar tarball either. michael@0: (tar --version) >/dev/null 2>&1 && continue michael@0: am__tar='tar chf - "$$tardir"' michael@0: am__tar_='tar chf - "$tardir"' michael@0: am__untar='tar xf -' michael@0: ;; michael@0: pax) michael@0: am__tar='pax -L -x $1 -w "$$tardir"' michael@0: am__tar_='pax -L -x $1 -w "$tardir"' michael@0: am__untar='pax -r' michael@0: ;; michael@0: cpio) michael@0: am__tar='find "$$tardir" -print | cpio -o -H $1 -L' michael@0: am__tar_='find "$tardir" -print | cpio -o -H $1 -L' michael@0: am__untar='cpio -i -H $1 -d' michael@0: ;; michael@0: none) michael@0: am__tar=false michael@0: am__tar_=false michael@0: am__untar=false michael@0: ;; michael@0: esac michael@0: michael@0: # If the value was cached, stop now. We just wanted to have am__tar michael@0: # and am__untar set. michael@0: test -n "${am_cv_prog_tar_$1}" && break michael@0: michael@0: # tar/untar a dummy directory, and stop if the command works michael@0: rm -rf conftest.dir michael@0: mkdir conftest.dir michael@0: echo GrepMe > conftest.dir/file michael@0: AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) michael@0: rm -rf conftest.dir michael@0: if test -s conftest.tar; then michael@0: AM_RUN_LOG([$am__untar /dev/null 2>&1 && break michael@0: fi michael@0: done michael@0: rm -rf conftest.dir michael@0: michael@0: AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) michael@0: AC_MSG_RESULT([$am_cv_prog_tar_$1])]) michael@0: AC_SUBST([am__tar]) michael@0: AC_SUBST([am__untar]) michael@0: ]) # _AM_PROG_TAR michael@0: