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