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