annotate aclocal.m4 @ 21:7275f59cab61

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