masqmail

annotate aclocal.m4 @ 434:f2a7271746d1

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