aclocal.m4 340 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9001
9002
9003
9004
9005
9006
9007
9008
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])


# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
9009
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9010
9011
9012
9013
9014
9015
9016
9017
9018
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])


# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
9019
9020
9021
[AC_ARG_ENABLE(dependency-tracking,
[  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9022
9023
9024
if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
9025
  am__nodep='_no'
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9026
9027
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9028
9029
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9030
9031
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9032
9033
])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9034
# Generate code to set up dependency tracking.              -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9035

9036
9037
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9038
9039
9040
9041
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9042

9043
#serial 5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9044
9045
9046
9047

# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
[{
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
  # are listed without --file.  Let's play safe and only enable the eval
  # if we detect the quoting.
  case $CONFIG_FILES in
  *\'*) eval set x "$CONFIG_FILES" ;;
  *)   set x $CONFIG_FILES ;;
  esac
  shift
  for mf
  do
    # Strip MF so we end up with the name of the file.
    mf=`echo "$mf" | sed -e 's/:.*$//'`
    # Check whether this is an Automake generated Makefile or not.
9062
    # We used to match only the files named `Makefile.in', but
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
    # some people rename them; so instead we look at the file content.
    # Grep'ing the first line is not enough: some people post-process
    # each Makefile.in and add a new line on top of each file to say so.
    # Grep'ing the whole file is not good either: AIX grep has a line
    # limit of 2048, but all sed's we know have understand at least 4000.
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
      dirpart=`AS_DIRNAME("$mf")`
    else
      continue
    fi
    # Extract the definition of DEPDIR, am__include, and am__quote
9074
    # from the Makefile without running `make'.
9075
9076
9077
9078
9079
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    test -z "$DEPDIR" && continue
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
    test -z "am__include" && continue
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9080
9081
    # When using ansi2knr, U may be empty or an underscore; expand it
    U=`sed -n 's/^U = //p' < "$mf"`
9082
9083
9084
9085
9086
9087
    # Find all dependency output files, they are included files with
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
    # simplest approach to changing $(DEPDIR) to its actual value in the
    # expansion.
    for file in `sed -n "
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9088
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9089
9090
9091
9092
9093
9094
9095
      # Make sure the directory exists.
      test -f "$dirpart/$file" && continue
      fdir=`AS_DIRNAME(["$file"])`
      AS_MKDIR_P([$dirpart/$fdir])
      # echo "creating $dirpart/$file"
      echo '# dummy' > "$dirpart/$file"
    done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9096
  done
9097
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9098
9099
9100
9101
9102
9103
9104
9105
])# _AM_OUTPUT_DEPENDENCY_COMMANDS


# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
9106
# is enabled.  FIXME.  This creates each `.P' file that we will
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9107
9108
9109
9110
9111
9112
9113
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9114
# Do all the work for Automake.                             -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9115

9116
9117
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9118
9119
9120
9121
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9122

9123
# serial 16
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9124

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9125
9126
# This macro actually does too much.  Some checks are only needed if
# your package does certain things.  But this isn't really a big deal.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139

# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition.  After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
9140
[AC_PREREQ([2.62])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9141
9142
9143
9144
9145
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9146
9147
9148
9149
9150
9151
9152
9153
if test "`cd $srcdir && pwd`" != "`pwd`"; then
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  # is not polluted with repeated "-I."
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  # test to see if srcdir already configured
  if test -f $srcdir/config.status; then
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
fi

# test whether we have cygpath
if test -z "$CYGPATH_W"; then
  if (cygpath --version) >/dev/null 2>/dev/null; then
    CYGPATH_W='cygpath -w'
  else
    CYGPATH_W=echo
  fi
fi
AC_SUBST([CYGPATH_W])

# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
9169
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9170
9171
9172
 AC_SUBST([PACKAGE], [$1])dnl
 AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9173
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9174
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9175
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9176
9177
9178
9179
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl

_AM_IF_OPTION([no-define],,
9180
9181
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9182
9183
9184
9185

# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9186
9187
9188
9189
9190
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
9191
9192
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9193
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9194
9195
9196
9197
9198
9199
# We need awk for the "check" target.  The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9200
9201
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
			     [_AM_PROG_TAR([v7])])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9202
9203
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9204
9205
9206
		  [_AM_DEPENDENCIES(CC)],
		  [define([AC_PROG_CC],
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9207
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9208
9209
9210
		  [_AM_DEPENDENCIES(CXX)],
		  [define([AC_PROG_CXX],
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9211
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9212
9213
9214
		  [_AM_DEPENDENCIES(OBJC)],
		  [define([AC_PROG_OBJC],
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9215
])
9216
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9217
9218
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9219
9220
9221
9222
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9223
9224
])

9225
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9226
9227
9228
9229
9230
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240

# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated.  The stamp files are numbered to have different names.

# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9241
_am_arg=$1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9242
9243
9244
_am_stamp_count=1
for _am_header in $config_headers :; do
  case $_am_header in
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9245
    $_am_arg | $_am_arg:* )
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9246
9247
9248
9249
9250
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9251
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9252

9253
9254
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
# Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9255
9256
9257
9258
9259
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

9260
# serial 1
9261

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9262
9263
9264
9265
9266
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9267
9268
9269
9270
9271
9272
9273
9274
if test x"${install_sh}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi
9275
AC_SUBST(install_sh)])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9276

9277
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9278
9279
9280
9281
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9282

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9283
# serial 2
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297

# Check whether the underlying file-system supports filenames
# with a leading dot.  For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
  am__leading_dot=.
else
  am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9298
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9299

9300
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9301
9302
9303
9304
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9305

9306
# serial 4
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9307
9308
9309
9310
9311
9312
9313
9314

# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
9315
	@echo this is the am__doit target
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9316
9317
9318
9319
9320
9321
9322
9323
9324
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
9325
# Ignore all kinds of additional output from `make'.
9326
9327
9328
9329
9330
9331
9332
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
  am__include=include
  am__quote=
  _am_result=GNU
  ;;
esac
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9333
9334
9335
# Now try BSD make style include.
if test "$am__include" = "#"; then
   echo '.include "confinc"' > confmf
9336
9337
9338
9339
9340
9341
9342
   case `$am_make -s -f confmf 2> /dev/null` in #(
   *the\ am__doit\ target*)
     am__include=.include
     am__quote="\""
     _am_result=BSD
     ;;
   esac
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9343
9344
9345
9346
9347
9348
9349
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9350
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9351

9352
9353
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9354
9355
9356
9357
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9358

9359
# serial 6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374

# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])


# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9375
AC_REQUIRE_AUX_FILE([missing])dnl
9376
9377
9378
9379
9380
9381
9382
9383
if test x"${MISSING+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  *)
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
  esac
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9384
9385
9386
9387
9388
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
9389
  AC_MSG_WARN([`missing' script is too old or missing])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9390
9391
9392
fi
])

9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# serial 1

# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
  [[\\/$]]* | ?:[[\\/]]*) ;;
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9422
# Helper functions for option handling.                     -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9423

9424
9425
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
# Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9426
9427
9428
9429
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9430

9431
# serial 5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9432
9433
9434
9435
9436
9437
9438

# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])

# _AM_SET_OPTION(NAME)
9439
# --------------------
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9440
9441
# Set option NAME.  Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
9442
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9443
9444

# _AM_SET_OPTIONS(OPTIONS)
9445
# ------------------------
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9446
9447
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
9448
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9449
9450
9451
9452
9453
9454
9455

# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9456
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9457

9458
9459
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9460
9461
9462
9463
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9464

9465
# serial 5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9466
9467
9468
9469
9470

# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
9471
9472
9473
# Just in case
sleep 1
echo timestamp > conftest.file
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
# Reject unsafe characters in $srcdir or the absolute working directory
# name.  Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
  *[[\\\"\#\$\&\'\`$am_lf]]*)
    AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9484
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9485
9486
esac

9487
# Do `set' in a subshell so we don't clobber the current shell's
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9488
9489
9490
9491
9492
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
   if test "$[*]" = "X"; then
      # -L didn't work.
      set X `ls -t "$srcdir/configure" conftest.file`
   fi
   rm -f conftest.file
   if test "$[*]" != "X $srcdir/configure conftest.file" \
      && test "$[*]" != "X conftest.file $srcdir/configure"; then

      # If neither matched, then we have a broken ls.  This can happen
      # if, for instance, CONFIG_SHELL is bash and it inherits a
      # broken ls alias from the environment.  This has actually
      # happened.  Such a system could not be considered "sane".
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
alias in your environment])
   fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9510
9511
9512
9513
9514
9515
9516
9517
9518
   test "$[2]" = conftest.file
   )
