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