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