448
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
449
# serial 40 IT_PROG_INTLTOOL
450
AC_DEFUN([IT_PROG_INTLTOOL], [
452
AC_REQUIRE([AM_NLS])dnl
454
case "$am__api_version" in
456
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
462
if test -n "$1"; then
463
AC_MSG_CHECKING([for intltool >= $1])
465
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
466
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
467
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
469
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
470
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
471
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
474
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
475
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
476
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
477
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
478
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
481
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
482
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
483
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
484
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
485
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
486
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
487
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
488
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
489
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
490
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
491
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
492
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
493
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
494
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
495
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
496
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
497
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
498
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
499
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
501
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
502
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
503
_IT_SUBST(INTLTOOL_KEYS_RULE)
504
_IT_SUBST(INTLTOOL_PROP_RULE)
505
_IT_SUBST(INTLTOOL_OAF_RULE)
506
_IT_SUBST(INTLTOOL_PONG_RULE)
507
_IT_SUBST(INTLTOOL_SERVER_RULE)
508
_IT_SUBST(INTLTOOL_SHEET_RULE)
509
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
510
_IT_SUBST(INTLTOOL_UI_RULE)
511
_IT_SUBST(INTLTOOL_XAM_RULE)
512
_IT_SUBST(INTLTOOL_KBD_RULE)
513
_IT_SUBST(INTLTOOL_XML_RULE)
514
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
515
_IT_SUBST(INTLTOOL_CAVES_RULE)
516
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
517
_IT_SUBST(INTLTOOL_THEME_RULE)
518
_IT_SUBST(INTLTOOL_SERVICE_RULE)
519
_IT_SUBST(INTLTOOL_POLICY_RULE)
521
# Check the gettext tools to make sure they are GNU
522
AC_PATH_PROG(XGETTEXT, xgettext)
523
AC_PATH_PROG(MSGMERGE, msgmerge)
524
AC_PATH_PROG(MSGFMT, msgfmt)
525
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
526
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
527
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
529
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
530
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
531
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
532
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
533
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
536
AC_PATH_PROG(INTLTOOL_PERL, perl)
537
if test -z "$INTLTOOL_PERL"; then
538
AC_MSG_ERROR([perl not found])
540
AC_MSG_CHECKING([for perl >= 5.8.1])
541
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
542
if test $? -ne 0; then
543
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
545
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
546
AC_MSG_RESULT([$IT_PERL_VERSION])
548
if test "x$2" != "xno-xml"; then
549
AC_MSG_CHECKING([for XML::Parser])
550
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
553
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
557
# Substitute ALL_LINGUAS so we can use it in po/Makefile
558
AC_SUBST(ALL_LINGUAS)
560
# Set DATADIRNAME correctly if it is not set yet
561
# (copied from glib-gettext.m4)
562
if test -z "$DATADIRNAME"; then
564
[AC_LANG_PROGRAM([[]],
565
[[extern int _nl_msg_cat_cntr;
566
return _nl_msg_cat_cntr]])],
570
dnl On Solaris, if bind_textdomain_codeset is in libc,
571
dnl GNU format message catalog is always supported,
572
dnl since both are added to the libc all together.
573
dnl Hence, we'd like to go with DATADIRNAME=share
575
AC_CHECK_FUNC(bind_textdomain_codeset,
576
[DATADIRNAME=share], [DATADIRNAME=lib])
583
AC_SUBST(DATADIRNAME)
590
# IT_PO_SUBDIR(DIRNAME)
591
# ---------------------
592
# All po subdirs have to be declared with this macro; the subdir "po" is
593
# declared by IT_PROG_INTLTOOL.
595
AC_DEFUN([IT_PO_SUBDIR],
596
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
598
dnl The following CONFIG_COMMANDS should be exetuted at the very end
599
dnl of config.status.
600
AC_CONFIG_COMMANDS_PRE([
601
AC_CONFIG_COMMANDS([$1/stamp-it], [
602
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
603
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
605
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
610
'"s|^| $ac_top_srcdir/|" \
611
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
613
[sed '/^POTFILES =/,/[^\\]$/ {
617
' "$1/Makefile.in" >"$1/Makefile"]
618
rm -f "$1/Makefile.tmp"
619
mv "$1/stamp-it.tmp" "$1/stamp-it"
624
# _IT_SUBST(VARIABLE)
625
# -------------------
626
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
628
AC_DEFUN([_IT_SUBST],
631
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
636
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
637
# A hint is needed for aclocal from Automake <= 1.9.4:
638
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
455
641
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
457
643
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
8414
8603
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8415
8604
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8606
# nls.m4 serial 3 (gettext-0.15)
8607
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8608
dnl This file is free software; the Free Software Foundation
8609
dnl gives unlimited permission to copy and/or distribute it,
8610
dnl with or without modifications, as long as this notice is preserved.
8612
dnl This file can can be used in projects which are not available under
8613
dnl the GNU General Public License or the GNU Library General Public
8614
dnl License but which still want to provide support for the GNU gettext
8616
dnl Please note that the actual code of the GNU gettext library is covered
8617
dnl by the GNU Library General Public License, and the rest of the GNU
8618
dnl gettext package package is covered by the GNU General Public License.
8619
dnl They are *not* in the public domain.
8622
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8623
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8629
AC_MSG_CHECKING([whether NLS is requested])
8630
dnl Default is enabled NLS
8632
[ --disable-nls do not use Native Language Support],
8633
USE_NLS=$enableval, USE_NLS=yes)
8634
AC_MSG_RESULT($USE_NLS)
8417
8638
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8419
8640
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
8582
8803
# ----------------------------
8583
8804
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8584
8805
# generated from the m4 files accompanying Automake X.Y.
8585
# (This private macro should not be called outside this file.)
8586
AC_DEFUN([AM_AUTOMAKE_VERSION],
8587
[am__api_version='1.10'
8588
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8589
dnl require some minimum version. Point them to the right macro.
8590
m4_if([$1], [1.10.2], [],
8591
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8594
# _AM_AUTOCONF_VERSION(VERSION)
8595
# -----------------------------
8596
# aclocal traces this macro to find the Autoconf version.
8597
# This is a private macro too. Using m4_define simplifies
8598
# the logic in aclocal, which can simply ignore this definition.
8599
m4_define([_AM_AUTOCONF_VERSION], [])
8806
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
8601
8808
# AM_SET_CURRENT_AUTOMAKE_VERSION
8602
8809
# -------------------------------
8603
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8604
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8810
# Call AM_AUTOMAKE_VERSION so it can be traced.
8811
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
8605
8812
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8606
[AM_AUTOMAKE_VERSION([1.10.2])dnl
8607
m4_ifndef([AC_AUTOCONF_VERSION],
8608
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8609
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8813
[AM_AUTOMAKE_VERSION([1.9.6])])
8611
8815
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
8850
9051
AMDEPBACKSLASH='\'
8852
9053
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8853
AC_SUBST([AMDEPBACKSLASH])dnl
8854
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9054
AC_SUBST([AMDEPBACKSLASH])
8857
9057
# Generate code to set up dependency tracking. -*- Autoconf -*-
8859
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9059
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
8860
9060
# Free Software Foundation, Inc.
8862
9062
# This file is free software; the Free Software Foundation
8863
9063
# gives unlimited permission to copy and/or distribute it,
8864
9064
# with or without modifications, as long as this notice is preserved.
8868
9068
# _AM_OUTPUT_DEPENDENCY_COMMANDS
8869
9069
# ------------------------------
8870
9070
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8872
# Autoconf 2.62 quotes --file arguments for eval, but not when files
8873
# are listed without --file. Let's play safe and only enable the eval
8874
# if we detect the quoting.
8875
case $CONFIG_FILES in
8876
*\'*) eval set x "$CONFIG_FILES" ;;
8877
*) set x $CONFIG_FILES ;;
8882
# Strip MF so we end up with the name of the file.
8883
mf=`echo "$mf" | sed -e 's/:.*$//'`
8884
# Check whether this is an Automake generated Makefile or not.
8885
# We used to match only the files named `Makefile.in', but
8886
# some people rename them; so instead we look at the file content.
8887
# Grep'ing the first line is not enough: some people post-process
8888
# each Makefile.in and add a new line on top of each file to say so.
8889
# Grep'ing the whole file is not good either: AIX grep has a line
8890
# limit of 2048, but all sed's we know have understand at least 4000.
8891
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8892
dirpart=`AS_DIRNAME("$mf")`
8896
# Extract the definition of DEPDIR, am__include, and am__quote
8897
# from the Makefile without running `make'.
8898
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8899
test -z "$DEPDIR" && continue
8900
am__include=`sed -n 's/^am__include = //p' < "$mf"`
8901
test -z "am__include" && continue
8902
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8903
# When using ansi2knr, U may be empty or an underscore; expand it
8904
U=`sed -n 's/^U = //p' < "$mf"`
8905
# Find all dependency output files, they are included files with
8906
# $(DEPDIR) in their names. We invoke sed twice because it is the
8907
# simplest approach to changing $(DEPDIR) to its actual value in the
8909
for file in `sed -n "
8910
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8911
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8912
# Make sure the directory exists.
8913
test -f "$dirpart/$file" && continue
8914
fdir=`AS_DIRNAME(["$file"])`
8915
AS_MKDIR_P([$dirpart/$fdir])
8916
# echo "creating $dirpart/$file"
8917
echo '# dummy' > "$dirpart/$file"
9071
[for mf in $CONFIG_FILES; do
9072
# Strip MF so we end up with the name of the file.
9073
mf=`echo "$mf" | sed -e 's/:.*$//'`
9074
# Check whether this is an Automake generated Makefile or not.
9075
# We used to match only the files named `Makefile.in', but
9076
# some people rename them; so instead we look at the file content.
9077
# Grep'ing the first line is not enough: some people post-process
9078
# each Makefile.in and add a new line on top of each file to say so.
9079
# So let's grep whole file.
9080
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
9081
dirpart=`AS_DIRNAME("$mf")`
9085
# Extract the definition of DEPDIR, am__include, and am__quote
9086
# from the Makefile without running `make'.
9087
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9088
test -z "$DEPDIR" && continue
9089
am__include=`sed -n 's/^am__include = //p' < "$mf"`
9090
test -z "am__include" && continue
9091
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9092
# When using ansi2knr, U may be empty or an underscore; expand it
9093
U=`sed -n 's/^U = //p' < "$mf"`
9094
# Find all dependency output files, they are included files with
9095
# $(DEPDIR) in their names. We invoke sed twice because it is the
9096
# simplest approach to changing $(DEPDIR) to its actual value in the
9098
for file in `sed -n "
9099
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9100
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9101
# Make sure the directory exists.
9102
test -f "$dirpart/$file" && continue
9103
fdir=`AS_DIRNAME(["$file"])`
9104
AS_MKDIR_P([$dirpart/$fdir])
9105
# echo "creating $dirpart/$file"
9106
echo '# dummy' > "$dirpart/$file"
8921
9109
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9192
9367
# AM_PROG_MKDIR_P
9193
9368
# ---------------
9194
# Check for `mkdir -p'.
9369
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
9371
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
9372
# created by `make install' are always world readable, even if the
9373
# installer happens to have an overly restrictive umask (e.g. 077).
9374
# This was a mistake. There are at least two reasons why we must not
9376
# - it causes special bits like SGID to be ignored,
9377
# - it may be too restrictive (some setups expect 775 directories).
9379
# Do not use -m 0755 and let people choose whatever they expect by
9382
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
9383
# Some implementations (such as Solaris 8's) are not thread-safe: if a
9384
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
9385
# concurrently, both version can detect that a/ is missing, but only
9386
# one can create it and the other will error out. Consequently we
9387
# restrict ourselves to GNU make (using the --version option ensures
9195
9389
AC_DEFUN([AM_PROG_MKDIR_P],
9196
[AC_PREREQ([2.60])dnl
9197
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9198
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9199
dnl while keeping a definition of mkdir_p for backward compatibility.
9200
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9201
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9202
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9203
dnl adjustment using top_builddir (which is defined more often than
9205
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9207
[[\\/$]]* | ?:[[\\/]]*) ;;
9208
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9390
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
9391
# We used to keeping the `.' as first argument, in order to
9392
# allow $(mkdir_p) to be used without argument. As in
9393
# $(mkdir_p) $(somedir)
9394
# where $(somedir) is conditionally defined. However this is wrong
9396
# 1. if the package is installed by a user who cannot write `.'
9397
# make install will fail,
9398
# 2. the above comment should most certainly read
9399
# $(mkdir_p) $(DESTDIR)$(somedir)
9400
# so it does not work when $(somedir) is undefined and
9401
# $(DESTDIR) is not.
9402
# To support the latter case, we have to write
9403
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
9404
# so the `.' trick is pointless.
9405
mkdir_p='mkdir -p --'
9407
# On NextStep and OpenStep, the `mkdir' command does not
9408
# recognize any option. It will interpret all options as
9409
# directories to create, and then abort because `.' already
9411
for d in ./-p ./--version;
9413
test -d $d && rmdir $d
9415
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
9416
if test -f "$ac_aux_dir/mkinstalldirs"; then
9417
mkdir_p='$(mkinstalldirs)'
9419
mkdir_p='$(install_sh) -d'
9422
AC_SUBST([mkdir_p])])
9212
9424
# Helper functions for option handling. -*- Autoconf -*-
9214
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9426
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
9216
9428
# This file is free software; the Free Software Foundation
9217
9429
# gives unlimited permission to copy and/or distribute it,
9218
9430
# with or without modifications, as long as this notice is preserved.
9222
9434
# _AM_MANGLE_OPTION(NAME)
9223
9435
# -----------------------