1*b76cdf5cSchristos# generated automatically by aclocal 1.15 -*- Autoconf -*- 2abb0f93cSkardel 3*b76cdf5cSchristos# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4*b76cdf5cSchristos 5abb0f93cSkardel# This file is free software; the Free Software Foundation 6abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 7abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 8abb0f93cSkardel 9abb0f93cSkardel# This program is distributed in the hope that it will be useful, 10abb0f93cSkardel# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11abb0f93cSkardel# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12abb0f93cSkardel# PARTICULAR PURPOSE. 13abb0f93cSkardel 14*b76cdf5cSchristosm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15abb0f93cSkardelm4_ifndef([AC_AUTOCONF_VERSION], 16abb0f93cSkardel [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17*b76cdf5cSchristosm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18*b76cdf5cSchristos[m4_warning([this file was generated for autoconf 2.69. 19abb0f93cSkardelYou have another version of autoconf. It may work, but is not guaranteed to. 20abb0f93cSkardelIf you have problems, you may need to regenerate the build system entirely. 21*b76cdf5cSchristosTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22abb0f93cSkardel 232b3787f6Schristos# serial 9 -*- Autoconf -*- 242b3787f6Schristos# Enable extensions on systems that normally disable them. 252b3787f6Schristos 262b3787f6Schristos# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc. 272b3787f6Schristos# This file is free software; the Free Software Foundation 282b3787f6Schristos# gives unlimited permission to copy and/or distribute it, 292b3787f6Schristos# with or without modifications, as long as this notice is preserved. 302b3787f6Schristos 312b3787f6Schristos# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS 322b3787f6Schristos# Autoconf. Perhaps we can remove this once we can assume Autoconf 332b3787f6Schristos# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly 342b3787f6Schristos# enough in this area it's likely we'll need to redefine 352b3787f6Schristos# AC_USE_SYSTEM_EXTENSIONS for quite some time. 362b3787f6Schristos 372b3787f6Schristos# If autoconf reports a warning 382b3787f6Schristos# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS 392b3787f6Schristos# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS 402b3787f6Schristos# the fix is 412b3787f6Schristos# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked 422b3787f6Schristos# but always AC_REQUIREd, 432b3787f6Schristos# 2) to ensure that for each occurrence of 442b3787f6Schristos# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 452b3787f6Schristos# or 462b3787f6Schristos# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 472b3787f6Schristos# the corresponding gnulib module description has 'extensions' among 482b3787f6Schristos# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS 492b3787f6Schristos# invocation occurs in gl_EARLY, not in gl_INIT. 502b3787f6Schristos 512b3787f6Schristos# AC_USE_SYSTEM_EXTENSIONS 522b3787f6Schristos# ------------------------ 532b3787f6Schristos# Enable extensions on systems that normally disable them, 542b3787f6Schristos# typically due to standards-conformance issues. 552b3787f6Schristos# Remember that #undef in AH_VERBATIM gets replaced with #define by 562b3787f6Schristos# AC_DEFINE. The goal here is to define all known feature-enabling 572b3787f6Schristos# macros, then, if reports of conflicts are made, disable macros that 582b3787f6Schristos# cause problems on some platforms (such as __EXTENSIONS__). 592b3787f6SchristosAC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], 602b3787f6Schristos[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl 612b3787f6SchristosAC_BEFORE([$0], [AC_RUN_IFELSE])dnl 622b3787f6Schristos 632b3787f6Schristos AC_REQUIRE([AC_CANONICAL_HOST]) 642b3787f6Schristos 652b3787f6Schristos AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) 662b3787f6Schristos if test "$MINIX" = yes; then 672b3787f6Schristos AC_DEFINE([_POSIX_SOURCE], [1], 682b3787f6Schristos [Define to 1 if you need to in order for `stat' and other 692b3787f6Schristos things to work.]) 702b3787f6Schristos AC_DEFINE([_POSIX_1_SOURCE], [2], 712b3787f6Schristos [Define to 2 if the system does not provide POSIX.1 features 722b3787f6Schristos except with this defined.]) 732b3787f6Schristos AC_DEFINE([_MINIX], [1], 742b3787f6Schristos [Define to 1 if on MINIX.]) 752b3787f6Schristos fi 762b3787f6Schristos 772b3787f6Schristos dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, 782b3787f6Schristos dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already 792b3787f6Schristos dnl provided. 802b3787f6Schristos case "$host_os" in 812b3787f6Schristos hpux*) 822b3787f6Schristos AC_DEFINE([_XOPEN_SOURCE], [500], 832b3787f6Schristos [Define to 500 only on HP-UX.]) 842b3787f6Schristos ;; 852b3787f6Schristos esac 862b3787f6Schristos 872b3787f6Schristos AH_VERBATIM([__EXTENSIONS__], 882b3787f6Schristos[/* Enable extensions on AIX 3, Interix. */ 892b3787f6Schristos#ifndef _ALL_SOURCE 902b3787f6Schristos# undef _ALL_SOURCE 912b3787f6Schristos#endif 922b3787f6Schristos/* Enable GNU extensions on systems that have them. */ 932b3787f6Schristos#ifndef _GNU_SOURCE 942b3787f6Schristos# undef _GNU_SOURCE 952b3787f6Schristos#endif 962b3787f6Schristos/* Enable threading extensions on Solaris. */ 972b3787f6Schristos#ifndef _POSIX_PTHREAD_SEMANTICS 982b3787f6Schristos# undef _POSIX_PTHREAD_SEMANTICS 992b3787f6Schristos#endif 1002b3787f6Schristos/* Enable extensions on HP NonStop. */ 1012b3787f6Schristos#ifndef _TANDEM_SOURCE 1022b3787f6Schristos# undef _TANDEM_SOURCE 1032b3787f6Schristos#endif 1042b3787f6Schristos/* Enable general extensions on Solaris. */ 1052b3787f6Schristos#ifndef __EXTENSIONS__ 1062b3787f6Schristos# undef __EXTENSIONS__ 1072b3787f6Schristos#endif 1082b3787f6Schristos]) 1092b3787f6Schristos AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], 1102b3787f6Schristos [ac_cv_safe_to_define___extensions__], 1112b3787f6Schristos [AC_COMPILE_IFELSE( 1122b3787f6Schristos [AC_LANG_PROGRAM([[ 1132b3787f6Schristos# define __EXTENSIONS__ 1 1142b3787f6Schristos ]AC_INCLUDES_DEFAULT])], 1152b3787f6Schristos [ac_cv_safe_to_define___extensions__=yes], 1162b3787f6Schristos [ac_cv_safe_to_define___extensions__=no])]) 1172b3787f6Schristos test $ac_cv_safe_to_define___extensions__ = yes && 1182b3787f6Schristos AC_DEFINE([__EXTENSIONS__]) 1192b3787f6Schristos AC_DEFINE([_ALL_SOURCE]) 1202b3787f6Schristos AC_DEFINE([_GNU_SOURCE]) 1212b3787f6Schristos AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) 1222b3787f6Schristos AC_DEFINE([_TANDEM_SOURCE]) 1232b3787f6Schristos])# AC_USE_SYSTEM_EXTENSIONS 1242b3787f6Schristos 1252b3787f6Schristos# gl_USE_SYSTEM_EXTENSIONS 1262b3787f6Schristos# ------------------------ 1272b3787f6Schristos# Enable extensions on systems that normally disable them, 1282b3787f6Schristos# typically due to standards-conformance issues. 1292b3787f6SchristosAC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], 1302b3787f6Schristos[ 1312b3787f6Schristos dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. 1322b3787f6Schristos dnl gnulib does not need it. But if it gets required by third-party macros 1332b3787f6Schristos dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a 1342b3787f6Schristos dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". 1352b3787f6Schristos dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, 1362b3787f6Schristos dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. 1372b3787f6Schristos AC_REQUIRE([AC_GNU_SOURCE]) 1382b3787f6Schristos 1392b3787f6Schristos AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 1402b3787f6Schristos]) 1412b3787f6Schristos 142*b76cdf5cSchristos# Copyright (C) 2002-2014 Free Software Foundation, Inc. 143abb0f93cSkardel# 144abb0f93cSkardel# This file is free software; the Free Software Foundation 145abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 146abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 147abb0f93cSkardel 148abb0f93cSkardel# AM_AUTOMAKE_VERSION(VERSION) 149abb0f93cSkardel# ---------------------------- 150abb0f93cSkardel# Automake X.Y traces this macro to ensure aclocal.m4 has been 151abb0f93cSkardel# generated from the m4 files accompanying Automake X.Y. 152abb0f93cSkardel# (This private macro should not be called outside this file.) 153abb0f93cSkardelAC_DEFUN([AM_AUTOMAKE_VERSION], 154*b76cdf5cSchristos[am__api_version='1.15' 155abb0f93cSkardeldnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 156abb0f93cSkardeldnl require some minimum version. Point them to the right macro. 157*b76cdf5cSchristosm4_if([$1], [1.15], [], 158abb0f93cSkardel [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 159abb0f93cSkardel]) 160abb0f93cSkardel 161abb0f93cSkardel# _AM_AUTOCONF_VERSION(VERSION) 162abb0f93cSkardel# ----------------------------- 163abb0f93cSkardel# aclocal traces this macro to find the Autoconf version. 164abb0f93cSkardel# This is a private macro too. Using m4_define simplifies 165abb0f93cSkardel# the logic in aclocal, which can simply ignore this definition. 166abb0f93cSkardelm4_define([_AM_AUTOCONF_VERSION], []) 167abb0f93cSkardel 168abb0f93cSkardel# AM_SET_CURRENT_AUTOMAKE_VERSION 169abb0f93cSkardel# ------------------------------- 170abb0f93cSkardel# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 171abb0f93cSkardel# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 172abb0f93cSkardelAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 173*b76cdf5cSchristos[AM_AUTOMAKE_VERSION([1.15])dnl 174abb0f93cSkardelm4_ifndef([AC_AUTOCONF_VERSION], 175abb0f93cSkardel [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 176abb0f93cSkardel_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 177abb0f93cSkardel 178*b76cdf5cSchristos# Copyright (C) 2011-2014 Free Software Foundation, Inc. 179*b76cdf5cSchristos# 180*b76cdf5cSchristos# This file is free software; the Free Software Foundation 181*b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it, 182*b76cdf5cSchristos# with or without modifications, as long as this notice is preserved. 183*b76cdf5cSchristos 184*b76cdf5cSchristos# AM_PROG_AR([ACT-IF-FAIL]) 185*b76cdf5cSchristos# ------------------------- 186*b76cdf5cSchristos# Try to determine the archiver interface, and trigger the ar-lib wrapper 187*b76cdf5cSchristos# if it is needed. If the detection of archiver interface fails, run 188*b76cdf5cSchristos# ACT-IF-FAIL (default is to abort configure with a proper error message). 189*b76cdf5cSchristosAC_DEFUN([AM_PROG_AR], 190*b76cdf5cSchristos[AC_BEFORE([$0], [LT_INIT])dnl 191*b76cdf5cSchristosAC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl 192*b76cdf5cSchristosAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 193*b76cdf5cSchristosAC_REQUIRE_AUX_FILE([ar-lib])dnl 194*b76cdf5cSchristosAC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) 195*b76cdf5cSchristos: ${AR=ar} 196*b76cdf5cSchristos 197*b76cdf5cSchristosAC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], 198*b76cdf5cSchristos [AC_LANG_PUSH([C]) 199*b76cdf5cSchristos am_cv_ar_interface=ar 200*b76cdf5cSchristos AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], 201*b76cdf5cSchristos [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 202*b76cdf5cSchristos AC_TRY_EVAL([am_ar_try]) 203*b76cdf5cSchristos if test "$ac_status" -eq 0; then 204*b76cdf5cSchristos am_cv_ar_interface=ar 205*b76cdf5cSchristos else 206*b76cdf5cSchristos am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 207*b76cdf5cSchristos AC_TRY_EVAL([am_ar_try]) 208*b76cdf5cSchristos if test "$ac_status" -eq 0; then 209*b76cdf5cSchristos am_cv_ar_interface=lib 210*b76cdf5cSchristos else 211*b76cdf5cSchristos am_cv_ar_interface=unknown 212*b76cdf5cSchristos fi 213*b76cdf5cSchristos fi 214*b76cdf5cSchristos rm -f conftest.lib libconftest.a 215*b76cdf5cSchristos ]) 216*b76cdf5cSchristos AC_LANG_POP([C])]) 217*b76cdf5cSchristos 218*b76cdf5cSchristoscase $am_cv_ar_interface in 219*b76cdf5cSchristosar) 220*b76cdf5cSchristos ;; 221*b76cdf5cSchristoslib) 222*b76cdf5cSchristos # Microsoft lib, so override with the ar-lib wrapper script. 223*b76cdf5cSchristos # FIXME: It is wrong to rewrite AR. 224*b76cdf5cSchristos # But if we don't then we get into trouble of one sort or another. 225*b76cdf5cSchristos # A longer-term fix would be to have automake use am__AR in this case, 226*b76cdf5cSchristos # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something 227*b76cdf5cSchristos # similar. 228*b76cdf5cSchristos AR="$am_aux_dir/ar-lib $AR" 229*b76cdf5cSchristos ;; 230*b76cdf5cSchristosunknown) 231*b76cdf5cSchristos m4_default([$1], 232*b76cdf5cSchristos [AC_MSG_ERROR([could not determine $AR interface])]) 233*b76cdf5cSchristos ;; 234*b76cdf5cSchristosesac 235*b76cdf5cSchristosAC_SUBST([AR])dnl 236*b76cdf5cSchristos]) 237*b76cdf5cSchristos 238abb0f93cSkardel# AM_AUX_DIR_EXPAND -*- Autoconf -*- 239abb0f93cSkardel 240*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 241abb0f93cSkardel# 242abb0f93cSkardel# This file is free software; the Free Software Foundation 243abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 244abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 245abb0f93cSkardel 246abb0f93cSkardel# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 247*b76cdf5cSchristos# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 248*b76cdf5cSchristos# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 249abb0f93cSkardel# 250abb0f93cSkardel# Of course, Automake must honor this variable whenever it calls a 251abb0f93cSkardel# tool from the auxiliary directory. The problem is that $srcdir (and 252abb0f93cSkardel# therefore $ac_aux_dir as well) can be either absolute or relative, 253abb0f93cSkardel# depending on how configure is run. This is pretty annoying, since 254abb0f93cSkardel# it makes $ac_aux_dir quite unusable in subdirectories: in the top 255abb0f93cSkardel# source directory, any form will work fine, but in subdirectories a 256abb0f93cSkardel# relative path needs to be adjusted first. 257abb0f93cSkardel# 258abb0f93cSkardel# $ac_aux_dir/missing 259abb0f93cSkardel# fails when called from a subdirectory if $ac_aux_dir is relative 260abb0f93cSkardel# $top_srcdir/$ac_aux_dir/missing 261abb0f93cSkardel# fails if $ac_aux_dir is absolute, 262abb0f93cSkardel# fails when called from a subdirectory in a VPATH build with 263abb0f93cSkardel# a relative $ac_aux_dir 264abb0f93cSkardel# 265abb0f93cSkardel# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 266abb0f93cSkardel# are both prefixed by $srcdir. In an in-source build this is usually 267*b76cdf5cSchristos# harmless because $srcdir is '.', but things will broke when you 268abb0f93cSkardel# start a VPATH build or use an absolute $srcdir. 269abb0f93cSkardel# 270abb0f93cSkardel# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 271abb0f93cSkardel# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 272abb0f93cSkardel# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 273abb0f93cSkardel# and then we would define $MISSING as 274abb0f93cSkardel# MISSING="\${SHELL} $am_aux_dir/missing" 275abb0f93cSkardel# This will work as long as MISSING is not called from configure, because 276abb0f93cSkardel# unfortunately $(top_srcdir) has no meaning in configure. 277abb0f93cSkardel# However there are other variables, like CC, which are often used in 278abb0f93cSkardel# configure, and could therefore not use this "fixed" $ac_aux_dir. 279abb0f93cSkardel# 280abb0f93cSkardel# Another solution, used here, is to always expand $ac_aux_dir to an 281abb0f93cSkardel# absolute PATH. The drawback is that using absolute paths prevent a 282abb0f93cSkardel# configured tree to be moved without reconfiguration. 283abb0f93cSkardel 284abb0f93cSkardelAC_DEFUN([AM_AUX_DIR_EXPAND], 285*b76cdf5cSchristos[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 286*b76cdf5cSchristos# Expand $ac_aux_dir to an absolute path. 287*b76cdf5cSchristosam_aux_dir=`cd "$ac_aux_dir" && pwd` 288abb0f93cSkardel]) 289abb0f93cSkardel 290abb0f93cSkardel# AM_CONDITIONAL -*- Autoconf -*- 291abb0f93cSkardel 292*b76cdf5cSchristos# Copyright (C) 1997-2014 Free Software Foundation, Inc. 293abb0f93cSkardel# 294abb0f93cSkardel# This file is free software; the Free Software Foundation 295abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 296abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 297abb0f93cSkardel 298abb0f93cSkardel# AM_CONDITIONAL(NAME, SHELL-CONDITION) 299abb0f93cSkardel# ------------------------------------- 300abb0f93cSkardel# Define a conditional. 301abb0f93cSkardelAC_DEFUN([AM_CONDITIONAL], 302*b76cdf5cSchristos[AC_PREREQ([2.52])dnl 303*b76cdf5cSchristos m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 304abb0f93cSkardel [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 305abb0f93cSkardelAC_SUBST([$1_TRUE])dnl 306abb0f93cSkardelAC_SUBST([$1_FALSE])dnl 307abb0f93cSkardel_AM_SUBST_NOTMAKE([$1_TRUE])dnl 308abb0f93cSkardel_AM_SUBST_NOTMAKE([$1_FALSE])dnl 309abb0f93cSkardelm4_define([_AM_COND_VALUE_$1], [$2])dnl 310abb0f93cSkardelif $2; then 311abb0f93cSkardel $1_TRUE= 312abb0f93cSkardel $1_FALSE='#' 313abb0f93cSkardelelse 314abb0f93cSkardel $1_TRUE='#' 315abb0f93cSkardel $1_FALSE= 316abb0f93cSkardelfi 317abb0f93cSkardelAC_CONFIG_COMMANDS_PRE( 318abb0f93cSkardel[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 319abb0f93cSkardel AC_MSG_ERROR([[conditional "$1" was never defined. 320abb0f93cSkardelUsually this means the macro was only invoked conditionally.]]) 321abb0f93cSkardelfi])]) 322abb0f93cSkardel 323*b76cdf5cSchristos# Copyright (C) 1999-2014 Free Software Foundation, Inc. 324abb0f93cSkardel# 325abb0f93cSkardel# This file is free software; the Free Software Foundation 326abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 327abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 328abb0f93cSkardel 329abb0f93cSkardel 330*b76cdf5cSchristos# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 331abb0f93cSkardel# written in clear, in which case automake, when reading aclocal.m4, 332abb0f93cSkardel# will think it sees a *use*, and therefore will trigger all it's 333abb0f93cSkardel# C support machinery. Also note that it means that autoscan, seeing 334abb0f93cSkardel# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 335abb0f93cSkardel 336abb0f93cSkardel 337abb0f93cSkardel# _AM_DEPENDENCIES(NAME) 338abb0f93cSkardel# ---------------------- 339abb0f93cSkardel# See how the compiler implements dependency checking. 340*b76cdf5cSchristos# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 341abb0f93cSkardel# We try a few techniques and use that to set a single cache variable. 342abb0f93cSkardel# 343abb0f93cSkardel# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 344abb0f93cSkardel# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 345abb0f93cSkardel# dependency, and given that the user is not expected to run this macro, 346abb0f93cSkardel# just rely on AC_PROG_CC. 347abb0f93cSkardelAC_DEFUN([_AM_DEPENDENCIES], 348abb0f93cSkardel[AC_REQUIRE([AM_SET_DEPDIR])dnl 349abb0f93cSkardelAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 350abb0f93cSkardelAC_REQUIRE([AM_MAKE_INCLUDE])dnl 351abb0f93cSkardelAC_REQUIRE([AM_DEP_TRACK])dnl 352abb0f93cSkardel 353*b76cdf5cSchristosm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 354*b76cdf5cSchristos [$1], [CXX], [depcc="$CXX" am_compiler_list=], 355*b76cdf5cSchristos [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 356*b76cdf5cSchristos [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 357*b76cdf5cSchristos [$1], [UPC], [depcc="$UPC" am_compiler_list=], 358*b76cdf5cSchristos [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 359abb0f93cSkardel [depcc="$$1" am_compiler_list=]) 360abb0f93cSkardel 361abb0f93cSkardelAC_CACHE_CHECK([dependency style of $depcc], 362abb0f93cSkardel [am_cv_$1_dependencies_compiler_type], 363abb0f93cSkardel[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 364abb0f93cSkardel # We make a subdir and do the tests there. Otherwise we can end up 365abb0f93cSkardel # making bogus files that we don't know about and never remove. For 366abb0f93cSkardel # instance it was reported that on HP-UX the gcc test will end up 367*b76cdf5cSchristos # making a dummy file named 'D' -- because '-MD' means "put the output 368*b76cdf5cSchristos # in D". 369*b76cdf5cSchristos rm -rf conftest.dir 370abb0f93cSkardel mkdir conftest.dir 371abb0f93cSkardel # Copy depcomp to subdir because otherwise we won't find it if we're 372abb0f93cSkardel # using a relative directory. 373abb0f93cSkardel cp "$am_depcomp" conftest.dir 374abb0f93cSkardel cd conftest.dir 375abb0f93cSkardel # We will build objects and dependencies in a subdirectory because 376abb0f93cSkardel # it helps to detect inapplicable dependency modes. For instance 377abb0f93cSkardel # both Tru64's cc and ICC support -MD to output dependencies as a 378abb0f93cSkardel # side effect of compilation, but ICC will put the dependencies in 379abb0f93cSkardel # the current directory while Tru64 will put them in the object 380abb0f93cSkardel # directory. 381abb0f93cSkardel mkdir sub 382abb0f93cSkardel 383abb0f93cSkardel am_cv_$1_dependencies_compiler_type=none 384abb0f93cSkardel if test "$am_compiler_list" = ""; then 385abb0f93cSkardel am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 386abb0f93cSkardel fi 387abb0f93cSkardel am__universal=false 388abb0f93cSkardel m4_case([$1], [CC], 389abb0f93cSkardel [case " $depcc " in #( 390abb0f93cSkardel *\ -arch\ *\ -arch\ *) am__universal=true ;; 391abb0f93cSkardel esac], 392abb0f93cSkardel [CXX], 393abb0f93cSkardel [case " $depcc " in #( 394abb0f93cSkardel *\ -arch\ *\ -arch\ *) am__universal=true ;; 395abb0f93cSkardel esac]) 396abb0f93cSkardel 397abb0f93cSkardel for depmode in $am_compiler_list; do 398abb0f93cSkardel # Setup a source with many dependencies, because some compilers 399abb0f93cSkardel # like to wrap large dependency lists on column 80 (with \), and 400abb0f93cSkardel # we should not choose a depcomp mode which is confused by this. 401abb0f93cSkardel # 402abb0f93cSkardel # We need to recreate these files for each test, as the compiler may 403abb0f93cSkardel # overwrite some of them when testing with obscure command lines. 404abb0f93cSkardel # This happens at least with the AIX C compiler. 405abb0f93cSkardel : > sub/conftest.c 406abb0f93cSkardel for i in 1 2 3 4 5 6; do 407abb0f93cSkardel echo '#include "conftst'$i'.h"' >> sub/conftest.c 408*b76cdf5cSchristos # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 409*b76cdf5cSchristos # Solaris 10 /bin/sh. 410*b76cdf5cSchristos echo '/* dummy */' > sub/conftst$i.h 411abb0f93cSkardel done 412abb0f93cSkardel echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 413abb0f93cSkardel 414*b76cdf5cSchristos # We check with '-c' and '-o' for the sake of the "dashmstdout" 415abb0f93cSkardel # mode. It turns out that the SunPro C++ compiler does not properly 416*b76cdf5cSchristos # handle '-M -o', and we need to detect this. Also, some Intel 417*b76cdf5cSchristos # versions had trouble with output in subdirs. 418abb0f93cSkardel am__obj=sub/conftest.${OBJEXT-o} 419abb0f93cSkardel am__minus_obj="-o $am__obj" 420abb0f93cSkardel case $depmode in 421abb0f93cSkardel gcc) 422abb0f93cSkardel # This depmode causes a compiler race in universal mode. 423abb0f93cSkardel test "$am__universal" = false || continue 424abb0f93cSkardel ;; 425abb0f93cSkardel nosideeffect) 426*b76cdf5cSchristos # After this tag, mechanisms are not by side-effect, so they'll 427*b76cdf5cSchristos # only be used when explicitly requested. 428abb0f93cSkardel if test "x$enable_dependency_tracking" = xyes; then 429abb0f93cSkardel continue 430abb0f93cSkardel else 431abb0f93cSkardel break 432abb0f93cSkardel fi 433abb0f93cSkardel ;; 434*b76cdf5cSchristos msvc7 | msvc7msys | msvisualcpp | msvcmsys) 435*b76cdf5cSchristos # This compiler won't grok '-c -o', but also, the minuso test has 436abb0f93cSkardel # not run yet. These depmodes are late enough in the game, and 437abb0f93cSkardel # so weak that their functioning should not be impacted. 438abb0f93cSkardel am__obj=conftest.${OBJEXT-o} 439abb0f93cSkardel am__minus_obj= 440abb0f93cSkardel ;; 441abb0f93cSkardel none) break ;; 442abb0f93cSkardel esac 443abb0f93cSkardel if depmode=$depmode \ 444abb0f93cSkardel source=sub/conftest.c object=$am__obj \ 445abb0f93cSkardel depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 446abb0f93cSkardel $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 447abb0f93cSkardel >/dev/null 2>conftest.err && 448abb0f93cSkardel grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 449abb0f93cSkardel grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 450abb0f93cSkardel grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 451abb0f93cSkardel ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 452abb0f93cSkardel # icc doesn't choke on unknown options, it will just issue warnings 453abb0f93cSkardel # or remarks (even with -Werror). So we grep stderr for any message 454abb0f93cSkardel # that says an option was ignored or not supported. 455abb0f93cSkardel # When given -MP, icc 7.0 and 7.1 complain thusly: 456abb0f93cSkardel # icc: Command line warning: ignoring option '-M'; no argument required 457abb0f93cSkardel # The diagnosis changed in icc 8.0: 458abb0f93cSkardel # icc: Command line remark: option '-MP' not supported 459abb0f93cSkardel if (grep 'ignoring option' conftest.err || 460abb0f93cSkardel grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 461abb0f93cSkardel am_cv_$1_dependencies_compiler_type=$depmode 462abb0f93cSkardel break 463abb0f93cSkardel fi 464abb0f93cSkardel fi 465abb0f93cSkardel done 466abb0f93cSkardel 467abb0f93cSkardel cd .. 468abb0f93cSkardel rm -rf conftest.dir 469abb0f93cSkardelelse 470abb0f93cSkardel am_cv_$1_dependencies_compiler_type=none 471abb0f93cSkardelfi 472abb0f93cSkardel]) 473abb0f93cSkardelAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 474abb0f93cSkardelAM_CONDITIONAL([am__fastdep$1], [ 475abb0f93cSkardel test "x$enable_dependency_tracking" != xno \ 476abb0f93cSkardel && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 477abb0f93cSkardel]) 478abb0f93cSkardel 479abb0f93cSkardel 480abb0f93cSkardel# AM_SET_DEPDIR 481abb0f93cSkardel# ------------- 482abb0f93cSkardel# Choose a directory name for dependency files. 483*b76cdf5cSchristos# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 484abb0f93cSkardelAC_DEFUN([AM_SET_DEPDIR], 485abb0f93cSkardel[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 486abb0f93cSkardelAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 487abb0f93cSkardel]) 488abb0f93cSkardel 489abb0f93cSkardel 490abb0f93cSkardel# AM_DEP_TRACK 491abb0f93cSkardel# ------------ 492abb0f93cSkardelAC_DEFUN([AM_DEP_TRACK], 493*b76cdf5cSchristos[AC_ARG_ENABLE([dependency-tracking], [dnl 494*b76cdf5cSchristosAS_HELP_STRING( 495*b76cdf5cSchristos [--enable-dependency-tracking], 496*b76cdf5cSchristos [do not reject slow dependency extractors]) 497*b76cdf5cSchristosAS_HELP_STRING( 498*b76cdf5cSchristos [--disable-dependency-tracking], 499*b76cdf5cSchristos [speeds up one-time build])]) 500abb0f93cSkardelif test "x$enable_dependency_tracking" != xno; then 501abb0f93cSkardel am_depcomp="$ac_aux_dir/depcomp" 502abb0f93cSkardel AMDEPBACKSLASH='\' 503*b76cdf5cSchristos am__nodep='_no' 504abb0f93cSkardelfi 505abb0f93cSkardelAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 506abb0f93cSkardelAC_SUBST([AMDEPBACKSLASH])dnl 507abb0f93cSkardel_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 508*b76cdf5cSchristosAC_SUBST([am__nodep])dnl 509*b76cdf5cSchristos_AM_SUBST_NOTMAKE([am__nodep])dnl 510abb0f93cSkardel]) 511abb0f93cSkardel 512abb0f93cSkardel# Generate code to set up dependency tracking. -*- Autoconf -*- 513abb0f93cSkardel 514*b76cdf5cSchristos# Copyright (C) 1999-2014 Free Software Foundation, Inc. 515abb0f93cSkardel# 516abb0f93cSkardel# This file is free software; the Free Software Foundation 517abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 518abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 519abb0f93cSkardel 520abb0f93cSkardel 521abb0f93cSkardel# _AM_OUTPUT_DEPENDENCY_COMMANDS 522abb0f93cSkardel# ------------------------------ 523abb0f93cSkardelAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 524abb0f93cSkardel[{ 525*b76cdf5cSchristos # Older Autoconf quotes --file arguments for eval, but not when files 526abb0f93cSkardel # are listed without --file. Let's play safe and only enable the eval 527abb0f93cSkardel # if we detect the quoting. 528abb0f93cSkardel case $CONFIG_FILES in 529abb0f93cSkardel *\'*) eval set x "$CONFIG_FILES" ;; 530abb0f93cSkardel *) set x $CONFIG_FILES ;; 531abb0f93cSkardel esac 532abb0f93cSkardel shift 533abb0f93cSkardel for mf 534abb0f93cSkardel do 535abb0f93cSkardel # Strip MF so we end up with the name of the file. 536abb0f93cSkardel mf=`echo "$mf" | sed -e 's/:.*$//'` 537abb0f93cSkardel # Check whether this is an Automake generated Makefile or not. 538*b76cdf5cSchristos # We used to match only the files named 'Makefile.in', but 539abb0f93cSkardel # some people rename them; so instead we look at the file content. 540abb0f93cSkardel # Grep'ing the first line is not enough: some people post-process 541abb0f93cSkardel # each Makefile.in and add a new line on top of each file to say so. 542abb0f93cSkardel # Grep'ing the whole file is not good either: AIX grep has a line 543abb0f93cSkardel # limit of 2048, but all sed's we know have understand at least 4000. 544abb0f93cSkardel if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 545abb0f93cSkardel dirpart=`AS_DIRNAME("$mf")` 546abb0f93cSkardel else 547abb0f93cSkardel continue 548abb0f93cSkardel fi 549abb0f93cSkardel # Extract the definition of DEPDIR, am__include, and am__quote 550*b76cdf5cSchristos # from the Makefile without running 'make'. 551abb0f93cSkardel DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 552abb0f93cSkardel test -z "$DEPDIR" && continue 553abb0f93cSkardel am__include=`sed -n 's/^am__include = //p' < "$mf"` 554*b76cdf5cSchristos test -z "$am__include" && continue 555abb0f93cSkardel am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 556abb0f93cSkardel # Find all dependency output files, they are included files with 557abb0f93cSkardel # $(DEPDIR) in their names. We invoke sed twice because it is the 558abb0f93cSkardel # simplest approach to changing $(DEPDIR) to its actual value in the 559abb0f93cSkardel # expansion. 560abb0f93cSkardel for file in `sed -n " 561abb0f93cSkardel s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 562*b76cdf5cSchristos sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 563abb0f93cSkardel # Make sure the directory exists. 564abb0f93cSkardel test -f "$dirpart/$file" && continue 565abb0f93cSkardel fdir=`AS_DIRNAME(["$file"])` 566abb0f93cSkardel AS_MKDIR_P([$dirpart/$fdir]) 567abb0f93cSkardel # echo "creating $dirpart/$file" 568abb0f93cSkardel echo '# dummy' > "$dirpart/$file" 569abb0f93cSkardel done 570abb0f93cSkardel done 571abb0f93cSkardel} 572abb0f93cSkardel])# _AM_OUTPUT_DEPENDENCY_COMMANDS 573abb0f93cSkardel 574abb0f93cSkardel 575abb0f93cSkardel# AM_OUTPUT_DEPENDENCY_COMMANDS 576abb0f93cSkardel# ----------------------------- 577abb0f93cSkardel# This macro should only be invoked once -- use via AC_REQUIRE. 578abb0f93cSkardel# 579abb0f93cSkardel# This code is only required when automatic dependency tracking 580*b76cdf5cSchristos# is enabled. FIXME. This creates each '.P' file that we will 581abb0f93cSkardel# need in order to bootstrap the dependency handling code. 582abb0f93cSkardelAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 583abb0f93cSkardel[AC_CONFIG_COMMANDS([depfiles], 584abb0f93cSkardel [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 585abb0f93cSkardel [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 586abb0f93cSkardel]) 587abb0f93cSkardel 588abb0f93cSkardel# Do all the work for Automake. -*- Autoconf -*- 589abb0f93cSkardel 590*b76cdf5cSchristos# Copyright (C) 1996-2014 Free Software Foundation, Inc. 591abb0f93cSkardel# 592abb0f93cSkardel# This file is free software; the Free Software Foundation 593abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 594abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 595abb0f93cSkardel 596abb0f93cSkardel# This macro actually does too much. Some checks are only needed if 597abb0f93cSkardel# your package does certain things. But this isn't really a big deal. 598abb0f93cSkardel 599*b76cdf5cSchristosdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 600*b76cdf5cSchristosm4_define([AC_PROG_CC], 601*b76cdf5cSchristosm4_defn([AC_PROG_CC]) 602*b76cdf5cSchristos[_AM_PROG_CC_C_O 603*b76cdf5cSchristos]) 604*b76cdf5cSchristos 605abb0f93cSkardel# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 606abb0f93cSkardel# AM_INIT_AUTOMAKE([OPTIONS]) 607abb0f93cSkardel# ----------------------------------------------- 608abb0f93cSkardel# The call with PACKAGE and VERSION arguments is the old style 609abb0f93cSkardel# call (pre autoconf-2.50), which is being phased out. PACKAGE 610abb0f93cSkardel# and VERSION should now be passed to AC_INIT and removed from 611abb0f93cSkardel# the call to AM_INIT_AUTOMAKE. 612abb0f93cSkardel# We support both call styles for the transition. After 613abb0f93cSkardel# the next Automake release, Autoconf can make the AC_INIT 614abb0f93cSkardel# arguments mandatory, and then we can depend on a new Autoconf 615abb0f93cSkardel# release and drop the old call support. 616abb0f93cSkardelAC_DEFUN([AM_INIT_AUTOMAKE], 617*b76cdf5cSchristos[AC_PREREQ([2.65])dnl 618abb0f93cSkardeldnl Autoconf wants to disallow AM_ names. We explicitly allow 619abb0f93cSkardeldnl the ones we care about. 620abb0f93cSkardelm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 621abb0f93cSkardelAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 622abb0f93cSkardelAC_REQUIRE([AC_PROG_INSTALL])dnl 623abb0f93cSkardelif test "`cd $srcdir && pwd`" != "`pwd`"; then 624abb0f93cSkardel # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 625abb0f93cSkardel # is not polluted with repeated "-I." 626abb0f93cSkardel AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 627abb0f93cSkardel # test to see if srcdir already configured 628abb0f93cSkardel if test -f $srcdir/config.status; then 629abb0f93cSkardel AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 630abb0f93cSkardel fi 631abb0f93cSkardelfi 632abb0f93cSkardel 633abb0f93cSkardel# test whether we have cygpath 634abb0f93cSkardelif test -z "$CYGPATH_W"; then 635abb0f93cSkardel if (cygpath --version) >/dev/null 2>/dev/null; then 636abb0f93cSkardel CYGPATH_W='cygpath -w' 637abb0f93cSkardel else 638abb0f93cSkardel CYGPATH_W=echo 639abb0f93cSkardel fi 640abb0f93cSkardelfi 641abb0f93cSkardelAC_SUBST([CYGPATH_W]) 642abb0f93cSkardel 643abb0f93cSkardel# Define the identity of the package. 644abb0f93cSkardeldnl Distinguish between old-style and new-style calls. 645abb0f93cSkardelm4_ifval([$2], 646*b76cdf5cSchristos[AC_DIAGNOSE([obsolete], 647*b76cdf5cSchristos [$0: two- and three-arguments forms are deprecated.]) 648*b76cdf5cSchristosm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 649abb0f93cSkardel AC_SUBST([PACKAGE], [$1])dnl 650abb0f93cSkardel AC_SUBST([VERSION], [$2])], 651abb0f93cSkardel[_AM_SET_OPTIONS([$1])dnl 652abb0f93cSkardeldnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 653*b76cdf5cSchristosm4_if( 654*b76cdf5cSchristos m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 655*b76cdf5cSchristos [ok:ok],, 656abb0f93cSkardel [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 657abb0f93cSkardel AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 658abb0f93cSkardel AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 659abb0f93cSkardel 660abb0f93cSkardel_AM_IF_OPTION([no-define],, 661*b76cdf5cSchristos[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 662*b76cdf5cSchristos AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 663abb0f93cSkardel 664abb0f93cSkardel# Some tools Automake needs. 665abb0f93cSkardelAC_REQUIRE([AM_SANITY_CHECK])dnl 666abb0f93cSkardelAC_REQUIRE([AC_ARG_PROGRAM])dnl 667*b76cdf5cSchristosAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 668*b76cdf5cSchristosAM_MISSING_PROG([AUTOCONF], [autoconf]) 669*b76cdf5cSchristosAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 670*b76cdf5cSchristosAM_MISSING_PROG([AUTOHEADER], [autoheader]) 671*b76cdf5cSchristosAM_MISSING_PROG([MAKEINFO], [makeinfo]) 672abb0f93cSkardelAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 673abb0f93cSkardelAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 674*b76cdf5cSchristosAC_REQUIRE([AC_PROG_MKDIR_P])dnl 675*b76cdf5cSchristos# For better backward compatibility. To be removed once Automake 1.9.x 676*b76cdf5cSchristos# dies out for good. For more background, see: 677*b76cdf5cSchristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 678*b76cdf5cSchristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 679*b76cdf5cSchristosAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 680*b76cdf5cSchristos# We need awk for the "check" target (and possibly the TAP driver). The 681*b76cdf5cSchristos# system "awk" is bad on some platforms. 682abb0f93cSkardelAC_REQUIRE([AC_PROG_AWK])dnl 683abb0f93cSkardelAC_REQUIRE([AC_PROG_MAKE_SET])dnl 684abb0f93cSkardelAC_REQUIRE([AM_SET_LEADING_DOT])dnl 685abb0f93cSkardel_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 686abb0f93cSkardel [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 687abb0f93cSkardel [_AM_PROG_TAR([v7])])]) 688abb0f93cSkardel_AM_IF_OPTION([no-dependencies],, 689abb0f93cSkardel[AC_PROVIDE_IFELSE([AC_PROG_CC], 690*b76cdf5cSchristos [_AM_DEPENDENCIES([CC])], 691*b76cdf5cSchristos [m4_define([AC_PROG_CC], 692*b76cdf5cSchristos m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 693abb0f93cSkardelAC_PROVIDE_IFELSE([AC_PROG_CXX], 694*b76cdf5cSchristos [_AM_DEPENDENCIES([CXX])], 695*b76cdf5cSchristos [m4_define([AC_PROG_CXX], 696*b76cdf5cSchristos m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 697abb0f93cSkardelAC_PROVIDE_IFELSE([AC_PROG_OBJC], 698*b76cdf5cSchristos [_AM_DEPENDENCIES([OBJC])], 699*b76cdf5cSchristos [m4_define([AC_PROG_OBJC], 700*b76cdf5cSchristos m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 701*b76cdf5cSchristosAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 702*b76cdf5cSchristos [_AM_DEPENDENCIES([OBJCXX])], 703*b76cdf5cSchristos [m4_define([AC_PROG_OBJCXX], 704*b76cdf5cSchristos m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 705abb0f93cSkardel]) 706*b76cdf5cSchristosAC_REQUIRE([AM_SILENT_RULES])dnl 707*b76cdf5cSchristosdnl The testsuite driver may need to know about EXEEXT, so add the 708*b76cdf5cSchristosdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 709*b76cdf5cSchristosdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 710abb0f93cSkardelAC_CONFIG_COMMANDS_PRE(dnl 711abb0f93cSkardel[m4_provide_if([_AM_COMPILER_EXEEXT], 712abb0f93cSkardel [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 713*b76cdf5cSchristos 714*b76cdf5cSchristos# POSIX will say in a future version that running "rm -f" with no argument 715*b76cdf5cSchristos# is OK; and we want to be able to make that assumption in our Makefile 716*b76cdf5cSchristos# recipes. So use an aggressive probe to check that the usage we want is 717*b76cdf5cSchristos# actually supported "in the wild" to an acceptable degree. 718*b76cdf5cSchristos# See automake bug#10828. 719*b76cdf5cSchristos# To make any issue more visible, cause the running configure to be aborted 720*b76cdf5cSchristos# by default if the 'rm' program in use doesn't match our expectations; the 721*b76cdf5cSchristos# user can still override this though. 722*b76cdf5cSchristosif rm -f && rm -fr && rm -rf; then : OK; else 723*b76cdf5cSchristos cat >&2 <<'END' 724*b76cdf5cSchristosOops! 725*b76cdf5cSchristos 726*b76cdf5cSchristosYour 'rm' program seems unable to run without file operands specified 727*b76cdf5cSchristoson the command line, even when the '-f' option is present. This is contrary 728*b76cdf5cSchristosto the behaviour of most rm programs out there, and not conforming with 729*b76cdf5cSchristosthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 730*b76cdf5cSchristos 731*b76cdf5cSchristosPlease tell bug-automake@gnu.org about your system, including the value 732*b76cdf5cSchristosof your $PATH and any error possibly output before this message. This 733*b76cdf5cSchristoscan help us improve future automake versions. 734*b76cdf5cSchristos 735*b76cdf5cSchristosEND 736*b76cdf5cSchristos if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 737*b76cdf5cSchristos echo 'Configuration will proceed anyway, since you have set the' >&2 738*b76cdf5cSchristos echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 739*b76cdf5cSchristos echo >&2 740*b76cdf5cSchristos else 741*b76cdf5cSchristos cat >&2 <<'END' 742*b76cdf5cSchristosAborting the configuration process, to ensure you take notice of the issue. 743*b76cdf5cSchristos 744*b76cdf5cSchristosYou can download and install GNU coreutils to get an 'rm' implementation 745*b76cdf5cSchristosthat behaves properly: <http://www.gnu.org/software/coreutils/>. 746*b76cdf5cSchristos 747*b76cdf5cSchristosIf you want to complete the configuration process using your problematic 748*b76cdf5cSchristos'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 749*b76cdf5cSchristosto "yes", and re-run configure. 750*b76cdf5cSchristos 751*b76cdf5cSchristosEND 752*b76cdf5cSchristos AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 753*b76cdf5cSchristos fi 754*b76cdf5cSchristosfi 755*b76cdf5cSchristosdnl The trailing newline in this macro's definition is deliberate, for 756*b76cdf5cSchristosdnl backward compatibility and to allow trailing 'dnl'-style comments 757*b76cdf5cSchristosdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 758abb0f93cSkardel]) 759abb0f93cSkardel 760*b76cdf5cSchristosdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 761abb0f93cSkardeldnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 762abb0f93cSkardeldnl mangled by Autoconf and run in a shell conditional statement. 763abb0f93cSkardelm4_define([_AC_COMPILER_EXEEXT], 764abb0f93cSkardelm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 765abb0f93cSkardel 766abb0f93cSkardel# When config.status generates a header, we must update the stamp-h file. 767abb0f93cSkardel# This file resides in the same directory as the config header 768abb0f93cSkardel# that is generated. The stamp files are numbered to have different names. 769abb0f93cSkardel 770abb0f93cSkardel# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 771abb0f93cSkardel# loop where config.status creates the headers, so we can generate 772abb0f93cSkardel# our stamp files there. 773abb0f93cSkardelAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 774abb0f93cSkardel[# Compute $1's index in $config_headers. 775abb0f93cSkardel_am_arg=$1 776abb0f93cSkardel_am_stamp_count=1 777abb0f93cSkardelfor _am_header in $config_headers :; do 778abb0f93cSkardel case $_am_header in 779abb0f93cSkardel $_am_arg | $_am_arg:* ) 780abb0f93cSkardel break ;; 781abb0f93cSkardel * ) 782abb0f93cSkardel _am_stamp_count=`expr $_am_stamp_count + 1` ;; 783abb0f93cSkardel esac 784abb0f93cSkardeldone 785abb0f93cSkardelecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 786abb0f93cSkardel 787*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 788abb0f93cSkardel# 789abb0f93cSkardel# This file is free software; the Free Software Foundation 790abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 791abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 792abb0f93cSkardel 793abb0f93cSkardel# AM_PROG_INSTALL_SH 794abb0f93cSkardel# ------------------ 795abb0f93cSkardel# Define $install_sh. 796abb0f93cSkardelAC_DEFUN([AM_PROG_INSTALL_SH], 797abb0f93cSkardel[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 798*b76cdf5cSchristosif test x"${install_sh+set}" != xset; then 799abb0f93cSkardel case $am_aux_dir in 800abb0f93cSkardel *\ * | *\ *) 801abb0f93cSkardel install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 802abb0f93cSkardel *) 803abb0f93cSkardel install_sh="\${SHELL} $am_aux_dir/install-sh" 804abb0f93cSkardel esac 805abb0f93cSkardelfi 806*b76cdf5cSchristosAC_SUBST([install_sh])]) 807abb0f93cSkardel 808*b76cdf5cSchristos# Copyright (C) 2003-2014 Free Software Foundation, Inc. 809abb0f93cSkardel# 810abb0f93cSkardel# This file is free software; the Free Software Foundation 811abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 812abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 813abb0f93cSkardel 814abb0f93cSkardel# Check whether the underlying file-system supports filenames 815abb0f93cSkardel# with a leading dot. For instance MS-DOS doesn't. 816abb0f93cSkardelAC_DEFUN([AM_SET_LEADING_DOT], 817abb0f93cSkardel[rm -rf .tst 2>/dev/null 818abb0f93cSkardelmkdir .tst 2>/dev/null 819abb0f93cSkardelif test -d .tst; then 820abb0f93cSkardel am__leading_dot=. 821abb0f93cSkardelelse 822abb0f93cSkardel am__leading_dot=_ 823abb0f93cSkardelfi 824abb0f93cSkardelrmdir .tst 2>/dev/null 825abb0f93cSkardelAC_SUBST([am__leading_dot])]) 826abb0f93cSkardel 827abb0f93cSkardel# Check to see how 'make' treats includes. -*- Autoconf -*- 828abb0f93cSkardel 829*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 830abb0f93cSkardel# 831abb0f93cSkardel# This file is free software; the Free Software Foundation 832abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 833abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 834abb0f93cSkardel 835abb0f93cSkardel# AM_MAKE_INCLUDE() 836abb0f93cSkardel# ----------------- 837abb0f93cSkardel# Check to see how make treats includes. 838abb0f93cSkardelAC_DEFUN([AM_MAKE_INCLUDE], 839abb0f93cSkardel[am_make=${MAKE-make} 840abb0f93cSkardelcat > confinc << 'END' 841abb0f93cSkardelam__doit: 842abb0f93cSkardel @echo this is the am__doit target 843abb0f93cSkardel.PHONY: am__doit 844abb0f93cSkardelEND 845abb0f93cSkardel# If we don't find an include directive, just comment out the code. 846abb0f93cSkardelAC_MSG_CHECKING([for style of include used by $am_make]) 847abb0f93cSkardelam__include="#" 848abb0f93cSkardelam__quote= 849abb0f93cSkardel_am_result=none 850abb0f93cSkardel# First try GNU make style include. 851abb0f93cSkardelecho "include confinc" > confmf 852*b76cdf5cSchristos# Ignore all kinds of additional output from 'make'. 853abb0f93cSkardelcase `$am_make -s -f confmf 2> /dev/null` in #( 854abb0f93cSkardel*the\ am__doit\ target*) 855abb0f93cSkardel am__include=include 856abb0f93cSkardel am__quote= 857abb0f93cSkardel _am_result=GNU 858abb0f93cSkardel ;; 859abb0f93cSkardelesac 860abb0f93cSkardel# Now try BSD make style include. 861abb0f93cSkardelif test "$am__include" = "#"; then 862abb0f93cSkardel echo '.include "confinc"' > confmf 863abb0f93cSkardel case `$am_make -s -f confmf 2> /dev/null` in #( 864abb0f93cSkardel *the\ am__doit\ target*) 865abb0f93cSkardel am__include=.include 866abb0f93cSkardel am__quote="\"" 867abb0f93cSkardel _am_result=BSD 868abb0f93cSkardel ;; 869abb0f93cSkardel esac 870abb0f93cSkardelfi 871abb0f93cSkardelAC_SUBST([am__include]) 872abb0f93cSkardelAC_SUBST([am__quote]) 873abb0f93cSkardelAC_MSG_RESULT([$_am_result]) 874abb0f93cSkardelrm -f confinc confmf 875abb0f93cSkardel]) 876abb0f93cSkardel 877abb0f93cSkardel# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 878abb0f93cSkardel 879*b76cdf5cSchristos# Copyright (C) 1997-2014 Free Software Foundation, Inc. 880abb0f93cSkardel# 881abb0f93cSkardel# This file is free software; the Free Software Foundation 882abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 883abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 884abb0f93cSkardel 885abb0f93cSkardel# AM_MISSING_PROG(NAME, PROGRAM) 886abb0f93cSkardel# ------------------------------ 887abb0f93cSkardelAC_DEFUN([AM_MISSING_PROG], 888abb0f93cSkardel[AC_REQUIRE([AM_MISSING_HAS_RUN]) 889abb0f93cSkardel$1=${$1-"${am_missing_run}$2"} 890abb0f93cSkardelAC_SUBST($1)]) 891abb0f93cSkardel 892abb0f93cSkardel# AM_MISSING_HAS_RUN 893abb0f93cSkardel# ------------------ 894*b76cdf5cSchristos# Define MISSING if not defined so far and test if it is modern enough. 895*b76cdf5cSchristos# If it is, set am_missing_run to use it, otherwise, to nothing. 896abb0f93cSkardelAC_DEFUN([AM_MISSING_HAS_RUN], 897abb0f93cSkardel[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 898abb0f93cSkardelAC_REQUIRE_AUX_FILE([missing])dnl 899abb0f93cSkardelif test x"${MISSING+set}" != xset; then 900abb0f93cSkardel case $am_aux_dir in 901abb0f93cSkardel *\ * | *\ *) 902abb0f93cSkardel MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 903abb0f93cSkardel *) 904abb0f93cSkardel MISSING="\${SHELL} $am_aux_dir/missing" ;; 905abb0f93cSkardel esac 906abb0f93cSkardelfi 907abb0f93cSkardel# Use eval to expand $SHELL 908*b76cdf5cSchristosif eval "$MISSING --is-lightweight"; then 909*b76cdf5cSchristos am_missing_run="$MISSING " 910abb0f93cSkardelelse 911abb0f93cSkardel am_missing_run= 912*b76cdf5cSchristos AC_MSG_WARN(['missing' script is too old or missing]) 913abb0f93cSkardelfi 914abb0f93cSkardel]) 915abb0f93cSkardel 916abb0f93cSkardel# Helper functions for option handling. -*- Autoconf -*- 917abb0f93cSkardel 918*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 919abb0f93cSkardel# 920abb0f93cSkardel# This file is free software; the Free Software Foundation 921abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 922abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 923abb0f93cSkardel 924abb0f93cSkardel# _AM_MANGLE_OPTION(NAME) 925abb0f93cSkardel# ----------------------- 926abb0f93cSkardelAC_DEFUN([_AM_MANGLE_OPTION], 927abb0f93cSkardel[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 928abb0f93cSkardel 929abb0f93cSkardel# _AM_SET_OPTION(NAME) 930*b76cdf5cSchristos# -------------------- 931abb0f93cSkardel# Set option NAME. Presently that only means defining a flag for this option. 932abb0f93cSkardelAC_DEFUN([_AM_SET_OPTION], 933*b76cdf5cSchristos[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 934abb0f93cSkardel 935abb0f93cSkardel# _AM_SET_OPTIONS(OPTIONS) 936*b76cdf5cSchristos# ------------------------ 937abb0f93cSkardel# OPTIONS is a space-separated list of Automake options. 938abb0f93cSkardelAC_DEFUN([_AM_SET_OPTIONS], 939abb0f93cSkardel[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 940abb0f93cSkardel 941abb0f93cSkardel# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 942abb0f93cSkardel# ------------------------------------------- 943abb0f93cSkardel# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 944abb0f93cSkardelAC_DEFUN([_AM_IF_OPTION], 945abb0f93cSkardel[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 946abb0f93cSkardel 947*b76cdf5cSchristos# Copyright (C) 1999-2014 Free Software Foundation, Inc. 948abb0f93cSkardel# 949abb0f93cSkardel# This file is free software; the Free Software Foundation 950abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 951abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 952abb0f93cSkardel 953*b76cdf5cSchristos# _AM_PROG_CC_C_O 954*b76cdf5cSchristos# --------------- 955*b76cdf5cSchristos# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 956*b76cdf5cSchristos# to automatically call this. 957*b76cdf5cSchristosAC_DEFUN([_AM_PROG_CC_C_O], 958*b76cdf5cSchristos[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 959*b76cdf5cSchristosAC_REQUIRE_AUX_FILE([compile])dnl 960*b76cdf5cSchristosAC_LANG_PUSH([C])dnl 961*b76cdf5cSchristosAC_CACHE_CHECK( 962*b76cdf5cSchristos [whether $CC understands -c and -o together], 963*b76cdf5cSchristos [am_cv_prog_cc_c_o], 964*b76cdf5cSchristos [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 965*b76cdf5cSchristos # Make sure it works both with $CC and with simple cc. 966*b76cdf5cSchristos # Following AC_PROG_CC_C_O, we do the test twice because some 967*b76cdf5cSchristos # compilers refuse to overwrite an existing .o file with -o, 968*b76cdf5cSchristos # though they will create one. 969*b76cdf5cSchristos am_cv_prog_cc_c_o=yes 970*b76cdf5cSchristos for am_i in 1 2; do 971*b76cdf5cSchristos if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 972*b76cdf5cSchristos && test -f conftest2.$ac_objext; then 973*b76cdf5cSchristos : OK 974*b76cdf5cSchristos else 975*b76cdf5cSchristos am_cv_prog_cc_c_o=no 976*b76cdf5cSchristos break 977*b76cdf5cSchristos fi 978*b76cdf5cSchristos done 979*b76cdf5cSchristos rm -f core conftest* 980*b76cdf5cSchristos unset am_i]) 981*b76cdf5cSchristosif test "$am_cv_prog_cc_c_o" != yes; then 982*b76cdf5cSchristos # Losing compiler, so override with the script. 983*b76cdf5cSchristos # FIXME: It is wrong to rewrite CC. 984*b76cdf5cSchristos # But if we don't then we get into trouble of one sort or another. 985*b76cdf5cSchristos # A longer-term fix would be to have automake use am__CC in this case, 986*b76cdf5cSchristos # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 987*b76cdf5cSchristos CC="$am_aux_dir/compile $CC" 988*b76cdf5cSchristosfi 989*b76cdf5cSchristosAC_LANG_POP([C])]) 990*b76cdf5cSchristos 991*b76cdf5cSchristos# For backward compatibility. 992*b76cdf5cSchristosAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 993*b76cdf5cSchristos 994*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 995*b76cdf5cSchristos# 996*b76cdf5cSchristos# This file is free software; the Free Software Foundation 997*b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it, 998*b76cdf5cSchristos# with or without modifications, as long as this notice is preserved. 999*b76cdf5cSchristos 1000*b76cdf5cSchristos# AM_RUN_LOG(COMMAND) 1001*b76cdf5cSchristos# ------------------- 1002*b76cdf5cSchristos# Run COMMAND, save the exit status in ac_status, and log it. 1003*b76cdf5cSchristos# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1004*b76cdf5cSchristosAC_DEFUN([AM_RUN_LOG], 1005*b76cdf5cSchristos[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1006*b76cdf5cSchristos ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1007*b76cdf5cSchristos ac_status=$? 1008*b76cdf5cSchristos echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1009*b76cdf5cSchristos (exit $ac_status); }]) 1010*b76cdf5cSchristos 1011*b76cdf5cSchristos# Check to make sure that the build environment is sane. -*- Autoconf -*- 1012*b76cdf5cSchristos 1013*b76cdf5cSchristos# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1014*b76cdf5cSchristos# 1015*b76cdf5cSchristos# This file is free software; the Free Software Foundation 1016*b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it, 1017*b76cdf5cSchristos# with or without modifications, as long as this notice is preserved. 1018abb0f93cSkardel 1019abb0f93cSkardel# AM_SANITY_CHECK 1020abb0f93cSkardel# --------------- 1021abb0f93cSkardelAC_DEFUN([AM_SANITY_CHECK], 1022abb0f93cSkardel[AC_MSG_CHECKING([whether build environment is sane]) 1023abb0f93cSkardel# Reject unsafe characters in $srcdir or the absolute working directory 1024abb0f93cSkardel# name. Accept space and tab only in the latter. 1025abb0f93cSkardelam_lf=' 1026abb0f93cSkardel' 1027abb0f93cSkardelcase `pwd` in 1028abb0f93cSkardel *[[\\\"\#\$\&\'\`$am_lf]]*) 1029abb0f93cSkardel AC_MSG_ERROR([unsafe absolute working directory name]);; 1030abb0f93cSkardelesac 1031abb0f93cSkardelcase $srcdir in 1032abb0f93cSkardel *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1033*b76cdf5cSchristos AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1034abb0f93cSkardelesac 1035abb0f93cSkardel 1036*b76cdf5cSchristos# Do 'set' in a subshell so we don't clobber the current shell's 1037abb0f93cSkardel# arguments. Must try -L first in case configure is actually a 1038abb0f93cSkardel# symlink; some systems play weird games with the mod time of symlinks 1039abb0f93cSkardel# (eg FreeBSD returns the mod time of the symlink's containing 1040abb0f93cSkardel# directory). 1041abb0f93cSkardelif ( 1042*b76cdf5cSchristos am_has_slept=no 1043*b76cdf5cSchristos for am_try in 1 2; do 1044*b76cdf5cSchristos echo "timestamp, slept: $am_has_slept" > conftest.file 1045abb0f93cSkardel set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1046abb0f93cSkardel if test "$[*]" = "X"; then 1047abb0f93cSkardel # -L didn't work. 1048abb0f93cSkardel set X `ls -t "$srcdir/configure" conftest.file` 1049abb0f93cSkardel fi 1050abb0f93cSkardel if test "$[*]" != "X $srcdir/configure conftest.file" \ 1051abb0f93cSkardel && test "$[*]" != "X conftest.file $srcdir/configure"; then 1052abb0f93cSkardel 1053abb0f93cSkardel # If neither matched, then we have a broken ls. This can happen 1054abb0f93cSkardel # if, for instance, CONFIG_SHELL is bash and it inherits a 1055abb0f93cSkardel # broken ls alias from the environment. This has actually 1056abb0f93cSkardel # happened. Such a system could not be considered "sane". 1057abb0f93cSkardel AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1058abb0f93cSkardel alias in your environment]) 1059abb0f93cSkardel fi 1060*b76cdf5cSchristos if test "$[2]" = conftest.file || test $am_try -eq 2; then 1061*b76cdf5cSchristos break 1062*b76cdf5cSchristos fi 1063*b76cdf5cSchristos # Just in case. 1064*b76cdf5cSchristos sleep 1 1065*b76cdf5cSchristos am_has_slept=yes 1066*b76cdf5cSchristos done 1067abb0f93cSkardel test "$[2]" = conftest.file 1068abb0f93cSkardel ) 1069abb0f93cSkardelthen 1070abb0f93cSkardel # Ok. 1071abb0f93cSkardel : 1072abb0f93cSkardelelse 1073abb0f93cSkardel AC_MSG_ERROR([newly created file is older than distributed files! 1074abb0f93cSkardelCheck your system clock]) 1075abb0f93cSkardelfi 1076*b76cdf5cSchristosAC_MSG_RESULT([yes]) 1077*b76cdf5cSchristos# If we didn't sleep, we still need to ensure time stamps of config.status and 1078*b76cdf5cSchristos# generated files are strictly newer. 1079*b76cdf5cSchristosam_sleep_pid= 1080*b76cdf5cSchristosif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1081*b76cdf5cSchristos ( sleep 1 ) & 1082*b76cdf5cSchristos am_sleep_pid=$! 1083*b76cdf5cSchristosfi 1084*b76cdf5cSchristosAC_CONFIG_COMMANDS_PRE( 1085*b76cdf5cSchristos [AC_MSG_CHECKING([that generated files are newer than configure]) 1086*b76cdf5cSchristos if test -n "$am_sleep_pid"; then 1087*b76cdf5cSchristos # Hide warnings about reused PIDs. 1088*b76cdf5cSchristos wait $am_sleep_pid 2>/dev/null 1089*b76cdf5cSchristos fi 1090*b76cdf5cSchristos AC_MSG_RESULT([done])]) 1091*b76cdf5cSchristosrm -f conftest.file 1092*b76cdf5cSchristos]) 1093abb0f93cSkardel 1094*b76cdf5cSchristos# Copyright (C) 2009-2014 Free Software Foundation, Inc. 10952b3787f6Schristos# 10962b3787f6Schristos# This file is free software; the Free Software Foundation 10972b3787f6Schristos# gives unlimited permission to copy and/or distribute it, 10982b3787f6Schristos# with or without modifications, as long as this notice is preserved. 10992b3787f6Schristos 11002b3787f6Schristos# AM_SILENT_RULES([DEFAULT]) 11012b3787f6Schristos# -------------------------- 11022b3787f6Schristos# Enable less verbose build rules; with the default set to DEFAULT 1103*b76cdf5cSchristos# ("yes" being less verbose, "no" or empty being verbose). 11042b3787f6SchristosAC_DEFUN([AM_SILENT_RULES], 1105*b76cdf5cSchristos[AC_ARG_ENABLE([silent-rules], [dnl 1106*b76cdf5cSchristosAS_HELP_STRING( 1107*b76cdf5cSchristos [--enable-silent-rules], 1108*b76cdf5cSchristos [less verbose build output (undo: "make V=1")]) 1109*b76cdf5cSchristosAS_HELP_STRING( 1110*b76cdf5cSchristos [--disable-silent-rules], 1111*b76cdf5cSchristos [verbose build output (undo: "make V=0")])dnl 1112*b76cdf5cSchristos]) 1113*b76cdf5cSchristoscase $enable_silent_rules in @%:@ ((( 11142b3787f6Schristos yes) AM_DEFAULT_VERBOSITY=0;; 11152b3787f6Schristos no) AM_DEFAULT_VERBOSITY=1;; 11162b3787f6Schristos *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11172b3787f6Schristosesac 1118*b76cdf5cSchristosdnl 1119*b76cdf5cSchristosdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1120*b76cdf5cSchristosdnl do not support nested variable expansions. 1121*b76cdf5cSchristosdnl See automake bug#9928 and bug#10237. 1122*b76cdf5cSchristosam_make=${MAKE-make} 1123*b76cdf5cSchristosAC_CACHE_CHECK([whether $am_make supports nested variables], 1124*b76cdf5cSchristos [am_cv_make_support_nested_variables], 1125*b76cdf5cSchristos [if AS_ECHO([['TRUE=$(BAR$(V)) 1126*b76cdf5cSchristosBAR0=false 1127*b76cdf5cSchristosBAR1=true 1128*b76cdf5cSchristosV=1 1129*b76cdf5cSchristosam__doit: 1130*b76cdf5cSchristos @$(TRUE) 1131*b76cdf5cSchristos.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1132*b76cdf5cSchristos am_cv_make_support_nested_variables=yes 1133*b76cdf5cSchristoselse 1134*b76cdf5cSchristos am_cv_make_support_nested_variables=no 1135*b76cdf5cSchristosfi]) 1136*b76cdf5cSchristosif test $am_cv_make_support_nested_variables = yes; then 1137*b76cdf5cSchristos dnl Using '$V' instead of '$(V)' breaks IRIX make. 1138*b76cdf5cSchristos AM_V='$(V)' 1139*b76cdf5cSchristos AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1140*b76cdf5cSchristoselse 1141*b76cdf5cSchristos AM_V=$AM_DEFAULT_VERBOSITY 1142*b76cdf5cSchristos AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1143*b76cdf5cSchristosfi 1144*b76cdf5cSchristosAC_SUBST([AM_V])dnl 1145*b76cdf5cSchristosAM_SUBST_NOTMAKE([AM_V])dnl 1146*b76cdf5cSchristosAC_SUBST([AM_DEFAULT_V])dnl 1147*b76cdf5cSchristosAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11482b3787f6SchristosAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11492b3787f6SchristosAM_BACKSLASH='\' 11502b3787f6SchristosAC_SUBST([AM_BACKSLASH])dnl 11512b3787f6Schristos_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11522b3787f6Schristos]) 11532b3787f6Schristos 1154*b76cdf5cSchristos# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1155abb0f93cSkardel# 1156abb0f93cSkardel# This file is free software; the Free Software Foundation 1157abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 1158abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 1159abb0f93cSkardel 1160abb0f93cSkardel# AM_PROG_INSTALL_STRIP 1161abb0f93cSkardel# --------------------- 1162*b76cdf5cSchristos# One issue with vendor 'install' (even GNU) is that you can't 1163abb0f93cSkardel# specify the program used to strip binaries. This is especially 1164abb0f93cSkardel# annoying in cross-compiling environments, where the build's strip 1165abb0f93cSkardel# is unlikely to handle the host's binaries. 1166abb0f93cSkardel# Fortunately install-sh will honor a STRIPPROG variable, so we 1167*b76cdf5cSchristos# always use install-sh in "make install-strip", and initialize 1168abb0f93cSkardel# STRIPPROG with the value of the STRIP variable (set by the user). 1169abb0f93cSkardelAC_DEFUN([AM_PROG_INSTALL_STRIP], 1170abb0f93cSkardel[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1171*b76cdf5cSchristos# Installed binaries are usually stripped using 'strip' when the user 1172*b76cdf5cSchristos# run "make install-strip". However 'strip' might not be the right 1173abb0f93cSkardel# tool to use in cross-compilation environments, therefore Automake 1174*b76cdf5cSchristos# will honor the 'STRIP' environment variable to overrule this program. 1175*b76cdf5cSchristosdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1176abb0f93cSkardelif test "$cross_compiling" != no; then 1177abb0f93cSkardel AC_CHECK_TOOL([STRIP], [strip], :) 1178abb0f93cSkardelfi 1179abb0f93cSkardelINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1180abb0f93cSkardelAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1181abb0f93cSkardel 1182*b76cdf5cSchristos# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1183abb0f93cSkardel# 1184abb0f93cSkardel# This file is free software; the Free Software Foundation 1185abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 1186abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 1187abb0f93cSkardel 1188abb0f93cSkardel# _AM_SUBST_NOTMAKE(VARIABLE) 1189abb0f93cSkardel# --------------------------- 1190abb0f93cSkardel# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1191abb0f93cSkardel# This macro is traced by Automake. 1192abb0f93cSkardelAC_DEFUN([_AM_SUBST_NOTMAKE]) 1193abb0f93cSkardel 1194abb0f93cSkardel# AM_SUBST_NOTMAKE(VARIABLE) 1195*b76cdf5cSchristos# -------------------------- 1196abb0f93cSkardel# Public sister of _AM_SUBST_NOTMAKE. 1197abb0f93cSkardelAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1198abb0f93cSkardel 1199abb0f93cSkardel# Check how to create a tarball. -*- Autoconf -*- 1200abb0f93cSkardel 1201*b76cdf5cSchristos# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1202abb0f93cSkardel# 1203abb0f93cSkardel# This file is free software; the Free Software Foundation 1204abb0f93cSkardel# gives unlimited permission to copy and/or distribute it, 1205abb0f93cSkardel# with or without modifications, as long as this notice is preserved. 1206abb0f93cSkardel 1207abb0f93cSkardel# _AM_PROG_TAR(FORMAT) 1208abb0f93cSkardel# -------------------- 1209abb0f93cSkardel# Check how to create a tarball in format FORMAT. 1210*b76cdf5cSchristos# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1211abb0f93cSkardel# 1212abb0f93cSkardel# Substitute a variable $(am__tar) that is a command 1213abb0f93cSkardel# writing to stdout a FORMAT-tarball containing the directory 1214abb0f93cSkardel# $tardir. 1215abb0f93cSkardel# tardir=directory && $(am__tar) > result.tar 1216abb0f93cSkardel# 1217abb0f93cSkardel# Substitute a variable $(am__untar) that extract such 1218abb0f93cSkardel# a tarball read from stdin. 1219abb0f93cSkardel# $(am__untar) < result.tar 1220*b76cdf5cSchristos# 1221abb0f93cSkardelAC_DEFUN([_AM_PROG_TAR], 1222*b76cdf5cSchristos[# Always define AMTAR for backward compatibility. Yes, it's still used 1223*b76cdf5cSchristos# in the wild :-( We should find a proper way to deprecate it ... 1224*b76cdf5cSchristosAC_SUBST([AMTAR], ['$${TAR-tar}']) 1225*b76cdf5cSchristos 1226*b76cdf5cSchristos# We'll loop over all known methods to create a tar archive until one works. 1227abb0f93cSkardel_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1228*b76cdf5cSchristos 1229*b76cdf5cSchristosm4_if([$1], [v7], 1230*b76cdf5cSchristos [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1231*b76cdf5cSchristos 1232*b76cdf5cSchristos [m4_case([$1], 1233*b76cdf5cSchristos [ustar], 1234*b76cdf5cSchristos [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1235*b76cdf5cSchristos # There is notably a 21 bits limit for the UID and the GID. In fact, 1236*b76cdf5cSchristos # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1237*b76cdf5cSchristos # and bug#13588). 1238*b76cdf5cSchristos am_max_uid=2097151 # 2^21 - 1 1239*b76cdf5cSchristos am_max_gid=$am_max_uid 1240*b76cdf5cSchristos # The $UID and $GID variables are not portable, so we need to resort 1241*b76cdf5cSchristos # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1242*b76cdf5cSchristos # below are definitely unexpected, so allow the users to see them 1243*b76cdf5cSchristos # (that is, avoid stderr redirection). 1244*b76cdf5cSchristos am_uid=`id -u || echo unknown` 1245*b76cdf5cSchristos am_gid=`id -g || echo unknown` 1246*b76cdf5cSchristos AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1247*b76cdf5cSchristos if test $am_uid -le $am_max_uid; then 1248*b76cdf5cSchristos AC_MSG_RESULT([yes]) 1249*b76cdf5cSchristos else 1250*b76cdf5cSchristos AC_MSG_RESULT([no]) 1251*b76cdf5cSchristos _am_tools=none 1252*b76cdf5cSchristos fi 1253*b76cdf5cSchristos AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1254*b76cdf5cSchristos if test $am_gid -le $am_max_gid; then 1255*b76cdf5cSchristos AC_MSG_RESULT([yes]) 1256*b76cdf5cSchristos else 1257*b76cdf5cSchristos AC_MSG_RESULT([no]) 1258*b76cdf5cSchristos _am_tools=none 1259*b76cdf5cSchristos fi], 1260*b76cdf5cSchristos 1261*b76cdf5cSchristos [pax], 1262*b76cdf5cSchristos [], 1263*b76cdf5cSchristos 1264*b76cdf5cSchristos [m4_fatal([Unknown tar format])]) 1265*b76cdf5cSchristos 1266*b76cdf5cSchristos AC_MSG_CHECKING([how to create a $1 tar archive]) 1267*b76cdf5cSchristos 1268*b76cdf5cSchristos # Go ahead even if we have the value already cached. We do so because we 1269*b76cdf5cSchristos # need to set the values for the 'am__tar' and 'am__untar' variables. 1270abb0f93cSkardel _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1271*b76cdf5cSchristos 1272*b76cdf5cSchristos for _am_tool in $_am_tools; do 1273abb0f93cSkardel case $_am_tool in 1274abb0f93cSkardel gnutar) 1275*b76cdf5cSchristos for _am_tar in tar gnutar gtar; do 1276abb0f93cSkardel AM_RUN_LOG([$_am_tar --version]) && break 1277abb0f93cSkardel done 1278abb0f93cSkardel am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1279abb0f93cSkardel am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1280abb0f93cSkardel am__untar="$_am_tar -xf -" 1281abb0f93cSkardel ;; 1282abb0f93cSkardel plaintar) 1283abb0f93cSkardel # Must skip GNU tar: if it does not support --format= it doesn't create 1284abb0f93cSkardel # ustar tarball either. 1285abb0f93cSkardel (tar --version) >/dev/null 2>&1 && continue 1286abb0f93cSkardel am__tar='tar chf - "$$tardir"' 1287abb0f93cSkardel am__tar_='tar chf - "$tardir"' 1288abb0f93cSkardel am__untar='tar xf -' 1289abb0f93cSkardel ;; 1290abb0f93cSkardel pax) 1291abb0f93cSkardel am__tar='pax -L -x $1 -w "$$tardir"' 1292abb0f93cSkardel am__tar_='pax -L -x $1 -w "$tardir"' 1293abb0f93cSkardel am__untar='pax -r' 1294abb0f93cSkardel ;; 1295abb0f93cSkardel cpio) 1296abb0f93cSkardel am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1297abb0f93cSkardel am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1298abb0f93cSkardel am__untar='cpio -i -H $1 -d' 1299abb0f93cSkardel ;; 1300abb0f93cSkardel none) 1301abb0f93cSkardel am__tar=false 1302abb0f93cSkardel am__tar_=false 1303abb0f93cSkardel am__untar=false 1304abb0f93cSkardel ;; 1305abb0f93cSkardel esac 1306abb0f93cSkardel 1307abb0f93cSkardel # If the value was cached, stop now. We just wanted to have am__tar 1308abb0f93cSkardel # and am__untar set. 1309abb0f93cSkardel test -n "${am_cv_prog_tar_$1}" && break 1310abb0f93cSkardel 1311*b76cdf5cSchristos # tar/untar a dummy directory, and stop if the command works. 1312abb0f93cSkardel rm -rf conftest.dir 1313abb0f93cSkardel mkdir conftest.dir 1314abb0f93cSkardel echo GrepMe > conftest.dir/file 1315abb0f93cSkardel AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1316abb0f93cSkardel rm -rf conftest.dir 1317abb0f93cSkardel if test -s conftest.tar; then 1318abb0f93cSkardel AM_RUN_LOG([$am__untar <conftest.tar]) 1319*b76cdf5cSchristos AM_RUN_LOG([cat conftest.dir/file]) 1320abb0f93cSkardel grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1321abb0f93cSkardel fi 1322abb0f93cSkardel done 1323abb0f93cSkardel rm -rf conftest.dir 1324abb0f93cSkardel 1325abb0f93cSkardel AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1326abb0f93cSkardel AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1327*b76cdf5cSchristos 1328abb0f93cSkardelAC_SUBST([am__tar]) 1329abb0f93cSkardelAC_SUBST([am__untar]) 1330abb0f93cSkardel]) # _AM_PROG_TAR 1331abb0f93cSkardel 13324305584aSkardelm4_include([sntp/libopts/m4/libopts.m4]) 13331b6f2cd4Schristosm4_include([sntp/libopts/m4/stdnoreturn.m4]) 133420ef19a6Schristosm4_include([sntp/m4/ax_c99_struct_init.m4]) 13352b3787f6Schristosm4_include([sntp/m4/define_dir.m4]) 13362b3787f6Schristosm4_include([sntp/m4/hms_search_lib.m4]) 13372b3787f6Schristosm4_include([sntp/m4/libtool.m4]) 13382b3787f6Schristosm4_include([sntp/m4/ltoptions.m4]) 13392b3787f6Schristosm4_include([sntp/m4/ltsugar.m4]) 13402b3787f6Schristosm4_include([sntp/m4/ltversion.m4]) 13412b3787f6Schristosm4_include([sntp/m4/lt~obsolete.m4]) 13422b3787f6Schristosm4_include([sntp/m4/ntp_cacheversion.m4]) 13432b3787f6Schristosm4_include([sntp/m4/ntp_compiler.m4]) 13442b3787f6Schristosm4_include([sntp/m4/ntp_crosscompile.m4]) 13451b6f2cd4Schristosm4_include([sntp/m4/ntp_crypto_rand.m4]) 13462b3787f6Schristosm4_include([sntp/m4/ntp_debug.m4]) 13472b3787f6Schristosm4_include([sntp/m4/ntp_dir_sep.m4]) 13482b3787f6Schristosm4_include([sntp/m4/ntp_facilitynames.m4]) 13492b3787f6Schristosm4_include([sntp/m4/ntp_googletest.m4]) 13502b3787f6Schristosm4_include([sntp/m4/ntp_ipv6.m4]) 13512b3787f6Schristosm4_include([sntp/m4/ntp_lib_m.m4]) 13522b3787f6Schristosm4_include([sntp/m4/ntp_libevent.m4]) 13532b3787f6Schristosm4_include([sntp/m4/ntp_libntp.m4]) 13542b3787f6Schristosm4_include([sntp/m4/ntp_lineeditlibs.m4]) 13552b3787f6Schristosm4_include([sntp/m4/ntp_locinfo.m4]) 13562b3787f6Schristosm4_include([sntp/m4/ntp_openssl.m4]) 13572b3787f6Schristosm4_include([sntp/m4/ntp_pkg_config.m4]) 13582b3787f6Schristosm4_include([sntp/m4/ntp_prog_cc.m4]) 13592b3787f6Schristosm4_include([sntp/m4/ntp_rlimit.m4]) 13602b3787f6Schristosm4_include([sntp/m4/ntp_sntp.m4]) 1361*b76cdf5cSchristosm4_include([sntp/m4/ntp_unitytest.m4]) 13622b3787f6Schristosm4_include([sntp/m4/ntp_ver_suffix.m4]) 13632b3787f6Schristosm4_include([sntp/m4/ntp_vpathhack.m4]) 136420ef19a6Schristosm4_include([sntp/m4/openldap-thread-check.m4]) 136520ef19a6Schristosm4_include([sntp/m4/openldap.m4]) 13662b3787f6Schristosm4_include([sntp/m4/os_cflags.m4]) 13672b3787f6Schristosm4_include([sntp/m4/snprintf.m4]) 1368