then
   # Ok.
   :
else
   AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
9519
AC_MSG_RESULT(yes)])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9520

9521
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9522
9523
9524
9525
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9526

9527
# serial 1
9528

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9529
9530
# AM_PROG_INSTALL_STRIP
# ---------------------
9531
# One issue with vendor `install' (even GNU) is that you can't
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9532
9533
9534
9535
# specify the program used to strip binaries.  This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
9536
# always use install-sh in `make install-strip', and initialize
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9537
9538
9539
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9540
9541
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'.  However `strip' might not be the right
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9542
# tool to use in cross-compilation environments, therefore Automake
9543
9544
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9545
9546
9547
if test "$cross_compiling" != no; then
  AC_CHECK_TOOL([STRIP], [strip], :)
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9548
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9549
9550
AC_SUBST([INSTALL_STRIP_PROGRAM])])

9551
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9552
9553
9554
9555
9556
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

9557
# serial 3
9558

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9559
9560
9561
9562
9563
9564
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])

9565
# AM_SUBST_NOTMAKE(VARIABLE)
9566
# --------------------------
9567
9568
9569
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9570
9571
# Check how to create a tarball.                            -*- Autoconf -*-

9572
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9573
9574
9575
9576
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9577

9578
# serial 2
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9579
9580
9581
9582

# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
9583
# FORMAT should be one of `v7', `ustar', or `pax'.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
#     tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
#     $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
9594
9595
9596
[# Always define AMTAR for backward compatibility.  Yes, it's still used
# in the wild :-(  We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9597
m4_if([$1], [v7],
9598
     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9599
9600
9601
9602
9603
9604
9605
     [m4_case([$1], [ustar],, [pax],,
              [m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
9606
# Solaris sh will not grok spaces in the rhs of `-'.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
for _am_tool in $_am_tools
do
  case $_am_tool in
  gnutar)
    for _am_tar in tar gnutar gtar;
    do
      AM_RUN_LOG([$_am_tar --version]) && break
    done
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
    am__untar="$_am_tar -xf -"
    ;;
  plaintar)
    # Must skip GNU tar: if it does not support --format= it doesn't create
    # ustar tarball either.
    (tar --version) >/dev/null 2>&1 && continue
    am__tar='tar chf - "$$tardir"'
    am__tar_='tar chf - "$tardir"'
    am__untar='tar xf -'
    ;;
  pax)
    am__tar='pax -L -x $1 -w "$$tardir"'
    am__tar_='pax -L -x $1 -w "$tardir"'
    am__untar='pax -r'
    ;;
  cpio)
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
    am__untar='cpio -i -H $1 -d'
    ;;
  none)
    am__tar=false
    am__tar_=false
    am__untar=false
    ;;
  esac

  # If the value was cached, stop now.  We just wanted to have am__tar
  # and am__untar set.
  test -n "${am_cv_prog_tar_$1}" && break

  # tar/untar a dummy directory, and stop if the command works
  rm -rf conftest.dir
  mkdir conftest.dir
  echo GrepMe > conftest.dir/file
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  rm -rf conftest.dir
  if test -s conftest.tar; then
    AM_RUN_LOG([$am__untar <conftest.tar])
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  fi
done
rm -rf conftest.dir

AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
For faster browsing, not all history is shown. View entire blame