aclocal.m4 revision 267897
1191668Sjamie# generated automatically by aclocal 1.14 -*- Autoconf -*- 2191668Sjamie 3234712Sjamie# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4191668Sjamie 5191668Sjamie# This file is free software; the Free Software Foundation 6191668Sjamie# gives unlimited permission to copy and/or distribute it, 7191668Sjamie# with or without modifications, as long as this notice is preserved. 8191668Sjamie 9191668Sjamie# This program is distributed in the hope that it will be useful, 10191668Sjamie# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11191668Sjamie# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12191668Sjamie# PARTICULAR PURPOSE. 13191668Sjamie 14191668Sjamiem4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15191668Sjamiem4_ifndef([AC_AUTOCONF_VERSION], 16191668Sjamie [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17191668Sjamiem4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18191668Sjamie[m4_warning([this file was generated for autoconf 2.69. 19191668SjamieYou have another version of autoconf. It may work, but is not guaranteed to. 20191668SjamieIf you have problems, you may need to regenerate the build system entirely. 21191668SjamieTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22191668Sjamie 23191668Sjamie# visibility.m4 serial 5 (gettext-0.18.2) 24191668Sjamiednl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc. 25191668Sjamiednl This file is free software; the Free Software Foundation 2646432Sphkdnl gives unlimited permission to copy and/or distribute it, 2746432Sphkdnl with or without modifications, as long as this notice is preserved. 28117280Scharnier 29117280Scharnierdnl From Bruno Haible. 30117280Scharnier 31234712Sjamiednl Tests whether the compiler supports the command-line option 32234712Sjamiednl -fvisibility=hidden and the function and variable attributes 33185435Sbzdnl __attribute__((__visibility__("hidden"))) and 34158428Smatteodnl __attribute__((__visibility__("default"))). 3578723Sdddnl Does *not* test for __visibility__("protected") - which has tricky 36192896Sjamiednl semantics (see the 'vismain' test in glibc) and does not exist e.g. on 3746155Sphkdnl Mac OS X. 3846155Sphkdnl Does *not* test for __visibility__("internal") - which has processor 3978723Sdddnl dependent semantics. 40129848Smaximdnl Does *not* test for #pragma GCC visibility push(hidden) - which is 41234712Sjamiednl "really only recommended for legacy code". 4278723Sdddnl Set the variable CFLAG_VISIBILITY. 4378723Sdddnl Defines and sets the variable HAVE_VISIBILITY. 4478723Sdd 4578723SddAC_DEFUN([gl_VISIBILITY], 4678723Sdd[ 47234712Sjamie AC_REQUIRE([AC_PROG_CC]) 48192896Sjamie CFLAG_VISIBILITY= 49234712Sjamie HAVE_VISIBILITY=0 50185435Sbz if test -n "$GCC"; then 51234712Sjamie dnl First, check whether -Werror can be added to the command line, or 52234712Sjamie dnl whether it leads to an error because of some other option that the 53234712Sjamie dnl user has put into $CC $CFLAGS $CPPFLAGS. 54234712Sjamie AC_MSG_CHECKING([whether the -Werror option is usable]) 55234712Sjamie AC_CACHE_VAL([gl_cv_cc_vis_werror], [ 56234712Sjamie gl_save_CFLAGS="$CFLAGS" 57234712Sjamie CFLAGS="$CFLAGS -Werror" 58236198Sjamie AC_COMPILE_IFELSE( 59234712Sjamie [AC_LANG_PROGRAM([[]], [[]])], 60234712Sjamie [gl_cv_cc_vis_werror=yes], 61234712Sjamie [gl_cv_cc_vis_werror=no]) 62234712Sjamie CFLAGS="$gl_save_CFLAGS"]) 63234712Sjamie AC_MSG_RESULT([$gl_cv_cc_vis_werror]) 64234712Sjamie dnl Now check whether visibility declarations are supported. 65234712Sjamie AC_MSG_CHECKING([for simple visibility declarations]) 66234712Sjamie AC_CACHE_VAL([gl_cv_cc_visibility], [ 67234712Sjamie gl_save_CFLAGS="$CFLAGS" 68234712Sjamie CFLAGS="$CFLAGS -fvisibility=hidden" 69234712Sjamie dnl We use the option -Werror and a function dummyfunc, because on some 70234712Sjamie dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning 71234712Sjamie dnl "visibility attribute not supported in this configuration; ignored" 72192896Sjamie dnl at the first function definition in every compilation unit, and we 73192896Sjamie dnl don't want to use the option in this case. 74185435Sbz if test $gl_cv_cc_vis_werror = yes; then 75234712Sjamie CFLAGS="$CFLAGS -Werror" 76234712Sjamie fi 77234712Sjamie AC_COMPILE_IFELSE( 78234712Sjamie [AC_LANG_PROGRAM( 79234712Sjamie [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; 80234712Sjamie extern __attribute__((__visibility__("default"))) int exportedvar; 81234712Sjamie extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 82193929Sjamie extern __attribute__((__visibility__("default"))) int exportedfunc (void); 83193929Sjamie void dummyfunc (void) {} 84234712Sjamie ]], 85234988Sjamie [[]])], 86234712Sjamie [gl_cv_cc_visibility=yes], 87234712Sjamie [gl_cv_cc_visibility=no]) 88234712Sjamie CFLAGS="$gl_save_CFLAGS"]) 89234712Sjamie AC_MSG_RESULT([$gl_cv_cc_visibility]) 90234712Sjamie if test $gl_cv_cc_visibility = yes; then 91234712Sjamie CFLAG_VISIBILITY="-fvisibility=hidden" 92234712Sjamie HAVE_VISIBILITY=1 93234712Sjamie fi 94234712Sjamie fi 95256387Shrs AC_SUBST([CFLAG_VISIBILITY]) 96278484Sjamie AC_SUBST([HAVE_VISIBILITY]) 97234712Sjamie AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], 98234712Sjamie [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) 99234712Sjamie]) 100234712Sjamie 101234712Sjamie# Copyright (C) 2002-2013 Free Software Foundation, Inc. 102234712Sjamie# 103234988Sjamie# This file is free software; the Free Software Foundation 104234712Sjamie# gives unlimited permission to copy and/or distribute it, 105192896Sjamie# with or without modifications, as long as this notice is preserved. 106234712Sjamie 107234988Sjamie# AM_AUTOMAKE_VERSION(VERSION) 108234712Sjamie# ---------------------------- 109234712Sjamie# Automake X.Y traces this macro to ensure aclocal.m4 has been 110234712Sjamie# generated from the m4 files accompanying Automake X.Y. 111234712Sjamie# (This private macro should not be called outside this file.) 112234712SjamieAC_DEFUN([AM_AUTOMAKE_VERSION], 113278484Sjamie[am__api_version='1.14' 114256387Shrsdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 115234712Sjamiednl require some minimum version. Point them to the right macro. 116234712Sjamiem4_if([$1], [1.14], [], 117234712Sjamie [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 118234712Sjamie]) 119234712Sjamie 120234712Sjamie# _AM_AUTOCONF_VERSION(VERSION) 121234712Sjamie# ----------------------------- 122234712Sjamie# aclocal traces this macro to find the Autoconf version. 123234712Sjamie# This is a private macro too. Using m4_define simplifies 124234988Sjamie# the logic in aclocal, which can simply ignore this definition. 125234712Sjamiem4_define([_AM_AUTOCONF_VERSION], []) 126129848Smaxim 12746155Sphk# AM_SET_CURRENT_AUTOMAKE_VERSION 12846155Sphk# ------------------------------- 12946155Sphk# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 130234712Sjamie# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 131234712SjamieAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 132234712Sjamie[AM_AUTOMAKE_VERSION([1.14])dnl 133234712Sjamiem4_ifndef([AC_AUTOCONF_VERSION], 134193929Sjamie [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 135234712Sjamie_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 136234712Sjamie 137236198Sjamie# AM_AUX_DIR_EXPAND -*- Autoconf -*- 138194869Sjamie 139234712Sjamie# Copyright (C) 2001-2013 Free Software Foundation, Inc. 140234712Sjamie# 141234712Sjamie# This file is free software; the Free Software Foundation 142234712Sjamie# gives unlimited permission to copy and/or distribute it, 143234712Sjamie# with or without modifications, as long as this notice is preserved. 144234712Sjamie 14546155Sphk# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 146234712Sjamie# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 147236198Sjamie# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 148234712Sjamie# 149234712Sjamie# Of course, Automake must honor this variable whenever it calls a 150234712Sjamie# tool from the auxiliary directory. The problem is that $srcdir (and 151112705Smaxim# therefore $ac_aux_dir as well) can be either absolute or relative, 152237697Smaxim# depending on how configure is run. This is pretty annoying, since 153112705Smaxim# it makes $ac_aux_dir quite unusable in subdirectories: in the top 154234712Sjamie# source directory, any form will work fine, but in subdirectories a 155234712Sjamie# relative path needs to be adjusted first. 156234712Sjamie# 157192896Sjamie# $ac_aux_dir/missing 158234712Sjamie# fails when called from a subdirectory if $ac_aux_dir is relative 159192896Sjamie# $top_srcdir/$ac_aux_dir/missing 160234712Sjamie# fails if $ac_aux_dir is absolute, 161234712Sjamie# fails when called from a subdirectory in a VPATH build with 162234712Sjamie# a relative $ac_aux_dir 163185435Sbz# 164234712Sjamie# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 165234712Sjamie# are both prefixed by $srcdir. In an in-source build this is usually 166234712Sjamie# harmless because $srcdir is '.', but things will broke when you 167234712Sjamie# start a VPATH build or use an absolute $srcdir. 168185435Sbz# 169113277Smike# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 170113277Smike# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 171234712Sjamie# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 172113277Smike# and then we would define $MISSING as 173153056Sphilip# MISSING="\${SHELL} $am_aux_dir/missing" 174153056Sphilip# This will work as long as MISSING is not called from configure, because 175153056Sphilip# unfortunately $(top_srcdir) has no meaning in configure. 176234712Sjamie# However there are other variables, like CC, which are often used in 177234712Sjamie# configure, and could therefore not use this "fixed" $ac_aux_dir. 178234712Sjamie# 179234712Sjamie# Another solution, used here, is to always expand $ac_aux_dir to an 180234712Sjamie# absolute PATH. The drawback is that using absolute paths prevent a 181234712Sjamie# configured tree to be moved without reconfiguration. 182234712Sjamie 183185435SbzAC_DEFUN([AM_AUX_DIR_EXPAND], 184234712Sjamie[dnl Rely on autoconf to set up CDPATH properly. 185234712SjamieAC_PREREQ([2.50])dnl 186185435Sbz# expand $ac_aux_dir to an absolute path 187234712Sjamieam_aux_dir=`cd $ac_aux_dir && pwd` 188234712Sjamie]) 189234712Sjamie 190234712Sjamie# AM_CONDITIONAL -*- Autoconf -*- 191234712Sjamie 192234712Sjamie# Copyright (C) 1997-2013 Free Software Foundation, Inc. 193234712Sjamie# 194234712Sjamie# This file is free software; the Free Software Foundation 195234712Sjamie# gives unlimited permission to copy and/or distribute it, 196234712Sjamie# with or without modifications, as long as this notice is preserved. 197234712Sjamie 198234712Sjamie# AM_CONDITIONAL(NAME, SHELL-CONDITION) 199234712Sjamie# ------------------------------------- 200234712Sjamie# Define a conditional. 201234712SjamieAC_DEFUN([AM_CONDITIONAL], 202158428Smatteo[AC_PREREQ([2.52])dnl 203234712Sjamie m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 204234712Sjamie [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 205158428SmatteoAC_SUBST([$1_TRUE])dnl 206112705SmaximAC_SUBST([$1_FALSE])dnl 207234712Sjamie_AM_SUBST_NOTMAKE([$1_TRUE])dnl 208234712Sjamie_AM_SUBST_NOTMAKE([$1_FALSE])dnl 209234712Sjamiem4_define([_AM_COND_VALUE_$1], [$2])dnl 210112705Smaximif $2; then 211129848Smaxim $1_TRUE= 212234712Sjamie $1_FALSE='#' 213234712Sjamieelse 214234712Sjamie $1_TRUE='#' 215234712Sjamie $1_FALSE= 216129848Smaximfi 217234712SjamieAC_CONFIG_COMMANDS_PRE( 218234712Sjamie[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 219133743Smaxim AC_MSG_ERROR([[conditional "$1" was never defined. 220112705SmaximUsually this means the macro was only invoked conditionally.]]) 221112705Smaximfi])]) 222112705Smaxim 223113277Smike# Copyright (C) 1999-2013 Free Software Foundation, Inc. 224112705Smaxim# 225112705Smaxim# This file is free software; the Free Software Foundation 226234712Sjamie# gives unlimited permission to copy and/or distribute it, 227234712Sjamie# with or without modifications, as long as this notice is preserved. 228234712Sjamie 229234712Sjamie 230234712Sjamie# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 231234712Sjamie# written in clear, in which case automake, when reading aclocal.m4, 232192896Sjamie# will think it sees a *use*, and therefore will trigger all it's 233234712Sjamie# C support machinery. Also note that it means that autoscan, seeing 234234712Sjamie# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 235234712Sjamie 236234712Sjamie 237234712Sjamie# _AM_DEPENDENCIES(NAME) 238234712Sjamie# ---------------------- 239234712Sjamie# See how the compiler implements dependency checking. 240234712Sjamie# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 241234712Sjamie# We try a few techniques and use that to set a single cache variable. 242234712Sjamie# 243234712Sjamie# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 244234712Sjamie# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 245234712Sjamie# dependency, and given that the user is not expected to run this macro, 246234712Sjamie# just rely on AC_PROG_CC. 247234712SjamieAC_DEFUN([_AM_DEPENDENCIES], 248234712Sjamie[AC_REQUIRE([AM_SET_DEPDIR])dnl 249234712SjamieAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 250234712SjamieAC_REQUIRE([AM_MAKE_INCLUDE])dnl 251234712SjamieAC_REQUIRE([AM_DEP_TRACK])dnl 252222465Sbz 253234712Sjamiem4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 254234712Sjamie [$1], [CXX], [depcc="$CXX" am_compiler_list=], 255192896Sjamie [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 256192896Sjamie [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 257192896Sjamie [$1], [UPC], [depcc="$UPC" am_compiler_list=], 258192896Sjamie [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 259234712Sjamie [depcc="$$1" am_compiler_list=]) 260234712Sjamie 261234712SjamieAC_CACHE_CHECK([dependency style of $depcc], 262193929Sjamie [am_cv_$1_dependencies_compiler_type], 263193929Sjamie[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 264193929Sjamie # We make a subdir and do the tests there. Otherwise we can end up 265193929Sjamie # making bogus files that we don't know about and never remove. For 266193929Sjamie # instance it was reported that on HP-UX the gcc test will end up 267193929Sjamie # making a dummy file named 'D' -- because '-MD' means "put the output 268234712Sjamie # in D". 269193929Sjamie rm -rf conftest.dir 270234712Sjamie mkdir conftest.dir 271234712Sjamie # Copy depcomp to subdir because otherwise we won't find it if we're 272234712Sjamie # using a relative directory. 273234712Sjamie cp "$am_depcomp" conftest.dir 274234712Sjamie cd conftest.dir 275193929Sjamie # We will build objects and dependencies in a subdirectory because 276193929Sjamie # it helps to detect inapplicable dependency modes. For instance 277193929Sjamie # both Tru64's cc and ICC support -MD to output dependencies as a 278193929Sjamie # side effect of compilation, but ICC will put the dependencies in 279193929Sjamie # the current directory while Tru64 will put them in the object 280193929Sjamie # directory. 281234712Sjamie mkdir sub 282234712Sjamie 283193929Sjamie am_cv_$1_dependencies_compiler_type=none 284193929Sjamie if test "$am_compiler_list" = ""; then 285234712Sjamie am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 286234712Sjamie fi 287234712Sjamie am__universal=false 288234712Sjamie m4_case([$1], [CC], 289234712Sjamie [case " $depcc " in #( 290234712Sjamie *\ -arch\ *\ -arch\ *) am__universal=true ;; 291234712Sjamie esac], 292234712Sjamie [CXX], 293234712Sjamie [case " $depcc " in #( 294234712Sjamie *\ -arch\ *\ -arch\ *) am__universal=true ;; 295234712Sjamie esac]) 296234712Sjamie 297234712Sjamie for depmode in $am_compiler_list; do 298234712Sjamie # Setup a source with many dependencies, because some compilers 299234712Sjamie # like to wrap large dependency lists on column 80 (with \), and 300234712Sjamie # we should not choose a depcomp mode which is confused by this. 301234712Sjamie # 302234712Sjamie # We need to recreate these files for each test, as the compiler may 303234712Sjamie # overwrite some of them when testing with obscure command lines. 304234712Sjamie # This happens at least with the AIX C compiler. 305234712Sjamie : > sub/conftest.c 306234712Sjamie for i in 1 2 3 4 5 6; do 307234712Sjamie echo '#include "conftst'$i'.h"' >> sub/conftest.c 308234712Sjamie # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 309234712Sjamie # Solaris 10 /bin/sh. 310234712Sjamie echo '/* dummy */' > sub/conftst$i.h 311234712Sjamie done 312239602Sjamie echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 313239602Sjamie 314239602Sjamie # We check with '-c' and '-o' for the sake of the "dashmstdout" 315239602Sjamie # mode. It turns out that the SunPro C++ compiler does not properly 316239602Sjamie # handle '-M -o', and we need to detect this. Also, some Intel 317239602Sjamie # versions had trouble with output in subdirs. 318239602Sjamie am__obj=sub/conftest.${OBJEXT-o} 319239602Sjamie am__minus_obj="-o $am__obj" 320239602Sjamie case $depmode in 321239602Sjamie gcc) 322239602Sjamie # This depmode causes a compiler race in universal mode. 323239602Sjamie test "$am__universal" = false || continue 324239602Sjamie ;; 325239602Sjamie nosideeffect) 326239602Sjamie # After this tag, mechanisms are not by side-effect, so they'll 327239602Sjamie # only be used when explicitly requested. 328239602Sjamie if test "x$enable_dependency_tracking" = xyes; then 329239602Sjamie continue 330239602Sjamie else 331239602Sjamie break 332239602Sjamie fi 333239602Sjamie ;; 334239602Sjamie msvc7 | msvc7msys | msvisualcpp | msvcmsys) 335239602Sjamie # This compiler won't grok '-c -o', but also, the minuso test has 336239602Sjamie # not run yet. These depmodes are late enough in the game, and 337239602Sjamie # so weak that their functioning should not be impacted. 338234712Sjamie am__obj=conftest.${OBJEXT-o} 339234712Sjamie am__minus_obj= 340234712Sjamie ;; 341234712Sjamie none) break ;; 342234712Sjamie esac 343234712Sjamie if depmode=$depmode \ 344185435Sbz source=sub/conftest.c object=$am__obj \ 345185435Sbz depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 346234712Sjamie $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 347234712Sjamie >/dev/null 2>conftest.err && 348234712Sjamie grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 349234712Sjamie grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 350234712Sjamie grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 351234712Sjamie ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 352234712Sjamie # icc doesn't choke on unknown options, it will just issue warnings 353234712Sjamie # or remarks (even with -Werror). So we grep stderr for any message 354234712Sjamie # that says an option was ignored or not supported. 355234712Sjamie # When given -MP, icc 7.0 and 7.1 complain thusly: 356153056Sphilip # icc: Command line warning: ignoring option '-M'; no argument required 357234712Sjamie # The diagnosis changed in icc 8.0: 358234712Sjamie # icc: Command line remark: option '-MP' not supported 359234712Sjamie if (grep 'ignoring option' conftest.err || 360234712Sjamie grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 361234712Sjamie am_cv_$1_dependencies_compiler_type=$depmode 362234712Sjamie break 363234712Sjamie fi 364113804Smike fi 365234712Sjamie done 366234712Sjamie 367234712Sjamie cd .. 368234712Sjamie rm -rf conftest.dir 369234712Sjamieelse 370234712Sjamie am_cv_$1_dependencies_compiler_type=none 371234712Sjamiefi 372234712Sjamie]) 373234712SjamieAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 374234712SjamieAM_CONDITIONAL([am__fastdep$1], [ 375234712Sjamie test "x$enable_dependency_tracking" != xno \ 376234712Sjamie && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 377234712Sjamie]) 378234712Sjamie 379234712Sjamie 380234712Sjamie# AM_SET_DEPDIR 381234712Sjamie# ------------- 382234712Sjamie# Choose a directory name for dependency files. 383234712Sjamie# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 384234712SjamieAC_DEFUN([AM_SET_DEPDIR], 385234712Sjamie[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 386234712SjamieAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 387234712Sjamie]) 388234712Sjamie 389234712Sjamie 390234712Sjamie# AM_DEP_TRACK 391234712Sjamie# ------------ 392234712SjamieAC_DEFUN([AM_DEP_TRACK], 393234712Sjamie[AC_ARG_ENABLE([dependency-tracking], [dnl 394234712SjamieAS_HELP_STRING( 395234712Sjamie [--enable-dependency-tracking], 396234712Sjamie [do not reject slow dependency extractors]) 397234712SjamieAS_HELP_STRING( 398234712Sjamie [--disable-dependency-tracking], 399234712Sjamie [speeds up one-time build])]) 400234712Sjamieif test "x$enable_dependency_tracking" != xno; then 401234712Sjamie am_depcomp="$ac_aux_dir/depcomp" 402234712Sjamie AMDEPBACKSLASH='\' 403234712Sjamie am__nodep='_no' 404234712Sjamiefi 405234712SjamieAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 406234712SjamieAC_SUBST([AMDEPBACKSLASH])dnl 407234712Sjamie_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 408234712SjamieAC_SUBST([am__nodep])dnl 409234712Sjamie_AM_SUBST_NOTMAKE([am__nodep])dnl 410234712Sjamie]) 411234712Sjamie 412234712Sjamie# Generate code to set up dependency tracking. -*- Autoconf -*- 413234712Sjamie 414234712Sjamie# Copyright (C) 1999-2013 Free Software Foundation, Inc. 415234712Sjamie# 416234712Sjamie# This file is free software; the Free Software Foundation 417234712Sjamie# gives unlimited permission to copy and/or distribute it, 418234712Sjamie# with or without modifications, as long as this notice is preserved. 419234712Sjamie 420234712Sjamie 421234712Sjamie# _AM_OUTPUT_DEPENDENCY_COMMANDS 422234712Sjamie# ------------------------------ 423234712SjamieAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 424234712Sjamie[{ 425234712Sjamie # Older Autoconf quotes --file arguments for eval, but not when files 426234712Sjamie # are listed without --file. Let's play safe and only enable the eval 427234712Sjamie # if we detect the quoting. 428234712Sjamie case $CONFIG_FILES in 429234712Sjamie *\'*) eval set x "$CONFIG_FILES" ;; 430234712Sjamie *) set x $CONFIG_FILES ;; 431234712Sjamie esac 432234712Sjamie shift 433234712Sjamie for mf 434234712Sjamie do 435192896Sjamie # Strip MF so we end up with the name of the file. 436234712Sjamie mf=`echo "$mf" | sed -e 's/:.*$//'` 437234712Sjamie # Check whether this is an Automake generated Makefile or not. 438234712Sjamie # We used to match only the files named 'Makefile.in', but 439234712Sjamie # some people rename them; so instead we look at the file content. 440234712Sjamie # Grep'ing the first line is not enough: some people post-process 441234712Sjamie # each Makefile.in and add a new line on top of each file to say so. 442234712Sjamie # Grep'ing the whole file is not good either: AIX grep has a line 443234712Sjamie # limit of 2048, but all sed's we know have understand at least 4000. 444234712Sjamie if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 445234712Sjamie dirpart=`AS_DIRNAME("$mf")` 446234712Sjamie else 447234712Sjamie continue 448234712Sjamie fi 449234712Sjamie # Extract the definition of DEPDIR, am__include, and am__quote 450234712Sjamie # from the Makefile without running 'make'. 451234712Sjamie DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 452234712Sjamie test -z "$DEPDIR" && continue 453234712Sjamie am__include=`sed -n 's/^am__include = //p' < "$mf"` 454234712Sjamie test -z "$am__include" && continue 455234712Sjamie am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 456234712Sjamie # Find all dependency output files, they are included files with 457234712Sjamie # $(DEPDIR) in their names. We invoke sed twice because it is the 458234712Sjamie # simplest approach to changing $(DEPDIR) to its actual value in the 459234712Sjamie # expansion. 460234712Sjamie for file in `sed -n " 461234712Sjamie s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 462234712Sjamie sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 463234712Sjamie # Make sure the directory exists. 464234712Sjamie test -f "$dirpart/$file" && continue 465234712Sjamie fdir=`AS_DIRNAME(["$file"])` 466234712Sjamie AS_MKDIR_P([$dirpart/$fdir]) 467234712Sjamie # echo "creating $dirpart/$file" 468234712Sjamie echo '# dummy' > "$dirpart/$file" 469234712Sjamie done 470234712Sjamie done 471234712Sjamie} 472234712Sjamie])# _AM_OUTPUT_DEPENDENCY_COMMANDS 473234712Sjamie 474234712Sjamie 475234712Sjamie# AM_OUTPUT_DEPENDENCY_COMMANDS 476234712Sjamie# ----------------------------- 477256256Shrs# This macro should only be invoked once -- use via AC_REQUIRE. 478256256Shrs# 479256256Shrs# This code is only required when automatic dependency tracking 480256256Shrs# is enabled. FIXME. This creates each '.P' file that we will 481256256Shrs# need in order to bootstrap the dependency handling code. 482256256ShrsAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 483234712Sjamie[AC_CONFIG_COMMANDS([depfiles], 484234712Sjamie [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 485234712Sjamie [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 486234712Sjamie]) 487234712Sjamie 488234712Sjamie# Do all the work for Automake. -*- Autoconf -*- 489234712Sjamie 490234712Sjamie# Copyright (C) 1996-2013 Free Software Foundation, Inc. 491234712Sjamie# 492234712Sjamie# This file is free software; the Free Software Foundation 493234712Sjamie# gives unlimited permission to copy and/or distribute it, 494234712Sjamie# with or without modifications, as long as this notice is preserved. 495234712Sjamie 496234712Sjamie# This macro actually does too much. Some checks are only needed if 497234712Sjamie# your package does certain things. But this isn't really a big deal. 498234712Sjamie 499234712Sjamiednl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 500153056Sphilipm4_define([AC_PROG_CC], 501153056Sphilipm4_defn([AC_PROG_CC]) 502234712Sjamie[_AM_PROG_CC_C_O 503234712Sjamie]) 504234712Sjamie 505234712Sjamie# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 506234712Sjamie# AM_INIT_AUTOMAKE([OPTIONS]) 507234712Sjamie# ----------------------------------------------- 508234712Sjamie# The call with PACKAGE and VERSION arguments is the old style 509234712Sjamie# call (pre autoconf-2.50), which is being phased out. PACKAGE 510234712Sjamie# and VERSION should now be passed to AC_INIT and removed from 511234712Sjamie# the call to AM_INIT_AUTOMAKE. 512234712Sjamie# We support both call styles for the transition. After 513234712Sjamie# the next Automake release, Autoconf can make the AC_INIT 514234712Sjamie# arguments mandatory, and then we can depend on a new Autoconf 515234712Sjamie# release and drop the old call support. 516234712SjamieAC_DEFUN([AM_INIT_AUTOMAKE], 517234712Sjamie[AC_PREREQ([2.65])dnl 518234712Sjamiednl Autoconf wants to disallow AM_ names. We explicitly allow 519234712Sjamiednl the ones we care about. 520234712Sjamiem4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 521234712SjamieAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 522234712SjamieAC_REQUIRE([AC_PROG_INSTALL])dnl 523234712Sjamieif test "`cd $srcdir && pwd`" != "`pwd`"; then 524234712Sjamie # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 525234712Sjamie # is not polluted with repeated "-I." 526234712Sjamie AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 527234712Sjamie # test to see if srcdir already configured 528234712Sjamie if test -f $srcdir/config.status; then 529234712Sjamie AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 530234712Sjamie fi 531234712Sjamiefi 532234712Sjamie 533234712Sjamie# test whether we have cygpath 534234712Sjamieif test -z "$CYGPATH_W"; then 535234712Sjamie if (cygpath --version) >/dev/null 2>/dev/null; then 536234712Sjamie CYGPATH_W='cygpath -w' 537234712Sjamie else 538234712Sjamie CYGPATH_W=echo 539234712Sjamie fi 540234712Sjamiefi 541234712SjamieAC_SUBST([CYGPATH_W]) 542234712Sjamie 543234712Sjamie# Define the identity of the package. 544234712Sjamiednl Distinguish between old-style and new-style calls. 545234712Sjamiem4_ifval([$2], 546234712Sjamie[AC_DIAGNOSE([obsolete], 547234712Sjamie [$0: two- and three-arguments forms are deprecated.]) 548234712Sjamiem4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 549234712Sjamie AC_SUBST([PACKAGE], [$1])dnl 550234712Sjamie AC_SUBST([VERSION], [$2])], 551234712Sjamie[_AM_SET_OPTIONS([$1])dnl 552234712Sjamiednl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 553234712Sjamiem4_if( 554234712Sjamie m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 555234712Sjamie [ok:ok],, 556234712Sjamie [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 557234712Sjamie AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 558234712Sjamie AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 559234712Sjamie 560234712Sjamie_AM_IF_OPTION([no-define],, 561234712Sjamie[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 562234712Sjamie AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 563234712Sjamie 564234712Sjamie# Some tools Automake needs. 565234712SjamieAC_REQUIRE([AM_SANITY_CHECK])dnl 566234712SjamieAC_REQUIRE([AC_ARG_PROGRAM])dnl 567234712SjamieAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 568234712SjamieAM_MISSING_PROG([AUTOCONF], [autoconf]) 569234712SjamieAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 570234712SjamieAM_MISSING_PROG([AUTOHEADER], [autoheader]) 571234712SjamieAM_MISSING_PROG([MAKEINFO], [makeinfo]) 572234712SjamieAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 573234712SjamieAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 574234712SjamieAC_REQUIRE([AC_PROG_MKDIR_P])dnl 575234712Sjamie# For better backward compatibility. To be removed once Automake 1.9.x 576234712Sjamie# dies out for good. For more background, see: 577234712Sjamie# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 578234712Sjamie# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 579234712SjamieAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 580234712Sjamie# We need awk for the "check" target. The system "awk" is bad on 581234712Sjamie# some platforms. 582234712SjamieAC_REQUIRE([AC_PROG_AWK])dnl 583234712SjamieAC_REQUIRE([AC_PROG_MAKE_SET])dnl 584234712SjamieAC_REQUIRE([AM_SET_LEADING_DOT])dnl 585234712Sjamie_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 586234712Sjamie [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 587234712Sjamie [_AM_PROG_TAR([v7])])]) 588234712Sjamie_AM_IF_OPTION([no-dependencies],, 589234712Sjamie[AC_PROVIDE_IFELSE([AC_PROG_CC], 590234712Sjamie [_AM_DEPENDENCIES([CC])], 591234712Sjamie [m4_define([AC_PROG_CC], 592234712Sjamie m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 593234712SjamieAC_PROVIDE_IFELSE([AC_PROG_CXX], 594234712Sjamie [_AM_DEPENDENCIES([CXX])], 595234712Sjamie [m4_define([AC_PROG_CXX], 596234712Sjamie m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 597234712SjamieAC_PROVIDE_IFELSE([AC_PROG_OBJC], 598234712Sjamie [_AM_DEPENDENCIES([OBJC])], 599234712Sjamie [m4_define([AC_PROG_OBJC], 600234712Sjamie m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 601234712SjamieAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 602234712Sjamie [_AM_DEPENDENCIES([OBJCXX])], 603234712Sjamie [m4_define([AC_PROG_OBJCXX], 604234712Sjamie m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 605234712Sjamie]) 606234712SjamieAC_REQUIRE([AM_SILENT_RULES])dnl 607234712Sjamiednl The testsuite driver may need to know about EXEEXT, so add the 608234712Sjamiednl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 609234712Sjamiednl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 610234712SjamieAC_CONFIG_COMMANDS_PRE(dnl 611234712Sjamie[m4_provide_if([_AM_COMPILER_EXEEXT], 612234712Sjamie [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 613234712Sjamie 614234712Sjamie# POSIX will say in a future version that running "rm -f" with no argument 615234712Sjamie# is OK; and we want to be able to make that assumption in our Makefile 616234712Sjamie# recipes. So use an aggressive probe to check that the usage we want is 617234712Sjamie# actually supported "in the wild" to an acceptable degree. 618234712Sjamie# See automake bug#10828. 619234712Sjamie# To make any issue more visible, cause the running configure to be aborted 620234712Sjamie# by default if the 'rm' program in use doesn't match our expectations; the 621234712Sjamie# user can still override this though. 622234712Sjamieif rm -f && rm -fr && rm -rf; then : OK; else 623133743Smaxim cat >&2 <<'END' 624234712SjamieOops! 625234712Sjamie 626234712SjamieYour 'rm' program seems unable to run without file operands specified 627234712Sjamieon the command line, even when the '-f' option is present. This is contrary 628234712Sjamieto the behaviour of most rm programs out there, and not conforming with 629234712Sjamiethe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 630234712Sjamie 631234712SjamiePlease tell bug-automake@gnu.org about your system, including the value 632112705Smaximof your $PATH and any error possibly output before this message. This 633234712Sjamiecan help us improve future automake versions. 634234712Sjamie 635234712SjamieEND 636234712Sjamie if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 637234712Sjamie echo 'Configuration will proceed anyway, since you have set the' >&2 638234712Sjamie echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 639234712Sjamie echo >&2 640234712Sjamie else 641234712Sjamie cat >&2 <<'END' 642234712SjamieAborting the configuration process, to ensure you take notice of the issue. 643234712Sjamie 644234712SjamieYou can download and install GNU coreutils to get an 'rm' implementation 645234712Sjamiethat behaves properly: <http://www.gnu.org/software/coreutils/>. 646133743Smaxim 647234712SjamieIf you want to complete the configuration process using your problematic 648234712Sjamie'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 649234712Sjamieto "yes", and re-run configure. 650234712Sjamie 651234712SjamieEND 652234712Sjamie AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 653234712Sjamie fi 654234712Sjamiefi]) 655234712Sjamie 656234712Sjamiednl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 657234712Sjamiednl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 658234712Sjamiednl mangled by Autoconf and run in a shell conditional statement. 659234712Sjamiem4_define([_AC_COMPILER_EXEEXT], 660234712Sjamiem4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 661234712Sjamie 662234712Sjamie# When config.status generates a header, we must update the stamp-h file. 663234712Sjamie# This file resides in the same directory as the config header 664234712Sjamie# that is generated. The stamp files are numbered to have different names. 665234712Sjamie 666234712Sjamie# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 667234712Sjamie# loop where config.status creates the headers, so we can generate 668234712Sjamie# our stamp files there. 669234712SjamieAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 670234712Sjamie[# Compute $1's index in $config_headers. 671234712Sjamie_am_arg=$1 672234712Sjamie_am_stamp_count=1 673234712Sjamiefor _am_header in $config_headers :; do 674234712Sjamie case $_am_header in 675234712Sjamie $_am_arg | $_am_arg:* ) 676234712Sjamie break ;; 677234712Sjamie * ) 678234712Sjamie _am_stamp_count=`expr $_am_stamp_count + 1` ;; 679234712Sjamie esac 680234712Sjamiedone 681234712Sjamieecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 682234712Sjamie 683234712Sjamie# Copyright (C) 2001-2013 Free Software Foundation, Inc. 684234712Sjamie# 685234712Sjamie# This file is free software; the Free Software Foundation 686234712Sjamie# gives unlimited permission to copy and/or distribute it, 687234712Sjamie# with or without modifications, as long as this notice is preserved. 688234712Sjamie 689234712Sjamie# AM_PROG_INSTALL_SH 690234712Sjamie# ------------------ 691234712Sjamie# Define $install_sh. 692234712SjamieAC_DEFUN([AM_PROG_INSTALL_SH], 693234712Sjamie[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 694234712Sjamieif test x"${install_sh}" != xset; then 695234712Sjamie case $am_aux_dir in 696234712Sjamie *\ * | *\ *) 697234712Sjamie install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 698234712Sjamie *) 699234712Sjamie install_sh="\${SHELL} $am_aux_dir/install-sh" 700234712Sjamie esac 701234712Sjamiefi 702234712SjamieAC_SUBST([install_sh])]) 703234712Sjamie 704234712Sjamie# Copyright (C) 2003-2013 Free Software Foundation, Inc. 705234712Sjamie# 706234712Sjamie# This file is free software; the Free Software Foundation 707234712Sjamie# gives unlimited permission to copy and/or distribute it, 708234712Sjamie# with or without modifications, as long as this notice is preserved. 709234712Sjamie 710234712Sjamie# Check whether the underlying file-system supports filenames 711234712Sjamie# with a leading dot. For instance MS-DOS doesn't. 71246155SphkAC_DEFUN([AM_SET_LEADING_DOT], 713112705Smaxim[rm -rf .tst 2>/dev/null 714234712Sjamiemkdir .tst 2>/dev/null 715234712Sjamieif test -d .tst; then 716234712Sjamie am__leading_dot=. 717112705Smaximelse 718234712Sjamie am__leading_dot=_ 719112705Smaximfi 720234712Sjamiermdir .tst 2>/dev/null 721234712SjamieAC_SUBST([am__leading_dot])]) 722112705Smaxim 723234712Sjamie# Check to see how 'make' treats includes. -*- Autoconf -*- 724234712Sjamie 725234712Sjamie# Copyright (C) 2001-2013 Free Software Foundation, Inc. 726234712Sjamie# 727234712Sjamie# This file is free software; the Free Software Foundation 728234712Sjamie# gives unlimited permission to copy and/or distribute it, 729234712Sjamie# with or without modifications, as long as this notice is preserved. 730234712Sjamie 731234712Sjamie# AM_MAKE_INCLUDE() 732234712Sjamie# ----------------- 733234712Sjamie# Check to see how make treats includes. 734234712SjamieAC_DEFUN([AM_MAKE_INCLUDE], 735234712Sjamie[am_make=${MAKE-make} 736234712Sjamiecat > confinc << 'END' 737234712Sjamieam__doit: 738234712Sjamie @echo this is the am__doit target 739234712Sjamie.PHONY: am__doit 740234712SjamieEND 741234712Sjamie# If we don't find an include directive, just comment out the code. 742234712SjamieAC_MSG_CHECKING([for style of include used by $am_make]) 743234712Sjamieam__include="#" 744234712Sjamieam__quote= 745234712Sjamie_am_result=none 746234712Sjamie# First try GNU make style include. 747234712Sjamieecho "include confinc" > confmf 748234712Sjamie# Ignore all kinds of additional output from 'make'. 749234712Sjamiecase `$am_make -s -f confmf 2> /dev/null` in #( 750234712Sjamie*the\ am__doit\ target*) 751234712Sjamie am__include=include 752234712Sjamie am__quote= 753234712Sjamie _am_result=GNU 754234712Sjamie ;; 755234712Sjamieesac 756234712Sjamie# Now try BSD make style include. 757234712Sjamieif test "$am__include" = "#"; then 758234712Sjamie echo '.include "confinc"' > confmf 759234712Sjamie case `$am_make -s -f confmf 2> /dev/null` in #( 760234712Sjamie *the\ am__doit\ target*) 761234712Sjamie am__include=.include 762192896Sjamie am__quote="\"" 763234712Sjamie _am_result=BSD 764234712Sjamie ;; 765234712Sjamie esac 766234712Sjamiefi 767234712SjamieAC_SUBST([am__include]) 768234712SjamieAC_SUBST([am__quote]) 769234712SjamieAC_MSG_RESULT([$_am_result]) 770234712Sjamierm -f confinc confmf 771234712Sjamie]) 772234712Sjamie 773234712Sjamie# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 774234712Sjamie 775234712Sjamie# Copyright (C) 1997-2013 Free Software Foundation, Inc. 776112705Smaxim# 777185435Sbz# This file is free software; the Free Software Foundation 778234712Sjamie# gives unlimited permission to copy and/or distribute it, 779234712Sjamie# with or without modifications, as long as this notice is preserved. 780234712Sjamie 781234712Sjamie# AM_MISSING_PROG(NAME, PROGRAM) 782234712Sjamie# ------------------------------ 783234712SjamieAC_DEFUN([AM_MISSING_PROG], 784234712Sjamie[AC_REQUIRE([AM_MISSING_HAS_RUN]) 785234712Sjamie$1=${$1-"${am_missing_run}$2"} 786234712SjamieAC_SUBST($1)]) 787234712Sjamie 788234712Sjamie# AM_MISSING_HAS_RUN 789234712Sjamie# ------------------ 790234712Sjamie# Define MISSING if not defined so far and test if it is modern enough. 791234712Sjamie# If it is, set am_missing_run to use it, otherwise, to nothing. 792234712SjamieAC_DEFUN([AM_MISSING_HAS_RUN], 793234712Sjamie[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 794234712SjamieAC_REQUIRE_AUX_FILE([missing])dnl 795234712Sjamieif test x"${MISSING+set}" != xset; then 796234712Sjamie case $am_aux_dir in 797234712Sjamie *\ * | *\ *) 798234712Sjamie MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 799234712Sjamie *) 800234712Sjamie MISSING="\${SHELL} $am_aux_dir/missing" ;; 801234712Sjamie esac 802234712Sjamiefi 803234712Sjamie# Use eval to expand $SHELL 804234712Sjamieif eval "$MISSING --is-lightweight"; then 805234712Sjamie am_missing_run="$MISSING " 806234712Sjamieelse 807234712Sjamie am_missing_run= 808234712Sjamie AC_MSG_WARN(['missing' script is too old or missing]) 809234712Sjamiefi 810234712Sjamie]) 811234712Sjamie 812234712Sjamie# Helper functions for option handling. -*- Autoconf -*- 813234712Sjamie 814234712Sjamie# Copyright (C) 2001-2013 Free Software Foundation, Inc. 815234712Sjamie# 816234712Sjamie# This file is free software; the Free Software Foundation 817234712Sjamie# gives unlimited permission to copy and/or distribute it, 818234712Sjamie# with or without modifications, as long as this notice is preserved. 819234712Sjamie 820234712Sjamie# _AM_MANGLE_OPTION(NAME) 821234712Sjamie# ----------------------- 822234712SjamieAC_DEFUN([_AM_MANGLE_OPTION], 823234712Sjamie[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 824234712Sjamie 825234712Sjamie# _AM_SET_OPTION(NAME) 826234712Sjamie# -------------------- 827234712Sjamie# Set option NAME. Presently that only means defining a flag for this option. 828234712SjamieAC_DEFUN([_AM_SET_OPTION], 829234712Sjamie[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 830234712Sjamie 831234712Sjamie# _AM_SET_OPTIONS(OPTIONS) 832234712Sjamie# ------------------------ 833234712Sjamie# OPTIONS is a space-separated list of Automake options. 834234712SjamieAC_DEFUN([_AM_SET_OPTIONS], 835234712Sjamie[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 836234712Sjamie 837234712Sjamie# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 838234712Sjamie# ------------------------------------------- 839234712Sjamie# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 840234712SjamieAC_DEFUN([_AM_IF_OPTION], 841192896Sjamie[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 842234712Sjamie 843185435Sbz# Copyright (C) 1999-2013 Free Software Foundation, Inc. 844234712Sjamie# 845234712Sjamie# This file is free software; the Free Software Foundation 846234712Sjamie# gives unlimited permission to copy and/or distribute it, 847234712Sjamie# with or without modifications, as long as this notice is preserved. 848192896Sjamie 849234712Sjamie# _AM_PROG_CC_C_O 850234712Sjamie# --------------- 851234712Sjamie# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 852234712Sjamie# to automatically call this. 853234712SjamieAC_DEFUN([_AM_PROG_CC_C_O], 854234712Sjamie[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 855234712SjamieAC_REQUIRE_AUX_FILE([compile])dnl 856234712SjamieAC_LANG_PUSH([C])dnl 857234712SjamieAC_CACHE_CHECK( 858234712Sjamie [whether $CC understands -c and -o together], 859234712Sjamie [am_cv_prog_cc_c_o], 860234712Sjamie [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 861234712Sjamie # Make sure it works both with $CC and with simple cc. 862234712Sjamie # Following AC_PROG_CC_C_O, we do the test twice because some 863234712Sjamie # compilers refuse to overwrite an existing .o file with -o, 864234712Sjamie # though they will create one. 865234712Sjamie am_cv_prog_cc_c_o=yes 866234712Sjamie for am_i in 1 2; do 867192896Sjamie if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 868234712Sjamie && test -f conftest2.$ac_objext; then 869192896Sjamie : OK 870192896Sjamie else 871192896Sjamie am_cv_prog_cc_c_o=no 872234712Sjamie break 873234712Sjamie fi 874192896Sjamie done 875234712Sjamie rm -f core conftest* 876234712Sjamie unset am_i]) 877234712Sjamieif test "$am_cv_prog_cc_c_o" != yes; then 878234712Sjamie # Losing compiler, so override with the script. 879234712Sjamie # FIXME: It is wrong to rewrite CC. 880234712Sjamie # But if we don't then we get into trouble of one sort or another. 881234712Sjamie # A longer-term fix would be to have automake use am__CC in this case, 882234712Sjamie # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 883234712Sjamie CC="$am_aux_dir/compile $CC" 884234712Sjamiefi 885234712SjamieAC_LANG_POP([C])]) 886234712Sjamie 887234712Sjamie# For backward compatibility. 888234712SjamieAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 889234712Sjamie 890234712Sjamie# Copyright (C) 2001-2013 Free Software Foundation, Inc. 891234712Sjamie# 892234712Sjamie# This file is free software; the Free Software Foundation 893234712Sjamie# gives unlimited permission to copy and/or distribute it, 894234712Sjamie# with or without modifications, as long as this notice is preserved. 895234712Sjamie 896234712Sjamie# AM_RUN_LOG(COMMAND) 897234712Sjamie# ------------------- 898234712Sjamie# Run COMMAND, save the exit status in ac_status, and log it. 899234712Sjamie# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 900234712SjamieAC_DEFUN([AM_RUN_LOG], 901234712Sjamie[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 902234712Sjamie ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 903234712Sjamie ac_status=$? 904234712Sjamie echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 905234712Sjamie (exit $ac_status); }]) 906234712Sjamie 907234712Sjamie# Check to make sure that the build environment is sane. -*- Autoconf -*- 908234712Sjamie 909234712Sjamie# Copyright (C) 1996-2013 Free Software Foundation, Inc. 910234712Sjamie# 911234712Sjamie# This file is free software; the Free Software Foundation 912234712Sjamie# gives unlimited permission to copy and/or distribute it, 913234712Sjamie# with or without modifications, as long as this notice is preserved. 914234712Sjamie 915234712Sjamie# AM_SANITY_CHECK 916234712Sjamie# --------------- 917234712SjamieAC_DEFUN([AM_SANITY_CHECK], 918234712Sjamie[AC_MSG_CHECKING([whether build environment is sane]) 919234712Sjamie# Reject unsafe characters in $srcdir or the absolute working directory 920234712Sjamie# name. Accept space and tab only in the latter. 921234712Sjamieam_lf=' 922234712Sjamie' 923234712Sjamiecase `pwd` in 924234712Sjamie *[[\\\"\#\$\&\'\`$am_lf]]*) 925234712Sjamie AC_MSG_ERROR([unsafe absolute working directory name]);; 926234712Sjamieesac 927234712Sjamiecase $srcdir in 928234712Sjamie *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 929234712Sjamie AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 930234712Sjamieesac 931234712Sjamie 932234712Sjamie# Do 'set' in a subshell so we don't clobber the current shell's 933222465Sbz# arguments. Must try -L first in case configure is actually a 934234712Sjamie# symlink; some systems play weird games with the mod time of symlinks 935185435Sbz# (eg FreeBSD returns the mod time of the symlink's containing 936234712Sjamie# directory). 937234712Sjamieif ( 938234712Sjamie am_has_slept=no 939234712Sjamie for am_try in 1 2; do 940234712Sjamie echo "timestamp, slept: $am_has_slept" > conftest.file 941185435Sbz set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 942192896Sjamie if test "$[*]" = "X"; then 943185435Sbz # -L didn't work. 944234712Sjamie set X `ls -t "$srcdir/configure" conftest.file` 945185435Sbz fi 946234712Sjamie if test "$[*]" != "X $srcdir/configure conftest.file" \ 947234712Sjamie && test "$[*]" != "X conftest.file $srcdir/configure"; then 948234712Sjamie 949234712Sjamie # If neither matched, then we have a broken ls. This can happen 950234712Sjamie # if, for instance, CONFIG_SHELL is bash and it inherits a 951234712Sjamie # broken ls alias from the environment. This has actually 952234712Sjamie # happened. Such a system could not be considered "sane". 953234712Sjamie AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 954234712Sjamie alias in your environment]) 955234712Sjamie fi 956234712Sjamie if test "$[2]" = conftest.file || test $am_try -eq 2; then 957185435Sbz break 958185435Sbz fi 959234712Sjamie # Just in case. 960234712Sjamie sleep 1 961234712Sjamie am_has_slept=yes 962192896Sjamie done 963234712Sjamie test "$[2]" = conftest.file 964234712Sjamie ) 965234712Sjamiethen 966234712Sjamie # Ok. 967234712Sjamie : 968234712Sjamieelse 969234712Sjamie AC_MSG_ERROR([newly created file is older than distributed files! 970234712SjamieCheck your system clock]) 971234712Sjamiefi 972234712SjamieAC_MSG_RESULT([yes]) 973234712Sjamie# If we didn't sleep, we still need to ensure time stamps of config.status and 974234712Sjamie# generated files are strictly newer. 975234712Sjamieam_sleep_pid= 976234712Sjamieif grep 'slept: no' conftest.file >/dev/null 2>&1; then 977234712Sjamie ( sleep 1 ) & 978234712Sjamie am_sleep_pid=$! 979234712Sjamiefi 980234712SjamieAC_CONFIG_COMMANDS_PRE( 981234712Sjamie [AC_MSG_CHECKING([that generated files are newer than configure]) 982234712Sjamie if test -n "$am_sleep_pid"; then 983234712Sjamie # Hide warnings about reused PIDs. 984192896Sjamie wait $am_sleep_pid 2>/dev/null 985185435Sbz fi 986192896Sjamie AC_MSG_RESULT([done])]) 987192896Sjamierm -f conftest.file 988185435Sbz]) 989234712Sjamie 990234712Sjamie# Copyright (C) 2009-2013 Free Software Foundation, Inc. 991192896Sjamie# 992192896Sjamie# This file is free software; the Free Software Foundation 993192896Sjamie# gives unlimited permission to copy and/or distribute it, 994192896Sjamie# with or without modifications, as long as this notice is preserved. 995192896Sjamie 996192896Sjamie# AM_SILENT_RULES([DEFAULT]) 997192896Sjamie# -------------------------- 998192896Sjamie# Enable less verbose build rules; with the default set to DEFAULT 999192896Sjamie# ("yes" being less verbose, "no" or empty being verbose). 1000185435SbzAC_DEFUN([AM_SILENT_RULES], 1001192896Sjamie[AC_ARG_ENABLE([silent-rules], [dnl 1002192896SjamieAS_HELP_STRING( 1003185435Sbz [--enable-silent-rules], 1004185435Sbz [less verbose build output (undo: "make V=1")]) 1005192896SjamieAS_HELP_STRING( 1006192896Sjamie [--disable-silent-rules], 1007192896Sjamie [verbose build output (undo: "make V=0")])dnl 1008192896Sjamie]) 1009192896Sjamiecase $enable_silent_rules in @%:@ ((( 1010234712Sjamie yes) AM_DEFAULT_VERBOSITY=0;; 1011234712Sjamie no) AM_DEFAULT_VERBOSITY=1;; 1012234712Sjamie *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1013234712Sjamieesac 1014234712Sjamiednl 1015234712Sjamiednl A few 'make' implementations (e.g., NonStop OS and NextStep) 1016234712Sjamiednl do not support nested variable expansions. 1017192896Sjamiednl See automake bug#9928 and bug#10237. 1018185435Sbzam_make=${MAKE-make} 1019AC_CACHE_CHECK([whether $am_make supports nested variables], 1020 [am_cv_make_support_nested_variables], 1021 [if AS_ECHO([['TRUE=$(BAR$(V)) 1022BAR0=false 1023BAR1=true 1024V=1 1025am__doit: 1026 @$(TRUE) 1027.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1028 am_cv_make_support_nested_variables=yes 1029else 1030 am_cv_make_support_nested_variables=no 1031fi]) 1032if test $am_cv_make_support_nested_variables = yes; then 1033 dnl Using '$V' instead of '$(V)' breaks IRIX make. 1034 AM_V='$(V)' 1035 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1036else 1037 AM_V=$AM_DEFAULT_VERBOSITY 1038 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1039fi 1040AC_SUBST([AM_V])dnl 1041AM_SUBST_NOTMAKE([AM_V])dnl 1042AC_SUBST([AM_DEFAULT_V])dnl 1043AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1044AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1045AM_BACKSLASH='\' 1046AC_SUBST([AM_BACKSLASH])dnl 1047_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1048]) 1049 1050# Copyright (C) 2001-2013 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# AM_PROG_INSTALL_STRIP 1057# --------------------- 1058# One issue with vendor 'install' (even GNU) is that you can't 1059# specify the program used to strip binaries. This is especially 1060# annoying in cross-compiling environments, where the build's strip 1061# is unlikely to handle the host's binaries. 1062# Fortunately install-sh will honor a STRIPPROG variable, so we 1063# always use install-sh in "make install-strip", and initialize 1064# STRIPPROG with the value of the STRIP variable (set by the user). 1065AC_DEFUN([AM_PROG_INSTALL_STRIP], 1066[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1067# Installed binaries are usually stripped using 'strip' when the user 1068# run "make install-strip". However 'strip' might not be the right 1069# tool to use in cross-compilation environments, therefore Automake 1070# will honor the 'STRIP' environment variable to overrule this program. 1071dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1072if test "$cross_compiling" != no; then 1073 AC_CHECK_TOOL([STRIP], [strip], :) 1074fi 1075INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1076AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1077 1078# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1079# 1080# This file is free software; the Free Software Foundation 1081# gives unlimited permission to copy and/or distribute it, 1082# with or without modifications, as long as this notice is preserved. 1083 1084# _AM_SUBST_NOTMAKE(VARIABLE) 1085# --------------------------- 1086# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1087# This macro is traced by Automake. 1088AC_DEFUN([_AM_SUBST_NOTMAKE]) 1089 1090# AM_SUBST_NOTMAKE(VARIABLE) 1091# -------------------------- 1092# Public sister of _AM_SUBST_NOTMAKE. 1093AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1094 1095# Check how to create a tarball. -*- Autoconf -*- 1096 1097# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1098# 1099# This file is free software; the Free Software Foundation 1100# gives unlimited permission to copy and/or distribute it, 1101# with or without modifications, as long as this notice is preserved. 1102 1103# _AM_PROG_TAR(FORMAT) 1104# -------------------- 1105# Check how to create a tarball in format FORMAT. 1106# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1107# 1108# Substitute a variable $(am__tar) that is a command 1109# writing to stdout a FORMAT-tarball containing the directory 1110# $tardir. 1111# tardir=directory && $(am__tar) > result.tar 1112# 1113# Substitute a variable $(am__untar) that extract such 1114# a tarball read from stdin. 1115# $(am__untar) < result.tar 1116# 1117AC_DEFUN([_AM_PROG_TAR], 1118[# Always define AMTAR for backward compatibility. Yes, it's still used 1119# in the wild :-( We should find a proper way to deprecate it ... 1120AC_SUBST([AMTAR], ['$${TAR-tar}']) 1121 1122# We'll loop over all known methods to create a tar archive until one works. 1123_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1124 1125m4_if([$1], [v7], 1126 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1127 1128 [m4_case([$1], 1129 [ustar], 1130 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1131 # There is notably a 21 bits limit for the UID and the GID. In fact, 1132 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1133 # and bug#13588). 1134 am_max_uid=2097151 # 2^21 - 1 1135 am_max_gid=$am_max_uid 1136 # The $UID and $GID variables are not portable, so we need to resort 1137 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1138 # below are definitely unexpected, so allow the users to see them 1139 # (that is, avoid stderr redirection). 1140 am_uid=`id -u || echo unknown` 1141 am_gid=`id -g || echo unknown` 1142 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1143 if test $am_uid -le $am_max_uid; then 1144 AC_MSG_RESULT([yes]) 1145 else 1146 AC_MSG_RESULT([no]) 1147 _am_tools=none 1148 fi 1149 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1150 if test $am_gid -le $am_max_gid; then 1151 AC_MSG_RESULT([yes]) 1152 else 1153 AC_MSG_RESULT([no]) 1154 _am_tools=none 1155 fi], 1156 1157 [pax], 1158 [], 1159 1160 [m4_fatal([Unknown tar format])]) 1161 1162 AC_MSG_CHECKING([how to create a $1 tar archive]) 1163 1164 # Go ahead even if we have the value already cached. We do so because we 1165 # need to set the values for the 'am__tar' and 'am__untar' variables. 1166 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1167 1168 for _am_tool in $_am_tools; do 1169 case $_am_tool in 1170 gnutar) 1171 for _am_tar in tar gnutar gtar; do 1172 AM_RUN_LOG([$_am_tar --version]) && break 1173 done 1174 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1175 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1176 am__untar="$_am_tar -xf -" 1177 ;; 1178 plaintar) 1179 # Must skip GNU tar: if it does not support --format= it doesn't create 1180 # ustar tarball either. 1181 (tar --version) >/dev/null 2>&1 && continue 1182 am__tar='tar chf - "$$tardir"' 1183 am__tar_='tar chf - "$tardir"' 1184 am__untar='tar xf -' 1185 ;; 1186 pax) 1187 am__tar='pax -L -x $1 -w "$$tardir"' 1188 am__tar_='pax -L -x $1 -w "$tardir"' 1189 am__untar='pax -r' 1190 ;; 1191 cpio) 1192 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1193 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1194 am__untar='cpio -i -H $1 -d' 1195 ;; 1196 none) 1197 am__tar=false 1198 am__tar_=false 1199 am__untar=false 1200 ;; 1201 esac 1202 1203 # If the value was cached, stop now. We just wanted to have am__tar 1204 # and am__untar set. 1205 test -n "${am_cv_prog_tar_$1}" && break 1206 1207 # tar/untar a dummy directory, and stop if the command works. 1208 rm -rf conftest.dir 1209 mkdir conftest.dir 1210 echo GrepMe > conftest.dir/file 1211 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1212 rm -rf conftest.dir 1213 if test -s conftest.tar; then 1214 AM_RUN_LOG([$am__untar <conftest.tar]) 1215 AM_RUN_LOG([cat conftest.dir/file]) 1216 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1217 fi 1218 done 1219 rm -rf conftest.dir 1220 1221 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1222 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1223 1224AC_SUBST([am__tar]) 1225AC_SUBST([am__untar]) 1226]) # _AM_PROG_TAR 1227 1228m4_include([m4/libtool.m4]) 1229m4_include([m4/ltoptions.m4]) 1230m4_include([m4/ltsugar.m4]) 1231m4_include([m4/ltversion.m4]) 1232m4_include([m4/lt~obsolete.m4]) 1233m4_include([acinclude.m4]) 1234