1*ae771770SStanislav Sedov# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2b528cefcSMark Murray 3c19800e8SDoug Rabson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4*ae771770SStanislav Sedov# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5adb0ddaeSAssar Westerlund# This file is free software; the Free Software Foundation 6adb0ddaeSAssar Westerlund# gives unlimited permission to copy and/or distribute it, 7adb0ddaeSAssar Westerlund# with or without modifications, as long as this notice is preserved. 8b528cefcSMark Murray 9adb0ddaeSAssar Westerlund# This program is distributed in the hope that it will be useful, 10adb0ddaeSAssar Westerlund# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11adb0ddaeSAssar Westerlund# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12adb0ddaeSAssar Westerlund# PARTICULAR PURPOSE. 13b528cefcSMark Murray 14*ae771770SStanislav Sedovm4_ifndef([AC_AUTOCONF_VERSION], 15*ae771770SStanislav Sedov [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16*ae771770SStanislav Sedovm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17*ae771770SStanislav Sedov[m4_warning([this file was generated for autoconf 2.65. 18*ae771770SStanislav SedovYou have another version of autoconf. It may work, but is not guaranteed to. 19*ae771770SStanislav SedovIf you have problems, you may need to regenerate the build system entirely. 20*ae771770SStanislav SedovTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21c19800e8SDoug Rabson 22*ae771770SStanislav Sedov# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23c19800e8SDoug Rabson# 24c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 25c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 26c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 270cadf2f4SJacques Vidrine 288d4ba808SJacques Vidrine# AM_AUTOMAKE_VERSION(VERSION) 298d4ba808SJacques Vidrine# ---------------------------- 308d4ba808SJacques Vidrine# Automake X.Y traces this macro to ensure aclocal.m4 has been 318d4ba808SJacques Vidrine# generated from the m4 files accompanying Automake X.Y. 32c19800e8SDoug Rabson# (This private macro should not be called outside this file.) 33c19800e8SDoug RabsonAC_DEFUN([AM_AUTOMAKE_VERSION], 34*ae771770SStanislav Sedov[am__api_version='1.11' 35c19800e8SDoug Rabsondnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36c19800e8SDoug Rabsondnl require some minimum version. Point them to the right macro. 37*ae771770SStanislav Sedovm4_if([$1], [1.11.1], [], 38c19800e8SDoug Rabson [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39c19800e8SDoug Rabson]) 40c19800e8SDoug Rabson 41c19800e8SDoug Rabson# _AM_AUTOCONF_VERSION(VERSION) 42c19800e8SDoug Rabson# ----------------------------- 43c19800e8SDoug Rabson# aclocal traces this macro to find the Autoconf version. 44c19800e8SDoug Rabson# This is a private macro too. Using m4_define simplifies 45c19800e8SDoug Rabson# the logic in aclocal, which can simply ignore this definition. 46c19800e8SDoug Rabsonm4_define([_AM_AUTOCONF_VERSION], []) 470cadf2f4SJacques Vidrine 488d4ba808SJacques Vidrine# AM_SET_CURRENT_AUTOMAKE_VERSION 498d4ba808SJacques Vidrine# ------------------------------- 50c19800e8SDoug Rabson# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51*ae771770SStanislav Sedov# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 528d4ba808SJacques VidrineAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53*ae771770SStanislav Sedov[AM_AUTOMAKE_VERSION([1.11.1])dnl 54*ae771770SStanislav Sedovm4_ifndef([AC_AUTOCONF_VERSION], 55*ae771770SStanislav Sedov [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56*ae771770SStanislav Sedov_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 570cadf2f4SJacques Vidrine 58c19800e8SDoug Rabson# AM_AUX_DIR_EXPAND -*- Autoconf -*- 590cadf2f4SJacques Vidrine 60c19800e8SDoug Rabson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61c19800e8SDoug Rabson# 62c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 63c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 64c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 650cadf2f4SJacques Vidrine 668d4ba808SJacques Vidrine# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 678d4ba808SJacques Vidrine# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 688d4ba808SJacques Vidrine# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 698373020dSJacques Vidrine# 708d4ba808SJacques Vidrine# Of course, Automake must honor this variable whenever it calls a 718d4ba808SJacques Vidrine# tool from the auxiliary directory. The problem is that $srcdir (and 728d4ba808SJacques Vidrine# therefore $ac_aux_dir as well) can be either absolute or relative, 738d4ba808SJacques Vidrine# depending on how configure is run. This is pretty annoying, since 748d4ba808SJacques Vidrine# it makes $ac_aux_dir quite unusable in subdirectories: in the top 758d4ba808SJacques Vidrine# source directory, any form will work fine, but in subdirectories a 768d4ba808SJacques Vidrine# relative path needs to be adjusted first. 778d4ba808SJacques Vidrine# 788d4ba808SJacques Vidrine# $ac_aux_dir/missing 798d4ba808SJacques Vidrine# fails when called from a subdirectory if $ac_aux_dir is relative 808d4ba808SJacques Vidrine# $top_srcdir/$ac_aux_dir/missing 818d4ba808SJacques Vidrine# fails if $ac_aux_dir is absolute, 828d4ba808SJacques Vidrine# fails when called from a subdirectory in a VPATH build with 838d4ba808SJacques Vidrine# a relative $ac_aux_dir 848d4ba808SJacques Vidrine# 858d4ba808SJacques Vidrine# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 868d4ba808SJacques Vidrine# are both prefixed by $srcdir. In an in-source build this is usually 878d4ba808SJacques Vidrine# harmless because $srcdir is `.', but things will broke when you 888d4ba808SJacques Vidrine# start a VPATH build or use an absolute $srcdir. 898d4ba808SJacques Vidrine# 908d4ba808SJacques Vidrine# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 918d4ba808SJacques Vidrine# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 928d4ba808SJacques Vidrine# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 938d4ba808SJacques Vidrine# and then we would define $MISSING as 948d4ba808SJacques Vidrine# MISSING="\${SHELL} $am_aux_dir/missing" 958d4ba808SJacques Vidrine# This will work as long as MISSING is not called from configure, because 968d4ba808SJacques Vidrine# unfortunately $(top_srcdir) has no meaning in configure. 978d4ba808SJacques Vidrine# However there are other variables, like CC, which are often used in 988d4ba808SJacques Vidrine# configure, and could therefore not use this "fixed" $ac_aux_dir. 998d4ba808SJacques Vidrine# 1008d4ba808SJacques Vidrine# Another solution, used here, is to always expand $ac_aux_dir to an 1018d4ba808SJacques Vidrine# absolute PATH. The drawback is that using absolute paths prevent a 1028d4ba808SJacques Vidrine# configured tree to be moved without reconfiguration. 1038373020dSJacques Vidrine 1048d4ba808SJacques VidrineAC_DEFUN([AM_AUX_DIR_EXPAND], 1058d4ba808SJacques Vidrine[dnl Rely on autoconf to set up CDPATH properly. 1068d4ba808SJacques VidrineAC_PREREQ([2.50])dnl 1078d4ba808SJacques Vidrine# expand $ac_aux_dir to an absolute path 1088d4ba808SJacques Vidrineam_aux_dir=`cd $ac_aux_dir && pwd` 1098d4ba808SJacques Vidrine]) 1108d4ba808SJacques Vidrine 1118d4ba808SJacques Vidrine# AM_CONDITIONAL -*- Autoconf -*- 1128d4ba808SJacques Vidrine 113*ae771770SStanislav Sedov# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114c19800e8SDoug Rabson# Free Software Foundation, Inc. 115c19800e8SDoug Rabson# 116c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 117c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 118c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 1198d4ba808SJacques Vidrine 120*ae771770SStanislav Sedov# serial 9 1218d4ba808SJacques Vidrine 1228d4ba808SJacques Vidrine# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1238d4ba808SJacques Vidrine# ------------------------------------- 1248d4ba808SJacques Vidrine# Define a conditional. 1258d4ba808SJacques VidrineAC_DEFUN([AM_CONDITIONAL], 1268d4ba808SJacques Vidrine[AC_PREREQ(2.52)dnl 1278d4ba808SJacques Vidrine ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1288d4ba808SJacques Vidrine [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129c19800e8SDoug RabsonAC_SUBST([$1_TRUE])dnl 130c19800e8SDoug RabsonAC_SUBST([$1_FALSE])dnl 131c19800e8SDoug Rabson_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132c19800e8SDoug Rabson_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133*ae771770SStanislav Sedovm4_define([_AM_COND_VALUE_$1], [$2])dnl 1348d4ba808SJacques Vidrineif $2; then 1358d4ba808SJacques Vidrine $1_TRUE= 1368d4ba808SJacques Vidrine $1_FALSE='#' 1378d4ba808SJacques Vidrineelse 1388d4ba808SJacques Vidrine $1_TRUE='#' 1398d4ba808SJacques Vidrine $1_FALSE= 1408d4ba808SJacques Vidrinefi 1418d4ba808SJacques VidrineAC_CONFIG_COMMANDS_PRE( 1428d4ba808SJacques Vidrine[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143c19800e8SDoug Rabson AC_MSG_ERROR([[conditional "$1" was never defined. 144c19800e8SDoug RabsonUsually this means the macro was only invoked conditionally.]]) 1458d4ba808SJacques Vidrinefi])]) 1468d4ba808SJacques Vidrine 147*ae771770SStanislav Sedov# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148*ae771770SStanislav Sedov# Free Software Foundation, Inc. 149c19800e8SDoug Rabson# 150c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 151c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 152c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 153c19800e8SDoug Rabson 154*ae771770SStanislav Sedov# serial 10 155*ae771770SStanislav Sedov 156*ae771770SStanislav Sedov# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157*ae771770SStanislav Sedov# written in clear, in which case automake, when reading aclocal.m4, 158*ae771770SStanislav Sedov# will think it sees a *use*, and therefore will trigger all it's 159*ae771770SStanislav Sedov# C support machinery. Also note that it means that autoscan, seeing 160*ae771770SStanislav Sedov# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161*ae771770SStanislav Sedov 162*ae771770SStanislav Sedov 163*ae771770SStanislav Sedov# _AM_DEPENDENCIES(NAME) 164*ae771770SStanislav Sedov# ---------------------- 165*ae771770SStanislav Sedov# See how the compiler implements dependency checking. 166*ae771770SStanislav Sedov# NAME is "CC", "CXX", "GCJ", or "OBJC". 167*ae771770SStanislav Sedov# We try a few techniques and use that to set a single cache variable. 168*ae771770SStanislav Sedov# 169*ae771770SStanislav Sedov# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170*ae771770SStanislav Sedov# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171*ae771770SStanislav Sedov# dependency, and given that the user is not expected to run this macro, 172*ae771770SStanislav Sedov# just rely on AC_PROG_CC. 173*ae771770SStanislav SedovAC_DEFUN([_AM_DEPENDENCIES], 174*ae771770SStanislav Sedov[AC_REQUIRE([AM_SET_DEPDIR])dnl 175*ae771770SStanislav SedovAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176*ae771770SStanislav SedovAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177*ae771770SStanislav SedovAC_REQUIRE([AM_DEP_TRACK])dnl 178*ae771770SStanislav Sedov 179*ae771770SStanislav Sedovifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180*ae771770SStanislav Sedov [$1], CXX, [depcc="$CXX" am_compiler_list=], 181*ae771770SStanislav Sedov [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182*ae771770SStanislav Sedov [$1], UPC, [depcc="$UPC" am_compiler_list=], 183*ae771770SStanislav Sedov [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184*ae771770SStanislav Sedov [depcc="$$1" am_compiler_list=]) 185*ae771770SStanislav Sedov 186*ae771770SStanislav SedovAC_CACHE_CHECK([dependency style of $depcc], 187*ae771770SStanislav Sedov [am_cv_$1_dependencies_compiler_type], 188*ae771770SStanislav Sedov[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189*ae771770SStanislav Sedov # We make a subdir and do the tests there. Otherwise we can end up 190*ae771770SStanislav Sedov # making bogus files that we don't know about and never remove. For 191*ae771770SStanislav Sedov # instance it was reported that on HP-UX the gcc test will end up 192*ae771770SStanislav Sedov # making a dummy file named `D' -- because `-MD' means `put the output 193*ae771770SStanislav Sedov # in D'. 194*ae771770SStanislav Sedov mkdir conftest.dir 195*ae771770SStanislav Sedov # Copy depcomp to subdir because otherwise we won't find it if we're 196*ae771770SStanislav Sedov # using a relative directory. 197*ae771770SStanislav Sedov cp "$am_depcomp" conftest.dir 198*ae771770SStanislav Sedov cd conftest.dir 199*ae771770SStanislav Sedov # We will build objects and dependencies in a subdirectory because 200*ae771770SStanislav Sedov # it helps to detect inapplicable dependency modes. For instance 201*ae771770SStanislav Sedov # both Tru64's cc and ICC support -MD to output dependencies as a 202*ae771770SStanislav Sedov # side effect of compilation, but ICC will put the dependencies in 203*ae771770SStanislav Sedov # the current directory while Tru64 will put them in the object 204*ae771770SStanislav Sedov # directory. 205*ae771770SStanislav Sedov mkdir sub 206*ae771770SStanislav Sedov 207*ae771770SStanislav Sedov am_cv_$1_dependencies_compiler_type=none 208*ae771770SStanislav Sedov if test "$am_compiler_list" = ""; then 209*ae771770SStanislav Sedov am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210*ae771770SStanislav Sedov fi 211*ae771770SStanislav Sedov am__universal=false 212*ae771770SStanislav Sedov m4_case([$1], [CC], 213*ae771770SStanislav Sedov [case " $depcc " in #( 214*ae771770SStanislav Sedov *\ -arch\ *\ -arch\ *) am__universal=true ;; 215*ae771770SStanislav Sedov esac], 216*ae771770SStanislav Sedov [CXX], 217*ae771770SStanislav Sedov [case " $depcc " in #( 218*ae771770SStanislav Sedov *\ -arch\ *\ -arch\ *) am__universal=true ;; 219*ae771770SStanislav Sedov esac]) 220*ae771770SStanislav Sedov 221*ae771770SStanislav Sedov for depmode in $am_compiler_list; do 222*ae771770SStanislav Sedov # Setup a source with many dependencies, because some compilers 223*ae771770SStanislav Sedov # like to wrap large dependency lists on column 80 (with \), and 224*ae771770SStanislav Sedov # we should not choose a depcomp mode which is confused by this. 225*ae771770SStanislav Sedov # 226*ae771770SStanislav Sedov # We need to recreate these files for each test, as the compiler may 227*ae771770SStanislav Sedov # overwrite some of them when testing with obscure command lines. 228*ae771770SStanislav Sedov # This happens at least with the AIX C compiler. 229*ae771770SStanislav Sedov : > sub/conftest.c 230*ae771770SStanislav Sedov for i in 1 2 3 4 5 6; do 231*ae771770SStanislav Sedov echo '#include "conftst'$i'.h"' >> sub/conftest.c 232*ae771770SStanislav Sedov # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233*ae771770SStanislav Sedov # Solaris 8's {/usr,}/bin/sh. 234*ae771770SStanislav Sedov touch sub/conftst$i.h 235*ae771770SStanislav Sedov done 236*ae771770SStanislav Sedov echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237*ae771770SStanislav Sedov 238*ae771770SStanislav Sedov # We check with `-c' and `-o' for the sake of the "dashmstdout" 239*ae771770SStanislav Sedov # mode. It turns out that the SunPro C++ compiler does not properly 240*ae771770SStanislav Sedov # handle `-M -o', and we need to detect this. Also, some Intel 241*ae771770SStanislav Sedov # versions had trouble with output in subdirs 242*ae771770SStanislav Sedov am__obj=sub/conftest.${OBJEXT-o} 243*ae771770SStanislav Sedov am__minus_obj="-o $am__obj" 244*ae771770SStanislav Sedov case $depmode in 245*ae771770SStanislav Sedov gcc) 246*ae771770SStanislav Sedov # This depmode causes a compiler race in universal mode. 247*ae771770SStanislav Sedov test "$am__universal" = false || continue 248*ae771770SStanislav Sedov ;; 249*ae771770SStanislav Sedov nosideeffect) 250*ae771770SStanislav Sedov # after this tag, mechanisms are not by side-effect, so they'll 251*ae771770SStanislav Sedov # only be used when explicitly requested 252*ae771770SStanislav Sedov if test "x$enable_dependency_tracking" = xyes; then 253*ae771770SStanislav Sedov continue 254*ae771770SStanislav Sedov else 255*ae771770SStanislav Sedov break 256*ae771770SStanislav Sedov fi 257*ae771770SStanislav Sedov ;; 258*ae771770SStanislav Sedov msvisualcpp | msvcmsys) 259*ae771770SStanislav Sedov # This compiler won't grok `-c -o', but also, the minuso test has 260*ae771770SStanislav Sedov # not run yet. These depmodes are late enough in the game, and 261*ae771770SStanislav Sedov # so weak that their functioning should not be impacted. 262*ae771770SStanislav Sedov am__obj=conftest.${OBJEXT-o} 263*ae771770SStanislav Sedov am__minus_obj= 264*ae771770SStanislav Sedov ;; 265*ae771770SStanislav Sedov none) break ;; 266*ae771770SStanislav Sedov esac 267*ae771770SStanislav Sedov if depmode=$depmode \ 268*ae771770SStanislav Sedov source=sub/conftest.c object=$am__obj \ 269*ae771770SStanislav Sedov depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270*ae771770SStanislav Sedov $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271*ae771770SStanislav Sedov >/dev/null 2>conftest.err && 272*ae771770SStanislav Sedov grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273*ae771770SStanislav Sedov grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274*ae771770SStanislav Sedov grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275*ae771770SStanislav Sedov ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276*ae771770SStanislav Sedov # icc doesn't choke on unknown options, it will just issue warnings 277*ae771770SStanislav Sedov # or remarks (even with -Werror). So we grep stderr for any message 278*ae771770SStanislav Sedov # that says an option was ignored or not supported. 279*ae771770SStanislav Sedov # When given -MP, icc 7.0 and 7.1 complain thusly: 280*ae771770SStanislav Sedov # icc: Command line warning: ignoring option '-M'; no argument required 281*ae771770SStanislav Sedov # The diagnosis changed in icc 8.0: 282*ae771770SStanislav Sedov # icc: Command line remark: option '-MP' not supported 283*ae771770SStanislav Sedov if (grep 'ignoring option' conftest.err || 284*ae771770SStanislav Sedov grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285*ae771770SStanislav Sedov am_cv_$1_dependencies_compiler_type=$depmode 286*ae771770SStanislav Sedov break 287*ae771770SStanislav Sedov fi 288*ae771770SStanislav Sedov fi 289*ae771770SStanislav Sedov done 290*ae771770SStanislav Sedov 291*ae771770SStanislav Sedov cd .. 292*ae771770SStanislav Sedov rm -rf conftest.dir 293*ae771770SStanislav Sedovelse 294*ae771770SStanislav Sedov am_cv_$1_dependencies_compiler_type=none 295*ae771770SStanislav Sedovfi 296*ae771770SStanislav Sedov]) 297*ae771770SStanislav SedovAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298*ae771770SStanislav SedovAM_CONDITIONAL([am__fastdep$1], [ 299*ae771770SStanislav Sedov test "x$enable_dependency_tracking" != xno \ 300*ae771770SStanislav Sedov && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301*ae771770SStanislav Sedov]) 302*ae771770SStanislav Sedov 303*ae771770SStanislav Sedov 304*ae771770SStanislav Sedov# AM_SET_DEPDIR 305*ae771770SStanislav Sedov# ------------- 306*ae771770SStanislav Sedov# Choose a directory name for dependency files. 307*ae771770SStanislav Sedov# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308*ae771770SStanislav SedovAC_DEFUN([AM_SET_DEPDIR], 309*ae771770SStanislav Sedov[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310*ae771770SStanislav SedovAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311*ae771770SStanislav Sedov]) 312*ae771770SStanislav Sedov 313*ae771770SStanislav Sedov 314*ae771770SStanislav Sedov# AM_DEP_TRACK 315*ae771770SStanislav Sedov# ------------ 316*ae771770SStanislav SedovAC_DEFUN([AM_DEP_TRACK], 317*ae771770SStanislav Sedov[AC_ARG_ENABLE(dependency-tracking, 318*ae771770SStanislav Sedov[ --disable-dependency-tracking speeds up one-time build 319*ae771770SStanislav Sedov --enable-dependency-tracking do not reject slow dependency extractors]) 320*ae771770SStanislav Sedovif test "x$enable_dependency_tracking" != xno; then 321*ae771770SStanislav Sedov am_depcomp="$ac_aux_dir/depcomp" 322*ae771770SStanislav Sedov AMDEPBACKSLASH='\' 323*ae771770SStanislav Sedovfi 324*ae771770SStanislav SedovAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325*ae771770SStanislav SedovAC_SUBST([AMDEPBACKSLASH])dnl 326*ae771770SStanislav Sedov_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327*ae771770SStanislav Sedov]) 328*ae771770SStanislav Sedov 329*ae771770SStanislav Sedov# Generate code to set up dependency tracking. -*- Autoconf -*- 330*ae771770SStanislav Sedov 331*ae771770SStanislav Sedov# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332*ae771770SStanislav Sedov# Free Software Foundation, Inc. 333*ae771770SStanislav Sedov# 334*ae771770SStanislav Sedov# This file is free software; the Free Software Foundation 335*ae771770SStanislav Sedov# gives unlimited permission to copy and/or distribute it, 336*ae771770SStanislav Sedov# with or without modifications, as long as this notice is preserved. 337*ae771770SStanislav Sedov 338*ae771770SStanislav Sedov#serial 5 339*ae771770SStanislav Sedov 340*ae771770SStanislav Sedov# _AM_OUTPUT_DEPENDENCY_COMMANDS 341*ae771770SStanislav Sedov# ------------------------------ 342*ae771770SStanislav SedovAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343*ae771770SStanislav Sedov[{ 344*ae771770SStanislav Sedov # Autoconf 2.62 quotes --file arguments for eval, but not when files 345*ae771770SStanislav Sedov # are listed without --file. Let's play safe and only enable the eval 346*ae771770SStanislav Sedov # if we detect the quoting. 347*ae771770SStanislav Sedov case $CONFIG_FILES in 348*ae771770SStanislav Sedov *\'*) eval set x "$CONFIG_FILES" ;; 349*ae771770SStanislav Sedov *) set x $CONFIG_FILES ;; 350*ae771770SStanislav Sedov esac 351*ae771770SStanislav Sedov shift 352*ae771770SStanislav Sedov for mf 353*ae771770SStanislav Sedov do 354*ae771770SStanislav Sedov # Strip MF so we end up with the name of the file. 355*ae771770SStanislav Sedov mf=`echo "$mf" | sed -e 's/:.*$//'` 356*ae771770SStanislav Sedov # Check whether this is an Automake generated Makefile or not. 357*ae771770SStanislav Sedov # We used to match only the files named `Makefile.in', but 358*ae771770SStanislav Sedov # some people rename them; so instead we look at the file content. 359*ae771770SStanislav Sedov # Grep'ing the first line is not enough: some people post-process 360*ae771770SStanislav Sedov # each Makefile.in and add a new line on top of each file to say so. 361*ae771770SStanislav Sedov # Grep'ing the whole file is not good either: AIX grep has a line 362*ae771770SStanislav Sedov # limit of 2048, but all sed's we know have understand at least 4000. 363*ae771770SStanislav Sedov if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364*ae771770SStanislav Sedov dirpart=`AS_DIRNAME("$mf")` 365*ae771770SStanislav Sedov else 366*ae771770SStanislav Sedov continue 367*ae771770SStanislav Sedov fi 368*ae771770SStanislav Sedov # Extract the definition of DEPDIR, am__include, and am__quote 369*ae771770SStanislav Sedov # from the Makefile without running `make'. 370*ae771770SStanislav Sedov DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371*ae771770SStanislav Sedov test -z "$DEPDIR" && continue 372*ae771770SStanislav Sedov am__include=`sed -n 's/^am__include = //p' < "$mf"` 373*ae771770SStanislav Sedov test -z "am__include" && continue 374*ae771770SStanislav Sedov am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375*ae771770SStanislav Sedov # When using ansi2knr, U may be empty or an underscore; expand it 376*ae771770SStanislav Sedov U=`sed -n 's/^U = //p' < "$mf"` 377*ae771770SStanislav Sedov # Find all dependency output files, they are included files with 378*ae771770SStanislav Sedov # $(DEPDIR) in their names. We invoke sed twice because it is the 379*ae771770SStanislav Sedov # simplest approach to changing $(DEPDIR) to its actual value in the 380*ae771770SStanislav Sedov # expansion. 381*ae771770SStanislav Sedov for file in `sed -n " 382*ae771770SStanislav Sedov s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383*ae771770SStanislav Sedov sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384*ae771770SStanislav Sedov # Make sure the directory exists. 385*ae771770SStanislav Sedov test -f "$dirpart/$file" && continue 386*ae771770SStanislav Sedov fdir=`AS_DIRNAME(["$file"])` 387*ae771770SStanislav Sedov AS_MKDIR_P([$dirpart/$fdir]) 388*ae771770SStanislav Sedov # echo "creating $dirpart/$file" 389*ae771770SStanislav Sedov echo '# dummy' > "$dirpart/$file" 390*ae771770SStanislav Sedov done 391*ae771770SStanislav Sedov done 392*ae771770SStanislav Sedov} 393*ae771770SStanislav Sedov])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394*ae771770SStanislav Sedov 395*ae771770SStanislav Sedov 396*ae771770SStanislav Sedov# AM_OUTPUT_DEPENDENCY_COMMANDS 397*ae771770SStanislav Sedov# ----------------------------- 398*ae771770SStanislav Sedov# This macro should only be invoked once -- use via AC_REQUIRE. 399*ae771770SStanislav Sedov# 400*ae771770SStanislav Sedov# This code is only required when automatic dependency tracking 401*ae771770SStanislav Sedov# is enabled. FIXME. This creates each `.P' file that we will 402*ae771770SStanislav Sedov# need in order to bootstrap the dependency handling code. 403*ae771770SStanislav SedovAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404*ae771770SStanislav Sedov[AC_CONFIG_COMMANDS([depfiles], 405*ae771770SStanislav Sedov [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406*ae771770SStanislav Sedov [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407*ae771770SStanislav Sedov]) 408*ae771770SStanislav Sedov 409*ae771770SStanislav Sedov# Do all the work for Automake. -*- Autoconf -*- 410*ae771770SStanislav Sedov 411*ae771770SStanislav Sedov# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 412*ae771770SStanislav Sedov# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 413*ae771770SStanislav Sedov# 414*ae771770SStanislav Sedov# This file is free software; the Free Software Foundation 415*ae771770SStanislav Sedov# gives unlimited permission to copy and/or distribute it, 416*ae771770SStanislav Sedov# with or without modifications, as long as this notice is preserved. 417*ae771770SStanislav Sedov 418*ae771770SStanislav Sedov# serial 16 419c19800e8SDoug Rabson 420c19800e8SDoug Rabson# This macro actually does too much. Some checks are only needed if 4218d4ba808SJacques Vidrine# your package does certain things. But this isn't really a big deal. 4228d4ba808SJacques Vidrine 4238d4ba808SJacques Vidrine# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4248d4ba808SJacques Vidrine# AM_INIT_AUTOMAKE([OPTIONS]) 4258d4ba808SJacques Vidrine# ----------------------------------------------- 4268d4ba808SJacques Vidrine# The call with PACKAGE and VERSION arguments is the old style 4278d4ba808SJacques Vidrine# call (pre autoconf-2.50), which is being phased out. PACKAGE 4288d4ba808SJacques Vidrine# and VERSION should now be passed to AC_INIT and removed from 4298d4ba808SJacques Vidrine# the call to AM_INIT_AUTOMAKE. 4308d4ba808SJacques Vidrine# We support both call styles for the transition. After 4318d4ba808SJacques Vidrine# the next Automake release, Autoconf can make the AC_INIT 4328d4ba808SJacques Vidrine# arguments mandatory, and then we can depend on a new Autoconf 4338d4ba808SJacques Vidrine# release and drop the old call support. 4348d4ba808SJacques VidrineAC_DEFUN([AM_INIT_AUTOMAKE], 435*ae771770SStanislav Sedov[AC_PREREQ([2.62])dnl 4368d4ba808SJacques Vidrinednl Autoconf wants to disallow AM_ names. We explicitly allow 4378d4ba808SJacques Vidrinednl the ones we care about. 4388d4ba808SJacques Vidrinem4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4398d4ba808SJacques VidrineAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4408d4ba808SJacques VidrineAC_REQUIRE([AC_PROG_INSTALL])dnl 441c19800e8SDoug Rabsonif test "`cd $srcdir && pwd`" != "`pwd`"; then 442c19800e8SDoug Rabson # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 443c19800e8SDoug Rabson # is not polluted with repeated "-I." 444c19800e8SDoug Rabson AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4458d4ba808SJacques Vidrine # test to see if srcdir already configured 446c19800e8SDoug Rabson if test -f $srcdir/config.status; then 4478d4ba808SJacques Vidrine AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4488d4ba808SJacques Vidrine fi 449c19800e8SDoug Rabsonfi 4508d4ba808SJacques Vidrine 4518d4ba808SJacques Vidrine# test whether we have cygpath 4528d4ba808SJacques Vidrineif test -z "$CYGPATH_W"; then 4538d4ba808SJacques Vidrine if (cygpath --version) >/dev/null 2>/dev/null; then 4548d4ba808SJacques Vidrine CYGPATH_W='cygpath -w' 4558d4ba808SJacques Vidrine else 4568d4ba808SJacques Vidrine CYGPATH_W=echo 4578d4ba808SJacques Vidrine fi 4588d4ba808SJacques Vidrinefi 4598d4ba808SJacques VidrineAC_SUBST([CYGPATH_W]) 4608d4ba808SJacques Vidrine 4618d4ba808SJacques Vidrine# Define the identity of the package. 4628d4ba808SJacques Vidrinednl Distinguish between old-style and new-style calls. 4638d4ba808SJacques Vidrinem4_ifval([$2], 4648d4ba808SJacques Vidrine[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4658d4ba808SJacques Vidrine AC_SUBST([PACKAGE], [$1])dnl 4668d4ba808SJacques Vidrine AC_SUBST([VERSION], [$2])], 4678d4ba808SJacques Vidrine[_AM_SET_OPTIONS([$1])dnl 468c19800e8SDoug Rabsondnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469c19800e8SDoug Rabsonm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 470c19800e8SDoug Rabson [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4718d4ba808SJacques Vidrine AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4728d4ba808SJacques Vidrine AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4738d4ba808SJacques Vidrine 4748d4ba808SJacques Vidrine_AM_IF_OPTION([no-define],, 4758d4ba808SJacques Vidrine[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4768d4ba808SJacques Vidrine AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4778d4ba808SJacques Vidrine 4788d4ba808SJacques Vidrine# Some tools Automake needs. 4798d4ba808SJacques VidrineAC_REQUIRE([AM_SANITY_CHECK])dnl 4808d4ba808SJacques VidrineAC_REQUIRE([AC_ARG_PROGRAM])dnl 4818d4ba808SJacques VidrineAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4828d4ba808SJacques VidrineAM_MISSING_PROG(AUTOCONF, autoconf) 4838d4ba808SJacques VidrineAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4848d4ba808SJacques VidrineAM_MISSING_PROG(AUTOHEADER, autoheader) 4858d4ba808SJacques VidrineAM_MISSING_PROG(MAKEINFO, makeinfo) 486*ae771770SStanislav SedovAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 487*ae771770SStanislav SedovAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4888d4ba808SJacques VidrineAC_REQUIRE([AM_PROG_MKDIR_P])dnl 4898d4ba808SJacques Vidrine# We need awk for the "check" target. The system "awk" is bad on 4908d4ba808SJacques Vidrine# some platforms. 4918d4ba808SJacques VidrineAC_REQUIRE([AC_PROG_AWK])dnl 4928d4ba808SJacques VidrineAC_REQUIRE([AC_PROG_MAKE_SET])dnl 4938d4ba808SJacques VidrineAC_REQUIRE([AM_SET_LEADING_DOT])dnl 494c19800e8SDoug Rabson_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 495c19800e8SDoug Rabson [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 496c19800e8SDoug Rabson [_AM_PROG_TAR([v7])])]) 4978d4ba808SJacques Vidrine_AM_IF_OPTION([no-dependencies],, 4988d4ba808SJacques Vidrine[AC_PROVIDE_IFELSE([AC_PROG_CC], 4998d4ba808SJacques Vidrine [_AM_DEPENDENCIES(CC)], 5008d4ba808SJacques Vidrine [define([AC_PROG_CC], 5018d4ba808SJacques Vidrine defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5028d4ba808SJacques VidrineAC_PROVIDE_IFELSE([AC_PROG_CXX], 5038d4ba808SJacques Vidrine [_AM_DEPENDENCIES(CXX)], 5048d4ba808SJacques Vidrine [define([AC_PROG_CXX], 5058d4ba808SJacques Vidrine defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 506c19800e8SDoug RabsonAC_PROVIDE_IFELSE([AC_PROG_OBJC], 507c19800e8SDoug Rabson [_AM_DEPENDENCIES(OBJC)], 508c19800e8SDoug Rabson [define([AC_PROG_OBJC], 509c19800e8SDoug Rabson defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5108d4ba808SJacques Vidrine]) 511*ae771770SStanislav Sedov_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 512*ae771770SStanislav Sedovdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 513*ae771770SStanislav Sedovdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 514*ae771770SStanislav Sedovdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 515*ae771770SStanislav SedovAC_CONFIG_COMMANDS_PRE(dnl 516*ae771770SStanislav Sedov[m4_provide_if([_AM_COMPILER_EXEEXT], 517*ae771770SStanislav Sedov [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5188d4ba808SJacques Vidrine]) 5198d4ba808SJacques Vidrine 520*ae771770SStanislav Sedovdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 521*ae771770SStanislav Sedovdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 522*ae771770SStanislav Sedovdnl mangled by Autoconf and run in a shell conditional statement. 523*ae771770SStanislav Sedovm4_define([_AC_COMPILER_EXEEXT], 524*ae771770SStanislav Sedovm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 525*ae771770SStanislav Sedov 5268d4ba808SJacques Vidrine 5278d4ba808SJacques Vidrine# When config.status generates a header, we must update the stamp-h file. 5288d4ba808SJacques Vidrine# This file resides in the same directory as the config header 5298d4ba808SJacques Vidrine# that is generated. The stamp files are numbered to have different names. 5308d4ba808SJacques Vidrine 5318d4ba808SJacques Vidrine# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5328d4ba808SJacques Vidrine# loop where config.status creates the headers, so we can generate 5338d4ba808SJacques Vidrine# our stamp files there. 5348d4ba808SJacques VidrineAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5358d4ba808SJacques Vidrine[# Compute $1's index in $config_headers. 536*ae771770SStanislav Sedov_am_arg=$1 5378d4ba808SJacques Vidrine_am_stamp_count=1 5388d4ba808SJacques Vidrinefor _am_header in $config_headers :; do 5398d4ba808SJacques Vidrine case $_am_header in 540*ae771770SStanislav Sedov $_am_arg | $_am_arg:* ) 5418d4ba808SJacques Vidrine break ;; 5428373020dSJacques Vidrine * ) 5438d4ba808SJacques Vidrine _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5440cadf2f4SJacques Vidrine esac 5450cadf2f4SJacques Vidrinedone 546*ae771770SStanislav Sedovecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5478d4ba808SJacques Vidrine 548*ae771770SStanislav Sedov# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 549c19800e8SDoug Rabson# 550c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 551c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 552c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 553c19800e8SDoug Rabson 5548d4ba808SJacques Vidrine# AM_PROG_INSTALL_SH 5558d4ba808SJacques Vidrine# ------------------ 5568d4ba808SJacques Vidrine# Define $install_sh. 5578d4ba808SJacques VidrineAC_DEFUN([AM_PROG_INSTALL_SH], 5588d4ba808SJacques Vidrine[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 559*ae771770SStanislav Sedovif test x"${install_sh}" != xset; then 560*ae771770SStanislav Sedov case $am_aux_dir in 561*ae771770SStanislav Sedov *\ * | *\ *) 562*ae771770SStanislav Sedov install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 563*ae771770SStanislav Sedov *) 564*ae771770SStanislav Sedov install_sh="\${SHELL} $am_aux_dir/install-sh" 565*ae771770SStanislav Sedov esac 566*ae771770SStanislav Sedovfi 5678d4ba808SJacques VidrineAC_SUBST(install_sh)]) 5688d4ba808SJacques Vidrine 569c19800e8SDoug Rabson# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 570c19800e8SDoug Rabson# 571c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 572c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 573c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 5748d4ba808SJacques Vidrine 575c19800e8SDoug Rabson# serial 2 5768d4ba808SJacques Vidrine 5778d4ba808SJacques Vidrine# Check whether the underlying file-system supports filenames 5788d4ba808SJacques Vidrine# with a leading dot. For instance MS-DOS doesn't. 5798d4ba808SJacques VidrineAC_DEFUN([AM_SET_LEADING_DOT], 5808d4ba808SJacques Vidrine[rm -rf .tst 2>/dev/null 5818d4ba808SJacques Vidrinemkdir .tst 2>/dev/null 5828d4ba808SJacques Vidrineif test -d .tst; then 5838d4ba808SJacques Vidrine am__leading_dot=. 5840cadf2f4SJacques Vidrineelse 5858d4ba808SJacques Vidrine am__leading_dot=_ 5868d4ba808SJacques Vidrinefi 5878d4ba808SJacques Vidrinermdir .tst 2>/dev/null 5888d4ba808SJacques VidrineAC_SUBST([am__leading_dot])]) 5898d4ba808SJacques Vidrine 590c19800e8SDoug Rabson# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 5918d4ba808SJacques Vidrine# Free Software Foundation, Inc. 592c19800e8SDoug Rabson# 593c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 594c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 595c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 5968d4ba808SJacques Vidrine 597c19800e8SDoug Rabson# serial 5 5988d4ba808SJacques Vidrine 5998d4ba808SJacques Vidrine# AM_PROG_LEX 6008d4ba808SJacques Vidrine# ----------- 6018d4ba808SJacques Vidrine# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a 6028d4ba808SJacques Vidrine# "missing" invocation, for better error output. 6038d4ba808SJacques VidrineAC_DEFUN([AM_PROG_LEX], 6048d4ba808SJacques Vidrine[AC_PREREQ(2.50)dnl 6058d4ba808SJacques VidrineAC_REQUIRE([AM_MISSING_HAS_RUN])dnl 6068d4ba808SJacques VidrineAC_REQUIRE([AC_PROG_LEX])dnl 6078d4ba808SJacques Vidrineif test "$LEX" = :; then 6088d4ba808SJacques Vidrine LEX=${am_missing_run}flex 6098d4ba808SJacques Vidrinefi]) 6108d4ba808SJacques Vidrine 611c19800e8SDoug Rabson# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6128d4ba808SJacques Vidrine# From Jim Meyering 6138d4ba808SJacques Vidrine 614*ae771770SStanislav Sedov# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 615c19800e8SDoug Rabson# Free Software Foundation, Inc. 616c19800e8SDoug Rabson# 617c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 618c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 619c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 6208d4ba808SJacques Vidrine 621c19800e8SDoug Rabson# serial 5 6228d4ba808SJacques Vidrine 623*ae771770SStanislav Sedov# AM_MAINTAINER_MODE([DEFAULT-MODE]) 624*ae771770SStanislav Sedov# ---------------------------------- 625*ae771770SStanislav Sedov# Control maintainer-specific portions of Makefiles. 626*ae771770SStanislav Sedov# Default is to disable them, unless `enable' is passed literally. 627*ae771770SStanislav Sedov# For symmetry, `disable' may be passed as well. Anyway, the user 628*ae771770SStanislav Sedov# can override the default with the --enable/--disable switch. 629*ae771770SStanislav SedovAC_DEFUN([AM_MAINTAINER_MODE], 630*ae771770SStanislav Sedov[m4_case(m4_default([$1], [disable]), 631*ae771770SStanislav Sedov [enable], [m4_define([am_maintainer_other], [disable])], 632*ae771770SStanislav Sedov [disable], [m4_define([am_maintainer_other], [enable])], 633*ae771770SStanislav Sedov [m4_define([am_maintainer_other], [enable]) 634*ae771770SStanislav Sedov m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 635*ae771770SStanislav SedovAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 636*ae771770SStanislav Sedov dnl maintainer-mode's default is 'disable' unless 'enable' is passed 637*ae771770SStanislav Sedov AC_ARG_ENABLE([maintainer-mode], 638*ae771770SStanislav Sedov[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 639*ae771770SStanislav Sedov (and sometimes confusing) to the casual installer], 640*ae771770SStanislav Sedov [USE_MAINTAINER_MODE=$enableval], 641*ae771770SStanislav Sedov [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 642*ae771770SStanislav Sedov AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 643*ae771770SStanislav Sedov AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 644*ae771770SStanislav Sedov MAINT=$MAINTAINER_MODE_TRUE 645*ae771770SStanislav Sedov AC_SUBST([MAINT])dnl 646*ae771770SStanislav Sedov] 647*ae771770SStanislav Sedov) 648*ae771770SStanislav Sedov 649*ae771770SStanislav SedovAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 650*ae771770SStanislav Sedov 651*ae771770SStanislav Sedov# Check to see how 'make' treats includes. -*- Autoconf -*- 652*ae771770SStanislav Sedov 653*ae771770SStanislav Sedov# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 654*ae771770SStanislav Sedov# 655*ae771770SStanislav Sedov# This file is free software; the Free Software Foundation 656*ae771770SStanislav Sedov# gives unlimited permission to copy and/or distribute it, 657*ae771770SStanislav Sedov# with or without modifications, as long as this notice is preserved. 658*ae771770SStanislav Sedov 659*ae771770SStanislav Sedov# serial 4 660*ae771770SStanislav Sedov 661*ae771770SStanislav Sedov# AM_MAKE_INCLUDE() 662*ae771770SStanislav Sedov# ----------------- 663*ae771770SStanislav Sedov# Check to see how make treats includes. 664*ae771770SStanislav SedovAC_DEFUN([AM_MAKE_INCLUDE], 665*ae771770SStanislav Sedov[am_make=${MAKE-make} 666*ae771770SStanislav Sedovcat > confinc << 'END' 667*ae771770SStanislav Sedovam__doit: 668*ae771770SStanislav Sedov @echo this is the am__doit target 669*ae771770SStanislav Sedov.PHONY: am__doit 670*ae771770SStanislav SedovEND 671*ae771770SStanislav Sedov# If we don't find an include directive, just comment out the code. 672*ae771770SStanislav SedovAC_MSG_CHECKING([for style of include used by $am_make]) 673*ae771770SStanislav Sedovam__include="#" 674*ae771770SStanislav Sedovam__quote= 675*ae771770SStanislav Sedov_am_result=none 676*ae771770SStanislav Sedov# First try GNU make style include. 677*ae771770SStanislav Sedovecho "include confinc" > confmf 678*ae771770SStanislav Sedov# Ignore all kinds of additional output from `make'. 679*ae771770SStanislav Sedovcase `$am_make -s -f confmf 2> /dev/null` in #( 680*ae771770SStanislav Sedov*the\ am__doit\ target*) 681*ae771770SStanislav Sedov am__include=include 682*ae771770SStanislav Sedov am__quote= 683*ae771770SStanislav Sedov _am_result=GNU 684*ae771770SStanislav Sedov ;; 685*ae771770SStanislav Sedovesac 686*ae771770SStanislav Sedov# Now try BSD make style include. 687*ae771770SStanislav Sedovif test "$am__include" = "#"; then 688*ae771770SStanislav Sedov echo '.include "confinc"' > confmf 689*ae771770SStanislav Sedov case `$am_make -s -f confmf 2> /dev/null` in #( 690*ae771770SStanislav Sedov *the\ am__doit\ target*) 691*ae771770SStanislav Sedov am__include=.include 692*ae771770SStanislav Sedov am__quote="\"" 693*ae771770SStanislav Sedov _am_result=BSD 694*ae771770SStanislav Sedov ;; 695*ae771770SStanislav Sedov esac 696*ae771770SStanislav Sedovfi 697*ae771770SStanislav SedovAC_SUBST([am__include]) 698*ae771770SStanislav SedovAC_SUBST([am__quote]) 699*ae771770SStanislav SedovAC_MSG_RESULT([$_am_result]) 700*ae771770SStanislav Sedovrm -f confinc confmf 701*ae771770SStanislav Sedov]) 702*ae771770SStanislav Sedov 703*ae771770SStanislav Sedov# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 704*ae771770SStanislav Sedov# Free Software Foundation, Inc. 705*ae771770SStanislav Sedov# 706*ae771770SStanislav Sedov# This file is free software; the Free Software Foundation 707*ae771770SStanislav Sedov# gives unlimited permission to copy and/or distribute it, 708*ae771770SStanislav Sedov# with or without modifications, as long as this notice is preserved. 709*ae771770SStanislav Sedov 710*ae771770SStanislav Sedov# serial 6 711*ae771770SStanislav Sedov 712c19800e8SDoug Rabson# AM_PROG_CC_C_O 713c19800e8SDoug Rabson# -------------- 714c19800e8SDoug Rabson# Like AC_PROG_CC_C_O, but changed for automake. 715c19800e8SDoug RabsonAC_DEFUN([AM_PROG_CC_C_O], 716c19800e8SDoug Rabson[AC_REQUIRE([AC_PROG_CC_C_O])dnl 717c19800e8SDoug RabsonAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 718c19800e8SDoug RabsonAC_REQUIRE_AUX_FILE([compile])dnl 719c19800e8SDoug Rabson# FIXME: we rely on the cache variable name because 720c19800e8SDoug Rabson# there is no other way. 721c19800e8SDoug Rabsonset dummy $CC 722*ae771770SStanislav Sedovam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 723*ae771770SStanislav Sedoveval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 724*ae771770SStanislav Sedovif test "$am_t" != yes; then 725c19800e8SDoug Rabson # Losing compiler, so override with the script. 726c19800e8SDoug Rabson # FIXME: It is wrong to rewrite CC. 727c19800e8SDoug Rabson # But if we don't then we get into trouble of one sort or another. 728c19800e8SDoug Rabson # A longer-term fix would be to have automake use am__CC in this case, 729c19800e8SDoug Rabson # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 730c19800e8SDoug Rabson CC="$am_aux_dir/compile $CC" 731c19800e8SDoug Rabsonfi 732c19800e8SDoug Rabsondnl Make sure AC_PROG_CC is never called again, or it will override our 733c19800e8SDoug Rabsondnl setting of CC. 734c19800e8SDoug Rabsonm4_define([AC_PROG_CC], 735c19800e8SDoug Rabson [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 736c19800e8SDoug Rabson]) 7378d4ba808SJacques Vidrine 738c19800e8SDoug Rabson# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7398d4ba808SJacques Vidrine 740*ae771770SStanislav Sedov# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 741c19800e8SDoug Rabson# Free Software Foundation, Inc. 742c19800e8SDoug Rabson# 743c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 744c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 745c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 7468d4ba808SJacques Vidrine 747*ae771770SStanislav Sedov# serial 6 7488d4ba808SJacques Vidrine 7498d4ba808SJacques Vidrine# AM_MISSING_PROG(NAME, PROGRAM) 7508d4ba808SJacques Vidrine# ------------------------------ 7518d4ba808SJacques VidrineAC_DEFUN([AM_MISSING_PROG], 7528d4ba808SJacques Vidrine[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7538d4ba808SJacques Vidrine$1=${$1-"${am_missing_run}$2"} 7548d4ba808SJacques VidrineAC_SUBST($1)]) 7558d4ba808SJacques Vidrine 7568d4ba808SJacques Vidrine 7578d4ba808SJacques Vidrine# AM_MISSING_HAS_RUN 7588d4ba808SJacques Vidrine# ------------------ 7598d4ba808SJacques Vidrine# Define MISSING if not defined so far and test if it supports --run. 7608d4ba808SJacques Vidrine# If it does, set am_missing_run to use it, otherwise, to nothing. 7618d4ba808SJacques VidrineAC_DEFUN([AM_MISSING_HAS_RUN], 7628d4ba808SJacques Vidrine[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 763c19800e8SDoug RabsonAC_REQUIRE_AUX_FILE([missing])dnl 764*ae771770SStanislav Sedovif test x"${MISSING+set}" != xset; then 765*ae771770SStanislav Sedov case $am_aux_dir in 766*ae771770SStanislav Sedov *\ * | *\ *) 767*ae771770SStanislav Sedov MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 768*ae771770SStanislav Sedov *) 769*ae771770SStanislav Sedov MISSING="\${SHELL} $am_aux_dir/missing" ;; 770*ae771770SStanislav Sedov esac 771*ae771770SStanislav Sedovfi 7728d4ba808SJacques Vidrine# Use eval to expand $SHELL 7738d4ba808SJacques Vidrineif eval "$MISSING --run true"; then 7748d4ba808SJacques Vidrine am_missing_run="$MISSING --run " 7758d4ba808SJacques Vidrineelse 7768d4ba808SJacques Vidrine am_missing_run= 7778d4ba808SJacques Vidrine AC_MSG_WARN([`missing' script is too old or missing]) 7788d4ba808SJacques Vidrinefi 7798d4ba808SJacques Vidrine]) 7808d4ba808SJacques Vidrine 781c19800e8SDoug Rabson# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 782c19800e8SDoug Rabson# 783c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 784c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 785c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 786c19800e8SDoug Rabson 7878d4ba808SJacques Vidrine# AM_PROG_MKDIR_P 7888d4ba808SJacques Vidrine# --------------- 789c19800e8SDoug Rabson# Check for `mkdir -p'. 7908d4ba808SJacques VidrineAC_DEFUN([AM_PROG_MKDIR_P], 791c19800e8SDoug Rabson[AC_PREREQ([2.60])dnl 792c19800e8SDoug RabsonAC_REQUIRE([AC_PROG_MKDIR_P])dnl 793c19800e8SDoug Rabsondnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 794c19800e8SDoug Rabsondnl while keeping a definition of mkdir_p for backward compatibility. 795c19800e8SDoug Rabsondnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 796c19800e8SDoug Rabsondnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 797c19800e8SDoug Rabsondnl Makefile.ins that do not define MKDIR_P, so we do our own 798c19800e8SDoug Rabsondnl adjustment using top_builddir (which is defined more often than 799c19800e8SDoug Rabsondnl MKDIR_P). 800c19800e8SDoug RabsonAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 801c19800e8SDoug Rabsoncase $mkdir_p in 802c19800e8SDoug Rabson [[\\/$]]* | ?:[[\\/]]*) ;; 803c19800e8SDoug Rabson */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 804c19800e8SDoug Rabsonesac 805c19800e8SDoug Rabson]) 8068d4ba808SJacques Vidrine 8078d4ba808SJacques Vidrine# Helper functions for option handling. -*- Autoconf -*- 8088d4ba808SJacques Vidrine 809*ae771770SStanislav Sedov# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 810c19800e8SDoug Rabson# 811c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 812c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 813c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 8148d4ba808SJacques Vidrine 815*ae771770SStanislav Sedov# serial 4 8168d4ba808SJacques Vidrine 8178d4ba808SJacques Vidrine# _AM_MANGLE_OPTION(NAME) 8188d4ba808SJacques Vidrine# ----------------------- 8198d4ba808SJacques VidrineAC_DEFUN([_AM_MANGLE_OPTION], 8208d4ba808SJacques Vidrine[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8218d4ba808SJacques Vidrine 8228d4ba808SJacques Vidrine# _AM_SET_OPTION(NAME) 8238d4ba808SJacques Vidrine# ------------------------------ 8248d4ba808SJacques Vidrine# Set option NAME. Presently that only means defining a flag for this option. 8258d4ba808SJacques VidrineAC_DEFUN([_AM_SET_OPTION], 8268d4ba808SJacques Vidrine[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8278d4ba808SJacques Vidrine 8288d4ba808SJacques Vidrine# _AM_SET_OPTIONS(OPTIONS) 8298d4ba808SJacques Vidrine# ---------------------------------- 8308d4ba808SJacques Vidrine# OPTIONS is a space-separated list of Automake options. 8318d4ba808SJacques VidrineAC_DEFUN([_AM_SET_OPTIONS], 832*ae771770SStanislav Sedov[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8338d4ba808SJacques Vidrine 8348d4ba808SJacques Vidrine# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8358d4ba808SJacques Vidrine# ------------------------------------------- 8368d4ba808SJacques Vidrine# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8378d4ba808SJacques VidrineAC_DEFUN([_AM_IF_OPTION], 8388d4ba808SJacques Vidrine[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8398d4ba808SJacques Vidrine 840c19800e8SDoug Rabson# Check to make sure that the build environment is sane. -*- Autoconf -*- 841c19800e8SDoug Rabson 842*ae771770SStanislav Sedov# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 843c19800e8SDoug Rabson# Free Software Foundation, Inc. 8448d4ba808SJacques Vidrine# 845c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 846c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 847c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 8488d4ba808SJacques Vidrine 849*ae771770SStanislav Sedov# serial 5 8508d4ba808SJacques Vidrine 8518d4ba808SJacques Vidrine# AM_SANITY_CHECK 8528d4ba808SJacques Vidrine# --------------- 8538d4ba808SJacques VidrineAC_DEFUN([AM_SANITY_CHECK], 8548d4ba808SJacques Vidrine[AC_MSG_CHECKING([whether build environment is sane]) 8558d4ba808SJacques Vidrine# Just in case 8568d4ba808SJacques Vidrinesleep 1 8578d4ba808SJacques Vidrineecho timestamp > conftest.file 858*ae771770SStanislav Sedov# Reject unsafe characters in $srcdir or the absolute working directory 859*ae771770SStanislav Sedov# name. Accept space and tab only in the latter. 860*ae771770SStanislav Sedovam_lf=' 861*ae771770SStanislav Sedov' 862*ae771770SStanislav Sedovcase `pwd` in 863*ae771770SStanislav Sedov *[[\\\"\#\$\&\'\`$am_lf]]*) 864*ae771770SStanislav Sedov AC_MSG_ERROR([unsafe absolute working directory name]);; 865*ae771770SStanislav Sedovesac 866*ae771770SStanislav Sedovcase $srcdir in 867*ae771770SStanislav Sedov *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 868*ae771770SStanislav Sedov AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 869*ae771770SStanislav Sedovesac 870*ae771770SStanislav Sedov 8718d4ba808SJacques Vidrine# Do `set' in a subshell so we don't clobber the current shell's 8728d4ba808SJacques Vidrine# arguments. Must try -L first in case configure is actually a 8738d4ba808SJacques Vidrine# symlink; some systems play weird games with the mod time of symlinks 8748d4ba808SJacques Vidrine# (eg FreeBSD returns the mod time of the symlink's containing 8758d4ba808SJacques Vidrine# directory). 8768d4ba808SJacques Vidrineif ( 877*ae771770SStanislav Sedov set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8788d4ba808SJacques Vidrine if test "$[*]" = "X"; then 8798d4ba808SJacques Vidrine # -L didn't work. 880*ae771770SStanislav Sedov set X `ls -t "$srcdir/configure" conftest.file` 8818d4ba808SJacques Vidrine fi 8828d4ba808SJacques Vidrine rm -f conftest.file 8838d4ba808SJacques Vidrine if test "$[*]" != "X $srcdir/configure conftest.file" \ 8848d4ba808SJacques Vidrine && test "$[*]" != "X conftest.file $srcdir/configure"; then 8858d4ba808SJacques Vidrine 8868d4ba808SJacques Vidrine # If neither matched, then we have a broken ls. This can happen 8878d4ba808SJacques Vidrine # if, for instance, CONFIG_SHELL is bash and it inherits a 8888d4ba808SJacques Vidrine # broken ls alias from the environment. This has actually 8898d4ba808SJacques Vidrine # happened. Such a system could not be considered "sane". 8908d4ba808SJacques Vidrine AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8918d4ba808SJacques Vidrinealias in your environment]) 8920cadf2f4SJacques Vidrine fi 893b528cefcSMark Murray 8948d4ba808SJacques Vidrine test "$[2]" = conftest.file 8958d4ba808SJacques Vidrine ) 8968d4ba808SJacques Vidrinethen 8978d4ba808SJacques Vidrine # Ok. 8988d4ba808SJacques Vidrine : 8998d4ba808SJacques Vidrineelse 9008d4ba808SJacques Vidrine AC_MSG_ERROR([newly created file is older than distributed files! 9018d4ba808SJacques VidrineCheck your system clock]) 9028d4ba808SJacques Vidrinefi 9038d4ba808SJacques VidrineAC_MSG_RESULT(yes)]) 904b528cefcSMark Murray 905c19800e8SDoug Rabson# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 906c19800e8SDoug Rabson# 907c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 908c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 909c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 910c19800e8SDoug Rabson 9118d4ba808SJacques Vidrine# AM_PROG_INSTALL_STRIP 912c19800e8SDoug Rabson# --------------------- 9138d4ba808SJacques Vidrine# One issue with vendor `install' (even GNU) is that you can't 9148d4ba808SJacques Vidrine# specify the program used to strip binaries. This is especially 9158d4ba808SJacques Vidrine# annoying in cross-compiling environments, where the build's strip 9168d4ba808SJacques Vidrine# is unlikely to handle the host's binaries. 9178d4ba808SJacques Vidrine# Fortunately install-sh will honor a STRIPPROG variable, so we 9188d4ba808SJacques Vidrine# always use install-sh in `make install-strip', and initialize 9198d4ba808SJacques Vidrine# STRIPPROG with the value of the STRIP variable (set by the user). 9208d4ba808SJacques VidrineAC_DEFUN([AM_PROG_INSTALL_STRIP], 9218d4ba808SJacques Vidrine[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9228d4ba808SJacques Vidrine# Installed binaries are usually stripped using `strip' when the user 9238d4ba808SJacques Vidrine# run `make install-strip'. However `strip' might not be the right 9248d4ba808SJacques Vidrine# tool to use in cross-compilation environments, therefore Automake 9258d4ba808SJacques Vidrine# will honor the `STRIP' environment variable to overrule this program. 9268d4ba808SJacques Vidrinednl Don't test for $cross_compiling = yes, because it might be `maybe'. 9278d4ba808SJacques Vidrineif test "$cross_compiling" != no; then 9288d4ba808SJacques Vidrine AC_CHECK_TOOL([STRIP], [strip], :) 9298d4ba808SJacques Vidrinefi 930c19800e8SDoug RabsonINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9318d4ba808SJacques VidrineAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9328d4ba808SJacques Vidrine 933*ae771770SStanislav Sedov# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 934c19800e8SDoug Rabson# 935c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 936c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 937c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 938c19800e8SDoug Rabson 939*ae771770SStanislav Sedov# serial 2 940*ae771770SStanislav Sedov 941c19800e8SDoug Rabson# _AM_SUBST_NOTMAKE(VARIABLE) 942c19800e8SDoug Rabson# --------------------------- 943*ae771770SStanislav Sedov# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 944c19800e8SDoug Rabson# This macro is traced by Automake. 945c19800e8SDoug RabsonAC_DEFUN([_AM_SUBST_NOTMAKE]) 946c19800e8SDoug Rabson 947*ae771770SStanislav Sedov# AM_SUBST_NOTMAKE(VARIABLE) 948*ae771770SStanislav Sedov# --------------------------- 949*ae771770SStanislav Sedov# Public sister of _AM_SUBST_NOTMAKE. 950*ae771770SStanislav SedovAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 951*ae771770SStanislav Sedov 952c19800e8SDoug Rabson# Check how to create a tarball. -*- Autoconf -*- 953c19800e8SDoug Rabson 954c19800e8SDoug Rabson# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 955c19800e8SDoug Rabson# 956c19800e8SDoug Rabson# This file is free software; the Free Software Foundation 957c19800e8SDoug Rabson# gives unlimited permission to copy and/or distribute it, 958c19800e8SDoug Rabson# with or without modifications, as long as this notice is preserved. 959c19800e8SDoug Rabson 960c19800e8SDoug Rabson# serial 2 961c19800e8SDoug Rabson 962c19800e8SDoug Rabson# _AM_PROG_TAR(FORMAT) 963c19800e8SDoug Rabson# -------------------- 964c19800e8SDoug Rabson# Check how to create a tarball in format FORMAT. 965c19800e8SDoug Rabson# FORMAT should be one of `v7', `ustar', or `pax'. 966c19800e8SDoug Rabson# 967c19800e8SDoug Rabson# Substitute a variable $(am__tar) that is a command 968c19800e8SDoug Rabson# writing to stdout a FORMAT-tarball containing the directory 969c19800e8SDoug Rabson# $tardir. 970c19800e8SDoug Rabson# tardir=directory && $(am__tar) > result.tar 971c19800e8SDoug Rabson# 972c19800e8SDoug Rabson# Substitute a variable $(am__untar) that extract such 973c19800e8SDoug Rabson# a tarball read from stdin. 974c19800e8SDoug Rabson# $(am__untar) < result.tar 975c19800e8SDoug RabsonAC_DEFUN([_AM_PROG_TAR], 976c19800e8SDoug Rabson[# Always define AMTAR for backward compatibility. 977c19800e8SDoug RabsonAM_MISSING_PROG([AMTAR], [tar]) 978c19800e8SDoug Rabsonm4_if([$1], [v7], 979c19800e8SDoug Rabson [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 980c19800e8SDoug Rabson [m4_case([$1], [ustar],, [pax],, 981c19800e8SDoug Rabson [m4_fatal([Unknown tar format])]) 982c19800e8SDoug RabsonAC_MSG_CHECKING([how to create a $1 tar archive]) 983c19800e8SDoug Rabson# Loop over all known methods to create a tar archive until one works. 984c19800e8SDoug Rabson_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 985c19800e8SDoug Rabson_am_tools=${am_cv_prog_tar_$1-$_am_tools} 986c19800e8SDoug Rabson# Do not fold the above two line into one, because Tru64 sh and 987c19800e8SDoug Rabson# Solaris sh will not grok spaces in the rhs of `-'. 988c19800e8SDoug Rabsonfor _am_tool in $_am_tools 989c19800e8SDoug Rabsondo 990c19800e8SDoug Rabson case $_am_tool in 991c19800e8SDoug Rabson gnutar) 992c19800e8SDoug Rabson for _am_tar in tar gnutar gtar; 993c19800e8SDoug Rabson do 994c19800e8SDoug Rabson AM_RUN_LOG([$_am_tar --version]) && break 995c19800e8SDoug Rabson done 996c19800e8SDoug Rabson am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 997c19800e8SDoug Rabson am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 998c19800e8SDoug Rabson am__untar="$_am_tar -xf -" 999c19800e8SDoug Rabson ;; 1000c19800e8SDoug Rabson plaintar) 1001c19800e8SDoug Rabson # Must skip GNU tar: if it does not support --format= it doesn't create 1002c19800e8SDoug Rabson # ustar tarball either. 1003c19800e8SDoug Rabson (tar --version) >/dev/null 2>&1 && continue 1004c19800e8SDoug Rabson am__tar='tar chf - "$$tardir"' 1005c19800e8SDoug Rabson am__tar_='tar chf - "$tardir"' 1006c19800e8SDoug Rabson am__untar='tar xf -' 1007c19800e8SDoug Rabson ;; 1008c19800e8SDoug Rabson pax) 1009c19800e8SDoug Rabson am__tar='pax -L -x $1 -w "$$tardir"' 1010c19800e8SDoug Rabson am__tar_='pax -L -x $1 -w "$tardir"' 1011c19800e8SDoug Rabson am__untar='pax -r' 1012c19800e8SDoug Rabson ;; 1013c19800e8SDoug Rabson cpio) 1014c19800e8SDoug Rabson am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1015c19800e8SDoug Rabson am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1016c19800e8SDoug Rabson am__untar='cpio -i -H $1 -d' 1017c19800e8SDoug Rabson ;; 1018c19800e8SDoug Rabson none) 1019c19800e8SDoug Rabson am__tar=false 1020c19800e8SDoug Rabson am__tar_=false 1021c19800e8SDoug Rabson am__untar=false 1022c19800e8SDoug Rabson ;; 1023c19800e8SDoug Rabson esac 1024c19800e8SDoug Rabson 1025c19800e8SDoug Rabson # If the value was cached, stop now. We just wanted to have am__tar 1026c19800e8SDoug Rabson # and am__untar set. 1027c19800e8SDoug Rabson test -n "${am_cv_prog_tar_$1}" && break 1028c19800e8SDoug Rabson 1029c19800e8SDoug Rabson # tar/untar a dummy directory, and stop if the command works 1030c19800e8SDoug Rabson rm -rf conftest.dir 1031c19800e8SDoug Rabson mkdir conftest.dir 1032c19800e8SDoug Rabson echo GrepMe > conftest.dir/file 1033c19800e8SDoug Rabson AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1034c19800e8SDoug Rabson rm -rf conftest.dir 1035c19800e8SDoug Rabson if test -s conftest.tar; then 1036c19800e8SDoug Rabson AM_RUN_LOG([$am__untar <conftest.tar]) 1037c19800e8SDoug Rabson grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1038c19800e8SDoug Rabson fi 1039c19800e8SDoug Rabsondone 1040c19800e8SDoug Rabsonrm -rf conftest.dir 1041c19800e8SDoug Rabson 1042c19800e8SDoug RabsonAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1043c19800e8SDoug RabsonAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1044c19800e8SDoug RabsonAC_SUBST([am__tar]) 1045c19800e8SDoug RabsonAC_SUBST([am__untar]) 1046c19800e8SDoug Rabson]) # _AM_PROG_TAR 1047c19800e8SDoug Rabson 10488d4ba808SJacques Vidrinem4_include([cf/aix.m4]) 10498d4ba808SJacques Vidrinem4_include([cf/auth-modules.m4]) 10508d4ba808SJacques Vidrinem4_include([cf/broken-getaddrinfo.m4]) 10518d4ba808SJacques Vidrinem4_include([cf/broken-glob.m4]) 10528d4ba808SJacques Vidrinem4_include([cf/broken-realloc.m4]) 10538d4ba808SJacques Vidrinem4_include([cf/broken-snprintf.m4]) 10548d4ba808SJacques Vidrinem4_include([cf/broken.m4]) 10558d4ba808SJacques Vidrinem4_include([cf/broken2.m4]) 10568d4ba808SJacques Vidrinem4_include([cf/c-attribute.m4]) 10578d4ba808SJacques Vidrinem4_include([cf/capabilities.m4]) 10588d4ba808SJacques Vidrinem4_include([cf/check-compile-et.m4]) 10598d4ba808SJacques Vidrinem4_include([cf/check-getpwnam_r-posix.m4]) 10608d4ba808SJacques Vidrinem4_include([cf/check-man.m4]) 10618d4ba808SJacques Vidrinem4_include([cf/check-netinet-ip-and-tcp.m4]) 10628d4ba808SJacques Vidrinem4_include([cf/check-type-extra.m4]) 10638d4ba808SJacques Vidrinem4_include([cf/check-var.m4]) 10648d4ba808SJacques Vidrinem4_include([cf/check-x.m4]) 10658d4ba808SJacques Vidrinem4_include([cf/check-xau.m4]) 10668d4ba808SJacques Vidrinem4_include([cf/crypto.m4]) 10678d4ba808SJacques Vidrinem4_include([cf/db.m4]) 10688d4ba808SJacques Vidrinem4_include([cf/destdirs.m4]) 1069*ae771770SStanislav Sedovm4_include([cf/dispatch.m4]) 10708d4ba808SJacques Vidrinem4_include([cf/dlopen.m4]) 10718d4ba808SJacques Vidrinem4_include([cf/find-func-no-libs.m4]) 10728d4ba808SJacques Vidrinem4_include([cf/find-func-no-libs2.m4]) 10738d4ba808SJacques Vidrinem4_include([cf/find-func.m4]) 10748d4ba808SJacques Vidrinem4_include([cf/find-if-not-broken.m4]) 1075c19800e8SDoug Rabsonm4_include([cf/framework-security.m4]) 10768d4ba808SJacques Vidrinem4_include([cf/have-struct-field.m4]) 10778d4ba808SJacques Vidrinem4_include([cf/have-type.m4]) 10788d4ba808SJacques Vidrinem4_include([cf/irix.m4]) 10798d4ba808SJacques Vidrinem4_include([cf/krb-bigendian.m4]) 10808d4ba808SJacques Vidrinem4_include([cf/krb-func-getlogin.m4]) 10818d4ba808SJacques Vidrinem4_include([cf/krb-ipv6.m4]) 10828d4ba808SJacques Vidrinem4_include([cf/krb-prog-ln-s.m4]) 10838d4ba808SJacques Vidrinem4_include([cf/krb-readline.m4]) 10848d4ba808SJacques Vidrinem4_include([cf/krb-struct-spwd.m4]) 10858d4ba808SJacques Vidrinem4_include([cf/krb-struct-winsize.m4]) 1086c19800e8SDoug Rabsonm4_include([cf/largefile.m4]) 1087*ae771770SStanislav Sedovm4_include([cf/libtool.m4]) 1088*ae771770SStanislav Sedovm4_include([cf/ltoptions.m4]) 1089*ae771770SStanislav Sedovm4_include([cf/ltsugar.m4]) 1090*ae771770SStanislav Sedovm4_include([cf/ltversion.m4]) 1091*ae771770SStanislav Sedovm4_include([cf/lt~obsolete.m4]) 10928d4ba808SJacques Vidrinem4_include([cf/mips-abi.m4]) 10938d4ba808SJacques Vidrinem4_include([cf/misc.m4]) 10948d4ba808SJacques Vidrinem4_include([cf/need-proto.m4]) 10958d4ba808SJacques Vidrinem4_include([cf/osfc2.m4]) 10968d4ba808SJacques Vidrinem4_include([cf/otp.m4]) 1097*ae771770SStanislav Sedovm4_include([cf/pkg.m4]) 10988d4ba808SJacques Vidrinem4_include([cf/proto-compat.m4]) 1099c19800e8SDoug Rabsonm4_include([cf/pthreads.m4]) 1100c19800e8SDoug Rabsonm4_include([cf/resolv.m4]) 11018d4ba808SJacques Vidrinem4_include([cf/retsigtype.m4]) 11028d4ba808SJacques Vidrinem4_include([cf/roken-frag.m4]) 1103c19800e8SDoug Rabsonm4_include([cf/socket-wrapper.m4]) 11048d4ba808SJacques Vidrinem4_include([cf/sunos.m4]) 11058d4ba808SJacques Vidrinem4_include([cf/telnet.m4]) 11068d4ba808SJacques Vidrinem4_include([cf/test-package.m4]) 1107c19800e8SDoug Rabsonm4_include([cf/version-script.m4]) 11088d4ba808SJacques Vidrinem4_include([cf/wflags.m4]) 1109c19800e8SDoug Rabsonm4_include([cf/win32.m4]) 11108d4ba808SJacques Vidrinem4_include([cf/with-all.m4]) 1111c19800e8SDoug Rabsonm4_include([acinclude.m4]) 1112