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
9022
9023
9024
9025
[AC_ARG_ENABLE([dependency-tracking], [dnl
AS_HELP_STRING(
  [--enable-dependency-tracking],
  [do not reject slow dependency extractors])
AS_HELP_STRING(
  [--disable-dependency-tracking],
  [speeds up one-time build])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9026
9027
9028
if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
9029
  am__nodep='_no'
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9030
9031
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9032
9033
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9034
9035
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9036
9037
])

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

9040
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9041
9042
9043
9044
#
# 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
9045

9046
# serial 6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9047
9048
9049
9050

# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
[{
  # 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.
9065
    # We used to match only the files named 'Makefile.in', but
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
    # 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
9077
    # from the Makefile without running 'make'.
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
    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"`
    # 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" | \
9089
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9090
9091
9092
9093
9094
9095
9096
      # 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
9097
  done
9098
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9099
9100
9101
9102
9103
9104
9105
9106
])# _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
9107
# is enabled.  FIXME.  This creates each '.P' file that we will
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9108
9109
9110
9111
9112
9113
9114
# 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
9115
# Do all the work for Automake.                             -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9116

9117
# Copyright (C) 1996-2012 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 19
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
9170
9171
9172
[AC_DIAGNOSE([obsolete],
[$0: two- and three-arguments forms are deprecated.  For more info, see:
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9173
9174
9175
 AC_SUBST([PACKAGE], [$1])dnl
 AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9176
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9177
9178
9179
m4_if(
  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  [ok:ok],,
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9180
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9181
9182
9183
9184
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl

_AM_IF_OPTION([no-define],,
9185
9186
[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
9187
9188
9189
9190

# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9191
9192
9193
9194
9195
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])
9196
9197
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9198
9199
9200
9201
9202
9203
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9204
9205
9206
9207
9208
9209
# 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])],
9210
9211
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
			     [_AM_PROG_TAR([v7])])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9212
9213
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9214
9215
9216
		  [_AM_DEPENDENCIES([CC])],
		  [m4_define([AC_PROG_CC],
			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9217
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9218
9219
9220
		  [_AM_DEPENDENCIES([CXX])],
		  [m4_define([AC_PROG_CXX],
			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9221
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
		  [_AM_DEPENDENCIES([OBJC])],
		  [m4_define([AC_PROG_OBJC],
			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
dnl but we still cater to Autoconf 2.62.
m4_ifdef([AC_PROG_OBJCXX],
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
		  [_AM_DEPENDENCIES([OBJCXX])],
		  [m4_define([AC_PROG_OBJCXX],
			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9232
])
9233
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9234
9235
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
9236
9237
9238
9239
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
9240
9241
])

9242
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9243
9244
9245
9246
9247
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
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257

# 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
9258
_am_arg=$1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9259
9260
9261
_am_stamp_count=1
for _am_header in $config_headers :; do
  case $_am_header in
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9262
    $_am_arg | $_am_arg:* )
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9263
9264
9265
9266
9267
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9268
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9269

9270
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9271
9272
9273
9274
9275
#
# 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.

9276
9277
# serial 8

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9278
9279
9280
9281
9282
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9283
9284
9285
9286
9287
9288
9289
9290
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
9291
AC_SUBST([install_sh])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9292

9293
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9294
9295
9296
9297
#
# 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
9298

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9299
# serial 2
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313

# 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
9314
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9315

9316
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9317
9318
9319
9320
#
# 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
9321

9322
# serial 5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9323
9324
9325
9326
9327
9328
9329
9330

# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
9331
	@echo this is the am__doit target
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9332
9333
9334
9335
9336
9337
9338
9339
9340
.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
9341
# Ignore all kinds of additional output from 'make'.
9342
9343
9344
9345
9346
9347
9348
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
9349
9350
9351
# Now try BSD make style include.
if test "$am__include" = "#"; then
   echo '.include "confinc"' > confmf
9352
9353
9354
9355
9356
9357
9358
   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
9359
9360
9361
9362
9363
9364
9365
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
9366
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9367

9368
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9369
9370
9371
9372
#
# 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
9373

9374
# serial 7
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389

# 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
9390
AC_REQUIRE_AUX_FILE([missing])dnl
9391
9392
9393
9394
9395
9396
9397
9398
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
9399
9400
9401
9402
9403
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
9404
  AC_MSG_WARN(['missing' script is too old or missing])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9405
9406
9407
fi
])

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

9410
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9411
9412
9413
9414
#
# 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
9415

9416
# serial 6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9417
9418
9419
9420
9421
9422
9423

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

# _AM_SET_OPTION(NAME)
9424
# --------------------
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9425
9426
# Set option NAME.  Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
9427
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9428
9429

# _AM_SET_OPTIONS(OPTIONS)
9430
# ------------------------
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9431
9432
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
9433
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9434
9435
9436
9437
9438
9439
9440

# _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
9441
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9442

9443
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9444
9445
9446
9447
#
# 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
9448

9449
# serial 9
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9450
9451
9452
9453
9454

# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
# 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\ \	]]*)
9465
    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
9466
9467
esac

9468
# Do 'set' in a subshell so we don't clobber the current shell's
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9469
9470
9471
9472
9473
# 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 (
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
   am_has_slept=no
   for am_try in 1 2; do
     echo "timestamp, slept: $am_has_slept" > conftest.file
     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
     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
     if test "$[2]" = conftest.file || test $am_try -eq 2; then
       break
     fi
     # Just in case.
     sleep 1
     am_has_slept=yes
   done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9499
9500
9501
9502
9503
9504
9505
9506
9507
   test "$[2]" = conftest.file
   )
then
   # Ok.
   :
else
   AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
AC_MSG_RESULT([yes])
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  ( sleep 1 ) &
  am_sleep_pid=$!
fi
AC_CONFIG_COMMANDS_PRE(
  [AC_MSG_CHECKING([that generated files are newer than configure])
   if test -n "$am_sleep_pid"; then
     # Hide warnings about reused PIDs.
     wait $am_sleep_pid 2>/dev/null
   fi
   AC_MSG_RESULT([done])])
rm -f conftest.file
])
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9525

9526
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9527
9528
9529
9530
#
# 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
9531

9532
9533
# serial 2

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9534
9535
# AM_PROG_INSTALL_STRIP
# ---------------------
9536
# One issue with vendor 'install' (even GNU) is that you can't
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9537
9538
9539
9540
# 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
9541
# always use install-sh in "make install-strip", and initialize
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9542
9543
9544
# 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
9545
9546
# 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
9547
# tool to use in cross-compilation environments, therefore Automake
9548
9549
# 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
9550
9551
9552
if test "$cross_compiling" != no; then
  AC_CHECK_TOOL([STRIP], [strip], :)
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9553
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9554
9555
AC_SUBST([INSTALL_STRIP_PROGRAM])])

9556
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9557
9558
9559
9560
9561
#
# 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.

9562
# serial 3
9563

Emmanuel Bertin's avatar
Emmanuel Bertin committed
9564
9565
9566
9567
9568
9569
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])

9570
# AM_SUBST_NOTMAKE(VARIABLE)
9571
# --------------------------
9572
9573
9574
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])

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

9577
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9578
9579
9580
9581
#
# 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
9582

9583
# serial 3
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9584
9585
9586
9587

# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
9588
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
#
# 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],
9599
9600
9601
[# 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
9602
m4_if([$1], [v7],
9603
     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9604
9605
9606
9607
9608
9609
9610
     [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
9611
# Solaris sh will not grok spaces in the rhs of '-'.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
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
9667
9668
9669
9670
9671
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