1# generated automatically by aclocal 1.11.6 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5# Inc. 6# This file is free software; the Free Software Foundation 7# gives unlimited permission to copy and/or distribute it, 8# with or without modifications, as long as this notice is preserved. 9 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13# PARTICULAR PURPOSE. 14 15m4_ifndef([AC_AUTOCONF_VERSION], 16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18[m4_warning([this file was generated for autoconf 2.69. 19You have another version of autoconf. It may work, but is not guaranteed to. 20If you have problems, you may need to regenerate the build system entirely. 21To do so, use the procedure documented by the package, typically `autoreconf'.])]) 22 23dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 24dnl serial 11 (pkg-config-0.29.1) 25dnl 26dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 27dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 28dnl 29dnl This program is free software; you can redistribute it and/or modify 30dnl it under the terms of the GNU General Public License as published by 31dnl the Free Software Foundation; either version 2 of the License, or 32dnl (at your option) any later version. 33dnl 34dnl This program is distributed in the hope that it will be useful, but 35dnl WITHOUT ANY WARRANTY; without even the implied warranty of 36dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37dnl General Public License for more details. 38dnl 39dnl You should have received a copy of the GNU General Public License 40dnl along with this program; if not, write to the Free Software 41dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 42dnl 02111-1307, USA. 43dnl 44dnl As a special exception to the GNU General Public License, if you 45dnl distribute this file as part of a program that contains a 46dnl configuration script generated by Autoconf, you may include it under 47dnl the same distribution terms that you use for the rest of that 48dnl program. 49 50dnl PKG_PREREQ(MIN-VERSION) 51dnl ----------------------- 52dnl Since: 0.29 53dnl 54dnl Verify that the version of the pkg-config macros are at least 55dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 56dnl installed version of pkg-config, this checks the developer's version 57dnl of pkg.m4 when generating configure. 58dnl 59dnl To ensure that this macro is defined, also add: 60dnl m4_ifndef([PKG_PREREQ], 61dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 62dnl 63dnl See the "Since" comment for each macro you use to see what version 64dnl of the macros you require. 65m4_defun([PKG_PREREQ], 66[m4_define([PKG_MACROS_VERSION], [0.29.1]) 67m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 68 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 69])dnl PKG_PREREQ 70 71dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 72dnl ---------------------------------- 73dnl Since: 0.16 74dnl 75dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 76dnl first found in the path. Checks that the version of pkg-config found 77dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 78dnl used since that's the first version where most current features of 79dnl pkg-config existed. 80AC_DEFUN([PKG_PROG_PKG_CONFIG], 81[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 82m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 83m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 84AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 85AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 87 88if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 89 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 90fi 91if test -n "$PKG_CONFIG"; then 92 _pkg_min_version=m4_default([$1], [0.9.0]) 93 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 94 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 95 AC_MSG_RESULT([yes]) 96 else 97 AC_MSG_RESULT([no]) 98 PKG_CONFIG="" 99 fi 100fi[]dnl 101])dnl PKG_PROG_PKG_CONFIG 102 103dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 104dnl ------------------------------------------------------------------- 105dnl Since: 0.18 106dnl 107dnl Check to see whether a particular set of modules exists. Similar to 108dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 109dnl 110dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111dnl only at the first occurence in configure.ac, so if the first place 112dnl it's called might be skipped (such as if it is within an "if", you 113dnl have to call PKG_CHECK_EXISTS manually 114AC_DEFUN([PKG_CHECK_EXISTS], 115[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 116if test -n "$PKG_CONFIG" && \ 117 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 118 m4_default([$2], [:]) 119m4_ifvaln([$3], [else 120 $3])dnl 121fi]) 122 123dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 124dnl --------------------------------------------- 125dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 126dnl pkg_failed based on the result. 127m4_define([_PKG_CONFIG], 128[if test -n "$$1"; then 129 pkg_cv_[]$1="$$1" 130 elif test -n "$PKG_CONFIG"; then 131 PKG_CHECK_EXISTS([$3], 132 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 133 test "x$?" != "x0" && pkg_failed=yes ], 134 [pkg_failed=yes]) 135 else 136 pkg_failed=untried 137fi[]dnl 138])dnl _PKG_CONFIG 139 140dnl _PKG_SHORT_ERRORS_SUPPORTED 141dnl --------------------------- 142dnl Internal check to see if pkg-config supports short errors. 143AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 144[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 145if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 146 _pkg_short_errors_supported=yes 147else 148 _pkg_short_errors_supported=no 149fi[]dnl 150])dnl _PKG_SHORT_ERRORS_SUPPORTED 151 152 153dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 154dnl [ACTION-IF-NOT-FOUND]) 155dnl -------------------------------------------------------------- 156dnl Since: 0.4.0 157dnl 158dnl Note that if there is a possibility the first call to 159dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 160dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 161AC_DEFUN([PKG_CHECK_MODULES], 162[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 163AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 164AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 165 166pkg_failed=no 167AC_MSG_CHECKING([for $1]) 168 169_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 170_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 171 172m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 173and $1[]_LIBS to avoid the need to call pkg-config. 174See the pkg-config man page for more details.]) 175 176if test $pkg_failed = yes; then 177 AC_MSG_RESULT([no]) 178 _PKG_SHORT_ERRORS_SUPPORTED 179 if test $_pkg_short_errors_supported = yes; then 180 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 181 else 182 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 183 fi 184 # Put the nasty error message in config.log where it belongs 185 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 186 187 m4_default([$4], [AC_MSG_ERROR( 188[Package requirements ($2) were not met: 189 190$$1_PKG_ERRORS 191 192Consider adjusting the PKG_CONFIG_PATH environment variable if you 193installed software in a non-standard prefix. 194 195_PKG_TEXT])[]dnl 196 ]) 197elif test $pkg_failed = untried; then 198 AC_MSG_RESULT([no]) 199 m4_default([$4], [AC_MSG_FAILURE( 200[The pkg-config script could not be found or is too old. Make sure it 201is in your PATH or set the PKG_CONFIG environment variable to the full 202path to pkg-config. 203 204_PKG_TEXT 205 206To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 207 ]) 208else 209 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 210 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 211 AC_MSG_RESULT([yes]) 212 $3 213fi[]dnl 214])dnl PKG_CHECK_MODULES 215 216 217dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 218dnl [ACTION-IF-NOT-FOUND]) 219dnl --------------------------------------------------------------------- 220dnl Since: 0.29 221dnl 222dnl Checks for existence of MODULES and gathers its build flags with 223dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 224dnl and VARIABLE-PREFIX_LIBS from --libs. 225dnl 226dnl Note that if there is a possibility the first call to 227dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 228dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 229dnl configure.ac. 230AC_DEFUN([PKG_CHECK_MODULES_STATIC], 231[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 232_save_PKG_CONFIG=$PKG_CONFIG 233PKG_CONFIG="$PKG_CONFIG --static" 234PKG_CHECK_MODULES($@) 235PKG_CONFIG=$_save_PKG_CONFIG[]dnl 236])dnl PKG_CHECK_MODULES_STATIC 237 238 239dnl PKG_INSTALLDIR([DIRECTORY]) 240dnl ------------------------- 241dnl Since: 0.27 242dnl 243dnl Substitutes the variable pkgconfigdir as the location where a module 244dnl should install pkg-config .pc files. By default the directory is 245dnl $libdir/pkgconfig, but the default can be changed by passing 246dnl DIRECTORY. The user can override through the --with-pkgconfigdir 247dnl parameter. 248AC_DEFUN([PKG_INSTALLDIR], 249[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 250m4_pushdef([pkg_description], 251 [pkg-config installation directory @<:@]pkg_default[@:>@]) 252AC_ARG_WITH([pkgconfigdir], 253 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 254 [with_pkgconfigdir=]pkg_default) 255AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 256m4_popdef([pkg_default]) 257m4_popdef([pkg_description]) 258])dnl PKG_INSTALLDIR 259 260 261dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 262dnl -------------------------------- 263dnl Since: 0.27 264dnl 265dnl Substitutes the variable noarch_pkgconfigdir as the location where a 266dnl module should install arch-independent pkg-config .pc files. By 267dnl default the directory is $datadir/pkgconfig, but the default can be 268dnl changed by passing DIRECTORY. The user can override through the 269dnl --with-noarch-pkgconfigdir parameter. 270AC_DEFUN([PKG_NOARCH_INSTALLDIR], 271[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 272m4_pushdef([pkg_description], 273 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 274AC_ARG_WITH([noarch-pkgconfigdir], 275 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 276 [with_noarch_pkgconfigdir=]pkg_default) 277AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 278m4_popdef([pkg_default]) 279m4_popdef([pkg_description]) 280])dnl PKG_NOARCH_INSTALLDIR 281 282 283dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 284dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 285dnl ------------------------------------------- 286dnl Since: 0.28 287dnl 288dnl Retrieves the value of the pkg-config variable for the given module. 289AC_DEFUN([PKG_CHECK_VAR], 290[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 291AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 292 293_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 294AS_VAR_COPY([$1], [pkg_cv_][$1]) 295 296AS_VAR_IF([$1], [""], [$5], [$4])dnl 297])dnl PKG_CHECK_VAR 298 299# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 300# Foundation, Inc. 301# 302# This file is free software; the Free Software Foundation 303# gives unlimited permission to copy and/or distribute it, 304# with or without modifications, as long as this notice is preserved. 305 306# serial 1 307 308# AM_AUTOMAKE_VERSION(VERSION) 309# ---------------------------- 310# Automake X.Y traces this macro to ensure aclocal.m4 has been 311# generated from the m4 files accompanying Automake X.Y. 312# (This private macro should not be called outside this file.) 313AC_DEFUN([AM_AUTOMAKE_VERSION], 314[am__api_version='1.11' 315dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 316dnl require some minimum version. Point them to the right macro. 317m4_if([$1], [1.11.6], [], 318 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 319]) 320 321# _AM_AUTOCONF_VERSION(VERSION) 322# ----------------------------- 323# aclocal traces this macro to find the Autoconf version. 324# This is a private macro too. Using m4_define simplifies 325# the logic in aclocal, which can simply ignore this definition. 326m4_define([_AM_AUTOCONF_VERSION], []) 327 328# AM_SET_CURRENT_AUTOMAKE_VERSION 329# ------------------------------- 330# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 331# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 332AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 333[AM_AUTOMAKE_VERSION([1.11.6])dnl 334m4_ifndef([AC_AUTOCONF_VERSION], 335 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 336_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 337 338# AM_AUX_DIR_EXPAND -*- Autoconf -*- 339 340# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 341# 342# This file is free software; the Free Software Foundation 343# gives unlimited permission to copy and/or distribute it, 344# with or without modifications, as long as this notice is preserved. 345 346# serial 1 347 348# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 349# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 350# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 351# 352# Of course, Automake must honor this variable whenever it calls a 353# tool from the auxiliary directory. The problem is that $srcdir (and 354# therefore $ac_aux_dir as well) can be either absolute or relative, 355# depending on how configure is run. This is pretty annoying, since 356# it makes $ac_aux_dir quite unusable in subdirectories: in the top 357# source directory, any form will work fine, but in subdirectories a 358# relative path needs to be adjusted first. 359# 360# $ac_aux_dir/missing 361# fails when called from a subdirectory if $ac_aux_dir is relative 362# $top_srcdir/$ac_aux_dir/missing 363# fails if $ac_aux_dir is absolute, 364# fails when called from a subdirectory in a VPATH build with 365# a relative $ac_aux_dir 366# 367# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 368# are both prefixed by $srcdir. In an in-source build this is usually 369# harmless because $srcdir is `.', but things will broke when you 370# start a VPATH build or use an absolute $srcdir. 371# 372# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 373# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 374# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 375# and then we would define $MISSING as 376# MISSING="\${SHELL} $am_aux_dir/missing" 377# This will work as long as MISSING is not called from configure, because 378# unfortunately $(top_srcdir) has no meaning in configure. 379# However there are other variables, like CC, which are often used in 380# configure, and could therefore not use this "fixed" $ac_aux_dir. 381# 382# Another solution, used here, is to always expand $ac_aux_dir to an 383# absolute PATH. The drawback is that using absolute paths prevent a 384# configured tree to be moved without reconfiguration. 385 386AC_DEFUN([AM_AUX_DIR_EXPAND], 387[dnl Rely on autoconf to set up CDPATH properly. 388AC_PREREQ([2.50])dnl 389# expand $ac_aux_dir to an absolute path 390am_aux_dir=`cd $ac_aux_dir && pwd` 391]) 392 393# AM_CONDITIONAL -*- Autoconf -*- 394 395# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 396# Free Software Foundation, Inc. 397# 398# This file is free software; the Free Software Foundation 399# gives unlimited permission to copy and/or distribute it, 400# with or without modifications, as long as this notice is preserved. 401 402# serial 9 403 404# AM_CONDITIONAL(NAME, SHELL-CONDITION) 405# ------------------------------------- 406# Define a conditional. 407AC_DEFUN([AM_CONDITIONAL], 408[AC_PREREQ(2.52)dnl 409 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 410 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 411AC_SUBST([$1_TRUE])dnl 412AC_SUBST([$1_FALSE])dnl 413_AM_SUBST_NOTMAKE([$1_TRUE])dnl 414_AM_SUBST_NOTMAKE([$1_FALSE])dnl 415m4_define([_AM_COND_VALUE_$1], [$2])dnl 416if $2; then 417 $1_TRUE= 418 $1_FALSE='#' 419else 420 $1_TRUE='#' 421 $1_FALSE= 422fi 423AC_CONFIG_COMMANDS_PRE( 424[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 425 AC_MSG_ERROR([[conditional "$1" was never defined. 426Usually this means the macro was only invoked conditionally.]]) 427fi])]) 428 429# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 430# 2010, 2011 Free Software Foundation, Inc. 431# 432# This file is free software; the Free Software Foundation 433# gives unlimited permission to copy and/or distribute it, 434# with or without modifications, as long as this notice is preserved. 435 436# serial 12 437 438# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 439# written in clear, in which case automake, when reading aclocal.m4, 440# will think it sees a *use*, and therefore will trigger all it's 441# C support machinery. Also note that it means that autoscan, seeing 442# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 443 444 445# _AM_DEPENDENCIES(NAME) 446# ---------------------- 447# See how the compiler implements dependency checking. 448# NAME is "CC", "CXX", "GCJ", or "OBJC". 449# We try a few techniques and use that to set a single cache variable. 450# 451# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 452# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 453# dependency, and given that the user is not expected to run this macro, 454# just rely on AC_PROG_CC. 455AC_DEFUN([_AM_DEPENDENCIES], 456[AC_REQUIRE([AM_SET_DEPDIR])dnl 457AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 458AC_REQUIRE([AM_MAKE_INCLUDE])dnl 459AC_REQUIRE([AM_DEP_TRACK])dnl 460 461ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 462 [$1], CXX, [depcc="$CXX" am_compiler_list=], 463 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 464 [$1], UPC, [depcc="$UPC" am_compiler_list=], 465 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 466 [depcc="$$1" am_compiler_list=]) 467 468AC_CACHE_CHECK([dependency style of $depcc], 469 [am_cv_$1_dependencies_compiler_type], 470[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 471 # We make a subdir and do the tests there. Otherwise we can end up 472 # making bogus files that we don't know about and never remove. For 473 # instance it was reported that on HP-UX the gcc test will end up 474 # making a dummy file named `D' -- because `-MD' means `put the output 475 # in D'. 476 rm -rf conftest.dir 477 mkdir conftest.dir 478 # Copy depcomp to subdir because otherwise we won't find it if we're 479 # using a relative directory. 480 cp "$am_depcomp" conftest.dir 481 cd conftest.dir 482 # We will build objects and dependencies in a subdirectory because 483 # it helps to detect inapplicable dependency modes. For instance 484 # both Tru64's cc and ICC support -MD to output dependencies as a 485 # side effect of compilation, but ICC will put the dependencies in 486 # the current directory while Tru64 will put them in the object 487 # directory. 488 mkdir sub 489 490 am_cv_$1_dependencies_compiler_type=none 491 if test "$am_compiler_list" = ""; then 492 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 493 fi 494 am__universal=false 495 m4_case([$1], [CC], 496 [case " $depcc " in #( 497 *\ -arch\ *\ -arch\ *) am__universal=true ;; 498 esac], 499 [CXX], 500 [case " $depcc " in #( 501 *\ -arch\ *\ -arch\ *) am__universal=true ;; 502 esac]) 503 504 for depmode in $am_compiler_list; do 505 # Setup a source with many dependencies, because some compilers 506 # like to wrap large dependency lists on column 80 (with \), and 507 # we should not choose a depcomp mode which is confused by this. 508 # 509 # We need to recreate these files for each test, as the compiler may 510 # overwrite some of them when testing with obscure command lines. 511 # This happens at least with the AIX C compiler. 512 : > sub/conftest.c 513 for i in 1 2 3 4 5 6; do 514 echo '#include "conftst'$i'.h"' >> sub/conftest.c 515 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 516 # Solaris 8's {/usr,}/bin/sh. 517 touch sub/conftst$i.h 518 done 519 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 520 521 # We check with `-c' and `-o' for the sake of the "dashmstdout" 522 # mode. It turns out that the SunPro C++ compiler does not properly 523 # handle `-M -o', and we need to detect this. Also, some Intel 524 # versions had trouble with output in subdirs 525 am__obj=sub/conftest.${OBJEXT-o} 526 am__minus_obj="-o $am__obj" 527 case $depmode in 528 gcc) 529 # This depmode causes a compiler race in universal mode. 530 test "$am__universal" = false || continue 531 ;; 532 nosideeffect) 533 # after this tag, mechanisms are not by side-effect, so they'll 534 # only be used when explicitly requested 535 if test "x$enable_dependency_tracking" = xyes; then 536 continue 537 else 538 break 539 fi 540 ;; 541 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 542 # This compiler won't grok `-c -o', but also, the minuso test has 543 # not run yet. These depmodes are late enough in the game, and 544 # so weak that their functioning should not be impacted. 545 am__obj=conftest.${OBJEXT-o} 546 am__minus_obj= 547 ;; 548 none) break ;; 549 esac 550 if depmode=$depmode \ 551 source=sub/conftest.c object=$am__obj \ 552 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 553 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 554 >/dev/null 2>conftest.err && 555 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 556 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 557 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 558 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 559 # icc doesn't choke on unknown options, it will just issue warnings 560 # or remarks (even with -Werror). So we grep stderr for any message 561 # that says an option was ignored or not supported. 562 # When given -MP, icc 7.0 and 7.1 complain thusly: 563 # icc: Command line warning: ignoring option '-M'; no argument required 564 # The diagnosis changed in icc 8.0: 565 # icc: Command line remark: option '-MP' not supported 566 if (grep 'ignoring option' conftest.err || 567 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 568 am_cv_$1_dependencies_compiler_type=$depmode 569 break 570 fi 571 fi 572 done 573 574 cd .. 575 rm -rf conftest.dir 576else 577 am_cv_$1_dependencies_compiler_type=none 578fi 579]) 580AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 581AM_CONDITIONAL([am__fastdep$1], [ 582 test "x$enable_dependency_tracking" != xno \ 583 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 584]) 585 586 587# AM_SET_DEPDIR 588# ------------- 589# Choose a directory name for dependency files. 590# This macro is AC_REQUIREd in _AM_DEPENDENCIES 591AC_DEFUN([AM_SET_DEPDIR], 592[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 593AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 594]) 595 596 597# AM_DEP_TRACK 598# ------------ 599AC_DEFUN([AM_DEP_TRACK], 600[AC_ARG_ENABLE(dependency-tracking, 601[ --disable-dependency-tracking speeds up one-time build 602 --enable-dependency-tracking do not reject slow dependency extractors]) 603if test "x$enable_dependency_tracking" != xno; then 604 am_depcomp="$ac_aux_dir/depcomp" 605 AMDEPBACKSLASH='\' 606 am__nodep='_no' 607fi 608AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 609AC_SUBST([AMDEPBACKSLASH])dnl 610_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 611AC_SUBST([am__nodep])dnl 612_AM_SUBST_NOTMAKE([am__nodep])dnl 613]) 614 615# Generate code to set up dependency tracking. -*- Autoconf -*- 616 617# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 618# Free Software Foundation, Inc. 619# 620# This file is free software; the Free Software Foundation 621# gives unlimited permission to copy and/or distribute it, 622# with or without modifications, as long as this notice is preserved. 623 624#serial 5 625 626# _AM_OUTPUT_DEPENDENCY_COMMANDS 627# ------------------------------ 628AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 629[{ 630 # Autoconf 2.62 quotes --file arguments for eval, but not when files 631 # are listed without --file. Let's play safe and only enable the eval 632 # if we detect the quoting. 633 case $CONFIG_FILES in 634 *\'*) eval set x "$CONFIG_FILES" ;; 635 *) set x $CONFIG_FILES ;; 636 esac 637 shift 638 for mf 639 do 640 # Strip MF so we end up with the name of the file. 641 mf=`echo "$mf" | sed -e 's/:.*$//'` 642 # Check whether this is an Automake generated Makefile or not. 643 # We used to match only the files named `Makefile.in', but 644 # some people rename them; so instead we look at the file content. 645 # Grep'ing the first line is not enough: some people post-process 646 # each Makefile.in and add a new line on top of each file to say so. 647 # Grep'ing the whole file is not good either: AIX grep has a line 648 # limit of 2048, but all sed's we know have understand at least 4000. 649 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 650 dirpart=`AS_DIRNAME("$mf")` 651 else 652 continue 653 fi 654 # Extract the definition of DEPDIR, am__include, and am__quote 655 # from the Makefile without running `make'. 656 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 657 test -z "$DEPDIR" && continue 658 am__include=`sed -n 's/^am__include = //p' < "$mf"` 659 test -z "am__include" && continue 660 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 661 # When using ansi2knr, U may be empty or an underscore; expand it 662 U=`sed -n 's/^U = //p' < "$mf"` 663 # Find all dependency output files, they are included files with 664 # $(DEPDIR) in their names. We invoke sed twice because it is the 665 # simplest approach to changing $(DEPDIR) to its actual value in the 666 # expansion. 667 for file in `sed -n " 668 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 669 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 670 # Make sure the directory exists. 671 test -f "$dirpart/$file" && continue 672 fdir=`AS_DIRNAME(["$file"])` 673 AS_MKDIR_P([$dirpart/$fdir]) 674 # echo "creating $dirpart/$file" 675 echo '# dummy' > "$dirpart/$file" 676 done 677 done 678} 679])# _AM_OUTPUT_DEPENDENCY_COMMANDS 680 681 682# AM_OUTPUT_DEPENDENCY_COMMANDS 683# ----------------------------- 684# This macro should only be invoked once -- use via AC_REQUIRE. 685# 686# This code is only required when automatic dependency tracking 687# is enabled. FIXME. This creates each `.P' file that we will 688# need in order to bootstrap the dependency handling code. 689AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 690[AC_CONFIG_COMMANDS([depfiles], 691 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 692 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 693]) 694 695# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 696# Free Software Foundation, Inc. 697# 698# This file is free software; the Free Software Foundation 699# gives unlimited permission to copy and/or distribute it, 700# with or without modifications, as long as this notice is preserved. 701 702# serial 8 703 704# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 705AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 706 707# Do all the work for Automake. -*- Autoconf -*- 708 709# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 710# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 711# 712# This file is free software; the Free Software Foundation 713# gives unlimited permission to copy and/or distribute it, 714# with or without modifications, as long as this notice is preserved. 715 716# serial 16 717 718# This macro actually does too much. Some checks are only needed if 719# your package does certain things. But this isn't really a big deal. 720 721# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 722# AM_INIT_AUTOMAKE([OPTIONS]) 723# ----------------------------------------------- 724# The call with PACKAGE and VERSION arguments is the old style 725# call (pre autoconf-2.50), which is being phased out. PACKAGE 726# and VERSION should now be passed to AC_INIT and removed from 727# the call to AM_INIT_AUTOMAKE. 728# We support both call styles for the transition. After 729# the next Automake release, Autoconf can make the AC_INIT 730# arguments mandatory, and then we can depend on a new Autoconf 731# release and drop the old call support. 732AC_DEFUN([AM_INIT_AUTOMAKE], 733[AC_PREREQ([2.62])dnl 734dnl Autoconf wants to disallow AM_ names. We explicitly allow 735dnl the ones we care about. 736m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 737AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 738AC_REQUIRE([AC_PROG_INSTALL])dnl 739if test "`cd $srcdir && pwd`" != "`pwd`"; then 740 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 741 # is not polluted with repeated "-I." 742 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 743 # test to see if srcdir already configured 744 if test -f $srcdir/config.status; then 745 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 746 fi 747fi 748 749# test whether we have cygpath 750if test -z "$CYGPATH_W"; then 751 if (cygpath --version) >/dev/null 2>/dev/null; then 752 CYGPATH_W='cygpath -w' 753 else 754 CYGPATH_W=echo 755 fi 756fi 757AC_SUBST([CYGPATH_W]) 758 759# Define the identity of the package. 760dnl Distinguish between old-style and new-style calls. 761m4_ifval([$2], 762[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 763 AC_SUBST([PACKAGE], [$1])dnl 764 AC_SUBST([VERSION], [$2])], 765[_AM_SET_OPTIONS([$1])dnl 766dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 767m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 768 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 769 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 770 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 771 772_AM_IF_OPTION([no-define],, 773[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 774 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 775 776# Some tools Automake needs. 777AC_REQUIRE([AM_SANITY_CHECK])dnl 778AC_REQUIRE([AC_ARG_PROGRAM])dnl 779AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 780AM_MISSING_PROG(AUTOCONF, autoconf) 781AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 782AM_MISSING_PROG(AUTOHEADER, autoheader) 783AM_MISSING_PROG(MAKEINFO, makeinfo) 784AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 785AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 786AC_REQUIRE([AM_PROG_MKDIR_P])dnl 787# We need awk for the "check" target. The system "awk" is bad on 788# some platforms. 789AC_REQUIRE([AC_PROG_AWK])dnl 790AC_REQUIRE([AC_PROG_MAKE_SET])dnl 791AC_REQUIRE([AM_SET_LEADING_DOT])dnl 792_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 793 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 794 [_AM_PROG_TAR([v7])])]) 795_AM_IF_OPTION([no-dependencies],, 796[AC_PROVIDE_IFELSE([AC_PROG_CC], 797 [_AM_DEPENDENCIES(CC)], 798 [define([AC_PROG_CC], 799 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 800AC_PROVIDE_IFELSE([AC_PROG_CXX], 801 [_AM_DEPENDENCIES(CXX)], 802 [define([AC_PROG_CXX], 803 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 804AC_PROVIDE_IFELSE([AC_PROG_OBJC], 805 [_AM_DEPENDENCIES(OBJC)], 806 [define([AC_PROG_OBJC], 807 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 808]) 809_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 810dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 811dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 812dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 813AC_CONFIG_COMMANDS_PRE(dnl 814[m4_provide_if([_AM_COMPILER_EXEEXT], 815 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 816]) 817 818dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 819dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 820dnl mangled by Autoconf and run in a shell conditional statement. 821m4_define([_AC_COMPILER_EXEEXT], 822m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 823 824 825# When config.status generates a header, we must update the stamp-h file. 826# This file resides in the same directory as the config header 827# that is generated. The stamp files are numbered to have different names. 828 829# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 830# loop where config.status creates the headers, so we can generate 831# our stamp files there. 832AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 833[# Compute $1's index in $config_headers. 834_am_arg=$1 835_am_stamp_count=1 836for _am_header in $config_headers :; do 837 case $_am_header in 838 $_am_arg | $_am_arg:* ) 839 break ;; 840 * ) 841 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 842 esac 843done 844echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 845 846# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 847# Inc. 848# 849# This file is free software; the Free Software Foundation 850# gives unlimited permission to copy and/or distribute it, 851# with or without modifications, as long as this notice is preserved. 852 853# serial 1 854 855# AM_PROG_INSTALL_SH 856# ------------------ 857# Define $install_sh. 858AC_DEFUN([AM_PROG_INSTALL_SH], 859[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 860if test x"${install_sh}" != xset; then 861 case $am_aux_dir in 862 *\ * | *\ *) 863 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 864 *) 865 install_sh="\${SHELL} $am_aux_dir/install-sh" 866 esac 867fi 868AC_SUBST(install_sh)]) 869 870# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 871# 872# This file is free software; the Free Software Foundation 873# gives unlimited permission to copy and/or distribute it, 874# with or without modifications, as long as this notice is preserved. 875 876# serial 2 877 878# Check whether the underlying file-system supports filenames 879# with a leading dot. For instance MS-DOS doesn't. 880AC_DEFUN([AM_SET_LEADING_DOT], 881[rm -rf .tst 2>/dev/null 882mkdir .tst 2>/dev/null 883if test -d .tst; then 884 am__leading_dot=. 885else 886 am__leading_dot=_ 887fi 888rmdir .tst 2>/dev/null 889AC_SUBST([am__leading_dot])]) 890 891# Check to see how 'make' treats includes. -*- Autoconf -*- 892 893# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 894# 895# This file is free software; the Free Software Foundation 896# gives unlimited permission to copy and/or distribute it, 897# with or without modifications, as long as this notice is preserved. 898 899# serial 4 900 901# AM_MAKE_INCLUDE() 902# ----------------- 903# Check to see how make treats includes. 904AC_DEFUN([AM_MAKE_INCLUDE], 905[am_make=${MAKE-make} 906cat > confinc << 'END' 907am__doit: 908 @echo this is the am__doit target 909.PHONY: am__doit 910END 911# If we don't find an include directive, just comment out the code. 912AC_MSG_CHECKING([for style of include used by $am_make]) 913am__include="#" 914am__quote= 915_am_result=none 916# First try GNU make style include. 917echo "include confinc" > confmf 918# Ignore all kinds of additional output from `make'. 919case `$am_make -s -f confmf 2> /dev/null` in #( 920*the\ am__doit\ target*) 921 am__include=include 922 am__quote= 923 _am_result=GNU 924 ;; 925esac 926# Now try BSD make style include. 927if test "$am__include" = "#"; then 928 echo '.include "confinc"' > confmf 929 case `$am_make -s -f confmf 2> /dev/null` in #( 930 *the\ am__doit\ target*) 931 am__include=.include 932 am__quote="\"" 933 _am_result=BSD 934 ;; 935 esac 936fi 937AC_SUBST([am__include]) 938AC_SUBST([am__quote]) 939AC_MSG_RESULT([$_am_result]) 940rm -f confinc confmf 941]) 942 943# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 944 945# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 946# Free Software Foundation, Inc. 947# 948# This file is free software; the Free Software Foundation 949# gives unlimited permission to copy and/or distribute it, 950# with or without modifications, as long as this notice is preserved. 951 952# serial 6 953 954# AM_MISSING_PROG(NAME, PROGRAM) 955# ------------------------------ 956AC_DEFUN([AM_MISSING_PROG], 957[AC_REQUIRE([AM_MISSING_HAS_RUN]) 958$1=${$1-"${am_missing_run}$2"} 959AC_SUBST($1)]) 960 961 962# AM_MISSING_HAS_RUN 963# ------------------ 964# Define MISSING if not defined so far and test if it supports --run. 965# If it does, set am_missing_run to use it, otherwise, to nothing. 966AC_DEFUN([AM_MISSING_HAS_RUN], 967[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 968AC_REQUIRE_AUX_FILE([missing])dnl 969if test x"${MISSING+set}" != xset; then 970 case $am_aux_dir in 971 *\ * | *\ *) 972 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 973 *) 974 MISSING="\${SHELL} $am_aux_dir/missing" ;; 975 esac 976fi 977# Use eval to expand $SHELL 978if eval "$MISSING --run true"; then 979 am_missing_run="$MISSING --run " 980else 981 am_missing_run= 982 AC_MSG_WARN([`missing' script is too old or missing]) 983fi 984]) 985 986# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 987# Inc. 988# 989# This file is free software; the Free Software Foundation 990# gives unlimited permission to copy and/or distribute it, 991# with or without modifications, as long as this notice is preserved. 992 993# serial 1 994 995# AM_PROG_MKDIR_P 996# --------------- 997# Check for `mkdir -p'. 998AC_DEFUN([AM_PROG_MKDIR_P], 999[AC_PREREQ([2.60])dnl 1000AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1001dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1002dnl while keeping a definition of mkdir_p for backward compatibility. 1003dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1004dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1005dnl Makefile.ins that do not define MKDIR_P, so we do our own 1006dnl adjustment using top_builddir (which is defined more often than 1007dnl MKDIR_P). 1008AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1009case $mkdir_p in 1010 [[\\/$]]* | ?:[[\\/]]*) ;; 1011 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1012esac 1013]) 1014 1015# Helper functions for option handling. -*- Autoconf -*- 1016 1017# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 1018# Foundation, Inc. 1019# 1020# This file is free software; the Free Software Foundation 1021# gives unlimited permission to copy and/or distribute it, 1022# with or without modifications, as long as this notice is preserved. 1023 1024# serial 5 1025 1026# _AM_MANGLE_OPTION(NAME) 1027# ----------------------- 1028AC_DEFUN([_AM_MANGLE_OPTION], 1029[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1030 1031# _AM_SET_OPTION(NAME) 1032# -------------------- 1033# Set option NAME. Presently that only means defining a flag for this option. 1034AC_DEFUN([_AM_SET_OPTION], 1035[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1036 1037# _AM_SET_OPTIONS(OPTIONS) 1038# ------------------------ 1039# OPTIONS is a space-separated list of Automake options. 1040AC_DEFUN([_AM_SET_OPTIONS], 1041[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1042 1043# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1044# ------------------------------------------- 1045# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1046AC_DEFUN([_AM_IF_OPTION], 1047[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1048 1049# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 1050# 2011 Free Software Foundation, Inc. 1051# 1052# This file is free software; the Free Software Foundation 1053# gives unlimited permission to copy and/or distribute it, 1054# with or without modifications, as long as this notice is preserved. 1055 1056# serial 2 1057 1058# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1059# --------------------------------------------------------------------------- 1060# Adds support for distributing Python modules and packages. To 1061# install modules, copy them to $(pythondir), using the python_PYTHON 1062# automake variable. To install a package with the same name as the 1063# automake package, install to $(pkgpythondir), or use the 1064# pkgpython_PYTHON automake variable. 1065# 1066# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as 1067# locations to install python extension modules (shared libraries). 1068# Another macro is required to find the appropriate flags to compile 1069# extension modules. 1070# 1071# If your package is configured with a different prefix to python, 1072# users will have to add the install directory to the PYTHONPATH 1073# environment variable, or create a .pth file (see the python 1074# documentation for details). 1075# 1076# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will 1077# cause an error if the version of python installed on the system 1078# doesn't meet the requirement. MINIMUM-VERSION should consist of 1079# numbers and dots only. 1080AC_DEFUN([AM_PATH_PYTHON], 1081 [ 1082 dnl Find a Python interpreter. Python versions prior to 2.0 are not 1083 dnl supported. (2.0 was released on October 16, 2000). 1084 m4_define_default([_AM_PYTHON_INTERPRETER_LIST], 1085[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl 1086 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) 1087 1088 AC_ARG_VAR([PYTHON], [the Python interpreter]) 1089 1090 m4_if([$1],[],[ 1091 dnl No version check is needed. 1092 # Find any Python interpreter. 1093 if test -z "$PYTHON"; then 1094 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) 1095 fi 1096 am_display_PYTHON=python 1097 ], [ 1098 dnl A version check is needed. 1099 if test -n "$PYTHON"; then 1100 # If the user set $PYTHON, use it and don't search something else. 1101 AC_MSG_CHECKING([whether $PYTHON version >= $1]) 1102 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], 1103 [AC_MSG_RESULT(yes)], 1104 [AC_MSG_ERROR(too old)]) 1105 am_display_PYTHON=$PYTHON 1106 else 1107 # Otherwise, try each interpreter until we find one that satisfies 1108 # VERSION. 1109 AC_CACHE_CHECK([for a Python interpreter with version >= $1], 1110 [am_cv_pathless_PYTHON],[ 1111 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do 1112 test "$am_cv_pathless_PYTHON" = none && break 1113 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) 1114 done]) 1115 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. 1116 if test "$am_cv_pathless_PYTHON" = none; then 1117 PYTHON=: 1118 else 1119 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) 1120 fi 1121 am_display_PYTHON=$am_cv_pathless_PYTHON 1122 fi 1123 ]) 1124 1125 if test "$PYTHON" = :; then 1126 dnl Run any user-specified action, or abort. 1127 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) 1128 else 1129 1130 dnl Query Python for its version number. Getting [:3] seems to be 1131 dnl the best way to do this; it's what "site.py" does in the standard 1132 dnl library. 1133 1134 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], 1135 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) 1136 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) 1137 1138 dnl Use the values of $prefix and $exec_prefix for the corresponding 1139 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made 1140 dnl distinct variables so they can be overridden if need be. However, 1141 dnl general consensus is that you shouldn't need this ability. 1142 1143 AC_SUBST([PYTHON_PREFIX], ['${prefix}']) 1144 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) 1145 1146 dnl At times (like when building shared libraries) you may want 1147 dnl to know which OS platform Python thinks this is. 1148 1149 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], 1150 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) 1151 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) 1152 1153 1154 dnl Set up 4 directories: 1155 1156 dnl pythondir -- where to install python scripts. This is the 1157 dnl site-packages directory, not the python standard library 1158 dnl directory like in previous automake betas. This behavior 1159 dnl is more consistent with lispdir.m4 for example. 1160 dnl Query distutils for this directory. 1161 AC_CACHE_CHECK([for $am_display_PYTHON script directory], 1162 [am_cv_python_pythondir], 1163 [if test "x$prefix" = xNONE 1164 then 1165 am_py_prefix=$ac_default_prefix 1166 else 1167 am_py_prefix=$prefix 1168 fi 1169 am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` 1170 case $am_cv_python_pythondir in 1171 $am_py_prefix*) 1172 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` 1173 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` 1174 ;; 1175 *) 1176 case $am_py_prefix in 1177 /usr|/System*) ;; 1178 *) 1179 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages 1180 ;; 1181 esac 1182 ;; 1183 esac 1184 ]) 1185 AC_SUBST([pythondir], [$am_cv_python_pythondir]) 1186 1187 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was 1188 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is 1189 dnl more consistent with the rest of automake. 1190 1191 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) 1192 1193 dnl pyexecdir -- directory for installing python extension modules 1194 dnl (shared libraries) 1195 dnl Query distutils for this directory. 1196 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], 1197 [am_cv_python_pyexecdir], 1198 [if test "x$exec_prefix" = xNONE 1199 then 1200 am_py_exec_prefix=$am_py_prefix 1201 else 1202 am_py_exec_prefix=$exec_prefix 1203 fi 1204 am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` 1205 case $am_cv_python_pyexecdir in 1206 $am_py_exec_prefix*) 1207 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` 1208 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` 1209 ;; 1210 *) 1211 case $am_py_exec_prefix in 1212 /usr|/System*) ;; 1213 *) 1214 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages 1215 ;; 1216 esac 1217 ;; 1218 esac 1219 ]) 1220 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) 1221 1222 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) 1223 1224 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) 1225 1226 dnl Run any user-specified action. 1227 $2 1228 fi 1229 1230]) 1231 1232 1233# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) 1234# --------------------------------------------------------------------------- 1235# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. 1236# Run ACTION-IF-FALSE otherwise. 1237# This test uses sys.hexversion instead of the string equivalent (first 1238# word of sys.version), in order to cope with versions such as 2.2c1. 1239# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). 1240AC_DEFUN([AM_PYTHON_CHECK_VERSION], 1241 [prog="import sys 1242# split strings by '.' and convert to numeric. Append some zeros 1243# because we need at least 4 digits for the hex conversion. 1244# map returns an iterator in Python 3.0 and a list in 2.x 1245minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] 1246minverhex = 0 1247# xrange is not present in Python 3.0 and range returns an iterator 1248for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] 1249sys.exit(sys.hexversion < minverhex)" 1250 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) 1251 1252# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1253# 1254# This file is free software; the Free Software Foundation 1255# gives unlimited permission to copy and/or distribute it, 1256# with or without modifications, as long as this notice is preserved. 1257 1258# serial 1 1259 1260# AM_RUN_LOG(COMMAND) 1261# ------------------- 1262# Run COMMAND, save the exit status in ac_status, and log it. 1263# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1264AC_DEFUN([AM_RUN_LOG], 1265[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1266 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1267 ac_status=$? 1268 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1269 (exit $ac_status); }]) 1270 1271# Check to make sure that the build environment is sane. -*- Autoconf -*- 1272 1273# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1274# Free Software Foundation, Inc. 1275# 1276# This file is free software; the Free Software Foundation 1277# gives unlimited permission to copy and/or distribute it, 1278# with or without modifications, as long as this notice is preserved. 1279 1280# serial 5 1281 1282# AM_SANITY_CHECK 1283# --------------- 1284AC_DEFUN([AM_SANITY_CHECK], 1285[AC_MSG_CHECKING([whether build environment is sane]) 1286# Just in case 1287sleep 1 1288echo timestamp > conftest.file 1289# Reject unsafe characters in $srcdir or the absolute working directory 1290# name. Accept space and tab only in the latter. 1291am_lf=' 1292' 1293case `pwd` in 1294 *[[\\\"\#\$\&\'\`$am_lf]]*) 1295 AC_MSG_ERROR([unsafe absolute working directory name]);; 1296esac 1297case $srcdir in 1298 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1299 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1300esac 1301 1302# Do `set' in a subshell so we don't clobber the current shell's 1303# arguments. Must try -L first in case configure is actually a 1304# symlink; some systems play weird games with the mod time of symlinks 1305# (eg FreeBSD returns the mod time of the symlink's containing 1306# directory). 1307if ( 1308 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1309 if test "$[*]" = "X"; then 1310 # -L didn't work. 1311 set X `ls -t "$srcdir/configure" conftest.file` 1312 fi 1313 rm -f conftest.file 1314 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1315 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1316 1317 # If neither matched, then we have a broken ls. This can happen 1318 # if, for instance, CONFIG_SHELL is bash and it inherits a 1319 # broken ls alias from the environment. This has actually 1320 # happened. Such a system could not be considered "sane". 1321 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1322alias in your environment]) 1323 fi 1324 1325 test "$[2]" = conftest.file 1326 ) 1327then 1328 # Ok. 1329 : 1330else 1331 AC_MSG_ERROR([newly created file is older than distributed files! 1332Check your system clock]) 1333fi 1334AC_MSG_RESULT(yes)]) 1335 1336# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 1337# 1338# This file is free software; the Free Software Foundation 1339# gives unlimited permission to copy and/or distribute it, 1340# with or without modifications, as long as this notice is preserved. 1341 1342# serial 2 1343 1344# AM_SILENT_RULES([DEFAULT]) 1345# -------------------------- 1346# Enable less verbose build rules; with the default set to DEFAULT 1347# (`yes' being less verbose, `no' or empty being verbose). 1348AC_DEFUN([AM_SILENT_RULES], 1349[AC_ARG_ENABLE([silent-rules], 1350[ --enable-silent-rules less verbose build output (undo: `make V=1') 1351 --disable-silent-rules verbose build output (undo: `make V=0')]) 1352case $enable_silent_rules in 1353yes) AM_DEFAULT_VERBOSITY=0;; 1354no) AM_DEFAULT_VERBOSITY=1;; 1355*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1356esac 1357dnl 1358dnl A few `make' implementations (e.g., NonStop OS and NextStep) 1359dnl do not support nested variable expansions. 1360dnl See automake bug#9928 and bug#10237. 1361am_make=${MAKE-make} 1362AC_CACHE_CHECK([whether $am_make supports nested variables], 1363 [am_cv_make_support_nested_variables], 1364 [if AS_ECHO([['TRUE=$(BAR$(V)) 1365BAR0=false 1366BAR1=true 1367V=1 1368am__doit: 1369 @$(TRUE) 1370.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1371 am_cv_make_support_nested_variables=yes 1372else 1373 am_cv_make_support_nested_variables=no 1374fi]) 1375if test $am_cv_make_support_nested_variables = yes; then 1376 dnl Using `$V' instead of `$(V)' breaks IRIX make. 1377 AM_V='$(V)' 1378 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1379else 1380 AM_V=$AM_DEFAULT_VERBOSITY 1381 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1382fi 1383AC_SUBST([AM_V])dnl 1384AM_SUBST_NOTMAKE([AM_V])dnl 1385AC_SUBST([AM_DEFAULT_V])dnl 1386AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1387AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1388AM_BACKSLASH='\' 1389AC_SUBST([AM_BACKSLASH])dnl 1390_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1391]) 1392 1393# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1394# 1395# This file is free software; the Free Software Foundation 1396# gives unlimited permission to copy and/or distribute it, 1397# with or without modifications, as long as this notice is preserved. 1398 1399# serial 1 1400 1401# AM_PROG_INSTALL_STRIP 1402# --------------------- 1403# One issue with vendor `install' (even GNU) is that you can't 1404# specify the program used to strip binaries. This is especially 1405# annoying in cross-compiling environments, where the build's strip 1406# is unlikely to handle the host's binaries. 1407# Fortunately install-sh will honor a STRIPPROG variable, so we 1408# always use install-sh in `make install-strip', and initialize 1409# STRIPPROG with the value of the STRIP variable (set by the user). 1410AC_DEFUN([AM_PROG_INSTALL_STRIP], 1411[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1412# Installed binaries are usually stripped using `strip' when the user 1413# run `make install-strip'. However `strip' might not be the right 1414# tool to use in cross-compilation environments, therefore Automake 1415# will honor the `STRIP' environment variable to overrule this program. 1416dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1417if test "$cross_compiling" != no; then 1418 AC_CHECK_TOOL([STRIP], [strip], :) 1419fi 1420INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1421AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1422 1423# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 1424# 1425# This file is free software; the Free Software Foundation 1426# gives unlimited permission to copy and/or distribute it, 1427# with or without modifications, as long as this notice is preserved. 1428 1429# serial 3 1430 1431# _AM_SUBST_NOTMAKE(VARIABLE) 1432# --------------------------- 1433# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1434# This macro is traced by Automake. 1435AC_DEFUN([_AM_SUBST_NOTMAKE]) 1436 1437# AM_SUBST_NOTMAKE(VARIABLE) 1438# -------------------------- 1439# Public sister of _AM_SUBST_NOTMAKE. 1440AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1441 1442# Check how to create a tarball. -*- Autoconf -*- 1443 1444# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 1445# 1446# This file is free software; the Free Software Foundation 1447# gives unlimited permission to copy and/or distribute it, 1448# with or without modifications, as long as this notice is preserved. 1449 1450# serial 2 1451 1452# _AM_PROG_TAR(FORMAT) 1453# -------------------- 1454# Check how to create a tarball in format FORMAT. 1455# FORMAT should be one of `v7', `ustar', or `pax'. 1456# 1457# Substitute a variable $(am__tar) that is a command 1458# writing to stdout a FORMAT-tarball containing the directory 1459# $tardir. 1460# tardir=directory && $(am__tar) > result.tar 1461# 1462# Substitute a variable $(am__untar) that extract such 1463# a tarball read from stdin. 1464# $(am__untar) < result.tar 1465AC_DEFUN([_AM_PROG_TAR], 1466[# Always define AMTAR for backward compatibility. Yes, it's still used 1467# in the wild :-( We should find a proper way to deprecate it ... 1468AC_SUBST([AMTAR], ['$${TAR-tar}']) 1469m4_if([$1], [v7], 1470 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1471 [m4_case([$1], [ustar],, [pax],, 1472 [m4_fatal([Unknown tar format])]) 1473AC_MSG_CHECKING([how to create a $1 tar archive]) 1474# Loop over all known methods to create a tar archive until one works. 1475_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1476_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1477# Do not fold the above two line into one, because Tru64 sh and 1478# Solaris sh will not grok spaces in the rhs of `-'. 1479for _am_tool in $_am_tools 1480do 1481 case $_am_tool in 1482 gnutar) 1483 for _am_tar in tar gnutar gtar; 1484 do 1485 AM_RUN_LOG([$_am_tar --version]) && break 1486 done 1487 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1488 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1489 am__untar="$_am_tar -xf -" 1490 ;; 1491 plaintar) 1492 # Must skip GNU tar: if it does not support --format= it doesn't create 1493 # ustar tarball either. 1494 (tar --version) >/dev/null 2>&1 && continue 1495 am__tar='tar chf - "$$tardir"' 1496 am__tar_='tar chf - "$tardir"' 1497 am__untar='tar xf -' 1498 ;; 1499 pax) 1500 am__tar='pax -L -x $1 -w "$$tardir"' 1501 am__tar_='pax -L -x $1 -w "$tardir"' 1502 am__untar='pax -r' 1503 ;; 1504 cpio) 1505 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1506 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1507 am__untar='cpio -i -H $1 -d' 1508 ;; 1509 none) 1510 am__tar=false 1511 am__tar_=false 1512 am__untar=false 1513 ;; 1514 esac 1515 1516 # If the value was cached, stop now. We just wanted to have am__tar 1517 # and am__untar set. 1518 test -n "${am_cv_prog_tar_$1}" && break 1519 1520 # tar/untar a dummy directory, and stop if the command works 1521 rm -rf conftest.dir 1522 mkdir conftest.dir 1523 echo GrepMe > conftest.dir/file 1524 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1525 rm -rf conftest.dir 1526 if test -s conftest.tar; then 1527 AM_RUN_LOG([$am__untar <conftest.tar]) 1528 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1529 fi 1530done 1531rm -rf conftest.dir 1532 1533AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1534AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1535AC_SUBST([am__tar]) 1536AC_SUBST([am__untar]) 1537]) # _AM_PROG_TAR 1538 1539m4_include([m4/ax_config_dir.m4]) 1540m4_include([m4/compiler.m4]) 1541m4_include([m4/libtool.m4]) 1542m4_include([m4/ltoptions.m4]) 1543m4_include([m4/ltsugar.m4]) 1544m4_include([m4/ltversion.m4]) 1545m4_include([m4/lt~obsolete.m4]) 1546m4_include([m4/tp-compiler-flag.m4]) 1547m4_include([m4/tp-compiler-warnings.m4]) 1548