masqmail

annotate aclocal.m4 @ 352:4905a1d9e6a7

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