aclocal.m4 revision 75ebec6d
175ebec6dSmrg# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 275ebec6dSmrg 375ebec6dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 473143b9aSmrg 573143b9aSmrg# This file is free software; the Free Software Foundation 673143b9aSmrg# gives unlimited permission to copy and/or distribute it, 773143b9aSmrg# with or without modifications, as long as this notice is preserved. 873143b9aSmrg 973143b9aSmrg# This program is distributed in the hope that it will be useful, 1073143b9aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1173143b9aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1273143b9aSmrg# PARTICULAR PURPOSE. 1373143b9aSmrg 1475ebec6dSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15b53e5eeaSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16b53e5eeaSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1775ebec6dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1875ebec6dSmrg[m4_warning([this file was generated for autoconf 2.69. 19b53e5eeaSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20b53e5eeaSmrgIf you have problems, you may need to regenerate the build system entirely. 2175ebec6dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2273143b9aSmrg 2375ebec6dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2475ebec6dSmrg# serial 1 (pkg-config-0.24) 2575ebec6dSmrg# 2675ebec6dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2773143b9aSmrg# 2875ebec6dSmrg# This program is free software; you can redistribute it and/or modify 2975ebec6dSmrg# it under the terms of the GNU General Public License as published by 3075ebec6dSmrg# the Free Software Foundation; either version 2 of the License, or 3175ebec6dSmrg# (at your option) any later version. 3275ebec6dSmrg# 3375ebec6dSmrg# This program is distributed in the hope that it will be useful, but 3475ebec6dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3575ebec6dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3675ebec6dSmrg# General Public License for more details. 3775ebec6dSmrg# 3875ebec6dSmrg# You should have received a copy of the GNU General Public License 3975ebec6dSmrg# along with this program; if not, write to the Free Software 4075ebec6dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 4175ebec6dSmrg# 4275ebec6dSmrg# As a special exception to the GNU General Public License, if you 4375ebec6dSmrg# distribute this file as part of a program that contains a 4475ebec6dSmrg# configuration script generated by Autoconf, you may include it under 4575ebec6dSmrg# the same distribution terms that you use for the rest of that program. 4673143b9aSmrg 4775ebec6dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 4875ebec6dSmrg# ---------------------------------- 4975ebec6dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 5075ebec6dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 5175ebec6dSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 5275ebec6dSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 5375ebec6dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 5475ebec6dSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 5575ebec6dSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 5673143b9aSmrg 5775ebec6dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 5875ebec6dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 5975ebec6dSmrgfi 6075ebec6dSmrgif test -n "$PKG_CONFIG"; then 6175ebec6dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 6275ebec6dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 6375ebec6dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 6475ebec6dSmrg AC_MSG_RESULT([yes]) 6575ebec6dSmrg else 6675ebec6dSmrg AC_MSG_RESULT([no]) 6775ebec6dSmrg PKG_CONFIG="" 6875ebec6dSmrg fi 6975ebec6dSmrgfi[]dnl 7075ebec6dSmrg])# PKG_PROG_PKG_CONFIG 7173143b9aSmrg 7275ebec6dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 7375ebec6dSmrg# 7475ebec6dSmrg# Check to see whether a particular set of modules exists. Similar 7575ebec6dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 7675ebec6dSmrg# 7775ebec6dSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 7875ebec6dSmrg# only at the first occurence in configure.ac, so if the first place 7975ebec6dSmrg# it's called might be skipped (such as if it is within an "if", you 8075ebec6dSmrg# have to call PKG_CHECK_EXISTS manually 8175ebec6dSmrg# -------------------------------------------------------------- 8275ebec6dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8375ebec6dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8475ebec6dSmrgif test -n "$PKG_CONFIG" && \ 8575ebec6dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8675ebec6dSmrg m4_default([$2], [:]) 8775ebec6dSmrgm4_ifvaln([$3], [else 8875ebec6dSmrg $3])dnl 8975ebec6dSmrgfi]) 9073143b9aSmrg 9175ebec6dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9275ebec6dSmrg# --------------------------------------------- 9375ebec6dSmrgm4_define([_PKG_CONFIG], 9475ebec6dSmrg[if test -n "$$1"; then 9575ebec6dSmrg pkg_cv_[]$1="$$1" 9675ebec6dSmrg elif test -n "$PKG_CONFIG"; then 9775ebec6dSmrg PKG_CHECK_EXISTS([$3], 9875ebec6dSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9975ebec6dSmrg test "x$?" != "x0" && pkg_failed=yes ], 10075ebec6dSmrg [pkg_failed=yes]) 10175ebec6dSmrg else 10275ebec6dSmrg pkg_failed=untried 10375ebec6dSmrgfi[]dnl 10475ebec6dSmrg])# _PKG_CONFIG 10573143b9aSmrg 10675ebec6dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 10775ebec6dSmrg# ----------------------------- 10875ebec6dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 10975ebec6dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11075ebec6dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 11175ebec6dSmrg _pkg_short_errors_supported=yes 11275ebec6dSmrgelse 11375ebec6dSmrg _pkg_short_errors_supported=no 11475ebec6dSmrgfi[]dnl 11575ebec6dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 11673143b9aSmrg 11775ebec6dSmrg 11875ebec6dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 11975ebec6dSmrg# [ACTION-IF-NOT-FOUND]) 12073143b9aSmrg# 12173143b9aSmrg# 12275ebec6dSmrg# Note that if there is a possibility the first call to 12375ebec6dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 12475ebec6dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 12573143b9aSmrg# 12673143b9aSmrg# 12775ebec6dSmrg# -------------------------------------------------------------- 12875ebec6dSmrgAC_DEFUN([PKG_CHECK_MODULES], 12975ebec6dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 13075ebec6dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 13175ebec6dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 13273143b9aSmrg 13375ebec6dSmrgpkg_failed=no 13475ebec6dSmrgAC_MSG_CHECKING([for $1]) 13573143b9aSmrg 13675ebec6dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 13775ebec6dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 13873143b9aSmrg 13975ebec6dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 14075ebec6dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 14175ebec6dSmrgSee the pkg-config man page for more details.]) 14273143b9aSmrg 14375ebec6dSmrgif test $pkg_failed = yes; then 14475ebec6dSmrg AC_MSG_RESULT([no]) 14575ebec6dSmrg _PKG_SHORT_ERRORS_SUPPORTED 14675ebec6dSmrg if test $_pkg_short_errors_supported = yes; then 14775ebec6dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 14875ebec6dSmrg else 14975ebec6dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 15075ebec6dSmrg fi 15175ebec6dSmrg # Put the nasty error message in config.log where it belongs 15275ebec6dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 15373143b9aSmrg 15475ebec6dSmrg m4_default([$4], [AC_MSG_ERROR( 15575ebec6dSmrg[Package requirements ($2) were not met: 15673143b9aSmrg 15775ebec6dSmrg$$1_PKG_ERRORS 15873143b9aSmrg 15975ebec6dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 16075ebec6dSmrginstalled software in a non-standard prefix. 16173143b9aSmrg 16275ebec6dSmrg_PKG_TEXT])[]dnl 16375ebec6dSmrg ]) 16475ebec6dSmrgelif test $pkg_failed = untried; then 16575ebec6dSmrg AC_MSG_RESULT([no]) 16675ebec6dSmrg m4_default([$4], [AC_MSG_FAILURE( 16775ebec6dSmrg[The pkg-config script could not be found or is too old. Make sure it 16875ebec6dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 16975ebec6dSmrgpath to pkg-config. 17073143b9aSmrg 17175ebec6dSmrg_PKG_TEXT 17273143b9aSmrg 17375ebec6dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 17475ebec6dSmrg ]) 17575ebec6dSmrgelse 17675ebec6dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 17775ebec6dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 17875ebec6dSmrg AC_MSG_RESULT([yes]) 17975ebec6dSmrg $3 18075ebec6dSmrgfi[]dnl 18175ebec6dSmrg])# PKG_CHECK_MODULES 18273143b9aSmrg 18373143b9aSmrg 18475ebec6dSmrg# PKG_INSTALLDIR(DIRECTORY) 18575ebec6dSmrg# ------------------------- 18675ebec6dSmrg# Substitutes the variable pkgconfigdir as the location where a module 18775ebec6dSmrg# should install pkg-config .pc files. By default the directory is 18875ebec6dSmrg# $libdir/pkgconfig, but the default can be changed by passing 18975ebec6dSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 19075ebec6dSmrg# parameter. 19175ebec6dSmrgAC_DEFUN([PKG_INSTALLDIR], 19275ebec6dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 19375ebec6dSmrgm4_pushdef([pkg_description], 19475ebec6dSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 19575ebec6dSmrgAC_ARG_WITH([pkgconfigdir], 19675ebec6dSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 19775ebec6dSmrg [with_pkgconfigdir=]pkg_default) 19875ebec6dSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 19975ebec6dSmrgm4_popdef([pkg_default]) 20075ebec6dSmrgm4_popdef([pkg_description]) 20175ebec6dSmrg]) dnl PKG_INSTALLDIR 20275ebec6dSmrg 20375ebec6dSmrg 20475ebec6dSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 20575ebec6dSmrg# ------------------------- 20675ebec6dSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 20775ebec6dSmrg# module should install arch-independent pkg-config .pc files. By 20875ebec6dSmrg# default the directory is $datadir/pkgconfig, but the default can be 20975ebec6dSmrg# changed by passing DIRECTORY. The user can override through the 21075ebec6dSmrg# --with-noarch-pkgconfigdir parameter. 21175ebec6dSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 21275ebec6dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 21375ebec6dSmrgm4_pushdef([pkg_description], 21475ebec6dSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 21575ebec6dSmrgAC_ARG_WITH([noarch-pkgconfigdir], 21675ebec6dSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 21775ebec6dSmrg [with_noarch_pkgconfigdir=]pkg_default) 21875ebec6dSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 21975ebec6dSmrgm4_popdef([pkg_default]) 22075ebec6dSmrgm4_popdef([pkg_description]) 22175ebec6dSmrg]) dnl PKG_NOARCH_INSTALLDIR 22275ebec6dSmrg 22375ebec6dSmrg 22475ebec6dSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 22575ebec6dSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 22675ebec6dSmrg# ------------------------------------------- 22775ebec6dSmrg# Retrieves the value of the pkg-config variable for the given module. 22875ebec6dSmrgAC_DEFUN([PKG_CHECK_VAR], 22975ebec6dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 23075ebec6dSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 23173143b9aSmrg 23275ebec6dSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 23375ebec6dSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 234fe567363Smrg 23575ebec6dSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 23675ebec6dSmrg])# PKG_CHECK_VAR 237fe567363Smrg 2388d4c0f7bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 2398d4c0f7bSmrgdnl 240af928962Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 2418d4c0f7bSmrgdnl 2428d4c0f7bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 243af928962Smrgdnl copy of this software and associated documentation files (the "Software"), 244af928962Smrgdnl to deal in the Software without restriction, including without limitation 245af928962Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 246af928962Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 247af928962Smrgdnl Software is furnished to do so, subject to the following conditions: 2488d4c0f7bSmrgdnl 249af928962Smrgdnl The above copyright notice and this permission notice (including the next 250af928962Smrgdnl paragraph) shall be included in all copies or substantial portions of the 251af928962Smrgdnl Software. 2528d4c0f7bSmrgdnl 253af928962Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 254af928962Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 255af928962Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 256af928962Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 257af928962Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 258af928962Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 259af928962Smrgdnl DEALINGS IN THE SOFTWARE. 2608d4c0f7bSmrg 2618d4c0f7bSmrg# XORG_MACROS_VERSION(required-version) 2628d4c0f7bSmrg# ------------------------------------- 2638d4c0f7bSmrg# Minimum version: 1.1.0 2648d4c0f7bSmrg# 2658d4c0f7bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 2668d4c0f7bSmrg# your configure.ac with the minimum required version, such as: 2678d4c0f7bSmrg# XORG_MACROS_VERSION(1.1) 2688d4c0f7bSmrg# 269e8a71cdfSmrg# To ensure that this macro is defined, also add: 270e8a71cdfSmrg# m4_ifndef([XORG_MACROS_VERSION], 271e8a71cdfSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 2728d4c0f7bSmrg# 2738d4c0f7bSmrg# 2748d4c0f7bSmrg# See the "minimum version" comment for each macro you use to see what 2758d4c0f7bSmrg# version you require. 276e8a71cdfSmrgm4_defun([XORG_MACROS_VERSION],[ 277fe567363Smrgm4_define([vers_have], [1.17]) 278e8a71cdfSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 279e8a71cdfSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 280e8a71cdfSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 281e8a71cdfSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 282e8a71cdfSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 283e8a71cdfSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 284e8a71cdfSmrgm4_undefine([vers_have]) 285e8a71cdfSmrgm4_undefine([maj_have]) 286e8a71cdfSmrgm4_undefine([maj_needed]) 2878d4c0f7bSmrg]) # XORG_MACROS_VERSION 2888d4c0f7bSmrg 2898d4c0f7bSmrg# XORG_PROG_RAWCPP() 2908d4c0f7bSmrg# ------------------ 2918d4c0f7bSmrg# Minimum version: 1.0.0 2928d4c0f7bSmrg# 2938d4c0f7bSmrg# Find cpp program and necessary flags for use in pre-processing text files 2948d4c0f7bSmrg# such as man pages and config files 2958d4c0f7bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 2968d4c0f7bSmrgAC_REQUIRE([AC_PROG_CPP]) 2978d4c0f7bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 2988d4c0f7bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 2998d4c0f7bSmrg 3008d4c0f7bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 3018d4c0f7bSmrg# which is not the best choice for supporting other OS'es, but covers most 3028d4c0f7bSmrg# of the ones we need for now. 3038d4c0f7bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 304fe567363SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 3058d4c0f7bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 3068d4c0f7bSmrg AC_MSG_RESULT([no]) 3078d4c0f7bSmrgelse 3088d4c0f7bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 3098d4c0f7bSmrg RAWCPPFLAGS=-undef 3108d4c0f7bSmrg AC_MSG_RESULT([yes]) 3118d4c0f7bSmrg # under Cygwin unix is still defined even with -undef 3128d4c0f7bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 3138d4c0f7bSmrg RAWCPPFLAGS="-undef -ansi" 3148d4c0f7bSmrg AC_MSG_RESULT([yes, with -ansi]) 3158d4c0f7bSmrg else 3168d4c0f7bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 3178d4c0f7bSmrg fi 3188d4c0f7bSmrgfi 3198d4c0f7bSmrgrm -f conftest.$ac_ext 3208d4c0f7bSmrg 3218d4c0f7bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 322fe567363SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 3238d4c0f7bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 3248d4c0f7bSmrg AC_MSG_RESULT([no]) 3258d4c0f7bSmrgelse 3268d4c0f7bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 3278d4c0f7bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 3288d4c0f7bSmrg AC_MSG_RESULT([yes]) 3298d4c0f7bSmrg else 3308d4c0f7bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 3318d4c0f7bSmrg fi 3328d4c0f7bSmrgfi 3338d4c0f7bSmrgrm -f conftest.$ac_ext 3348d4c0f7bSmrgAC_SUBST(RAWCPPFLAGS) 3358d4c0f7bSmrg]) # XORG_PROG_RAWCPP 3368d4c0f7bSmrg 3378d4c0f7bSmrg# XORG_MANPAGE_SECTIONS() 3388d4c0f7bSmrg# ----------------------- 3398d4c0f7bSmrg# Minimum version: 1.0.0 3408d4c0f7bSmrg# 3418d4c0f7bSmrg# Determine which sections man pages go in for the different man page types 3428d4c0f7bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 3438d4c0f7bSmrg# Not sure if there's any better way than just hardcoding by OS name. 3448d4c0f7bSmrg# Override default settings by setting environment variables 345af928962Smrg# Added MAN_SUBSTS in version 1.8 346af928962Smrg# Added AC_PROG_SED in version 1.8 3478d4c0f7bSmrg 3488d4c0f7bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 3498d4c0f7bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 350af928962SmrgAC_REQUIRE([AC_PROG_SED]) 3518d4c0f7bSmrg 3528d4c0f7bSmrgif test x$APP_MAN_SUFFIX = x ; then 3538d4c0f7bSmrg APP_MAN_SUFFIX=1 3548d4c0f7bSmrgfi 3558d4c0f7bSmrgif test x$APP_MAN_DIR = x ; then 3568d4c0f7bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 3578d4c0f7bSmrgfi 3588d4c0f7bSmrg 3598d4c0f7bSmrgif test x$LIB_MAN_SUFFIX = x ; then 3608d4c0f7bSmrg LIB_MAN_SUFFIX=3 3618d4c0f7bSmrgfi 3628d4c0f7bSmrgif test x$LIB_MAN_DIR = x ; then 3638d4c0f7bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 3648d4c0f7bSmrgfi 3658d4c0f7bSmrg 3668d4c0f7bSmrgif test x$FILE_MAN_SUFFIX = x ; then 3678d4c0f7bSmrg case $host_os in 3688d4c0f7bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 3698d4c0f7bSmrg *) FILE_MAN_SUFFIX=5 ;; 3708d4c0f7bSmrg esac 3718d4c0f7bSmrgfi 3728d4c0f7bSmrgif test x$FILE_MAN_DIR = x ; then 3738d4c0f7bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 3748d4c0f7bSmrgfi 3758d4c0f7bSmrg 3768d4c0f7bSmrgif test x$MISC_MAN_SUFFIX = x ; then 3778d4c0f7bSmrg case $host_os in 3788d4c0f7bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 3798d4c0f7bSmrg *) MISC_MAN_SUFFIX=7 ;; 3808d4c0f7bSmrg esac 3818d4c0f7bSmrgfi 3828d4c0f7bSmrgif test x$MISC_MAN_DIR = x ; then 3838d4c0f7bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 3848d4c0f7bSmrgfi 3858d4c0f7bSmrg 3868d4c0f7bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 3878d4c0f7bSmrg case $host_os in 3888d4c0f7bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 3898d4c0f7bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 3908d4c0f7bSmrg esac 3918d4c0f7bSmrgfi 3928d4c0f7bSmrgif test x$DRIVER_MAN_DIR = x ; then 3938d4c0f7bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 3948d4c0f7bSmrgfi 3958d4c0f7bSmrg 3968d4c0f7bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 3978d4c0f7bSmrg case $host_os in 3988d4c0f7bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 3998d4c0f7bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 4008d4c0f7bSmrg esac 4018d4c0f7bSmrgfi 4028d4c0f7bSmrgif test x$ADMIN_MAN_DIR = x ; then 4038d4c0f7bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 4048d4c0f7bSmrgfi 4058d4c0f7bSmrg 4068d4c0f7bSmrg 4078d4c0f7bSmrgAC_SUBST([APP_MAN_SUFFIX]) 4088d4c0f7bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 4098d4c0f7bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 4108d4c0f7bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 4118d4c0f7bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 4128d4c0f7bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 4138d4c0f7bSmrgAC_SUBST([APP_MAN_DIR]) 4148d4c0f7bSmrgAC_SUBST([LIB_MAN_DIR]) 4158d4c0f7bSmrgAC_SUBST([FILE_MAN_DIR]) 4168d4c0f7bSmrgAC_SUBST([MISC_MAN_DIR]) 4178d4c0f7bSmrgAC_SUBST([DRIVER_MAN_DIR]) 4188d4c0f7bSmrgAC_SUBST([ADMIN_MAN_DIR]) 419af928962Smrg 420af928962SmrgXORG_MAN_PAGE="X Version 11" 421af928962SmrgAC_SUBST([XORG_MAN_PAGE]) 422af928962SmrgMAN_SUBSTS="\ 423af928962Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 424af928962Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 425af928962Smrg -e 's|__xservername__|Xorg|g' \ 426af928962Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 427af928962Smrg -e 's|__projectroot__|\$(prefix)|g' \ 428af928962Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 429af928962Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 430af928962Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 431af928962Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 432af928962Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 433af928962Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 434af928962Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 435af928962SmrgAC_SUBST([MAN_SUBSTS]) 436af928962Smrg 4378d4c0f7bSmrg]) # XORG_MANPAGE_SECTIONS 4388d4c0f7bSmrg 439af928962Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 440af928962Smrg# ------------------------ 441af928962Smrg# Minimum version: 1.7.0 442af928962Smrg# 443af928962Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 444af928962Smrg# provided by xorg-sgml-doctools, if installed. 445af928962SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 446af928962SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 447af928962SmrgXORG_SGML_PATH= 448af928962SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 449af928962Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 450af928962Smrg [m4_ifval([$1],[:], 451af928962Smrg [if test x"$cross_compiling" != x"yes" ; then 452af928962Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 453af928962Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 454af928962Smrg fi]) 455af928962Smrg ]) 456af928962Smrg 457af928962Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 458af928962Smrg# the path and the name of the doc stylesheet 459af928962Smrgif test "x$XORG_SGML_PATH" != "x" ; then 460af928962Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 461af928962Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 462af928962Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 463af928962Smrgelse 464af928962Smrg AC_MSG_RESULT([no]) 465af928962Smrgfi 466af928962Smrg 467af928962SmrgAC_SUBST(XORG_SGML_PATH) 468af928962SmrgAC_SUBST(STYLESHEET_SRCDIR) 469af928962SmrgAC_SUBST(XSL_STYLESHEET) 470af928962SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 471af928962Smrg]) # XORG_CHECK_SGML_DOCTOOLS 472af928962Smrg 4738d4c0f7bSmrg# XORG_CHECK_LINUXDOC 4748d4c0f7bSmrg# ------------------- 4758d4c0f7bSmrg# Minimum version: 1.0.0 4768d4c0f7bSmrg# 4778d4c0f7bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 4788d4c0f7bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 4798d4c0f7bSmrg# Whether or not the necessary tools and files are found can be checked 4808d4c0f7bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 4818d4c0f7bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 482af928962SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 483af928962SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 4848d4c0f7bSmrg 4858d4c0f7bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 4868d4c0f7bSmrg 487af928962SmrgAC_MSG_CHECKING([whether to build documentation]) 4888d4c0f7bSmrg 489af928962Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 4908d4c0f7bSmrg BUILDDOC=yes 4918d4c0f7bSmrgelse 4928d4c0f7bSmrg BUILDDOC=no 4938d4c0f7bSmrgfi 4948d4c0f7bSmrg 4958d4c0f7bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 4968d4c0f7bSmrg 4978d4c0f7bSmrgAC_MSG_RESULT([$BUILDDOC]) 4988d4c0f7bSmrg 499af928962SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 5008d4c0f7bSmrg 501af928962Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 5028d4c0f7bSmrg BUILDPDFDOC=yes 5038d4c0f7bSmrgelse 5048d4c0f7bSmrg BUILDPDFDOC=no 5058d4c0f7bSmrgfi 5068d4c0f7bSmrg 5078d4c0f7bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 5088d4c0f7bSmrg 5098d4c0f7bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 5108d4c0f7bSmrg 511af928962SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 5128d4c0f7bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 5138d4c0f7bSmrgMAKE_PDF="$PS2PDF" 5148d4c0f7bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 5158d4c0f7bSmrg 5168d4c0f7bSmrgAC_SUBST(MAKE_TEXT) 5178d4c0f7bSmrgAC_SUBST(MAKE_PS) 5188d4c0f7bSmrgAC_SUBST(MAKE_PDF) 5198d4c0f7bSmrgAC_SUBST(MAKE_HTML) 5208d4c0f7bSmrg]) # XORG_CHECK_LINUXDOC 5218d4c0f7bSmrg 5228d4c0f7bSmrg# XORG_CHECK_DOCBOOK 5238d4c0f7bSmrg# ------------------- 5248d4c0f7bSmrg# Minimum version: 1.0.0 5258d4c0f7bSmrg# 5268d4c0f7bSmrg# Checks for the ability to build output formats from SGML DocBook source. 5278d4c0f7bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 5288d4c0f7bSmrg# indicates whether the necessary tools and files are found and, if set, 5298d4c0f7bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 5308d4c0f7bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 531af928962SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 532af928962Smrg 5338d4c0f7bSmrgBUILDTXTDOC=no 5348d4c0f7bSmrgBUILDPDFDOC=no 5358d4c0f7bSmrgBUILDPSDOC=no 5368d4c0f7bSmrgBUILDHTMLDOC=no 5378d4c0f7bSmrg 5388d4c0f7bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 5398d4c0f7bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 5408d4c0f7bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 5418d4c0f7bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 5428d4c0f7bSmrg 543af928962SmrgAC_MSG_CHECKING([whether to build text documentation]) 544af928962Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 5458d4c0f7bSmrg test x$BUILD_TXTDOC != xno; then 5468d4c0f7bSmrg BUILDTXTDOC=yes 5478d4c0f7bSmrgfi 5488d4c0f7bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 5498d4c0f7bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 5508d4c0f7bSmrg 551af928962SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 552af928962Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 5538d4c0f7bSmrg test x$BUILD_PDFDOC != xno; then 5548d4c0f7bSmrg BUILDPDFDOC=yes 5558d4c0f7bSmrgfi 5568d4c0f7bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 5578d4c0f7bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 5588d4c0f7bSmrg 559af928962SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 560af928962Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 5618d4c0f7bSmrg test x$BUILD_PSDOC != xno; then 5628d4c0f7bSmrg BUILDPSDOC=yes 5638d4c0f7bSmrgfi 5648d4c0f7bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 5658d4c0f7bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 5668d4c0f7bSmrg 567af928962SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 568af928962Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 5698d4c0f7bSmrg test x$BUILD_HTMLDOC != xno; then 5708d4c0f7bSmrg BUILDHTMLDOC=yes 5718d4c0f7bSmrgfi 5728d4c0f7bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 5738d4c0f7bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 5748d4c0f7bSmrg 5758d4c0f7bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 5768d4c0f7bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 5778d4c0f7bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 5788d4c0f7bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 5798d4c0f7bSmrg 5808d4c0f7bSmrgAC_SUBST(MAKE_TEXT) 5818d4c0f7bSmrgAC_SUBST(MAKE_PS) 5828d4c0f7bSmrgAC_SUBST(MAKE_PDF) 5838d4c0f7bSmrgAC_SUBST(MAKE_HTML) 5848d4c0f7bSmrg]) # XORG_CHECK_DOCBOOK 5858d4c0f7bSmrg 586af928962Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 587af928962Smrg# ---------------- 588af928962Smrg# Minimum version: 1.5.0 589af928962Smrg# Minimum version for optional DEFAULT argument: 1.11.0 590af928962Smrg# 591af928962Smrg# Documentation tools are not always available on all platforms and sometimes 592af928962Smrg# not at the appropriate level. This macro enables a module to test for the 593af928962Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 594af928962Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 595af928962Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 596af928962Smrg# --with-xmlto assumes 'auto'. 597af928962Smrg# 598af928962Smrg# Interface to module: 599af928962Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 600af928962Smrg# XMLTO: returns the path of the xmlto program found 601af928962Smrg# returns the path set by the user in the environment 602af928962Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 603af928962Smrg# 'no' user instructs the module not to use xmlto 604af928962Smrg# 605af928962Smrg# Added in version 1.10.0 606af928962Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 607af928962Smrg# xmlto for text output requires either lynx, links, or w3m browsers 608af928962Smrg# 609af928962Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 610af928962Smrg# 611af928962SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 612af928962SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 613af928962Smrgm4_define([_defopt], m4_default([$2], [auto])) 614af928962SmrgAC_ARG_WITH(xmlto, 615af928962Smrg AS_HELP_STRING([--with-xmlto], 616af928962Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 617af928962Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 618af928962Smrgm4_undefine([_defopt]) 619af928962Smrg 620af928962Smrgif test "x$use_xmlto" = x"auto"; then 621af928962Smrg AC_PATH_PROG([XMLTO], [xmlto]) 622af928962Smrg if test "x$XMLTO" = "x"; then 623af928962Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 624af928962Smrg have_xmlto=no 625af928962Smrg else 626af928962Smrg have_xmlto=yes 627af928962Smrg fi 628af928962Smrgelif test "x$use_xmlto" = x"yes" ; then 629af928962Smrg AC_PATH_PROG([XMLTO], [xmlto]) 630af928962Smrg if test "x$XMLTO" = "x"; then 631af928962Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 632af928962Smrg fi 633af928962Smrg have_xmlto=yes 634af928962Smrgelif test "x$use_xmlto" = x"no" ; then 635af928962Smrg if test "x$XMLTO" != "x"; then 636af928962Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 637af928962Smrg fi 638af928962Smrg have_xmlto=no 639af928962Smrgelse 640af928962Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 641af928962Smrgfi 642af928962Smrg 643af928962Smrg# Test for a minimum version of xmlto, if provided. 644af928962Smrgm4_ifval([$1], 645af928962Smrg[if test "$have_xmlto" = yes; then 646af928962Smrg # scrape the xmlto version 647af928962Smrg AC_MSG_CHECKING([the xmlto version]) 648af928962Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 649af928962Smrg AC_MSG_RESULT([$xmlto_version]) 650af928962Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 651af928962Smrg [if test "x$use_xmlto" = xauto; then 652af928962Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 653af928962Smrg have_xmlto=no 654af928962Smrg else 655af928962Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 656af928962Smrg fi]) 657af928962Smrgfi]) 658af928962Smrg 659af928962Smrg# Test for the ability of xmlto to generate a text target 660af928962Smrghave_xmlto_text=no 661af928962Smrgcat > conftest.xml << "EOF" 662af928962SmrgEOF 663af928962SmrgAS_IF([test "$have_xmlto" = yes], 664af928962Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 665af928962Smrg [have_xmlto_text=yes], 666af928962Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 667af928962Smrgrm -f conftest.xml 668af928962SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 669af928962SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 670af928962Smrg]) # XORG_WITH_XMLTO 671af928962Smrg 672fe567363Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 673fe567363Smrg# -------------------------------------------- 674fe567363Smrg# Minimum version: 1.12.0 675fe567363Smrg# Minimum version for optional DEFAULT argument: 1.12.0 676fe567363Smrg# 677fe567363Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 678fe567363Smrg# XML-based language used for the transformation of XML documents. 679fe567363Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 680fe567363Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 681fe567363Smrg# The XSLT processor is often used as a standalone tool for transformations. 682fe567363Smrg# It should not be assumed that this tool is used only to work with documnetation. 683fe567363Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 684fe567363Smrg# 685fe567363Smrg# Interface to module: 686fe567363Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 687fe567363Smrg# XSLTPROC: returns the path of the xsltproc program found 688fe567363Smrg# returns the path set by the user in the environment 689fe567363Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 690fe567363Smrg# 'no' user instructs the module not to use xsltproc 691fe567363Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 692fe567363Smrg# 693fe567363Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 694fe567363Smrg# 695fe567363SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 696fe567363SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 697fe567363Smrg# Preserves the interface, should it be implemented later 698fe567363Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 699fe567363Smrgm4_define([_defopt], m4_default([$2], [auto])) 700fe567363SmrgAC_ARG_WITH(xsltproc, 701fe567363Smrg AS_HELP_STRING([--with-xsltproc], 702fe567363Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 703fe567363Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 704fe567363Smrgm4_undefine([_defopt]) 705fe567363Smrg 706fe567363Smrgif test "x$use_xsltproc" = x"auto"; then 707fe567363Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 708fe567363Smrg if test "x$XSLTPROC" = "x"; then 709fe567363Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 710fe567363Smrg have_xsltproc=no 711fe567363Smrg else 712fe567363Smrg have_xsltproc=yes 713fe567363Smrg fi 714fe567363Smrgelif test "x$use_xsltproc" = x"yes" ; then 715fe567363Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 716fe567363Smrg if test "x$XSLTPROC" = "x"; then 717fe567363Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 718fe567363Smrg fi 719fe567363Smrg have_xsltproc=yes 720fe567363Smrgelif test "x$use_xsltproc" = x"no" ; then 721fe567363Smrg if test "x$XSLTPROC" != "x"; then 722fe567363Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 723fe567363Smrg fi 724fe567363Smrg have_xsltproc=no 725fe567363Smrgelse 726fe567363Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 727fe567363Smrgfi 728fe567363Smrg 729fe567363SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 730fe567363Smrg]) # XORG_WITH_XSLTPROC 731fe567363Smrg 732fe567363Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 733fe567363Smrg# ---------------------------------------- 734fe567363Smrg# Minimum version: 1.15.0 735fe567363Smrg# 736fe567363Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 737fe567363Smrg# scanning arbitrary text files, extracting information from those text files, 738fe567363Smrg# and printing reports based on that information. 739fe567363Smrg# 740fe567363Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 741fe567363Smrg# 742fe567363Smrg# Interface to module: 743fe567363Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 744fe567363Smrg# PERL: returns the path of the perl program found 745fe567363Smrg# returns the path set by the user in the environment 746fe567363Smrg# --with-perl: 'yes' user instructs the module to use perl 747fe567363Smrg# 'no' user instructs the module not to use perl 748fe567363Smrg# have_perl: returns yes if perl found in PATH or no 749fe567363Smrg# 750fe567363Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 751fe567363Smrg# 752fe567363SmrgAC_DEFUN([XORG_WITH_PERL],[ 753fe567363SmrgAC_ARG_VAR([PERL], [Path to perl command]) 754fe567363Smrg# Preserves the interface, should it be implemented later 755fe567363Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 756fe567363Smrgm4_define([_defopt], m4_default([$2], [auto])) 757fe567363SmrgAC_ARG_WITH(perl, 758fe567363Smrg AS_HELP_STRING([--with-perl], 759fe567363Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 760fe567363Smrg [use_perl=$withval], [use_perl=]_defopt) 761fe567363Smrgm4_undefine([_defopt]) 762fe567363Smrg 763fe567363Smrgif test "x$use_perl" = x"auto"; then 764fe567363Smrg AC_PATH_PROG([PERL], [perl]) 765fe567363Smrg if test "x$PERL" = "x"; then 766fe567363Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 767fe567363Smrg have_perl=no 768fe567363Smrg else 769fe567363Smrg have_perl=yes 770fe567363Smrg fi 771fe567363Smrgelif test "x$use_perl" = x"yes" ; then 772fe567363Smrg AC_PATH_PROG([PERL], [perl]) 773fe567363Smrg if test "x$PERL" = "x"; then 774fe567363Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 775fe567363Smrg fi 776fe567363Smrg have_perl=yes 777fe567363Smrgelif test "x$use_perl" = x"no" ; then 778fe567363Smrg if test "x$PERL" != "x"; then 779fe567363Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 780fe567363Smrg fi 781fe567363Smrg have_perl=no 782fe567363Smrgelse 783fe567363Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 784fe567363Smrgfi 785fe567363Smrg 786fe567363SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 787fe567363Smrg]) # XORG_WITH_PERL 788fe567363Smrg 789af928962Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 790af928962Smrg# ---------------- 791af928962Smrg# Minimum version: 1.5.0 792af928962Smrg# Minimum version for optional DEFAULT argument: 1.11.0 793af928962Smrg# 794af928962Smrg# Documentation tools are not always available on all platforms and sometimes 795af928962Smrg# not at the appropriate level. This macro enables a module to test for the 796af928962Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 797af928962Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 798af928962Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 799af928962Smrg# --with-asciidoc assumes 'auto'. 800af928962Smrg# 801af928962Smrg# Interface to module: 802af928962Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 803af928962Smrg# ASCIIDOC: returns the path of the asciidoc program found 804af928962Smrg# returns the path set by the user in the environment 805af928962Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 806af928962Smrg# 'no' user instructs the module not to use asciidoc 807af928962Smrg# 808af928962Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 809af928962Smrg# 810af928962SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 811af928962SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 812af928962Smrgm4_define([_defopt], m4_default([$2], [auto])) 813af928962SmrgAC_ARG_WITH(asciidoc, 814af928962Smrg AS_HELP_STRING([--with-asciidoc], 815af928962Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 816af928962Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 817af928962Smrgm4_undefine([_defopt]) 818af928962Smrg 819af928962Smrgif test "x$use_asciidoc" = x"auto"; then 820af928962Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 821af928962Smrg if test "x$ASCIIDOC" = "x"; then 822af928962Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 823af928962Smrg have_asciidoc=no 824af928962Smrg else 825af928962Smrg have_asciidoc=yes 826af928962Smrg fi 827af928962Smrgelif test "x$use_asciidoc" = x"yes" ; then 828af928962Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 829af928962Smrg if test "x$ASCIIDOC" = "x"; then 830af928962Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 831af928962Smrg fi 832af928962Smrg have_asciidoc=yes 833af928962Smrgelif test "x$use_asciidoc" = x"no" ; then 834af928962Smrg if test "x$ASCIIDOC" != "x"; then 835af928962Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 836af928962Smrg fi 837af928962Smrg have_asciidoc=no 838af928962Smrgelse 839af928962Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 840af928962Smrgfi 841af928962Smrgm4_ifval([$1], 842af928962Smrg[if test "$have_asciidoc" = yes; then 843af928962Smrg # scrape the asciidoc version 844af928962Smrg AC_MSG_CHECKING([the asciidoc version]) 845af928962Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 846af928962Smrg AC_MSG_RESULT([$asciidoc_version]) 847af928962Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 848af928962Smrg [if test "x$use_asciidoc" = xauto; then 849af928962Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 850af928962Smrg have_asciidoc=no 851af928962Smrg else 852af928962Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 853af928962Smrg fi]) 854af928962Smrgfi]) 855af928962SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 856af928962Smrg]) # XORG_WITH_ASCIIDOC 857af928962Smrg 858af928962Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 859af928962Smrg# -------------------------------- 860af928962Smrg# Minimum version: 1.5.0 861af928962Smrg# Minimum version for optional DEFAULT argument: 1.11.0 862af928962Smrg# 863af928962Smrg# Documentation tools are not always available on all platforms and sometimes 864af928962Smrg# not at the appropriate level. This macro enables a module to test for the 865af928962Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 866af928962Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 867af928962Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 868af928962Smrg# --with-doxygen assumes 'auto'. 869af928962Smrg# 870af928962Smrg# Interface to module: 871af928962Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 872af928962Smrg# DOXYGEN: returns the path of the doxygen program found 873af928962Smrg# returns the path set by the user in the environment 874af928962Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 875af928962Smrg# 'no' user instructs the module not to use doxygen 876af928962Smrg# 877af928962Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 878af928962Smrg# 879af928962SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 880af928962SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 881af928962Smrgm4_define([_defopt], m4_default([$2], [auto])) 882af928962SmrgAC_ARG_WITH(doxygen, 883af928962Smrg AS_HELP_STRING([--with-doxygen], 884af928962Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 885af928962Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 886af928962Smrgm4_undefine([_defopt]) 887af928962Smrg 888af928962Smrgif test "x$use_doxygen" = x"auto"; then 889af928962Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 890af928962Smrg if test "x$DOXYGEN" = "x"; then 891af928962Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 892af928962Smrg have_doxygen=no 893af928962Smrg else 89475ebec6dSmrg have_doxygen=yes 89575ebec6dSmrg fi 89675ebec6dSmrgelif test "x$use_doxygen" = x"yes" ; then 89775ebec6dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 89875ebec6dSmrg if test "x$DOXYGEN" = "x"; then 89975ebec6dSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 90075ebec6dSmrg fi 90175ebec6dSmrg have_doxygen=yes 90275ebec6dSmrgelif test "x$use_doxygen" = x"no" ; then 90375ebec6dSmrg if test "x$DOXYGEN" != "x"; then 90475ebec6dSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 90575ebec6dSmrg fi 90675ebec6dSmrg have_doxygen=no 90775ebec6dSmrgelse 90875ebec6dSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 90975ebec6dSmrgfi 91075ebec6dSmrgm4_ifval([$1], 91175ebec6dSmrg[if test "$have_doxygen" = yes; then 91275ebec6dSmrg # scrape the doxygen version 91375ebec6dSmrg AC_MSG_CHECKING([the doxygen version]) 91475ebec6dSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 91575ebec6dSmrg AC_MSG_RESULT([$doxygen_version]) 91675ebec6dSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 91775ebec6dSmrg [if test "x$use_doxygen" = xauto; then 91875ebec6dSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 91975ebec6dSmrg have_doxygen=no 92075ebec6dSmrg else 92175ebec6dSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 92275ebec6dSmrg fi]) 92375ebec6dSmrgfi]) 92475ebec6dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 92575ebec6dSmrg]) # XORG_WITH_DOXYGEN 92675ebec6dSmrg 92775ebec6dSmrg# XORG_WITH_GROFF([DEFAULT]) 92875ebec6dSmrg# ---------------- 92975ebec6dSmrg# Minimum version: 1.6.0 93075ebec6dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 93175ebec6dSmrg# 93275ebec6dSmrg# Documentation tools are not always available on all platforms and sometimes 93375ebec6dSmrg# not at the appropriate level. This macro enables a module to test for the 93475ebec6dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 93575ebec6dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 93675ebec6dSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 93775ebec6dSmrg# --with-groff assumes 'auto'. 93875ebec6dSmrg# 93975ebec6dSmrg# Interface to module: 94075ebec6dSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 94175ebec6dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 94275ebec6dSmrg# HAVE_GROFF_MS: the -ms macros package 94375ebec6dSmrg# GROFF: returns the path of the groff program found 94475ebec6dSmrg# returns the path set by the user in the environment 94575ebec6dSmrg# --with-groff: 'yes' user instructs the module to use groff 94675ebec6dSmrg# 'no' user instructs the module not to use groff 94775ebec6dSmrg# 94875ebec6dSmrg# Added in version 1.9.0: 94975ebec6dSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 95075ebec6dSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 95175ebec6dSmrg# psselect from the psutils package. 95275ebec6dSmrg# the ghostcript package. Refer to the grohtml man pages 95375ebec6dSmrg# 95475ebec6dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 95575ebec6dSmrg# 95675ebec6dSmrg# OS and distros often splits groff in a basic and full package, the former 95775ebec6dSmrg# having the groff program and the later having devices, fonts and macros 95875ebec6dSmrg# Checking for the groff executable is not enough. 95975ebec6dSmrg# 96075ebec6dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 96175ebec6dSmrg# unset HAVE_GROFF or GROFF env variables. 96275ebec6dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 96375ebec6dSmrg# 96475ebec6dSmrgAC_DEFUN([XORG_WITH_GROFF],[ 96575ebec6dSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 96675ebec6dSmrgm4_define([_defopt], m4_default([$1], [auto])) 96775ebec6dSmrgAC_ARG_WITH(groff, 96875ebec6dSmrg AS_HELP_STRING([--with-groff], 96975ebec6dSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 97075ebec6dSmrg [use_groff=$withval], [use_groff=]_defopt) 97175ebec6dSmrgm4_undefine([_defopt]) 97275ebec6dSmrg 97375ebec6dSmrgif test "x$use_groff" = x"auto"; then 97475ebec6dSmrg AC_PATH_PROG([GROFF], [groff]) 97575ebec6dSmrg if test "x$GROFF" = "x"; then 97675ebec6dSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 97775ebec6dSmrg have_groff=no 97875ebec6dSmrg else 97975ebec6dSmrg have_groff=yes 98075ebec6dSmrg fi 98175ebec6dSmrgelif test "x$use_groff" = x"yes" ; then 98275ebec6dSmrg AC_PATH_PROG([GROFF], [groff]) 98375ebec6dSmrg if test "x$GROFF" = "x"; then 98475ebec6dSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 98575ebec6dSmrg fi 98675ebec6dSmrg have_groff=yes 98775ebec6dSmrgelif test "x$use_groff" = x"no" ; then 98875ebec6dSmrg if test "x$GROFF" != "x"; then 98975ebec6dSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 99075ebec6dSmrg fi 99175ebec6dSmrg have_groff=no 99275ebec6dSmrgelse 99375ebec6dSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 99475ebec6dSmrgfi 99575ebec6dSmrg 99675ebec6dSmrg# We have groff, test for the presence of the macro packages 99775ebec6dSmrgif test "x$have_groff" = x"yes"; then 99875ebec6dSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 99975ebec6dSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 100075ebec6dSmrg groff_ms_works=yes 100175ebec6dSmrg else 100275ebec6dSmrg groff_ms_works=no 100375ebec6dSmrg fi 100475ebec6dSmrg AC_MSG_RESULT([$groff_ms_works]) 100575ebec6dSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 100675ebec6dSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 100775ebec6dSmrg groff_mm_works=yes 100875ebec6dSmrg else 100975ebec6dSmrg groff_mm_works=no 101075ebec6dSmrg fi 101175ebec6dSmrg AC_MSG_RESULT([$groff_mm_works]) 101275ebec6dSmrgfi 101375ebec6dSmrg 101475ebec6dSmrg# We have groff, test for HTML dependencies, one command per package 101575ebec6dSmrgif test "x$have_groff" = x"yes"; then 101675ebec6dSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 101775ebec6dSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 101875ebec6dSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 101975ebec6dSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 102075ebec6dSmrg have_groff_html=yes 102175ebec6dSmrg else 102275ebec6dSmrg have_groff_html=no 102375ebec6dSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 102475ebec6dSmrg fi 102575ebec6dSmrgfi 102675ebec6dSmrg 102775ebec6dSmrg# Set Automake conditionals for Makefiles 102875ebec6dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 102975ebec6dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 103075ebec6dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 103175ebec6dSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 103275ebec6dSmrg]) # XORG_WITH_GROFF 103375ebec6dSmrg 103475ebec6dSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 103575ebec6dSmrg# --------------------------------------- 103675ebec6dSmrg# Minimum version: 1.6.0 103775ebec6dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 103875ebec6dSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 103975ebec6dSmrg# 104075ebec6dSmrg# Documentation tools are not always available on all platforms and sometimes 104175ebec6dSmrg# not at the appropriate level. This macro enables a module to test for the 104275ebec6dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 104375ebec6dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 104475ebec6dSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 104575ebec6dSmrg# --with-fop assumes 'auto'. 104675ebec6dSmrg# 104775ebec6dSmrg# Interface to module: 104875ebec6dSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 104975ebec6dSmrg# FOP: returns the path of the fop program found 105075ebec6dSmrg# returns the path set by the user in the environment 105175ebec6dSmrg# --with-fop: 'yes' user instructs the module to use fop 105275ebec6dSmrg# 'no' user instructs the module not to use fop 105375ebec6dSmrg# 105475ebec6dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 105575ebec6dSmrg# 105675ebec6dSmrgAC_DEFUN([XORG_WITH_FOP],[ 105775ebec6dSmrgAC_ARG_VAR([FOP], [Path to fop command]) 105875ebec6dSmrgm4_define([_defopt], m4_default([$2], [auto])) 105975ebec6dSmrgAC_ARG_WITH(fop, 106075ebec6dSmrg AS_HELP_STRING([--with-fop], 106175ebec6dSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106275ebec6dSmrg [use_fop=$withval], [use_fop=]_defopt) 106375ebec6dSmrgm4_undefine([_defopt]) 106475ebec6dSmrg 106575ebec6dSmrgif test "x$use_fop" = x"auto"; then 106675ebec6dSmrg AC_PATH_PROG([FOP], [fop]) 106775ebec6dSmrg if test "x$FOP" = "x"; then 106875ebec6dSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 106975ebec6dSmrg have_fop=no 107075ebec6dSmrg else 107175ebec6dSmrg have_fop=yes 107275ebec6dSmrg fi 107375ebec6dSmrgelif test "x$use_fop" = x"yes" ; then 107475ebec6dSmrg AC_PATH_PROG([FOP], [fop]) 107575ebec6dSmrg if test "x$FOP" = "x"; then 107675ebec6dSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107775ebec6dSmrg fi 107875ebec6dSmrg have_fop=yes 107975ebec6dSmrgelif test "x$use_fop" = x"no" ; then 108075ebec6dSmrg if test "x$FOP" != "x"; then 108175ebec6dSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 108275ebec6dSmrg fi 108375ebec6dSmrg have_fop=no 108475ebec6dSmrgelse 108575ebec6dSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 108675ebec6dSmrgfi 108775ebec6dSmrg 108875ebec6dSmrg# Test for a minimum version of fop, if provided. 108975ebec6dSmrgm4_ifval([$1], 109075ebec6dSmrg[if test "$have_fop" = yes; then 109175ebec6dSmrg # scrape the fop version 109275ebec6dSmrg AC_MSG_CHECKING([for fop minimum version]) 109375ebec6dSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 109475ebec6dSmrg AC_MSG_RESULT([$fop_version]) 109575ebec6dSmrg AS_VERSION_COMPARE([$fop_version], [$1], 109675ebec6dSmrg [if test "x$use_fop" = xauto; then 109775ebec6dSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 109875ebec6dSmrg have_fop=no 109975ebec6dSmrg else 110075ebec6dSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 110175ebec6dSmrg fi]) 110275ebec6dSmrgfi]) 110375ebec6dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 110475ebec6dSmrg]) # XORG_WITH_FOP 110575ebec6dSmrg 110675ebec6dSmrg# XORG_WITH_PS2PDF([DEFAULT]) 110775ebec6dSmrg# ---------------- 110875ebec6dSmrg# Minimum version: 1.6.0 110975ebec6dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 111075ebec6dSmrg# 111175ebec6dSmrg# Documentation tools are not always available on all platforms and sometimes 111275ebec6dSmrg# not at the appropriate level. This macro enables a module to test for the 111375ebec6dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 111475ebec6dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 111575ebec6dSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 111675ebec6dSmrg# --with-ps2pdf assumes 'auto'. 111775ebec6dSmrg# 111875ebec6dSmrg# Interface to module: 111975ebec6dSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 112075ebec6dSmrg# PS2PDF: returns the path of the ps2pdf program found 112175ebec6dSmrg# returns the path set by the user in the environment 112275ebec6dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 112375ebec6dSmrg# 'no' user instructs the module not to use ps2pdf 112475ebec6dSmrg# 112575ebec6dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 112675ebec6dSmrg# 112775ebec6dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 112875ebec6dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 112975ebec6dSmrgm4_define([_defopt], m4_default([$1], [auto])) 113075ebec6dSmrgAC_ARG_WITH(ps2pdf, 113175ebec6dSmrg AS_HELP_STRING([--with-ps2pdf], 113275ebec6dSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 113375ebec6dSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 113475ebec6dSmrgm4_undefine([_defopt]) 113575ebec6dSmrg 113675ebec6dSmrgif test "x$use_ps2pdf" = x"auto"; then 113775ebec6dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 113875ebec6dSmrg if test "x$PS2PDF" = "x"; then 113975ebec6dSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 114075ebec6dSmrg have_ps2pdf=no 114175ebec6dSmrg else 114275ebec6dSmrg have_ps2pdf=yes 1143af928962Smrg fi 114475ebec6dSmrgelif test "x$use_ps2pdf" = x"yes" ; then 114575ebec6dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 114675ebec6dSmrg if test "x$PS2PDF" = "x"; then 114775ebec6dSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1148af928962Smrg fi 114975ebec6dSmrg have_ps2pdf=yes 115075ebec6dSmrgelif test "x$use_ps2pdf" = x"no" ; then 115175ebec6dSmrg if test "x$PS2PDF" != "x"; then 115275ebec6dSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1153af928962Smrg fi 115475ebec6dSmrg have_ps2pdf=no 1155af928962Smrgelse 115675ebec6dSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1157af928962Smrgfi 115875ebec6dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 115975ebec6dSmrg]) # XORG_WITH_PS2PDF 1160af928962Smrg 116175ebec6dSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1162af928962Smrg# ---------------- 1163af928962Smrg# Minimum version: 1.6.0 1164af928962Smrg# 1165af928962Smrg# Documentation tools are not always available on all platforms and sometimes 116675ebec6dSmrg# not at the appropriate level. This macro enables a builder to skip all 116775ebec6dSmrg# documentation targets except traditional man pages. 116875ebec6dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 116975ebec6dSmrg# maximum flexibilty in controlling documentation building. 117075ebec6dSmrg# Refer to: 117175ebec6dSmrg# XORG_WITH_XMLTO --with-xmlto 117275ebec6dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 117375ebec6dSmrg# XORG_WITH_DOXYGEN --with-doxygen 117475ebec6dSmrg# XORG_WITH_FOP --with-fop 117575ebec6dSmrg# XORG_WITH_GROFF --with-groff 117675ebec6dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1177af928962Smrg# 1178af928962Smrg# Interface to module: 117975ebec6dSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 118075ebec6dSmrg# --enable-docs: 'yes' user instructs the module to generate docs 118175ebec6dSmrg# 'no' user instructs the module not to generate docs 118275ebec6dSmrg# parm1: specify the default value, yes or no. 1183af928962Smrg# 118475ebec6dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 118575ebec6dSmrgm4_define([docs_default], m4_default([$1], [yes])) 118675ebec6dSmrgAC_ARG_ENABLE(docs, 118775ebec6dSmrg AS_HELP_STRING([--enable-docs], 118875ebec6dSmrg [Enable building the documentation (default: ]docs_default[)]), 118975ebec6dSmrg [build_docs=$enableval], [build_docs=]docs_default) 119075ebec6dSmrgm4_undefine([docs_default]) 119175ebec6dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 119275ebec6dSmrgAC_MSG_CHECKING([whether to build documentation]) 119375ebec6dSmrgAC_MSG_RESULT([$build_docs]) 119475ebec6dSmrg]) # XORG_ENABLE_DOCS 119575ebec6dSmrg 119675ebec6dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 119775ebec6dSmrg# ---------------- 119875ebec6dSmrg# Minimum version: 1.6.0 1199af928962Smrg# 120075ebec6dSmrg# This macro enables a builder to skip all developer documentation. 120175ebec6dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 120275ebec6dSmrg# maximum flexibilty in controlling documentation building. 120375ebec6dSmrg# Refer to: 120475ebec6dSmrg# XORG_WITH_XMLTO --with-xmlto 120575ebec6dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 120675ebec6dSmrg# XORG_WITH_DOXYGEN --with-doxygen 120775ebec6dSmrg# XORG_WITH_FOP --with-fop 120875ebec6dSmrg# XORG_WITH_GROFF --with-groff 120975ebec6dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1210af928962Smrg# 121175ebec6dSmrg# Interface to module: 121275ebec6dSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 121375ebec6dSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 121475ebec6dSmrg# 'no' user instructs the module not to generate developer docs 121575ebec6dSmrg# parm1: specify the default value, yes or no. 1216af928962Smrg# 121775ebec6dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 121875ebec6dSmrgm4_define([devel_default], m4_default([$1], [yes])) 121975ebec6dSmrgAC_ARG_ENABLE(devel-docs, 122075ebec6dSmrg AS_HELP_STRING([--enable-devel-docs], 122175ebec6dSmrg [Enable building the developer documentation (default: ]devel_default[)]), 122275ebec6dSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 122375ebec6dSmrgm4_undefine([devel_default]) 122475ebec6dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 122575ebec6dSmrgAC_MSG_CHECKING([whether to build developer documentation]) 122675ebec6dSmrgAC_MSG_RESULT([$build_devel_docs]) 122775ebec6dSmrg]) # XORG_ENABLE_DEVEL_DOCS 122875ebec6dSmrg 122975ebec6dSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 123075ebec6dSmrg# ---------------- 123175ebec6dSmrg# Minimum version: 1.6.0 1232af928962Smrg# 123375ebec6dSmrg# This macro enables a builder to skip all functional specification targets. 123475ebec6dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 123575ebec6dSmrg# maximum flexibilty in controlling documentation building. 123675ebec6dSmrg# Refer to: 123775ebec6dSmrg# XORG_WITH_XMLTO --with-xmlto 123875ebec6dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 123975ebec6dSmrg# XORG_WITH_DOXYGEN --with-doxygen 124075ebec6dSmrg# XORG_WITH_FOP --with-fop 124175ebec6dSmrg# XORG_WITH_GROFF --with-groff 124275ebec6dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 124375ebec6dSmrg# 124475ebec6dSmrg# Interface to module: 124575ebec6dSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 124675ebec6dSmrg# --enable-specs: 'yes' user instructs the module to generate specs 124775ebec6dSmrg# 'no' user instructs the module not to generate specs 124875ebec6dSmrg# parm1: specify the default value, yes or no. 124975ebec6dSmrg# 125075ebec6dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 125175ebec6dSmrgm4_define([spec_default], m4_default([$1], [yes])) 125275ebec6dSmrgAC_ARG_ENABLE(specs, 125375ebec6dSmrg AS_HELP_STRING([--enable-specs], 125475ebec6dSmrg [Enable building the specs (default: ]spec_default[)]), 125575ebec6dSmrg [build_specs=$enableval], [build_specs=]spec_default) 125675ebec6dSmrgm4_undefine([spec_default]) 125775ebec6dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 125875ebec6dSmrgAC_MSG_CHECKING([whether to build functional specifications]) 125975ebec6dSmrgAC_MSG_RESULT([$build_specs]) 126075ebec6dSmrg]) # XORG_ENABLE_SPECS 126175ebec6dSmrg 126275ebec6dSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 126375ebec6dSmrg# ---------------------------------------------- 126475ebec6dSmrg# Minimum version: 1.13.0 126575ebec6dSmrg# 126675ebec6dSmrg# This macro enables a builder to enable/disable unit testing 126775ebec6dSmrg# It makes no assumption about the test cases implementation 126875ebec6dSmrg# Test cases may or may not use Automake "Support for test suites" 126975ebec6dSmrg# They may or may not use the software utility library GLib 127075ebec6dSmrg# 127175ebec6dSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 127275ebec6dSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 127375ebec6dSmrg# The variable enable_unit_tests is used by other macros in this file. 127475ebec6dSmrg# 127575ebec6dSmrg# Interface to module: 127675ebec6dSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 127775ebec6dSmrg# enable_unit_tests: used in configure.ac for additional configuration 127875ebec6dSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 127975ebec6dSmrg# 'no' user instructs the module not to build tests 128075ebec6dSmrg# parm1: specify the default value, yes or no. 128175ebec6dSmrg# 128275ebec6dSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 128375ebec6dSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 128475ebec6dSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 128575ebec6dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1286af928962Smrgm4_define([_defopt], m4_default([$1], [auto])) 128775ebec6dSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 128875ebec6dSmrg [Enable building unit test cases (default: ]_defopt[)]), 128975ebec6dSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 129075ebec6dSmrgm4_undefine([_defopt]) 129175ebec6dSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 129275ebec6dSmrgAC_MSG_CHECKING([whether to build unit test cases]) 129375ebec6dSmrgAC_MSG_RESULT([$enable_unit_tests]) 129475ebec6dSmrg]) # XORG_ENABLE_UNIT_TESTS 129575ebec6dSmrg 129675ebec6dSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 129775ebec6dSmrg# ------------------------------------------------------ 129875ebec6dSmrg# Minimum version: 1.17.0 129975ebec6dSmrg# 130075ebec6dSmrg# This macro enables a builder to enable/disable integration testing 130175ebec6dSmrg# It makes no assumption about the test cases' implementation 130275ebec6dSmrg# Test cases may or may not use Automake "Support for test suites" 130375ebec6dSmrg# 130475ebec6dSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 130575ebec6dSmrg# usually requires less dependencies and may be built and run under less 130675ebec6dSmrg# stringent environments than integration tests. 130775ebec6dSmrg# 130875ebec6dSmrg# Interface to module: 130975ebec6dSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 131075ebec6dSmrg# enable_integration_tests: used in configure.ac for additional configuration 131175ebec6dSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 131275ebec6dSmrg# 'no' user instructs the module not to build tests 131375ebec6dSmrg# parm1: specify the default value, yes or no. 131475ebec6dSmrg# 131575ebec6dSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 131675ebec6dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 131775ebec6dSmrgm4_define([_defopt], m4_default([$1], [auto])) 131875ebec6dSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 131975ebec6dSmrg [Enable building integration test cases (default: ]_defopt[)]), 132075ebec6dSmrg [enable_integration_tests=$enableval], 132175ebec6dSmrg [enable_integration_tests=]_defopt) 132275ebec6dSmrgm4_undefine([_defopt]) 132375ebec6dSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 132475ebec6dSmrg [test "x$enable_integration_tests" != xno]) 132575ebec6dSmrgAC_MSG_CHECKING([whether to build unit test cases]) 132675ebec6dSmrgAC_MSG_RESULT([$enable_integration_tests]) 132775ebec6dSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 132875ebec6dSmrg 132975ebec6dSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 133075ebec6dSmrg# ---------------------------------------- 133175ebec6dSmrg# Minimum version: 1.13.0 133275ebec6dSmrg# 133375ebec6dSmrg# GLib is a library which provides advanced data structures and functions. 133475ebec6dSmrg# This macro enables a module to test for the presence of Glib. 133575ebec6dSmrg# 133675ebec6dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 133775ebec6dSmrg# Otherwise the value of $enable_unit_tests is blank. 133875ebec6dSmrg# 133975ebec6dSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 134075ebec6dSmrg# test support usually requires less dependencies and may be built and run under 134175ebec6dSmrg# less stringent environments than integration tests. 134275ebec6dSmrg# 134375ebec6dSmrg# Interface to module: 134475ebec6dSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 134575ebec6dSmrg# with_glib: used in configure.ac to know if GLib has been found 134675ebec6dSmrg# --with-glib: 'yes' user instructs the module to use glib 134775ebec6dSmrg# 'no' user instructs the module not to use glib 134875ebec6dSmrg# 134975ebec6dSmrgAC_DEFUN([XORG_WITH_GLIB],[ 135075ebec6dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 135175ebec6dSmrgm4_define([_defopt], m4_default([$2], [auto])) 135275ebec6dSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 135375ebec6dSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 135475ebec6dSmrg [with_glib=$withval], [with_glib=]_defopt) 1355af928962Smrgm4_undefine([_defopt]) 1356af928962Smrg 135775ebec6dSmrghave_glib=no 135875ebec6dSmrg# Do not probe GLib if user explicitly disabled unit testing 135975ebec6dSmrgif test "x$enable_unit_tests" != x"no"; then 136075ebec6dSmrg # Do not probe GLib if user explicitly disabled it 136175ebec6dSmrg if test "x$with_glib" != x"no"; then 136275ebec6dSmrg m4_ifval( 136375ebec6dSmrg [$1], 136475ebec6dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 136575ebec6dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 136675ebec6dSmrg ) 136775ebec6dSmrg fi 1368af928962Smrgfi 1369af928962Smrg 137075ebec6dSmrg# Not having GLib when unit testing has been explicitly requested is an error 137175ebec6dSmrgif test "x$enable_unit_tests" = x"yes"; then 137275ebec6dSmrg if test "x$have_glib" = x"no"; then 137375ebec6dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 137475ebec6dSmrg fi 1375af928962Smrgfi 1376af928962Smrg 137775ebec6dSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 137875ebec6dSmrgif test "x$enable_unit_tests" = x"no"; then 137975ebec6dSmrg if test "x$with_glib" = x"yes"; then 138075ebec6dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 138175ebec6dSmrg fi 1382af928962Smrgfi 1383af928962Smrg 138475ebec6dSmrg# Not having GLib when it has been explicitly requested is an error 138575ebec6dSmrgif test "x$with_glib" = x"yes"; then 138675ebec6dSmrg if test "x$have_glib" = x"no"; then 138775ebec6dSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 138875ebec6dSmrg fi 138975ebec6dSmrgfi 1390af928962Smrg 139175ebec6dSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 139275ebec6dSmrg]) # XORG_WITH_GLIB 139375ebec6dSmrg 139475ebec6dSmrg# XORG_LD_WRAP([required|optional]) 139575ebec6dSmrg# --------------------------------- 139675ebec6dSmrg# Minimum version: 1.13.0 1397af928962Smrg# 139875ebec6dSmrg# Check if linker supports -wrap, passed via compiler flags 1399af928962Smrg# 140075ebec6dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 140175ebec6dSmrg# Otherwise the value of $enable_unit_tests is blank. 1402af928962Smrg# 140375ebec6dSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 140475ebec6dSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 140575ebec6dSmrg# available, an argument of "optional" allows use when some unit tests require 140675ebec6dSmrg# ld -wrap and others do not. 1407af928962Smrg# 140875ebec6dSmrgAC_DEFUN([XORG_LD_WRAP],[ 140975ebec6dSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 141075ebec6dSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 141175ebec6dSmrg void __wrap_exit(int status) { return; }], 141275ebec6dSmrg [exit(0);])]) 141375ebec6dSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 141475ebec6dSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 141575ebec6dSmrg if test "x$have_ld_wrap" = x"no"; then 141675ebec6dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 141775ebec6dSmrg fi 1418af928962Smrgfi 141975ebec6dSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 142075ebec6dSmrg# 142175ebec6dSmrg]) # XORG_LD_WRAP 1422fe567363Smrg 142375ebec6dSmrg# XORG_CHECK_LINKER_FLAGS 142475ebec6dSmrg# ----------------------- 142575ebec6dSmrg# SYNOPSIS 142675ebec6dSmrg# 142775ebec6dSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 142875ebec6dSmrg# 142975ebec6dSmrg# DESCRIPTION 143075ebec6dSmrg# 143175ebec6dSmrg# Check whether the given linker FLAGS work with the current language's 143275ebec6dSmrg# linker, or whether they give an error. 143375ebec6dSmrg# 143475ebec6dSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 143575ebec6dSmrg# success/failure. 143675ebec6dSmrg# 143775ebec6dSmrg# PROGRAM-SOURCE is the program source to link with, if needed 143875ebec6dSmrg# 143975ebec6dSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 144075ebec6dSmrg# 144175ebec6dSmrg# LICENSE 144275ebec6dSmrg# 144375ebec6dSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 144475ebec6dSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 144575ebec6dSmrg# Copyright (c) 2009 Matteo Frigo 144675ebec6dSmrg# 144775ebec6dSmrg# This program is free software: you can redistribute it and/or modify it 144875ebec6dSmrg# under the terms of the GNU General Public License as published by the 144975ebec6dSmrg# Free Software Foundation, either version 3 of the License, or (at your 145075ebec6dSmrg# option) any later version. 145175ebec6dSmrg# 145275ebec6dSmrg# This program is distributed in the hope that it will be useful, but 145375ebec6dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 145475ebec6dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 145575ebec6dSmrg# Public License for more details. 145675ebec6dSmrg# 145775ebec6dSmrg# You should have received a copy of the GNU General Public License along 145875ebec6dSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 145975ebec6dSmrg# 146075ebec6dSmrg# As a special exception, the respective Autoconf Macro's copyright owner 146175ebec6dSmrg# gives unlimited permission to copy, distribute and modify the configure 146275ebec6dSmrg# scripts that are the output of Autoconf when processing the Macro. You 146375ebec6dSmrg# need not follow the terms of the GNU General Public License when using 146475ebec6dSmrg# or distributing such scripts, even though portions of the text of the 146575ebec6dSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 146675ebec6dSmrg# all other use of the material that constitutes the Autoconf Macro. 146775ebec6dSmrg# 146875ebec6dSmrg# This special exception to the GPL applies to versions of the Autoconf 146975ebec6dSmrg# Macro released by the Autoconf Archive. When you make and distribute a 147075ebec6dSmrg# modified version of the Autoconf Macro, you may extend this special 147175ebec6dSmrg# exception to the GPL to apply to your modified version as well.# 147275ebec6dSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 147375ebec6dSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 147475ebec6dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 147575ebec6dSmrgAS_LITERAL_IF([$1], 147675ebec6dSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 147775ebec6dSmrg ax_save_FLAGS=$LDFLAGS 147875ebec6dSmrg LDFLAGS="$1" 147975ebec6dSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 148075ebec6dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 148175ebec6dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 148275ebec6dSmrg LDFLAGS=$ax_save_FLAGS])], 148375ebec6dSmrg [ax_save_FLAGS=$LDFLAGS 148475ebec6dSmrg LDFLAGS="$1" 148575ebec6dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 148675ebec6dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 148775ebec6dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 148875ebec6dSmrg LDFLAGS=$ax_save_FLAGS]) 148975ebec6dSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 149075ebec6dSmrgAC_MSG_RESULT($xorg_check_linker_flags) 149175ebec6dSmrgif test "x$xorg_check_linker_flags" = xyes; then 149275ebec6dSmrg m4_default([$2], :) 149375ebec6dSmrgelse 149475ebec6dSmrg m4_default([$3], :) 149575ebec6dSmrgfi 149675ebec6dSmrg]) # XORG_CHECK_LINKER_FLAGS 149775ebec6dSmrg 149875ebec6dSmrg# XORG_MEMORY_CHECK_FLAGS 149975ebec6dSmrg# ----------------------- 150075ebec6dSmrg# Minimum version: 1.16.0 1501af928962Smrg# 150275ebec6dSmrg# This macro attempts to find appropriate memory checking functionality 150375ebec6dSmrg# for various platforms which unit testing code may use to catch various 150475ebec6dSmrg# forms of memory allocation and access errors in testing. 1505af928962Smrg# 1506af928962Smrg# Interface to module: 150775ebec6dSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 150875ebec6dSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1509af928962Smrg# 151075ebec6dSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1511af928962Smrg# 151275ebec6dSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1513af928962Smrg 151475ebec6dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 151575ebec6dSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 151675ebec6dSmrg [Environment variables to enable memory checking in tests]) 151775ebec6dSmrg 151875ebec6dSmrg# Check for different types of support on different platforms 151975ebec6dSmrgcase $host_os in 152075ebec6dSmrg solaris*) 152175ebec6dSmrg AC_CHECK_LIB([umem], [umem_alloc], 152275ebec6dSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 152375ebec6dSmrg ;; 152475ebec6dSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 152575ebec6dSmrg # both directly and inverted, so should not be 0 or 255. 152675ebec6dSmrg malloc_debug_env='MALLOC_PERTURB_=15' 152775ebec6dSmrg ;; 152875ebec6dSmrg darwin*) 152975ebec6dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 153075ebec6dSmrg ;; 153175ebec6dSmrg *bsd*) 153275ebec6dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 153375ebec6dSmrg ;; 153475ebec6dSmrgesac 153575ebec6dSmrg 153675ebec6dSmrg# User supplied flags override default flags 153775ebec6dSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 153875ebec6dSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1539af928962Smrgfi 1540af928962Smrg 154175ebec6dSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 154275ebec6dSmrg]) # XORG_WITH_LINT 154375ebec6dSmrg 154475ebec6dSmrg# XORG_CHECK_MALLOC_ZERO 154575ebec6dSmrg# ---------------------- 154675ebec6dSmrg# Minimum version: 1.0.0 1547af928962Smrg# 154875ebec6dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 154975ebec6dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 155075ebec6dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 155175ebec6dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 155275ebec6dSmrgAC_ARG_ENABLE(malloc0returnsnull, 155375ebec6dSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 155475ebec6dSmrg [malloc(0) returns NULL (default: auto)]), 155575ebec6dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 155675ebec6dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1557af928962Smrg 155875ebec6dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 155975ebec6dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 156075ebec6dSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 156175ebec6dSmrg#include <stdlib.h> 156275ebec6dSmrg],[ 156375ebec6dSmrg char *m0, *r0, *c0, *p; 156475ebec6dSmrg m0 = malloc(0); 156575ebec6dSmrg p = malloc(10); 156675ebec6dSmrg r0 = realloc(p,0); 156775ebec6dSmrg c0 = calloc(0,10); 156875ebec6dSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 156975ebec6dSmrg])], 157075ebec6dSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 157175ebec6dSmrg [MALLOC_ZERO_RETURNS_NULL=no], 157275ebec6dSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 157375ebec6dSmrgfi 157475ebec6dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 157575ebec6dSmrg 157675ebec6dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 157775ebec6dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 157875ebec6dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 157975ebec6dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 158075ebec6dSmrgelse 158175ebec6dSmrg MALLOC_ZERO_CFLAGS="" 158275ebec6dSmrg XMALLOC_ZERO_CFLAGS="" 158375ebec6dSmrg XTMALLOC_ZERO_CFLAGS="" 158475ebec6dSmrgfi 158575ebec6dSmrg 158675ebec6dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 158775ebec6dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 158875ebec6dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 158975ebec6dSmrg]) # XORG_CHECK_MALLOC_ZERO 159075ebec6dSmrg 159175ebec6dSmrg# XORG_WITH_LINT() 1592af928962Smrg# ---------------- 159375ebec6dSmrg# Minimum version: 1.1.0 1594af928962Smrg# 159575ebec6dSmrg# This macro enables the use of a tool that flags some suspicious and 159675ebec6dSmrg# non-portable constructs (likely to be bugs) in C language source code. 159775ebec6dSmrg# It will attempt to locate the tool and use appropriate options. 159875ebec6dSmrg# There are various lint type tools on different platforms. 1599af928962Smrg# 1600af928962Smrg# Interface to module: 160175ebec6dSmrg# LINT: returns the path to the tool found on the platform 160275ebec6dSmrg# or the value set to LINT on the configure cmd line 160375ebec6dSmrg# also an Automake conditional 160475ebec6dSmrg# LINT_FLAGS: an Automake variable with appropriate flags 1605af928962Smrg# 160675ebec6dSmrg# --with-lint: 'yes' user instructs the module to use lint 160775ebec6dSmrg# 'no' user instructs the module not to use lint (default) 1608af928962Smrg# 160975ebec6dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 161075ebec6dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1611af928962Smrg# 161275ebec6dSmrgAC_DEFUN([XORG_WITH_LINT],[ 161375ebec6dSmrg 161475ebec6dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 161575ebec6dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 161675ebec6dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 161775ebec6dSmrg [Use a lint-style source code checker (default: disabled)])], 161875ebec6dSmrg [use_lint=$withval], [use_lint=no]) 161975ebec6dSmrg 162075ebec6dSmrg# Obtain platform specific info like program name and options 162175ebec6dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 162275ebec6dSmrgcase $host_os in 162375ebec6dSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 162475ebec6dSmrg lint_name=splint 162575ebec6dSmrg lint_options="-badflag" 162675ebec6dSmrg ;; 162775ebec6dSmrg *freebsd* | *netbsd*) 162875ebec6dSmrg lint_name=lint 162975ebec6dSmrg lint_options="-u -b" 163075ebec6dSmrg ;; 163175ebec6dSmrg *solaris*) 163275ebec6dSmrg lint_name=lint 163375ebec6dSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 163475ebec6dSmrg ;; 163575ebec6dSmrgesac 1636af928962Smrg 163775ebec6dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 163875ebec6dSmrgif test "x$use_lint" = x"yes" ; then 163975ebec6dSmrg AC_PATH_PROG([LINT], [$lint_name]) 164075ebec6dSmrg if test "x$LINT" = "x"; then 164175ebec6dSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 164275ebec6dSmrg fi 164375ebec6dSmrgelif test "x$use_lint" = x"no" ; then 164475ebec6dSmrg if test "x$LINT" != "x"; then 164575ebec6dSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 164675ebec6dSmrg fi 164775ebec6dSmrgelse 164875ebec6dSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 164975ebec6dSmrgfi 165075ebec6dSmrg 165175ebec6dSmrg# User supplied flags override default flags 165275ebec6dSmrgif test "x$LINT_FLAGS" != "x"; then 165375ebec6dSmrg lint_options=$LINT_FLAGS 165475ebec6dSmrgfi 165575ebec6dSmrg 165675ebec6dSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 165775ebec6dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 165875ebec6dSmrg 165975ebec6dSmrg]) # XORG_WITH_LINT 166075ebec6dSmrg 166175ebec6dSmrg# XORG_LINT_LIBRARY(LIBNAME) 166275ebec6dSmrg# -------------------------- 166375ebec6dSmrg# Minimum version: 1.1.0 1664fe567363Smrg# 166575ebec6dSmrg# Sets up flags for building lint libraries for checking programs that call 166675ebec6dSmrg# functions in the library. 1667fe567363Smrg# 1668fe567363Smrg# Interface to module: 166975ebec6dSmrg# LINTLIB - Automake variable with the name of lint library file to make 167075ebec6dSmrg# MAKE_LINT_LIB - Automake conditional 1671fe567363Smrg# 167275ebec6dSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 167375ebec6dSmrg# - 'no' user instructs the module not to create a lint library (default) 1674fe567363Smrg 167575ebec6dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 167675ebec6dSmrgAC_REQUIRE([XORG_WITH_LINT]) 167775ebec6dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 167875ebec6dSmrg [Create lint library (default: disabled)])], 167975ebec6dSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 168075ebec6dSmrg 168175ebec6dSmrgif test "x$make_lint_lib" = x"yes" ; then 168275ebec6dSmrg LINTLIB=llib-l$1.ln 168375ebec6dSmrg if test "x$LINT" = "x"; then 168475ebec6dSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 168575ebec6dSmrg fi 168675ebec6dSmrgelif test "x$make_lint_lib" != x"no" ; then 168775ebec6dSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 168875ebec6dSmrgfi 168975ebec6dSmrg 169075ebec6dSmrgAC_SUBST(LINTLIB) 169175ebec6dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 169275ebec6dSmrg 169375ebec6dSmrg]) # XORG_LINT_LIBRARY 169475ebec6dSmrg 169575ebec6dSmrg# XORG_COMPILER_BRAND 169675ebec6dSmrg# ------------------- 169775ebec6dSmrg# Minimum version: 1.14.0 1698fe567363Smrg# 169975ebec6dSmrg# Checks for various brands of compilers and sets flags as appropriate: 170075ebec6dSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 170175ebec6dSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 170275ebec6dSmrg# clang compiler - sets CLANGCC to "yes" 170375ebec6dSmrg# Intel compiler - sets INTELCC to "yes" 170475ebec6dSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1705fe567363Smrg# 170675ebec6dSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 170775ebec6dSmrgAC_LANG_CASE( 170875ebec6dSmrg [C], [ 170975ebec6dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 171075ebec6dSmrg ], 171175ebec6dSmrg [C++], [ 171275ebec6dSmrg AC_REQUIRE([AC_PROG_CXX]) 171375ebec6dSmrg ] 171475ebec6dSmrg) 171575ebec6dSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 171675ebec6dSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 171775ebec6dSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 171875ebec6dSmrg]) # XORG_COMPILER_BRAND 1719fe567363Smrg 172075ebec6dSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 172175ebec6dSmrg# --------------- 172275ebec6dSmrg# Minimum version: 1.16.0 1723fe567363Smrg# 172475ebec6dSmrg# Test if the compiler works when passed the given flag as a command line argument. 172575ebec6dSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 172675ebec6dSmrg# next flag in the list until there are no more options. 1727fe567363Smrg# 172875ebec6dSmrg# Note that this does not guarantee that the compiler supports the flag as some 172975ebec6dSmrg# compilers will simply ignore arguments that they do not understand, but we do 173075ebec6dSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 173175ebec6dSmrg# -Werror=unused-command-line-argument 1732fe567363Smrg# 173375ebec6dSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 173475ebec6dSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 173575ebec6dSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 173675ebec6dSmrg 173775ebec6dSmrgAC_LANG_COMPILER_REQUIRE 173875ebec6dSmrg 173975ebec6dSmrgAC_LANG_CASE( 174075ebec6dSmrg [C], [ 174175ebec6dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 174275ebec6dSmrg define([PREFIX], [C]) 174375ebec6dSmrg define([CACHE_PREFIX], [cc]) 174475ebec6dSmrg define([COMPILER], [$CC]) 174575ebec6dSmrg ], 174675ebec6dSmrg [C++], [ 174775ebec6dSmrg define([PREFIX], [CXX]) 174875ebec6dSmrg define([CACHE_PREFIX], [cxx]) 174975ebec6dSmrg define([COMPILER], [$CXX]) 175075ebec6dSmrg ] 175175ebec6dSmrg) 175275ebec6dSmrg 175375ebec6dSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 175475ebec6dSmrg 175575ebec6dSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 175675ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 175775ebec6dSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 175875ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 175975ebec6dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 176075ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 176175ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 176275ebec6dSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 176375ebec6dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 176475ebec6dSmrgfi 176575ebec6dSmrg 176675ebec6dSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 176775ebec6dSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 176875ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 176975ebec6dSmrg fi 177075ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 177175ebec6dSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 177275ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 177375ebec6dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 177475ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 177575ebec6dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 177675ebec6dSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 177775ebec6dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 177875ebec6dSmrgfi 177975ebec6dSmrg 178075ebec6dSmrgfound="no" 178175ebec6dSmrgm4_foreach([flag], m4_cdr($@), [ 178275ebec6dSmrg if test $found = "no" ; then 178375ebec6dSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 178475ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 178575ebec6dSmrg fi 178675ebec6dSmrg 178775ebec6dSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 178875ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 178975ebec6dSmrg fi 179075ebec6dSmrg 179175ebec6dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 179275ebec6dSmrg 179375ebec6dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 179475ebec6dSmrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 179575ebec6dSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 179675ebec6dSmrg AC_CACHE_VAL($cacheid, 179775ebec6dSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 179875ebec6dSmrg [eval $cacheid=yes], 179975ebec6dSmrg [eval $cacheid=no])]) 180075ebec6dSmrg 180175ebec6dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 180275ebec6dSmrg 180375ebec6dSmrg eval supported=\$$cacheid 180475ebec6dSmrg AC_MSG_RESULT([$supported]) 180575ebec6dSmrg if test "$supported" = "yes" ; then 180675ebec6dSmrg $1="$$1 ]flag[" 180775ebec6dSmrg found="yes" 180875ebec6dSmrg fi 180975ebec6dSmrg fi 181075ebec6dSmrg]) 181175ebec6dSmrg]) # XORG_TESTSET_CFLAG 181275ebec6dSmrg 181375ebec6dSmrg# XORG_COMPILER_FLAGS 181475ebec6dSmrg# --------------- 181575ebec6dSmrg# Minimum version: 1.16.0 1816fe567363Smrg# 181775ebec6dSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 181875ebec6dSmrg# arguments supported by the selected compiler which do NOT alter the generated 181975ebec6dSmrg# code. These arguments will cause the compiler to print various warnings 182075ebec6dSmrg# during compilation AND turn a conservative set of warnings into errors. 1821fe567363Smrg# 182275ebec6dSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 182375ebec6dSmrg# future versions of util-macros as options are added to new compilers. 182475ebec6dSmrg# 182575ebec6dSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 182675ebec6dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1827fe567363Smrg 182875ebec6dSmrgAC_ARG_ENABLE(selective-werror, 182975ebec6dSmrg AS_HELP_STRING([--disable-selective-werror], 183075ebec6dSmrg [Turn off selective compiler errors. (default: enabled)]), 183175ebec6dSmrg [SELECTIVE_WERROR=$enableval], 183275ebec6dSmrg [SELECTIVE_WERROR=yes]) 1833fe567363Smrg 183475ebec6dSmrgAC_LANG_CASE( 183575ebec6dSmrg [C], [ 183675ebec6dSmrg define([PREFIX], [C]) 183775ebec6dSmrg ], 183875ebec6dSmrg [C++], [ 183975ebec6dSmrg define([PREFIX], [CXX]) 184075ebec6dSmrg ] 184175ebec6dSmrg) 184275ebec6dSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 184375ebec6dSmrgif test "x$SUNCC" = "xyes"; then 184475ebec6dSmrg [BASE_]PREFIX[FLAGS]="-v" 184575ebec6dSmrgelse 184675ebec6dSmrg [BASE_]PREFIX[FLAGS]="" 1847fe567363Smrgfi 1848fe567363Smrg 184975ebec6dSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 185075ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 185175ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 185275ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 185375ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1854fe567363Smrg 185575ebec6dSmrgAC_LANG_CASE( 185675ebec6dSmrg [C], [ 185775ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 185875ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 185975ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 186075ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 186175ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 186275ebec6dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 186375ebec6dSmrg ] 186475ebec6dSmrg) 186575ebec6dSmrg 186675ebec6dSmrg# This chunk adds additional warnings that could catch undesired effects. 186775ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 186875ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 186975ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 187075ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 187175ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 187275ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 187375ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 187475ebec6dSmrg 187575ebec6dSmrg# These are currently disabled because they are noisy. They will be enabled 187675ebec6dSmrg# in the future once the codebase is sufficiently modernized to silence 187775ebec6dSmrg# them. For now, I don't want them to drown out the other warnings. 187875ebec6dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 187975ebec6dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 188075ebec6dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 188175ebec6dSmrg 188275ebec6dSmrg# Turn some warnings into errors, so we don't accidently get successful builds 188375ebec6dSmrg# when there are problems that should be fixed. 188475ebec6dSmrg 188575ebec6dSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 188675ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 188775ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 188875ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 188975ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 189075ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 189175ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 189275ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 189375ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 189475ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 189575ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 189675ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 189775ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 189875ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 189975ebec6dSmrgelse 190075ebec6dSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 190175ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 190275ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 190375ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 190475ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 190575ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 190675ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 190775ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 190875ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 190975ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 191075ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 191175ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 191275ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 191375ebec6dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1914fe567363Smrgfi 1915fe567363Smrg 191675ebec6dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 191775ebec6dSmrg]) # XORG_COMPILER_FLAGS 1918fe567363Smrg 191975ebec6dSmrg# XORG_CWARNFLAGS 192075ebec6dSmrg# --------------- 192175ebec6dSmrg# Minimum version: 1.2.0 192275ebec6dSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1923fe567363Smrg# 192475ebec6dSmrg# Defines CWARNFLAGS to enable C compiler warnings. 1925fe567363Smrg# 192675ebec6dSmrg# This function is deprecated because it defines -fno-strict-aliasing 192775ebec6dSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 192875ebec6dSmrg# is needed, then it should be added explicitly in the module when 192975ebec6dSmrg# it is updated to use BASE_CFLAGS. 1930fe567363Smrg# 193175ebec6dSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 193275ebec6dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 193375ebec6dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 193475ebec6dSmrgAC_LANG_CASE( 193575ebec6dSmrg [C], [ 193675ebec6dSmrg CWARNFLAGS="$BASE_CFLAGS" 193775ebec6dSmrg if test "x$GCC" = xyes ; then 193875ebec6dSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 193975ebec6dSmrg fi 194075ebec6dSmrg AC_SUBST(CWARNFLAGS) 194175ebec6dSmrg ] 194275ebec6dSmrg) 194375ebec6dSmrg]) # XORG_CWARNFLAGS 1944fe567363Smrg 194575ebec6dSmrg# XORG_STRICT_OPTION 1946fe567363Smrg# ----------------------- 194775ebec6dSmrg# Minimum version: 1.3.0 1948fe567363Smrg# 194975ebec6dSmrg# Add configure option to enable strict compilation flags, such as treating 195075ebec6dSmrg# warnings as fatal errors. 195175ebec6dSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 195275ebec6dSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1953fe567363Smrg# 195475ebec6dSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 195575ebec6dSmrg# when strict compilation is unconditionally desired. 195675ebec6dSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 195775ebec6dSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 195875ebec6dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 195975ebec6dSmrg 196075ebec6dSmrgAC_ARG_ENABLE(strict-compilation, 196175ebec6dSmrg AS_HELP_STRING([--enable-strict-compilation], 196275ebec6dSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 196375ebec6dSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 196475ebec6dSmrg 196575ebec6dSmrgAC_LANG_CASE( 196675ebec6dSmrg [C], [ 196775ebec6dSmrg define([PREFIX], [C]) 196875ebec6dSmrg ], 196975ebec6dSmrg [C++], [ 197075ebec6dSmrg define([PREFIX], [CXX]) 197175ebec6dSmrg ] 197275ebec6dSmrg) 197375ebec6dSmrg 197475ebec6dSmrg[STRICT_]PREFIX[FLAGS]="" 197575ebec6dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 197675ebec6dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 197775ebec6dSmrg 197875ebec6dSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 197975ebec6dSmrg# activate it with -Werror, so we add it here explicitly. 198075ebec6dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 198175ebec6dSmrg 198275ebec6dSmrgif test "x$STRICT_COMPILE" = "xyes"; then 198375ebec6dSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 198475ebec6dSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1985fe567363Smrgfi 198675ebec6dSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 198775ebec6dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 198875ebec6dSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 198975ebec6dSmrg]) # XORG_STRICT_OPTION 1990fe567363Smrg 199175ebec6dSmrg# XORG_DEFAULT_OPTIONS 199275ebec6dSmrg# -------------------- 199375ebec6dSmrg# Minimum version: 1.3.0 1994fe567363Smrg# 199575ebec6dSmrg# Defines default options for X.Org modules. 1996fe567363Smrg# 199775ebec6dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 199875ebec6dSmrgAC_REQUIRE([AC_PROG_INSTALL]) 199975ebec6dSmrgXORG_COMPILER_FLAGS 200075ebec6dSmrgXORG_CWARNFLAGS 200175ebec6dSmrgXORG_STRICT_OPTION 200275ebec6dSmrgXORG_RELEASE_VERSION 200375ebec6dSmrgXORG_CHANGELOG 200475ebec6dSmrgXORG_INSTALL 200575ebec6dSmrgXORG_MANPAGE_SECTIONS 200675ebec6dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 200775ebec6dSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 200875ebec6dSmrg]) # XORG_DEFAULT_OPTIONS 200975ebec6dSmrg 201075ebec6dSmrg# XORG_INSTALL() 201175ebec6dSmrg# ---------------- 201275ebec6dSmrg# Minimum version: 1.4.0 2013fe567363Smrg# 201475ebec6dSmrg# Defines the variable INSTALL_CMD as the command to copy 201575ebec6dSmrg# INSTALL from $prefix/share/util-macros. 2016fe567363Smrg# 201775ebec6dSmrgAC_DEFUN([XORG_INSTALL], [ 201875ebec6dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 201975ebec6dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 202075ebec6dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 202175ebec6dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 202275ebec6dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 202375ebec6dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 202475ebec6dSmrgAC_SUBST([INSTALL_CMD]) 202575ebec6dSmrg]) # XORG_INSTALL 202675ebec6dSmrgdnl Copyright 2005 Red Hat, Inc 202775ebec6dSmrgdnl 202875ebec6dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 202975ebec6dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 203075ebec6dSmrgdnl the above copyright notice appear in all copies and that both that 203175ebec6dSmrgdnl copyright notice and this permission notice appear in supporting 203275ebec6dSmrgdnl documentation. 203375ebec6dSmrgdnl 203475ebec6dSmrgdnl The above copyright notice and this permission notice shall be included 203575ebec6dSmrgdnl in all copies or substantial portions of the Software. 203675ebec6dSmrgdnl 203775ebec6dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 203875ebec6dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 203975ebec6dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 204075ebec6dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 204175ebec6dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 204275ebec6dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 204375ebec6dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 204475ebec6dSmrgdnl 204575ebec6dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 204675ebec6dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 204775ebec6dSmrgdnl other dealings in this Software without prior written authorization 204875ebec6dSmrgdnl from the copyright holders. 204975ebec6dSmrgdnl 2050fe567363Smrg 205175ebec6dSmrg# XORG_RELEASE_VERSION 205275ebec6dSmrg# -------------------- 205375ebec6dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 205475ebec6dSmrg 205575ebec6dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 205675ebec6dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 205775ebec6dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 205875ebec6dSmrg [Major version of this package]) 205975ebec6dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 206075ebec6dSmrg if test "x$PVM" = "x"; then 206175ebec6dSmrg PVM="0" 206275ebec6dSmrg fi 206375ebec6dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 206475ebec6dSmrg [$PVM], 206575ebec6dSmrg [Minor version of this package]) 206675ebec6dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 206775ebec6dSmrg if test "x$PVP" = "x"; then 206875ebec6dSmrg PVP="0" 206975ebec6dSmrg fi 207075ebec6dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 207175ebec6dSmrg [$PVP], 207275ebec6dSmrg [Patch version of this package]) 207375ebec6dSmrg]) 2074fe567363Smrg 207575ebec6dSmrg# XORG_CHANGELOG() 207675ebec6dSmrg# ---------------- 207775ebec6dSmrg# Minimum version: 1.2.0 207875ebec6dSmrg# 207975ebec6dSmrg# Defines the variable CHANGELOG_CMD as the command to generate 208075ebec6dSmrg# ChangeLog from git. 208175ebec6dSmrg# 208275ebec6dSmrg# 208375ebec6dSmrgAC_DEFUN([XORG_CHANGELOG], [ 208475ebec6dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 208575ebec6dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 208675ebec6dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 208775ebec6dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 208875ebec6dSmrgAC_SUBST([CHANGELOG_CMD]) 208975ebec6dSmrg]) # XORG_CHANGELOG 2090fe567363Smrg 209175ebec6dSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 209275ebec6dSmrg# 209375ebec6dSmrg# This file is free software; the Free Software Foundation 209475ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 209575ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2096fe567363Smrg 209775ebec6dSmrg# AM_AUTOMAKE_VERSION(VERSION) 209875ebec6dSmrg# ---------------------------- 209975ebec6dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 210075ebec6dSmrg# generated from the m4 files accompanying Automake X.Y. 210175ebec6dSmrg# (This private macro should not be called outside this file.) 210275ebec6dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 210375ebec6dSmrg[am__api_version='1.13' 210475ebec6dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 210575ebec6dSmrgdnl require some minimum version. Point them to the right macro. 210675ebec6dSmrgm4_if([$1], [1.13.4], [], 210775ebec6dSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 210875ebec6dSmrg]) 2109fe567363Smrg 211075ebec6dSmrg# _AM_AUTOCONF_VERSION(VERSION) 211175ebec6dSmrg# ----------------------------- 211275ebec6dSmrg# aclocal traces this macro to find the Autoconf version. 211375ebec6dSmrg# This is a private macro too. Using m4_define simplifies 211475ebec6dSmrg# the logic in aclocal, which can simply ignore this definition. 211575ebec6dSmrgm4_define([_AM_AUTOCONF_VERSION], []) 21168d4c0f7bSmrg 211775ebec6dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 211875ebec6dSmrg# ------------------------------- 211975ebec6dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 212075ebec6dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 212175ebec6dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 212275ebec6dSmrg[AM_AUTOMAKE_VERSION([1.13.4])dnl 212375ebec6dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 212475ebec6dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 212575ebec6dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 21268d4c0f7bSmrg 212775ebec6dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 21288d4c0f7bSmrg 212975ebec6dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 213075ebec6dSmrg# 213175ebec6dSmrg# This file is free software; the Free Software Foundation 213275ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 213375ebec6dSmrg# with or without modifications, as long as this notice is preserved. 21348d4c0f7bSmrg 213575ebec6dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 213675ebec6dSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 213775ebec6dSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 21388d4c0f7bSmrg# 213975ebec6dSmrg# Of course, Automake must honor this variable whenever it calls a 214075ebec6dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 214175ebec6dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 214275ebec6dSmrg# depending on how configure is run. This is pretty annoying, since 214375ebec6dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 214475ebec6dSmrg# source directory, any form will work fine, but in subdirectories a 214575ebec6dSmrg# relative path needs to be adjusted first. 2146af928962Smrg# 214775ebec6dSmrg# $ac_aux_dir/missing 214875ebec6dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 214975ebec6dSmrg# $top_srcdir/$ac_aux_dir/missing 215075ebec6dSmrg# fails if $ac_aux_dir is absolute, 215175ebec6dSmrg# fails when called from a subdirectory in a VPATH build with 215275ebec6dSmrg# a relative $ac_aux_dir 2153af928962Smrg# 215475ebec6dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 215575ebec6dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 215675ebec6dSmrg# harmless because $srcdir is '.', but things will broke when you 215775ebec6dSmrg# start a VPATH build or use an absolute $srcdir. 2158af928962Smrg# 215975ebec6dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 216075ebec6dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 216175ebec6dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 216275ebec6dSmrg# and then we would define $MISSING as 216375ebec6dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 216475ebec6dSmrg# This will work as long as MISSING is not called from configure, because 216575ebec6dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 216675ebec6dSmrg# However there are other variables, like CC, which are often used in 216775ebec6dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 21688d4c0f7bSmrg# 216975ebec6dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 217075ebec6dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 217175ebec6dSmrg# configured tree to be moved without reconfiguration. 21728d4c0f7bSmrg 217375ebec6dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 217475ebec6dSmrg[dnl Rely on autoconf to set up CDPATH properly. 217575ebec6dSmrgAC_PREREQ([2.50])dnl 217675ebec6dSmrg# expand $ac_aux_dir to an absolute path 217775ebec6dSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 217875ebec6dSmrg]) 2179af928962Smrg 218075ebec6dSmrg# AM_CONDITIONAL -*- Autoconf -*- 2181af928962Smrg 218275ebec6dSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 218375ebec6dSmrg# 218475ebec6dSmrg# This file is free software; the Free Software Foundation 218575ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 218675ebec6dSmrg# with or without modifications, as long as this notice is preserved. 218775ebec6dSmrg 218875ebec6dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 218975ebec6dSmrg# ------------------------------------- 219075ebec6dSmrg# Define a conditional. 219175ebec6dSmrgAC_DEFUN([AM_CONDITIONAL], 219275ebec6dSmrg[AC_PREREQ([2.52])dnl 219375ebec6dSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 219475ebec6dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 219575ebec6dSmrgAC_SUBST([$1_TRUE])dnl 219675ebec6dSmrgAC_SUBST([$1_FALSE])dnl 219775ebec6dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 219875ebec6dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 219975ebec6dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 220075ebec6dSmrgif $2; then 220175ebec6dSmrg $1_TRUE= 220275ebec6dSmrg $1_FALSE='#' 22038d4c0f7bSmrgelse 220475ebec6dSmrg $1_TRUE='#' 220575ebec6dSmrg $1_FALSE= 22068d4c0f7bSmrgfi 220775ebec6dSmrgAC_CONFIG_COMMANDS_PRE( 220875ebec6dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 220975ebec6dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 221075ebec6dSmrgUsually this means the macro was only invoked conditionally.]]) 221175ebec6dSmrgfi])]) 2212af928962Smrg 221375ebec6dSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 221475ebec6dSmrg# 221575ebec6dSmrg# This file is free software; the Free Software Foundation 221675ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 221775ebec6dSmrg# with or without modifications, as long as this notice is preserved. 22188d4c0f7bSmrg 22198d4c0f7bSmrg 222075ebec6dSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 222175ebec6dSmrg# written in clear, in which case automake, when reading aclocal.m4, 222275ebec6dSmrg# will think it sees a *use*, and therefore will trigger all it's 222375ebec6dSmrg# C support machinery. Also note that it means that autoscan, seeing 222475ebec6dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 22258d4c0f7bSmrg 222675ebec6dSmrg 222775ebec6dSmrg# _AM_DEPENDENCIES(NAME) 222875ebec6dSmrg# ---------------------- 222975ebec6dSmrg# See how the compiler implements dependency checking. 223075ebec6dSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 223175ebec6dSmrg# We try a few techniques and use that to set a single cache variable. 2232af928962Smrg# 223375ebec6dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 223475ebec6dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 223575ebec6dSmrg# dependency, and given that the user is not expected to run this macro, 223675ebec6dSmrg# just rely on AC_PROG_CC. 223775ebec6dSmrgAC_DEFUN([_AM_DEPENDENCIES], 223875ebec6dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 223975ebec6dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 224075ebec6dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 224175ebec6dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 22428d4c0f7bSmrg 224375ebec6dSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 224475ebec6dSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 224575ebec6dSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 224675ebec6dSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 224775ebec6dSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 224875ebec6dSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 224975ebec6dSmrg [depcc="$$1" am_compiler_list=]) 2250af928962Smrg 225175ebec6dSmrgAC_CACHE_CHECK([dependency style of $depcc], 225275ebec6dSmrg [am_cv_$1_dependencies_compiler_type], 225375ebec6dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 225475ebec6dSmrg # We make a subdir and do the tests there. Otherwise we can end up 225575ebec6dSmrg # making bogus files that we don't know about and never remove. For 225675ebec6dSmrg # instance it was reported that on HP-UX the gcc test will end up 225775ebec6dSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 225875ebec6dSmrg # in D". 225975ebec6dSmrg rm -rf conftest.dir 226075ebec6dSmrg mkdir conftest.dir 226175ebec6dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 226275ebec6dSmrg # using a relative directory. 226375ebec6dSmrg cp "$am_depcomp" conftest.dir 226475ebec6dSmrg cd conftest.dir 226575ebec6dSmrg # We will build objects and dependencies in a subdirectory because 226675ebec6dSmrg # it helps to detect inapplicable dependency modes. For instance 226775ebec6dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 226875ebec6dSmrg # side effect of compilation, but ICC will put the dependencies in 226975ebec6dSmrg # the current directory while Tru64 will put them in the object 227075ebec6dSmrg # directory. 227175ebec6dSmrg mkdir sub 227275ebec6dSmrg 227375ebec6dSmrg am_cv_$1_dependencies_compiler_type=none 227475ebec6dSmrg if test "$am_compiler_list" = ""; then 227575ebec6dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 227675ebec6dSmrg fi 227775ebec6dSmrg am__universal=false 227875ebec6dSmrg m4_case([$1], [CC], 227975ebec6dSmrg [case " $depcc " in #( 228075ebec6dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 228175ebec6dSmrg esac], 228275ebec6dSmrg [CXX], 228375ebec6dSmrg [case " $depcc " in #( 228475ebec6dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 228575ebec6dSmrg esac]) 228675ebec6dSmrg 228775ebec6dSmrg for depmode in $am_compiler_list; do 228875ebec6dSmrg # Setup a source with many dependencies, because some compilers 228975ebec6dSmrg # like to wrap large dependency lists on column 80 (with \), and 229075ebec6dSmrg # we should not choose a depcomp mode which is confused by this. 229175ebec6dSmrg # 229275ebec6dSmrg # We need to recreate these files for each test, as the compiler may 229375ebec6dSmrg # overwrite some of them when testing with obscure command lines. 229475ebec6dSmrg # This happens at least with the AIX C compiler. 229575ebec6dSmrg : > sub/conftest.c 229675ebec6dSmrg for i in 1 2 3 4 5 6; do 229775ebec6dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229875ebec6dSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 229975ebec6dSmrg # Solaris 10 /bin/sh. 230075ebec6dSmrg echo '/* dummy */' > sub/conftst$i.h 230175ebec6dSmrg done 230275ebec6dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 230375ebec6dSmrg 230475ebec6dSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 230575ebec6dSmrg # mode. It turns out that the SunPro C++ compiler does not properly 230675ebec6dSmrg # handle '-M -o', and we need to detect this. Also, some Intel 230775ebec6dSmrg # versions had trouble with output in subdirs. 230875ebec6dSmrg am__obj=sub/conftest.${OBJEXT-o} 230975ebec6dSmrg am__minus_obj="-o $am__obj" 231075ebec6dSmrg case $depmode in 231175ebec6dSmrg gcc) 231275ebec6dSmrg # This depmode causes a compiler race in universal mode. 231375ebec6dSmrg test "$am__universal" = false || continue 231475ebec6dSmrg ;; 231575ebec6dSmrg nosideeffect) 231675ebec6dSmrg # After this tag, mechanisms are not by side-effect, so they'll 231775ebec6dSmrg # only be used when explicitly requested. 231875ebec6dSmrg if test "x$enable_dependency_tracking" = xyes; then 231975ebec6dSmrg continue 232075ebec6dSmrg else 232175ebec6dSmrg break 232275ebec6dSmrg fi 232375ebec6dSmrg ;; 232475ebec6dSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 232575ebec6dSmrg # This compiler won't grok '-c -o', but also, the minuso test has 232675ebec6dSmrg # not run yet. These depmodes are late enough in the game, and 232775ebec6dSmrg # so weak that their functioning should not be impacted. 232875ebec6dSmrg am__obj=conftest.${OBJEXT-o} 232975ebec6dSmrg am__minus_obj= 233075ebec6dSmrg ;; 233175ebec6dSmrg none) break ;; 233275ebec6dSmrg esac 233375ebec6dSmrg if depmode=$depmode \ 233475ebec6dSmrg source=sub/conftest.c object=$am__obj \ 233575ebec6dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 233675ebec6dSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 233775ebec6dSmrg >/dev/null 2>conftest.err && 233875ebec6dSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 233975ebec6dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 234075ebec6dSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 234175ebec6dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 234275ebec6dSmrg # icc doesn't choke on unknown options, it will just issue warnings 234375ebec6dSmrg # or remarks (even with -Werror). So we grep stderr for any message 234475ebec6dSmrg # that says an option was ignored or not supported. 234575ebec6dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 234675ebec6dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 234775ebec6dSmrg # The diagnosis changed in icc 8.0: 234875ebec6dSmrg # icc: Command line remark: option '-MP' not supported 234975ebec6dSmrg if (grep 'ignoring option' conftest.err || 235075ebec6dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 235175ebec6dSmrg am_cv_$1_dependencies_compiler_type=$depmode 235275ebec6dSmrg break 235375ebec6dSmrg fi 235475ebec6dSmrg fi 235575ebec6dSmrg done 235675ebec6dSmrg 235775ebec6dSmrg cd .. 235875ebec6dSmrg rm -rf conftest.dir 235975ebec6dSmrgelse 236075ebec6dSmrg am_cv_$1_dependencies_compiler_type=none 23618d4c0f7bSmrgfi 236275ebec6dSmrg]) 236375ebec6dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 236475ebec6dSmrgAM_CONDITIONAL([am__fastdep$1], [ 236575ebec6dSmrg test "x$enable_dependency_tracking" != xno \ 236675ebec6dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 236775ebec6dSmrg]) 2368af928962Smrg 23698d4c0f7bSmrg 237075ebec6dSmrg# AM_SET_DEPDIR 237175ebec6dSmrg# ------------- 237275ebec6dSmrg# Choose a directory name for dependency files. 237375ebec6dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 237475ebec6dSmrgAC_DEFUN([AM_SET_DEPDIR], 237575ebec6dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 237675ebec6dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 237775ebec6dSmrg]) 237875ebec6dSmrg 237975ebec6dSmrg 238075ebec6dSmrg# AM_DEP_TRACK 238175ebec6dSmrg# ------------ 238275ebec6dSmrgAC_DEFUN([AM_DEP_TRACK], 238375ebec6dSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 238475ebec6dSmrgAS_HELP_STRING( 238575ebec6dSmrg [--enable-dependency-tracking], 238675ebec6dSmrg [do not reject slow dependency extractors]) 238775ebec6dSmrgAS_HELP_STRING( 238875ebec6dSmrg [--disable-dependency-tracking], 238975ebec6dSmrg [speeds up one-time build])]) 239075ebec6dSmrgif test "x$enable_dependency_tracking" != xno; then 239175ebec6dSmrg am_depcomp="$ac_aux_dir/depcomp" 239275ebec6dSmrg AMDEPBACKSLASH='\' 239375ebec6dSmrg am__nodep='_no' 239475ebec6dSmrgfi 239575ebec6dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 239675ebec6dSmrgAC_SUBST([AMDEPBACKSLASH])dnl 239775ebec6dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 239875ebec6dSmrgAC_SUBST([am__nodep])dnl 239975ebec6dSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 240075ebec6dSmrg]) 240175ebec6dSmrg 240275ebec6dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 24038d4c0f7bSmrg 240475ebec6dSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 2405fe567363Smrg# 240675ebec6dSmrg# This file is free software; the Free Software Foundation 240775ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 240875ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2409fe567363Smrg 241075ebec6dSmrg 241175ebec6dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 241275ebec6dSmrg# ------------------------------ 241375ebec6dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 241475ebec6dSmrg[{ 241575ebec6dSmrg # Older Autoconf quotes --file arguments for eval, but not when files 241675ebec6dSmrg # are listed without --file. Let's play safe and only enable the eval 241775ebec6dSmrg # if we detect the quoting. 241875ebec6dSmrg case $CONFIG_FILES in 241975ebec6dSmrg *\'*) eval set x "$CONFIG_FILES" ;; 242075ebec6dSmrg *) set x $CONFIG_FILES ;; 242175ebec6dSmrg esac 242275ebec6dSmrg shift 242375ebec6dSmrg for mf 242475ebec6dSmrg do 242575ebec6dSmrg # Strip MF so we end up with the name of the file. 242675ebec6dSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 242775ebec6dSmrg # Check whether this is an Automake generated Makefile or not. 242875ebec6dSmrg # We used to match only the files named 'Makefile.in', but 242975ebec6dSmrg # some people rename them; so instead we look at the file content. 243075ebec6dSmrg # Grep'ing the first line is not enough: some people post-process 243175ebec6dSmrg # each Makefile.in and add a new line on top of each file to say so. 243275ebec6dSmrg # Grep'ing the whole file is not good either: AIX grep has a line 243375ebec6dSmrg # limit of 2048, but all sed's we know have understand at least 4000. 243475ebec6dSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 243575ebec6dSmrg dirpart=`AS_DIRNAME("$mf")` 243675ebec6dSmrg else 243775ebec6dSmrg continue 243875ebec6dSmrg fi 243975ebec6dSmrg # Extract the definition of DEPDIR, am__include, and am__quote 244075ebec6dSmrg # from the Makefile without running 'make'. 244175ebec6dSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 244275ebec6dSmrg test -z "$DEPDIR" && continue 244375ebec6dSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 244475ebec6dSmrg test -z "$am__include" && continue 244575ebec6dSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 244675ebec6dSmrg # Find all dependency output files, they are included files with 244775ebec6dSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 244875ebec6dSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 244975ebec6dSmrg # expansion. 245075ebec6dSmrg for file in `sed -n " 245175ebec6dSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 245275ebec6dSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 245375ebec6dSmrg # Make sure the directory exists. 245475ebec6dSmrg test -f "$dirpart/$file" && continue 245575ebec6dSmrg fdir=`AS_DIRNAME(["$file"])` 245675ebec6dSmrg AS_MKDIR_P([$dirpart/$fdir]) 245775ebec6dSmrg # echo "creating $dirpart/$file" 245875ebec6dSmrg echo '# dummy' > "$dirpart/$file" 245975ebec6dSmrg done 246075ebec6dSmrg done 246175ebec6dSmrg} 246275ebec6dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 246375ebec6dSmrg 246475ebec6dSmrg 246575ebec6dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 246675ebec6dSmrg# ----------------------------- 246775ebec6dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 2468fe567363Smrg# 246975ebec6dSmrg# This code is only required when automatic dependency tracking 247075ebec6dSmrg# is enabled. FIXME. This creates each '.P' file that we will 247175ebec6dSmrg# need in order to bootstrap the dependency handling code. 247275ebec6dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 247375ebec6dSmrg[AC_CONFIG_COMMANDS([depfiles], 247475ebec6dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 247575ebec6dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 247675ebec6dSmrg]) 2477fe567363Smrg 247875ebec6dSmrg# Do all the work for Automake. -*- Autoconf -*- 2479fe567363Smrg 248075ebec6dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 248175ebec6dSmrg# 248275ebec6dSmrg# This file is free software; the Free Software Foundation 248375ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 248475ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2485fe567363Smrg 248675ebec6dSmrg# This macro actually does too much. Some checks are only needed if 248775ebec6dSmrg# your package does certain things. But this isn't really a big deal. 2488fe567363Smrg 248975ebec6dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 249075ebec6dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 249175ebec6dSmrg# ----------------------------------------------- 249275ebec6dSmrg# The call with PACKAGE and VERSION arguments is the old style 249375ebec6dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 249475ebec6dSmrg# and VERSION should now be passed to AC_INIT and removed from 249575ebec6dSmrg# the call to AM_INIT_AUTOMAKE. 249675ebec6dSmrg# We support both call styles for the transition. After 249775ebec6dSmrg# the next Automake release, Autoconf can make the AC_INIT 249875ebec6dSmrg# arguments mandatory, and then we can depend on a new Autoconf 249975ebec6dSmrg# release and drop the old call support. 250075ebec6dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 250175ebec6dSmrg[AC_PREREQ([2.65])dnl 250275ebec6dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 250375ebec6dSmrgdnl the ones we care about. 250475ebec6dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 250575ebec6dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 250675ebec6dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 250775ebec6dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 250875ebec6dSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 250975ebec6dSmrg # is not polluted with repeated "-I." 251075ebec6dSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 251175ebec6dSmrg # test to see if srcdir already configured 251275ebec6dSmrg if test -f $srcdir/config.status; then 251375ebec6dSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 251475ebec6dSmrg fi 2515fe567363Smrgfi 2516fe567363Smrg 251775ebec6dSmrg# test whether we have cygpath 251875ebec6dSmrgif test -z "$CYGPATH_W"; then 251975ebec6dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 252075ebec6dSmrg CYGPATH_W='cygpath -w' 252175ebec6dSmrg else 252275ebec6dSmrg CYGPATH_W=echo 252375ebec6dSmrg fi 2524fe567363Smrgfi 252575ebec6dSmrgAC_SUBST([CYGPATH_W]) 2526fe567363Smrg 252775ebec6dSmrg# Define the identity of the package. 252875ebec6dSmrgdnl Distinguish between old-style and new-style calls. 252975ebec6dSmrgm4_ifval([$2], 253075ebec6dSmrg[AC_DIAGNOSE([obsolete], 253175ebec6dSmrg [$0: two- and three-arguments forms are deprecated.]) 253275ebec6dSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 253375ebec6dSmrg AC_SUBST([PACKAGE], [$1])dnl 253475ebec6dSmrg AC_SUBST([VERSION], [$2])], 253575ebec6dSmrg[_AM_SET_OPTIONS([$1])dnl 253675ebec6dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 253775ebec6dSmrgm4_if( 253875ebec6dSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 253975ebec6dSmrg [ok:ok],, 254075ebec6dSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 254175ebec6dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 254275ebec6dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 2543fe567363Smrg 254475ebec6dSmrg_AM_IF_OPTION([no-define],, 254575ebec6dSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 254675ebec6dSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 2547fe567363Smrg 254875ebec6dSmrg# Some tools Automake needs. 254975ebec6dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 255075ebec6dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 255175ebec6dSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 255275ebec6dSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 255375ebec6dSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 255475ebec6dSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 255575ebec6dSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 255675ebec6dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 255775ebec6dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 255875ebec6dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 255975ebec6dSmrg# For better backward compatibility. To be removed once Automake 1.9.x 256075ebec6dSmrg# dies out for good. For more background, see: 256175ebec6dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 256275ebec6dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 256375ebec6dSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 256475ebec6dSmrg# We need awk for the "check" target. The system "awk" is bad on 256575ebec6dSmrg# some platforms. 256675ebec6dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 256775ebec6dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 256875ebec6dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 256975ebec6dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 257075ebec6dSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 257175ebec6dSmrg [_AM_PROG_TAR([v7])])]) 257275ebec6dSmrg_AM_IF_OPTION([no-dependencies],, 257375ebec6dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 257475ebec6dSmrg [_AM_DEPENDENCIES([CC])], 257575ebec6dSmrg [m4_define([AC_PROG_CC], 257675ebec6dSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 257775ebec6dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 257875ebec6dSmrg [_AM_DEPENDENCIES([CXX])], 257975ebec6dSmrg [m4_define([AC_PROG_CXX], 258075ebec6dSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 258175ebec6dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 258275ebec6dSmrg [_AM_DEPENDENCIES([OBJC])], 258375ebec6dSmrg [m4_define([AC_PROG_OBJC], 258475ebec6dSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 258575ebec6dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 258675ebec6dSmrg [_AM_DEPENDENCIES([OBJCXX])], 258775ebec6dSmrg [m4_define([AC_PROG_OBJCXX], 258875ebec6dSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 258975ebec6dSmrg]) 259075ebec6dSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 259175ebec6dSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 259275ebec6dSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 259375ebec6dSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 259475ebec6dSmrgAC_CONFIG_COMMANDS_PRE(dnl 259575ebec6dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 259675ebec6dSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 259775ebec6dSmrg]) 2598fe567363Smrg 259975ebec6dSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 260075ebec6dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 260175ebec6dSmrgdnl mangled by Autoconf and run in a shell conditional statement. 260275ebec6dSmrgm4_define([_AC_COMPILER_EXEEXT], 260375ebec6dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 260475ebec6dSmrg 260575ebec6dSmrg 260675ebec6dSmrg# When config.status generates a header, we must update the stamp-h file. 260775ebec6dSmrg# This file resides in the same directory as the config header 260875ebec6dSmrg# that is generated. The stamp files are numbered to have different names. 260975ebec6dSmrg 261075ebec6dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 261175ebec6dSmrg# loop where config.status creates the headers, so we can generate 261275ebec6dSmrg# our stamp files there. 261375ebec6dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 261475ebec6dSmrg[# Compute $1's index in $config_headers. 261575ebec6dSmrg_am_arg=$1 261675ebec6dSmrg_am_stamp_count=1 261775ebec6dSmrgfor _am_header in $config_headers :; do 261875ebec6dSmrg case $_am_header in 261975ebec6dSmrg $_am_arg | $_am_arg:* ) 262075ebec6dSmrg break ;; 262175ebec6dSmrg * ) 262275ebec6dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 262375ebec6dSmrg esac 262475ebec6dSmrgdone 262575ebec6dSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 2626fe567363Smrg 262775ebec6dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 262875ebec6dSmrg# 262975ebec6dSmrg# This file is free software; the Free Software Foundation 263075ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 263175ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2632fe567363Smrg 263375ebec6dSmrg# AM_PROG_INSTALL_SH 263475ebec6dSmrg# ------------------ 263575ebec6dSmrg# Define $install_sh. 263675ebec6dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 263775ebec6dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 263875ebec6dSmrgif test x"${install_sh}" != xset; then 263975ebec6dSmrg case $am_aux_dir in 264075ebec6dSmrg *\ * | *\ *) 264175ebec6dSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 264275ebec6dSmrg *) 264375ebec6dSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 264475ebec6dSmrg esac 264575ebec6dSmrgfi 264675ebec6dSmrgAC_SUBST([install_sh])]) 2647fe567363Smrg 264875ebec6dSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 2649fe567363Smrg# 265075ebec6dSmrg# This file is free software; the Free Software Foundation 265175ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 265275ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2653fe567363Smrg 265475ebec6dSmrg# Check whether the underlying file-system supports filenames 265575ebec6dSmrg# with a leading dot. For instance MS-DOS doesn't. 265675ebec6dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 265775ebec6dSmrg[rm -rf .tst 2>/dev/null 265875ebec6dSmrgmkdir .tst 2>/dev/null 265975ebec6dSmrgif test -d .tst; then 266075ebec6dSmrg am__leading_dot=. 2661fe567363Smrgelse 266275ebec6dSmrg am__leading_dot=_ 2663fe567363Smrgfi 266475ebec6dSmrgrmdir .tst 2>/dev/null 266575ebec6dSmrgAC_SUBST([am__leading_dot])]) 2666fe567363Smrg 266775ebec6dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 2668fe567363Smrg 266975ebec6dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 267075ebec6dSmrg# 267175ebec6dSmrg# This file is free software; the Free Software Foundation 267275ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 267375ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2674fe567363Smrg 267575ebec6dSmrg# AM_MAKE_INCLUDE() 267675ebec6dSmrg# ----------------- 267775ebec6dSmrg# Check to see how make treats includes. 267875ebec6dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 267975ebec6dSmrg[am_make=${MAKE-make} 268075ebec6dSmrgcat > confinc << 'END' 268175ebec6dSmrgam__doit: 268275ebec6dSmrg @echo this is the am__doit target 268375ebec6dSmrg.PHONY: am__doit 268475ebec6dSmrgEND 268575ebec6dSmrg# If we don't find an include directive, just comment out the code. 268675ebec6dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 268775ebec6dSmrgam__include="#" 268875ebec6dSmrgam__quote= 268975ebec6dSmrg_am_result=none 269075ebec6dSmrg# First try GNU make style include. 269175ebec6dSmrgecho "include confinc" > confmf 269275ebec6dSmrg# Ignore all kinds of additional output from 'make'. 269375ebec6dSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 269475ebec6dSmrg*the\ am__doit\ target*) 269575ebec6dSmrg am__include=include 269675ebec6dSmrg am__quote= 269775ebec6dSmrg _am_result=GNU 269875ebec6dSmrg ;; 269975ebec6dSmrgesac 270075ebec6dSmrg# Now try BSD make style include. 270175ebec6dSmrgif test "$am__include" = "#"; then 270275ebec6dSmrg echo '.include "confinc"' > confmf 270375ebec6dSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 270475ebec6dSmrg *the\ am__doit\ target*) 270575ebec6dSmrg am__include=.include 270675ebec6dSmrg am__quote="\"" 270775ebec6dSmrg _am_result=BSD 270875ebec6dSmrg ;; 270975ebec6dSmrg esac 271075ebec6dSmrgfi 271175ebec6dSmrgAC_SUBST([am__include]) 271275ebec6dSmrgAC_SUBST([am__quote]) 271375ebec6dSmrgAC_MSG_RESULT([$_am_result]) 271475ebec6dSmrgrm -f confinc confmf 271575ebec6dSmrg]) 2716fe567363Smrg 271775ebec6dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 2718fe567363Smrg 271975ebec6dSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 272075ebec6dSmrg# 272175ebec6dSmrg# This file is free software; the Free Software Foundation 272275ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 272375ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2724fe567363Smrg 272575ebec6dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 272675ebec6dSmrg# ------------------------------ 272775ebec6dSmrgAC_DEFUN([AM_MISSING_PROG], 272875ebec6dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 272975ebec6dSmrg$1=${$1-"${am_missing_run}$2"} 273075ebec6dSmrgAC_SUBST($1)]) 273175ebec6dSmrg 273275ebec6dSmrg# AM_MISSING_HAS_RUN 273375ebec6dSmrg# ------------------ 273475ebec6dSmrg# Define MISSING if not defined so far and test if it is modern enough. 273575ebec6dSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 273675ebec6dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 273775ebec6dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 273875ebec6dSmrgAC_REQUIRE_AUX_FILE([missing])dnl 273975ebec6dSmrgif test x"${MISSING+set}" != xset; then 274075ebec6dSmrg case $am_aux_dir in 274175ebec6dSmrg *\ * | *\ *) 274275ebec6dSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 274375ebec6dSmrg *) 274475ebec6dSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 274575ebec6dSmrg esac 274675ebec6dSmrgfi 274775ebec6dSmrg# Use eval to expand $SHELL 274875ebec6dSmrgif eval "$MISSING --is-lightweight"; then 274975ebec6dSmrg am_missing_run="$MISSING " 2750fe567363Smrgelse 275175ebec6dSmrg am_missing_run= 275275ebec6dSmrg AC_MSG_WARN(['missing' script is too old or missing]) 2753fe567363Smrgfi 275475ebec6dSmrg]) 2755fe567363Smrg 275675ebec6dSmrg# Helper functions for option handling. -*- Autoconf -*- 2757fe567363Smrg 275875ebec6dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 2759fe567363Smrg# 276075ebec6dSmrg# This file is free software; the Free Software Foundation 276175ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 276275ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2763b53e5eeaSmrg 276475ebec6dSmrg# _AM_MANGLE_OPTION(NAME) 2765b53e5eeaSmrg# ----------------------- 276675ebec6dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 276775ebec6dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 276875ebec6dSmrg 276975ebec6dSmrg# _AM_SET_OPTION(NAME) 277075ebec6dSmrg# -------------------- 277175ebec6dSmrg# Set option NAME. Presently that only means defining a flag for this option. 277275ebec6dSmrgAC_DEFUN([_AM_SET_OPTION], 277375ebec6dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 2774b53e5eeaSmrg 277575ebec6dSmrg# _AM_SET_OPTIONS(OPTIONS) 277675ebec6dSmrg# ------------------------ 277775ebec6dSmrg# OPTIONS is a space-separated list of Automake options. 277875ebec6dSmrgAC_DEFUN([_AM_SET_OPTIONS], 277975ebec6dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2780fe567363Smrg 278175ebec6dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 278275ebec6dSmrg# ------------------------------------------- 278375ebec6dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 278475ebec6dSmrgAC_DEFUN([_AM_IF_OPTION], 278575ebec6dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2786fe567363Smrg 278775ebec6dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 2788fe567363Smrg 278975ebec6dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 279075ebec6dSmrg# 279175ebec6dSmrg# This file is free software; the Free Software Foundation 279275ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 279375ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2794fe567363Smrg 279575ebec6dSmrg# AM_SANITY_CHECK 279675ebec6dSmrg# --------------- 279775ebec6dSmrgAC_DEFUN([AM_SANITY_CHECK], 279875ebec6dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 279975ebec6dSmrg# Reject unsafe characters in $srcdir or the absolute working directory 280075ebec6dSmrg# name. Accept space and tab only in the latter. 280175ebec6dSmrgam_lf=' 280275ebec6dSmrg' 280375ebec6dSmrgcase `pwd` in 280475ebec6dSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 280575ebec6dSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 280675ebec6dSmrgesac 280775ebec6dSmrgcase $srcdir in 280875ebec6dSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 280975ebec6dSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 281075ebec6dSmrgesac 281175ebec6dSmrg 281275ebec6dSmrg# Do 'set' in a subshell so we don't clobber the current shell's 281375ebec6dSmrg# arguments. Must try -L first in case configure is actually a 281475ebec6dSmrg# symlink; some systems play weird games with the mod time of symlinks 281575ebec6dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 281675ebec6dSmrg# directory). 281775ebec6dSmrgif ( 281875ebec6dSmrg am_has_slept=no 281975ebec6dSmrg for am_try in 1 2; do 282075ebec6dSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 282175ebec6dSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 282275ebec6dSmrg if test "$[*]" = "X"; then 282375ebec6dSmrg # -L didn't work. 282475ebec6dSmrg set X `ls -t "$srcdir/configure" conftest.file` 282575ebec6dSmrg fi 282675ebec6dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 282775ebec6dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 282875ebec6dSmrg 282975ebec6dSmrg # If neither matched, then we have a broken ls. This can happen 283075ebec6dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 283175ebec6dSmrg # broken ls alias from the environment. This has actually 283275ebec6dSmrg # happened. Such a system could not be considered "sane". 283375ebec6dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 283475ebec6dSmrg alias in your environment]) 283575ebec6dSmrg fi 283675ebec6dSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 283775ebec6dSmrg break 283875ebec6dSmrg fi 283975ebec6dSmrg # Just in case. 284075ebec6dSmrg sleep 1 284175ebec6dSmrg am_has_slept=yes 284275ebec6dSmrg done 284375ebec6dSmrg test "$[2]" = conftest.file 284475ebec6dSmrg ) 284575ebec6dSmrgthen 284675ebec6dSmrg # Ok. 284775ebec6dSmrg : 284875ebec6dSmrgelse 284975ebec6dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 285075ebec6dSmrgCheck your system clock]) 2851b53e5eeaSmrgfi 285275ebec6dSmrgAC_MSG_RESULT([yes]) 285375ebec6dSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 285475ebec6dSmrg# generated files are strictly newer. 285575ebec6dSmrgam_sleep_pid= 285675ebec6dSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 285775ebec6dSmrg ( sleep 1 ) & 285875ebec6dSmrg am_sleep_pid=$! 285975ebec6dSmrgfi 286075ebec6dSmrgAC_CONFIG_COMMANDS_PRE( 286175ebec6dSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 286275ebec6dSmrg if test -n "$am_sleep_pid"; then 286375ebec6dSmrg # Hide warnings about reused PIDs. 286475ebec6dSmrg wait $am_sleep_pid 2>/dev/null 286575ebec6dSmrg fi 286675ebec6dSmrg AC_MSG_RESULT([done])]) 286775ebec6dSmrgrm -f conftest.file 286875ebec6dSmrg]) 2869b53e5eeaSmrg 287075ebec6dSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 2871b53e5eeaSmrg# 287275ebec6dSmrg# This file is free software; the Free Software Foundation 287375ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 287475ebec6dSmrg# with or without modifications, as long as this notice is preserved. 287575ebec6dSmrg 287675ebec6dSmrg# AM_SILENT_RULES([DEFAULT]) 287775ebec6dSmrg# -------------------------- 287875ebec6dSmrg# Enable less verbose build rules; with the default set to DEFAULT 287975ebec6dSmrg# ("yes" being less verbose, "no" or empty being verbose). 288075ebec6dSmrgAC_DEFUN([AM_SILENT_RULES], 288175ebec6dSmrg[AC_ARG_ENABLE([silent-rules], [dnl 288275ebec6dSmrgAS_HELP_STRING( 288375ebec6dSmrg [--enable-silent-rules], 288475ebec6dSmrg [less verbose build output (undo: "make V=1")]) 288575ebec6dSmrgAS_HELP_STRING( 288675ebec6dSmrg [--disable-silent-rules], 288775ebec6dSmrg [verbose build output (undo: "make V=0")])dnl 288875ebec6dSmrg]) 288975ebec6dSmrgcase $enable_silent_rules in @%:@ ((( 289075ebec6dSmrg yes) AM_DEFAULT_VERBOSITY=0;; 289175ebec6dSmrg no) AM_DEFAULT_VERBOSITY=1;; 289275ebec6dSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 289375ebec6dSmrgesac 289475ebec6dSmrgdnl 289575ebec6dSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 289675ebec6dSmrgdnl do not support nested variable expansions. 289775ebec6dSmrgdnl See automake bug#9928 and bug#10237. 289875ebec6dSmrgam_make=${MAKE-make} 289975ebec6dSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 290075ebec6dSmrg [am_cv_make_support_nested_variables], 290175ebec6dSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 290275ebec6dSmrgBAR0=false 290375ebec6dSmrgBAR1=true 290475ebec6dSmrgV=1 290575ebec6dSmrgam__doit: 290675ebec6dSmrg @$(TRUE) 290775ebec6dSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 290875ebec6dSmrg am_cv_make_support_nested_variables=yes 290975ebec6dSmrgelse 291075ebec6dSmrg am_cv_make_support_nested_variables=no 291175ebec6dSmrgfi]) 291275ebec6dSmrgif test $am_cv_make_support_nested_variables = yes; then 291375ebec6dSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 291475ebec6dSmrg AM_V='$(V)' 291575ebec6dSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 291675ebec6dSmrgelse 291775ebec6dSmrg AM_V=$AM_DEFAULT_VERBOSITY 291875ebec6dSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 291975ebec6dSmrgfi 292075ebec6dSmrgAC_SUBST([AM_V])dnl 292175ebec6dSmrgAM_SUBST_NOTMAKE([AM_V])dnl 292275ebec6dSmrgAC_SUBST([AM_DEFAULT_V])dnl 292375ebec6dSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 292475ebec6dSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 292575ebec6dSmrgAM_BACKSLASH='\' 292675ebec6dSmrgAC_SUBST([AM_BACKSLASH])dnl 292775ebec6dSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 292875ebec6dSmrg]) 292975ebec6dSmrg 293075ebec6dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 2931b53e5eeaSmrg# 293275ebec6dSmrg# This file is free software; the Free Software Foundation 293375ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 293475ebec6dSmrg# with or without modifications, as long as this notice is preserved. 2935af928962Smrg 293675ebec6dSmrg# AM_PROG_INSTALL_STRIP 293775ebec6dSmrg# --------------------- 293875ebec6dSmrg# One issue with vendor 'install' (even GNU) is that you can't 293975ebec6dSmrg# specify the program used to strip binaries. This is especially 294075ebec6dSmrg# annoying in cross-compiling environments, where the build's strip 294175ebec6dSmrg# is unlikely to handle the host's binaries. 294275ebec6dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 294375ebec6dSmrg# always use install-sh in "make install-strip", and initialize 294475ebec6dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 294575ebec6dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 294675ebec6dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 294775ebec6dSmrg# Installed binaries are usually stripped using 'strip' when the user 294875ebec6dSmrg# run "make install-strip". However 'strip' might not be the right 294975ebec6dSmrg# tool to use in cross-compilation environments, therefore Automake 295075ebec6dSmrg# will honor the 'STRIP' environment variable to overrule this program. 295175ebec6dSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 295275ebec6dSmrgif test "$cross_compiling" != no; then 295375ebec6dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 295475ebec6dSmrgfi 295575ebec6dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 295675ebec6dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 295775ebec6dSmrg 295875ebec6dSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 2959af928962Smrg# 296075ebec6dSmrg# This file is free software; the Free Software Foundation 296175ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 296275ebec6dSmrg# with or without modifications, as long as this notice is preserved. 296375ebec6dSmrg 296475ebec6dSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 296575ebec6dSmrg# --------------------------- 296675ebec6dSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 296775ebec6dSmrg# This macro is traced by Automake. 296875ebec6dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 296975ebec6dSmrg 297075ebec6dSmrg# AM_SUBST_NOTMAKE(VARIABLE) 297175ebec6dSmrg# -------------------------- 297275ebec6dSmrg# Public sister of _AM_SUBST_NOTMAKE. 297375ebec6dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 297475ebec6dSmrg 297575ebec6dSmrg# Check how to create a tarball. -*- Autoconf -*- 297675ebec6dSmrg 297775ebec6dSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 2978af928962Smrg# 297975ebec6dSmrg# This file is free software; the Free Software Foundation 298075ebec6dSmrg# gives unlimited permission to copy and/or distribute it, 298175ebec6dSmrg# with or without modifications, as long as this notice is preserved. 29828d4c0f7bSmrg 298375ebec6dSmrg# _AM_PROG_TAR(FORMAT) 29848d4c0f7bSmrg# -------------------- 298575ebec6dSmrg# Check how to create a tarball in format FORMAT. 298675ebec6dSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 29878d4c0f7bSmrg# 298875ebec6dSmrg# Substitute a variable $(am__tar) that is a command 298975ebec6dSmrg# writing to stdout a FORMAT-tarball containing the directory 299075ebec6dSmrg# $tardir. 299175ebec6dSmrg# tardir=directory && $(am__tar) > result.tar 29928d4c0f7bSmrg# 299375ebec6dSmrg# Substitute a variable $(am__untar) that extract such 299475ebec6dSmrg# a tarball read from stdin. 299575ebec6dSmrg# $(am__untar) < result.tar 29968d4c0f7bSmrg# 299775ebec6dSmrgAC_DEFUN([_AM_PROG_TAR], 299875ebec6dSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 299975ebec6dSmrg# in the wild :-( We should find a proper way to deprecate it ... 300075ebec6dSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 300175ebec6dSmrg 300275ebec6dSmrg# We'll loop over all known methods to create a tar archive until one works. 300375ebec6dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 300475ebec6dSmrg 300575ebec6dSmrgm4_if([$1], [v7], 300675ebec6dSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 300775ebec6dSmrg 300875ebec6dSmrg [m4_case([$1], 300975ebec6dSmrg [ustar], 301075ebec6dSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 301175ebec6dSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 301275ebec6dSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 301375ebec6dSmrg # and bug#13588). 301475ebec6dSmrg am_max_uid=2097151 # 2^21 - 1 301575ebec6dSmrg am_max_gid=$am_max_uid 301675ebec6dSmrg # The $UID and $GID variables are not portable, so we need to resort 301775ebec6dSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 301875ebec6dSmrg # below are definitely unexpected, so allow the users to see them 301975ebec6dSmrg # (that is, avoid stderr redirection). 302075ebec6dSmrg am_uid=`id -u || echo unknown` 302175ebec6dSmrg am_gid=`id -g || echo unknown` 302275ebec6dSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 302375ebec6dSmrg if test $am_uid -le $am_max_uid; then 302475ebec6dSmrg AC_MSG_RESULT([yes]) 302575ebec6dSmrg else 302675ebec6dSmrg AC_MSG_RESULT([no]) 302775ebec6dSmrg _am_tools=none 302875ebec6dSmrg fi 302975ebec6dSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 303075ebec6dSmrg if test $am_gid -le $am_max_gid; then 303175ebec6dSmrg AC_MSG_RESULT([yes]) 303275ebec6dSmrg else 303375ebec6dSmrg AC_MSG_RESULT([no]) 303475ebec6dSmrg _am_tools=none 303575ebec6dSmrg fi], 303675ebec6dSmrg 303775ebec6dSmrg [pax], 303875ebec6dSmrg [], 303975ebec6dSmrg 304075ebec6dSmrg [m4_fatal([Unknown tar format])]) 304175ebec6dSmrg 304275ebec6dSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 304375ebec6dSmrg 304475ebec6dSmrg # Go ahead even if we have the value already cached. We do so because we 304575ebec6dSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 304675ebec6dSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 304775ebec6dSmrg 304875ebec6dSmrg for _am_tool in $_am_tools; do 304975ebec6dSmrg case $_am_tool in 305075ebec6dSmrg gnutar) 305175ebec6dSmrg for _am_tar in tar gnutar gtar; do 305275ebec6dSmrg AM_RUN_LOG([$_am_tar --version]) && break 305375ebec6dSmrg done 305475ebec6dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 305575ebec6dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 305675ebec6dSmrg am__untar="$_am_tar -xf -" 305775ebec6dSmrg ;; 305875ebec6dSmrg plaintar) 305975ebec6dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 306075ebec6dSmrg # ustar tarball either. 306175ebec6dSmrg (tar --version) >/dev/null 2>&1 && continue 306275ebec6dSmrg am__tar='tar chf - "$$tardir"' 306375ebec6dSmrg am__tar_='tar chf - "$tardir"' 306475ebec6dSmrg am__untar='tar xf -' 306575ebec6dSmrg ;; 306675ebec6dSmrg pax) 306775ebec6dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 306875ebec6dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 306975ebec6dSmrg am__untar='pax -r' 307075ebec6dSmrg ;; 307175ebec6dSmrg cpio) 307275ebec6dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 307375ebec6dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 307475ebec6dSmrg am__untar='cpio -i -H $1 -d' 307575ebec6dSmrg ;; 307675ebec6dSmrg none) 307775ebec6dSmrg am__tar=false 307875ebec6dSmrg am__tar_=false 307975ebec6dSmrg am__untar=false 308075ebec6dSmrg ;; 308175ebec6dSmrg esac 308275ebec6dSmrg 308375ebec6dSmrg # If the value was cached, stop now. We just wanted to have am__tar 308475ebec6dSmrg # and am__untar set. 308575ebec6dSmrg test -n "${am_cv_prog_tar_$1}" && break 308675ebec6dSmrg 308775ebec6dSmrg # tar/untar a dummy directory, and stop if the command works. 308875ebec6dSmrg rm -rf conftest.dir 308975ebec6dSmrg mkdir conftest.dir 309075ebec6dSmrg echo GrepMe > conftest.dir/file 309175ebec6dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 309275ebec6dSmrg rm -rf conftest.dir 309375ebec6dSmrg if test -s conftest.tar; then 309475ebec6dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 309575ebec6dSmrg AM_RUN_LOG([cat conftest.dir/file]) 309675ebec6dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 309775ebec6dSmrg fi 309875ebec6dSmrg done 309975ebec6dSmrg rm -rf conftest.dir 310075ebec6dSmrg 310175ebec6dSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 310275ebec6dSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 310375ebec6dSmrg 310475ebec6dSmrgAC_SUBST([am__tar]) 310575ebec6dSmrgAC_SUBST([am__untar]) 310675ebec6dSmrg]) # _AM_PROG_TAR 31078d4c0f7bSmrg 3108