aclocal.m4 revision 6f5dd5c2
16f5dd5c2Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2a0195d5fSmrg 3a0195d5fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 46600fe5bSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a0195d5fSmrg# This file is free software; the Free Software Foundation 6a0195d5fSmrg# gives unlimited permission to copy and/or distribute it, 7a0195d5fSmrg# with or without modifications, as long as this notice is preserved. 8a0195d5fSmrg 9a0195d5fSmrg# This program is distributed in the hope that it will be useful, 10a0195d5fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a0195d5fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a0195d5fSmrg# PARTICULAR PURPOSE. 13a0195d5fSmrg 14a0195d5fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15a0195d5fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 166f5dd5c2Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 176f5dd5c2Smrg[m4_warning([this file was generated for autoconf 2.65. 18a0195d5fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19a0195d5fSmrgIf you have problems, you may need to regenerate the build system entirely. 20a0195d5fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a0195d5fSmrg 226f5dd5c2Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 236f5dd5c2Smrg# 246f5dd5c2Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 256f5dd5c2Smrg# 266f5dd5c2Smrg# This program is free software; you can redistribute it and/or modify 276f5dd5c2Smrg# it under the terms of the GNU General Public License as published by 286f5dd5c2Smrg# the Free Software Foundation; either version 2 of the License, or 296f5dd5c2Smrg# (at your option) any later version. 306f5dd5c2Smrg# 316f5dd5c2Smrg# This program is distributed in the hope that it will be useful, but 326f5dd5c2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 336f5dd5c2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 346f5dd5c2Smrg# General Public License for more details. 356f5dd5c2Smrg# 366f5dd5c2Smrg# You should have received a copy of the GNU General Public License 376f5dd5c2Smrg# along with this program; if not, write to the Free Software 386f5dd5c2Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 396f5dd5c2Smrg# 406f5dd5c2Smrg# As a special exception to the GNU General Public License, if you 416f5dd5c2Smrg# distribute this file as part of a program that contains a 426f5dd5c2Smrg# configuration script generated by Autoconf, you may include it under 436f5dd5c2Smrg# the same distribution terms that you use for the rest of that program. 446f5dd5c2Smrg 456f5dd5c2Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 466f5dd5c2Smrg# ---------------------------------- 476f5dd5c2SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 486f5dd5c2Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 496f5dd5c2Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 506f5dd5c2SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 516f5dd5c2Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 526f5dd5c2Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 536f5dd5c2Smrgfi 546f5dd5c2Smrgif test -n "$PKG_CONFIG"; then 556f5dd5c2Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 566f5dd5c2Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 576f5dd5c2Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 586f5dd5c2Smrg AC_MSG_RESULT([yes]) 596f5dd5c2Smrg else 606f5dd5c2Smrg AC_MSG_RESULT([no]) 616f5dd5c2Smrg PKG_CONFIG="" 626f5dd5c2Smrg fi 636f5dd5c2Smrg 646f5dd5c2Smrgfi[]dnl 656f5dd5c2Smrg])# PKG_PROG_PKG_CONFIG 666f5dd5c2Smrg 676f5dd5c2Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 686f5dd5c2Smrg# 696f5dd5c2Smrg# Check to see whether a particular set of modules exists. Similar 706f5dd5c2Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 716f5dd5c2Smrg# 726f5dd5c2Smrg# 736f5dd5c2Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 746f5dd5c2Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 756f5dd5c2Smrg# PKG_CHECK_EXISTS manually 766f5dd5c2Smrg# -------------------------------------------------------------- 776f5dd5c2SmrgAC_DEFUN([PKG_CHECK_EXISTS], 786f5dd5c2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 796f5dd5c2Smrgif test -n "$PKG_CONFIG" && \ 806f5dd5c2Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 816f5dd5c2Smrg m4_ifval([$2], [$2], [:]) 826f5dd5c2Smrgm4_ifvaln([$3], [else 836f5dd5c2Smrg $3])dnl 846f5dd5c2Smrgfi]) 856f5dd5c2Smrg 866f5dd5c2Smrg 876f5dd5c2Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 886f5dd5c2Smrg# --------------------------------------------- 896f5dd5c2Smrgm4_define([_PKG_CONFIG], 906f5dd5c2Smrg[if test -n "$$1"; then 916f5dd5c2Smrg pkg_cv_[]$1="$$1" 926f5dd5c2Smrg elif test -n "$PKG_CONFIG"; then 936f5dd5c2Smrg PKG_CHECK_EXISTS([$3], 946f5dd5c2Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 956f5dd5c2Smrg [pkg_failed=yes]) 966f5dd5c2Smrg else 976f5dd5c2Smrg pkg_failed=untried 986f5dd5c2Smrgfi[]dnl 996f5dd5c2Smrg])# _PKG_CONFIG 1006f5dd5c2Smrg 1016f5dd5c2Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1026f5dd5c2Smrg# ----------------------------- 1036f5dd5c2SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1046f5dd5c2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1056f5dd5c2Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1066f5dd5c2Smrg _pkg_short_errors_supported=yes 1076f5dd5c2Smrgelse 1086f5dd5c2Smrg _pkg_short_errors_supported=no 1096f5dd5c2Smrgfi[]dnl 1106f5dd5c2Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1116f5dd5c2Smrg 1126f5dd5c2Smrg 1136f5dd5c2Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1146f5dd5c2Smrg# [ACTION-IF-NOT-FOUND]) 1156f5dd5c2Smrg# 1166f5dd5c2Smrg# 1176f5dd5c2Smrg# Note that if there is a possibility the first call to 1186f5dd5c2Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1196f5dd5c2Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1206f5dd5c2Smrg# 1216f5dd5c2Smrg# 1226f5dd5c2Smrg# -------------------------------------------------------------- 1236f5dd5c2SmrgAC_DEFUN([PKG_CHECK_MODULES], 1246f5dd5c2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1256f5dd5c2SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1266f5dd5c2SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1276f5dd5c2Smrg 1286f5dd5c2Smrgpkg_failed=no 1296f5dd5c2SmrgAC_MSG_CHECKING([for $1]) 1306f5dd5c2Smrg 1316f5dd5c2Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1326f5dd5c2Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1336f5dd5c2Smrg 1346f5dd5c2Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1356f5dd5c2Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1366f5dd5c2SmrgSee the pkg-config man page for more details.]) 1376f5dd5c2Smrg 1386f5dd5c2Smrgif test $pkg_failed = yes; then 1396f5dd5c2Smrg _PKG_SHORT_ERRORS_SUPPORTED 1406f5dd5c2Smrg if test $_pkg_short_errors_supported = yes; then 1416f5dd5c2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1426f5dd5c2Smrg else 1436f5dd5c2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1446f5dd5c2Smrg fi 1456f5dd5c2Smrg # Put the nasty error message in config.log where it belongs 1466f5dd5c2Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1476f5dd5c2Smrg 1486f5dd5c2Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 1496f5dd5c2Smrg[Package requirements ($2) were not met: 1506f5dd5c2Smrg 1516f5dd5c2Smrg$$1_PKG_ERRORS 1526f5dd5c2Smrg 1536f5dd5c2SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1546f5dd5c2Smrginstalled software in a non-standard prefix. 1556f5dd5c2Smrg 1566f5dd5c2Smrg_PKG_TEXT 1576f5dd5c2Smrg])], 1586f5dd5c2Smrg [AC_MSG_RESULT([no]) 1596f5dd5c2Smrg $4]) 1606f5dd5c2Smrgelif test $pkg_failed = untried; then 1616f5dd5c2Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1626f5dd5c2Smrg[The pkg-config script could not be found or is too old. Make sure it 1636f5dd5c2Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1646f5dd5c2Smrgpath to pkg-config. 1656f5dd5c2Smrg 1666f5dd5c2Smrg_PKG_TEXT 1676f5dd5c2Smrg 1686f5dd5c2SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1696f5dd5c2Smrg [$4]) 1706f5dd5c2Smrgelse 1716f5dd5c2Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1726f5dd5c2Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1736f5dd5c2Smrg AC_MSG_RESULT([yes]) 1746f5dd5c2Smrg ifelse([$3], , :, [$3]) 1756f5dd5c2Smrgfi[]dnl 1766f5dd5c2Smrg])# PKG_CHECK_MODULES 1776f5dd5c2Smrg 1786600fe5bSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 179a0195d5fSmrg# 1806600fe5bSmrg# This file is free software; the Free Software Foundation 1816600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 1826600fe5bSmrg# with or without modifications, as long as this notice is preserved. 183a0195d5fSmrg 1846600fe5bSmrg# AM_AUTOMAKE_VERSION(VERSION) 1856600fe5bSmrg# ---------------------------- 1866600fe5bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1876600fe5bSmrg# generated from the m4 files accompanying Automake X.Y. 1886600fe5bSmrg# (This private macro should not be called outside this file.) 1896600fe5bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1906600fe5bSmrg[am__api_version='1.11' 1916600fe5bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1926600fe5bSmrgdnl require some minimum version. Point them to the right macro. 1936f5dd5c2Smrgm4_if([$1], [1.11.1], [], 1946600fe5bSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1956600fe5bSmrg]) 196a0195d5fSmrg 1976600fe5bSmrg# _AM_AUTOCONF_VERSION(VERSION) 1986600fe5bSmrg# ----------------------------- 1996600fe5bSmrg# aclocal traces this macro to find the Autoconf version. 2006600fe5bSmrg# This is a private macro too. Using m4_define simplifies 2016600fe5bSmrg# the logic in aclocal, which can simply ignore this definition. 2026600fe5bSmrgm4_define([_AM_AUTOCONF_VERSION], []) 203a0195d5fSmrg 2046600fe5bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 2056600fe5bSmrg# ------------------------------- 2066600fe5bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 2076600fe5bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2086600fe5bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2096f5dd5c2Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 2106600fe5bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 2116600fe5bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 2126600fe5bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 213a0195d5fSmrg 2146600fe5bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 215a0195d5fSmrg 2166600fe5bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 2176600fe5bSmrg# 2186600fe5bSmrg# This file is free software; the Free Software Foundation 2196600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 2206600fe5bSmrg# with or without modifications, as long as this notice is preserved. 221a0195d5fSmrg 2226600fe5bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 2236600fe5bSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 2246600fe5bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 225a0195d5fSmrg# 2266600fe5bSmrg# Of course, Automake must honor this variable whenever it calls a 2276600fe5bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 2286600fe5bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 2296600fe5bSmrg# depending on how configure is run. This is pretty annoying, since 2306600fe5bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2316600fe5bSmrg# source directory, any form will work fine, but in subdirectories a 2326600fe5bSmrg# relative path needs to be adjusted first. 233a0195d5fSmrg# 2346600fe5bSmrg# $ac_aux_dir/missing 2356600fe5bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 2366600fe5bSmrg# $top_srcdir/$ac_aux_dir/missing 2376600fe5bSmrg# fails if $ac_aux_dir is absolute, 2386600fe5bSmrg# fails when called from a subdirectory in a VPATH build with 2396600fe5bSmrg# a relative $ac_aux_dir 240a0195d5fSmrg# 2416600fe5bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 2426600fe5bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 2436600fe5bSmrg# harmless because $srcdir is `.', but things will broke when you 2446600fe5bSmrg# start a VPATH build or use an absolute $srcdir. 245a0195d5fSmrg# 2466600fe5bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 2476600fe5bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 2486600fe5bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 2496600fe5bSmrg# and then we would define $MISSING as 2506600fe5bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 2516600fe5bSmrg# This will work as long as MISSING is not called from configure, because 2526600fe5bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 2536600fe5bSmrg# However there are other variables, like CC, which are often used in 2546600fe5bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 2556600fe5bSmrg# 2566600fe5bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 2576600fe5bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 2586600fe5bSmrg# configured tree to be moved without reconfiguration. 259a0195d5fSmrg 2606600fe5bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 2616600fe5bSmrg[dnl Rely on autoconf to set up CDPATH properly. 2626600fe5bSmrgAC_PREREQ([2.50])dnl 2636600fe5bSmrg# expand $ac_aux_dir to an absolute path 2646600fe5bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 2656600fe5bSmrg]) 266a0195d5fSmrg 2676600fe5bSmrg# AM_CONDITIONAL -*- Autoconf -*- 268a0195d5fSmrg 2696600fe5bSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 2706600fe5bSmrg# Free Software Foundation, Inc. 2716600fe5bSmrg# 2726600fe5bSmrg# This file is free software; the Free Software Foundation 2736600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 2746600fe5bSmrg# with or without modifications, as long as this notice is preserved. 275a0195d5fSmrg 2766600fe5bSmrg# serial 9 277a0195d5fSmrg 2786600fe5bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 2796600fe5bSmrg# ------------------------------------- 2806600fe5bSmrg# Define a conditional. 2816600fe5bSmrgAC_DEFUN([AM_CONDITIONAL], 2826600fe5bSmrg[AC_PREREQ(2.52)dnl 2836600fe5bSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 2846600fe5bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 2856600fe5bSmrgAC_SUBST([$1_TRUE])dnl 2866600fe5bSmrgAC_SUBST([$1_FALSE])dnl 2876600fe5bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 2886600fe5bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 2896600fe5bSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 2906600fe5bSmrgif $2; then 2916600fe5bSmrg $1_TRUE= 2926600fe5bSmrg $1_FALSE='#' 2936600fe5bSmrgelse 2946600fe5bSmrg $1_TRUE='#' 2956600fe5bSmrg $1_FALSE= 2966600fe5bSmrgfi 2976600fe5bSmrgAC_CONFIG_COMMANDS_PRE( 2986600fe5bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 2996600fe5bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 3006600fe5bSmrgUsually this means the macro was only invoked conditionally.]]) 3016600fe5bSmrgfi])]) 302a0195d5fSmrg 3036600fe5bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 3046600fe5bSmrg# Free Software Foundation, Inc. 3056600fe5bSmrg# 3066600fe5bSmrg# This file is free software; the Free Software Foundation 3076600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 3086600fe5bSmrg# with or without modifications, as long as this notice is preserved. 309a0195d5fSmrg 3106600fe5bSmrg# serial 10 311a0195d5fSmrg 3126600fe5bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 3136600fe5bSmrg# written in clear, in which case automake, when reading aclocal.m4, 3146600fe5bSmrg# will think it sees a *use*, and therefore will trigger all it's 3156600fe5bSmrg# C support machinery. Also note that it means that autoscan, seeing 3166600fe5bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 317a0195d5fSmrg 318a0195d5fSmrg 3196600fe5bSmrg# _AM_DEPENDENCIES(NAME) 3206600fe5bSmrg# ---------------------- 3216600fe5bSmrg# See how the compiler implements dependency checking. 3226600fe5bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 3236600fe5bSmrg# We try a few techniques and use that to set a single cache variable. 324a0195d5fSmrg# 3256600fe5bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 3266600fe5bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 3276600fe5bSmrg# dependency, and given that the user is not expected to run this macro, 3286600fe5bSmrg# just rely on AC_PROG_CC. 3296600fe5bSmrgAC_DEFUN([_AM_DEPENDENCIES], 3306600fe5bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 3316600fe5bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 3326600fe5bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 3336600fe5bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 334a0195d5fSmrg 3356600fe5bSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 3366600fe5bSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 3376600fe5bSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 3386600fe5bSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 3396600fe5bSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 3406600fe5bSmrg [depcc="$$1" am_compiler_list=]) 341a0195d5fSmrg 3426600fe5bSmrgAC_CACHE_CHECK([dependency style of $depcc], 3436600fe5bSmrg [am_cv_$1_dependencies_compiler_type], 3446600fe5bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 3456600fe5bSmrg # We make a subdir and do the tests there. Otherwise we can end up 3466600fe5bSmrg # making bogus files that we don't know about and never remove. For 3476600fe5bSmrg # instance it was reported that on HP-UX the gcc test will end up 3486600fe5bSmrg # making a dummy file named `D' -- because `-MD' means `put the output 3496600fe5bSmrg # in D'. 3506600fe5bSmrg mkdir conftest.dir 3516600fe5bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 3526600fe5bSmrg # using a relative directory. 3536600fe5bSmrg cp "$am_depcomp" conftest.dir 3546600fe5bSmrg cd conftest.dir 3556600fe5bSmrg # We will build objects and dependencies in a subdirectory because 3566600fe5bSmrg # it helps to detect inapplicable dependency modes. For instance 3576600fe5bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 3586600fe5bSmrg # side effect of compilation, but ICC will put the dependencies in 3596600fe5bSmrg # the current directory while Tru64 will put them in the object 3606600fe5bSmrg # directory. 3616600fe5bSmrg mkdir sub 3626600fe5bSmrg 3636600fe5bSmrg am_cv_$1_dependencies_compiler_type=none 3646600fe5bSmrg if test "$am_compiler_list" = ""; then 3656600fe5bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 3666600fe5bSmrg fi 3676600fe5bSmrg am__universal=false 3686600fe5bSmrg m4_case([$1], [CC], 3696600fe5bSmrg [case " $depcc " in #( 3706600fe5bSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 3716600fe5bSmrg esac], 3726600fe5bSmrg [CXX], 3736600fe5bSmrg [case " $depcc " in #( 3746600fe5bSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 3756600fe5bSmrg esac]) 3766600fe5bSmrg 3776600fe5bSmrg for depmode in $am_compiler_list; do 3786600fe5bSmrg # Setup a source with many dependencies, because some compilers 3796600fe5bSmrg # like to wrap large dependency lists on column 80 (with \), and 3806600fe5bSmrg # we should not choose a depcomp mode which is confused by this. 3816600fe5bSmrg # 3826600fe5bSmrg # We need to recreate these files for each test, as the compiler may 3836600fe5bSmrg # overwrite some of them when testing with obscure command lines. 3846600fe5bSmrg # This happens at least with the AIX C compiler. 3856600fe5bSmrg : > sub/conftest.c 3866600fe5bSmrg for i in 1 2 3 4 5 6; do 3876600fe5bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 3886600fe5bSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 3896600fe5bSmrg # Solaris 8's {/usr,}/bin/sh. 3906600fe5bSmrg touch sub/conftst$i.h 3916600fe5bSmrg done 3926600fe5bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 3936600fe5bSmrg 3946600fe5bSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 3956600fe5bSmrg # mode. It turns out that the SunPro C++ compiler does not properly 3966600fe5bSmrg # handle `-M -o', and we need to detect this. Also, some Intel 3976600fe5bSmrg # versions had trouble with output in subdirs 3986600fe5bSmrg am__obj=sub/conftest.${OBJEXT-o} 3996600fe5bSmrg am__minus_obj="-o $am__obj" 4006600fe5bSmrg case $depmode in 4016600fe5bSmrg gcc) 4026600fe5bSmrg # This depmode causes a compiler race in universal mode. 4036600fe5bSmrg test "$am__universal" = false || continue 4046600fe5bSmrg ;; 4056600fe5bSmrg nosideeffect) 4066600fe5bSmrg # after this tag, mechanisms are not by side-effect, so they'll 4076600fe5bSmrg # only be used when explicitly requested 4086600fe5bSmrg if test "x$enable_dependency_tracking" = xyes; then 4096600fe5bSmrg continue 4106600fe5bSmrg else 4116600fe5bSmrg break 4126600fe5bSmrg fi 4136600fe5bSmrg ;; 4146600fe5bSmrg msvisualcpp | msvcmsys) 4156600fe5bSmrg # This compiler won't grok `-c -o', but also, the minuso test has 4166600fe5bSmrg # not run yet. These depmodes are late enough in the game, and 4176600fe5bSmrg # so weak that their functioning should not be impacted. 4186600fe5bSmrg am__obj=conftest.${OBJEXT-o} 4196600fe5bSmrg am__minus_obj= 4206600fe5bSmrg ;; 4216600fe5bSmrg none) break ;; 4226600fe5bSmrg esac 4236600fe5bSmrg if depmode=$depmode \ 4246600fe5bSmrg source=sub/conftest.c object=$am__obj \ 4256600fe5bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 4266600fe5bSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 4276600fe5bSmrg >/dev/null 2>conftest.err && 4286600fe5bSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 4296600fe5bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 4306600fe5bSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 4316600fe5bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 4326600fe5bSmrg # icc doesn't choke on unknown options, it will just issue warnings 4336600fe5bSmrg # or remarks (even with -Werror). So we grep stderr for any message 4346600fe5bSmrg # that says an option was ignored or not supported. 4356600fe5bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 4366600fe5bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 4376600fe5bSmrg # The diagnosis changed in icc 8.0: 4386600fe5bSmrg # icc: Command line remark: option '-MP' not supported 4396600fe5bSmrg if (grep 'ignoring option' conftest.err || 4406600fe5bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 4416600fe5bSmrg am_cv_$1_dependencies_compiler_type=$depmode 4426600fe5bSmrg break 4436600fe5bSmrg fi 4446600fe5bSmrg fi 4456600fe5bSmrg done 4466600fe5bSmrg 4476600fe5bSmrg cd .. 4486600fe5bSmrg rm -rf conftest.dir 449a0195d5fSmrgelse 4506600fe5bSmrg am_cv_$1_dependencies_compiler_type=none 451a0195d5fSmrgfi 4526600fe5bSmrg]) 4536600fe5bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 4546600fe5bSmrgAM_CONDITIONAL([am__fastdep$1], [ 4556600fe5bSmrg test "x$enable_dependency_tracking" != xno \ 4566600fe5bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 4576600fe5bSmrg]) 458a0195d5fSmrg 4596600fe5bSmrg 4606600fe5bSmrg# AM_SET_DEPDIR 4616600fe5bSmrg# ------------- 4626600fe5bSmrg# Choose a directory name for dependency files. 4636600fe5bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 4646600fe5bSmrgAC_DEFUN([AM_SET_DEPDIR], 4656600fe5bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 4666600fe5bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 4676600fe5bSmrg]) 4686600fe5bSmrg 4696600fe5bSmrg 4706600fe5bSmrg# AM_DEP_TRACK 4716600fe5bSmrg# ------------ 4726600fe5bSmrgAC_DEFUN([AM_DEP_TRACK], 4736600fe5bSmrg[AC_ARG_ENABLE(dependency-tracking, 4746600fe5bSmrg[ --disable-dependency-tracking speeds up one-time build 4756600fe5bSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 4766600fe5bSmrgif test "x$enable_dependency_tracking" != xno; then 4776600fe5bSmrg am_depcomp="$ac_aux_dir/depcomp" 4786600fe5bSmrg AMDEPBACKSLASH='\' 479a0195d5fSmrgfi 4806600fe5bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 4816600fe5bSmrgAC_SUBST([AMDEPBACKSLASH])dnl 4826600fe5bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 4836600fe5bSmrg]) 484a0195d5fSmrg 4856600fe5bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 4866600fe5bSmrg 4876600fe5bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 4886600fe5bSmrg# Free Software Foundation, Inc. 489a0195d5fSmrg# 4906600fe5bSmrg# This file is free software; the Free Software Foundation 4916600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 4926600fe5bSmrg# with or without modifications, as long as this notice is preserved. 493a0195d5fSmrg 4946600fe5bSmrg#serial 5 495a0195d5fSmrg 4966600fe5bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 4976600fe5bSmrg# ------------------------------ 4986600fe5bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 4996600fe5bSmrg[{ 5006600fe5bSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 5016600fe5bSmrg # are listed without --file. Let's play safe and only enable the eval 5026600fe5bSmrg # if we detect the quoting. 5036600fe5bSmrg case $CONFIG_FILES in 5046600fe5bSmrg *\'*) eval set x "$CONFIG_FILES" ;; 5056600fe5bSmrg *) set x $CONFIG_FILES ;; 5066600fe5bSmrg esac 5076600fe5bSmrg shift 5086600fe5bSmrg for mf 5096600fe5bSmrg do 5106600fe5bSmrg # Strip MF so we end up with the name of the file. 5116600fe5bSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 5126600fe5bSmrg # Check whether this is an Automake generated Makefile or not. 5136600fe5bSmrg # We used to match only the files named `Makefile.in', but 5146600fe5bSmrg # some people rename them; so instead we look at the file content. 5156600fe5bSmrg # Grep'ing the first line is not enough: some people post-process 5166600fe5bSmrg # each Makefile.in and add a new line on top of each file to say so. 5176600fe5bSmrg # Grep'ing the whole file is not good either: AIX grep has a line 5186600fe5bSmrg # limit of 2048, but all sed's we know have understand at least 4000. 5196600fe5bSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 5206600fe5bSmrg dirpart=`AS_DIRNAME("$mf")` 5216600fe5bSmrg else 5226600fe5bSmrg continue 5236600fe5bSmrg fi 5246600fe5bSmrg # Extract the definition of DEPDIR, am__include, and am__quote 5256600fe5bSmrg # from the Makefile without running `make'. 5266600fe5bSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 5276600fe5bSmrg test -z "$DEPDIR" && continue 5286600fe5bSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 5296600fe5bSmrg test -z "am__include" && continue 5306600fe5bSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 5316600fe5bSmrg # When using ansi2knr, U may be empty or an underscore; expand it 5326600fe5bSmrg U=`sed -n 's/^U = //p' < "$mf"` 5336600fe5bSmrg # Find all dependency output files, they are included files with 5346600fe5bSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 5356600fe5bSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 5366600fe5bSmrg # expansion. 5376600fe5bSmrg for file in `sed -n " 5386600fe5bSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 5396600fe5bSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 5406600fe5bSmrg # Make sure the directory exists. 5416600fe5bSmrg test -f "$dirpart/$file" && continue 5426600fe5bSmrg fdir=`AS_DIRNAME(["$file"])` 5436600fe5bSmrg AS_MKDIR_P([$dirpart/$fdir]) 5446600fe5bSmrg # echo "creating $dirpart/$file" 5456600fe5bSmrg echo '# dummy' > "$dirpart/$file" 5466600fe5bSmrg done 5476600fe5bSmrg done 5486600fe5bSmrg} 5496600fe5bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 550a0195d5fSmrg 551a0195d5fSmrg 5526600fe5bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 5536600fe5bSmrg# ----------------------------- 5546600fe5bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 5556600fe5bSmrg# 5566600fe5bSmrg# This code is only required when automatic dependency tracking 5576600fe5bSmrg# is enabled. FIXME. This creates each `.P' file that we will 5586600fe5bSmrg# need in order to bootstrap the dependency handling code. 5596600fe5bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 5606600fe5bSmrg[AC_CONFIG_COMMANDS([depfiles], 5616600fe5bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 5626600fe5bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 5636600fe5bSmrg]) 564a0195d5fSmrg 5656600fe5bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 5666600fe5bSmrg# Free Software Foundation, Inc. 5676600fe5bSmrg# 5686600fe5bSmrg# This file is free software; the Free Software Foundation 5696600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 5706600fe5bSmrg# with or without modifications, as long as this notice is preserved. 571a0195d5fSmrg 5726600fe5bSmrg# serial 8 573a0195d5fSmrg 5746600fe5bSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 5756600fe5bSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 5766600fe5bSmrg 5776600fe5bSmrg# Do all the work for Automake. -*- Autoconf -*- 5786600fe5bSmrg 5796600fe5bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 5806600fe5bSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 5816600fe5bSmrg# 5826600fe5bSmrg# This file is free software; the Free Software Foundation 5836600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 5846600fe5bSmrg# with or without modifications, as long as this notice is preserved. 5856600fe5bSmrg 5866600fe5bSmrg# serial 16 5876600fe5bSmrg 5886600fe5bSmrg# This macro actually does too much. Some checks are only needed if 5896600fe5bSmrg# your package does certain things. But this isn't really a big deal. 5906600fe5bSmrg 5916600fe5bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 5926600fe5bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 5936600fe5bSmrg# ----------------------------------------------- 5946600fe5bSmrg# The call with PACKAGE and VERSION arguments is the old style 5956600fe5bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 5966600fe5bSmrg# and VERSION should now be passed to AC_INIT and removed from 5976600fe5bSmrg# the call to AM_INIT_AUTOMAKE. 5986600fe5bSmrg# We support both call styles for the transition. After 5996600fe5bSmrg# the next Automake release, Autoconf can make the AC_INIT 6006600fe5bSmrg# arguments mandatory, and then we can depend on a new Autoconf 6016600fe5bSmrg# release and drop the old call support. 6026600fe5bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 6036600fe5bSmrg[AC_PREREQ([2.62])dnl 6046600fe5bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 6056600fe5bSmrgdnl the ones we care about. 6066600fe5bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6076600fe5bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6086600fe5bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 6096600fe5bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 6106600fe5bSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 6116600fe5bSmrg # is not polluted with repeated "-I." 6126600fe5bSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 6136600fe5bSmrg # test to see if srcdir already configured 6146600fe5bSmrg if test -f $srcdir/config.status; then 6156600fe5bSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 6166600fe5bSmrg fi 617a0195d5fSmrgfi 6186600fe5bSmrg 6196600fe5bSmrg# test whether we have cygpath 6206600fe5bSmrgif test -z "$CYGPATH_W"; then 6216600fe5bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 6226600fe5bSmrg CYGPATH_W='cygpath -w' 6236600fe5bSmrg else 6246600fe5bSmrg CYGPATH_W=echo 6256600fe5bSmrg fi 626a0195d5fSmrgfi 6276600fe5bSmrgAC_SUBST([CYGPATH_W]) 628a0195d5fSmrg 6296600fe5bSmrg# Define the identity of the package. 6306600fe5bSmrgdnl Distinguish between old-style and new-style calls. 6316600fe5bSmrgm4_ifval([$2], 6326600fe5bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6336600fe5bSmrg AC_SUBST([PACKAGE], [$1])dnl 6346600fe5bSmrg AC_SUBST([VERSION], [$2])], 6356600fe5bSmrg[_AM_SET_OPTIONS([$1])dnl 6366600fe5bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 6376600fe5bSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 6386600fe5bSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 6396600fe5bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6406600fe5bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 641a0195d5fSmrg 6426600fe5bSmrg_AM_IF_OPTION([no-define],, 6436600fe5bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6446600fe5bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 645a0195d5fSmrg 6466600fe5bSmrg# Some tools Automake needs. 6476600fe5bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 6486600fe5bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 6496600fe5bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6506600fe5bSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 6516600fe5bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6526600fe5bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 6536600fe5bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 6546600fe5bSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 6556600fe5bSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 6566600fe5bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 6576600fe5bSmrg# We need awk for the "check" target. The system "awk" is bad on 6586600fe5bSmrg# some platforms. 6596600fe5bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 6606600fe5bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 6616600fe5bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 6626600fe5bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 6636600fe5bSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 6646600fe5bSmrg [_AM_PROG_TAR([v7])])]) 6656600fe5bSmrg_AM_IF_OPTION([no-dependencies],, 6666600fe5bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 6676600fe5bSmrg [_AM_DEPENDENCIES(CC)], 6686600fe5bSmrg [define([AC_PROG_CC], 6696600fe5bSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 6706600fe5bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 6716600fe5bSmrg [_AM_DEPENDENCIES(CXX)], 6726600fe5bSmrg [define([AC_PROG_CXX], 6736600fe5bSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 6746600fe5bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 6756600fe5bSmrg [_AM_DEPENDENCIES(OBJC)], 6766600fe5bSmrg [define([AC_PROG_OBJC], 6776600fe5bSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 6786600fe5bSmrg]) 6796600fe5bSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 6806600fe5bSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 6816600fe5bSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 6826600fe5bSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 6836600fe5bSmrgAC_CONFIG_COMMANDS_PRE(dnl 6846600fe5bSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 6856600fe5bSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 6866600fe5bSmrg]) 687a0195d5fSmrg 6886600fe5bSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 6896600fe5bSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 6906600fe5bSmrgdnl mangled by Autoconf and run in a shell conditional statement. 6916600fe5bSmrgm4_define([_AC_COMPILER_EXEEXT], 6926600fe5bSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 693a0195d5fSmrg 694a0195d5fSmrg 6956600fe5bSmrg# When config.status generates a header, we must update the stamp-h file. 6966600fe5bSmrg# This file resides in the same directory as the config header 6976600fe5bSmrg# that is generated. The stamp files are numbered to have different names. 6986600fe5bSmrg 6996600fe5bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7006600fe5bSmrg# loop where config.status creates the headers, so we can generate 7016600fe5bSmrg# our stamp files there. 7026600fe5bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7036600fe5bSmrg[# Compute $1's index in $config_headers. 7046600fe5bSmrg_am_arg=$1 7056600fe5bSmrg_am_stamp_count=1 7066600fe5bSmrgfor _am_header in $config_headers :; do 7076600fe5bSmrg case $_am_header in 7086600fe5bSmrg $_am_arg | $_am_arg:* ) 7096600fe5bSmrg break ;; 7106600fe5bSmrg * ) 7116600fe5bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7126600fe5bSmrg esac 7136600fe5bSmrgdone 7146600fe5bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7156600fe5bSmrg 7166600fe5bSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 7176600fe5bSmrg# 7186600fe5bSmrg# This file is free software; the Free Software Foundation 7196600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 7206600fe5bSmrg# with or without modifications, as long as this notice is preserved. 721a0195d5fSmrg 7226600fe5bSmrg# AM_PROG_INSTALL_SH 7236600fe5bSmrg# ------------------ 7246600fe5bSmrg# Define $install_sh. 7256600fe5bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7266600fe5bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7276600fe5bSmrgif test x"${install_sh}" != xset; then 7286600fe5bSmrg case $am_aux_dir in 7296600fe5bSmrg *\ * | *\ *) 7306600fe5bSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 7316600fe5bSmrg *) 7326600fe5bSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 7336600fe5bSmrg esac 734a0195d5fSmrgfi 7356600fe5bSmrgAC_SUBST(install_sh)]) 736a0195d5fSmrg 7376600fe5bSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7386600fe5bSmrg# 7396600fe5bSmrg# This file is free software; the Free Software Foundation 7406600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 7416600fe5bSmrg# with or without modifications, as long as this notice is preserved. 742a0195d5fSmrg 7436600fe5bSmrg# serial 2 744a0195d5fSmrg 7456600fe5bSmrg# Check whether the underlying file-system supports filenames 7466600fe5bSmrg# with a leading dot. For instance MS-DOS doesn't. 7476600fe5bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 7486600fe5bSmrg[rm -rf .tst 2>/dev/null 7496600fe5bSmrgmkdir .tst 2>/dev/null 7506600fe5bSmrgif test -d .tst; then 7516600fe5bSmrg am__leading_dot=. 752a0195d5fSmrgelse 7536600fe5bSmrg am__leading_dot=_ 754a0195d5fSmrgfi 7556600fe5bSmrgrmdir .tst 2>/dev/null 7566600fe5bSmrgAC_SUBST([am__leading_dot])]) 757a0195d5fSmrg 7586600fe5bSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7596600fe5bSmrg# From Jim Meyering 760a0195d5fSmrg 7616600fe5bSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 7626600fe5bSmrg# Free Software Foundation, Inc. 7636600fe5bSmrg# 7646600fe5bSmrg# This file is free software; the Free Software Foundation 7656600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 7666600fe5bSmrg# with or without modifications, as long as this notice is preserved. 767a0195d5fSmrg 7686600fe5bSmrg# serial 5 769a0195d5fSmrg 7706600fe5bSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 7716600fe5bSmrg# ---------------------------------- 7726600fe5bSmrg# Control maintainer-specific portions of Makefiles. 7736600fe5bSmrg# Default is to disable them, unless `enable' is passed literally. 7746600fe5bSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 7756600fe5bSmrg# can override the default with the --enable/--disable switch. 7766600fe5bSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7776600fe5bSmrg[m4_case(m4_default([$1], [disable]), 7786600fe5bSmrg [enable], [m4_define([am_maintainer_other], [disable])], 7796600fe5bSmrg [disable], [m4_define([am_maintainer_other], [enable])], 7806600fe5bSmrg [m4_define([am_maintainer_other], [enable]) 7816600fe5bSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 7826600fe5bSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 7836600fe5bSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 7846600fe5bSmrg AC_ARG_ENABLE([maintainer-mode], 7856600fe5bSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 7866600fe5bSmrg (and sometimes confusing) to the casual installer], 7876600fe5bSmrg [USE_MAINTAINER_MODE=$enableval], 7886600fe5bSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 7896600fe5bSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7906600fe5bSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 7916600fe5bSmrg MAINT=$MAINTAINER_MODE_TRUE 7926600fe5bSmrg AC_SUBST([MAINT])dnl 7936600fe5bSmrg] 7946600fe5bSmrg) 795a0195d5fSmrg 7966600fe5bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 797a0195d5fSmrg 7986600fe5bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 799a0195d5fSmrg 8006600fe5bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 8016600fe5bSmrg# 8026600fe5bSmrg# This file is free software; the Free Software Foundation 8036600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 8046600fe5bSmrg# with or without modifications, as long as this notice is preserved. 805a0195d5fSmrg 8066600fe5bSmrg# serial 4 807a0195d5fSmrg 8086600fe5bSmrg# AM_MAKE_INCLUDE() 8096600fe5bSmrg# ----------------- 8106600fe5bSmrg# Check to see how make treats includes. 8116600fe5bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 8126600fe5bSmrg[am_make=${MAKE-make} 8136600fe5bSmrgcat > confinc << 'END' 8146600fe5bSmrgam__doit: 8156600fe5bSmrg @echo this is the am__doit target 8166600fe5bSmrg.PHONY: am__doit 8176600fe5bSmrgEND 8186600fe5bSmrg# If we don't find an include directive, just comment out the code. 8196600fe5bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8206600fe5bSmrgam__include="#" 8216600fe5bSmrgam__quote= 8226600fe5bSmrg_am_result=none 8236600fe5bSmrg# First try GNU make style include. 8246600fe5bSmrgecho "include confinc" > confmf 8256600fe5bSmrg# Ignore all kinds of additional output from `make'. 8266600fe5bSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8276600fe5bSmrg*the\ am__doit\ target*) 8286600fe5bSmrg am__include=include 8296600fe5bSmrg am__quote= 8306600fe5bSmrg _am_result=GNU 8316600fe5bSmrg ;; 8326600fe5bSmrgesac 8336600fe5bSmrg# Now try BSD make style include. 8346600fe5bSmrgif test "$am__include" = "#"; then 8356600fe5bSmrg echo '.include "confinc"' > confmf 8366600fe5bSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 8376600fe5bSmrg *the\ am__doit\ target*) 8386600fe5bSmrg am__include=.include 8396600fe5bSmrg am__quote="\"" 8406600fe5bSmrg _am_result=BSD 8416600fe5bSmrg ;; 8426600fe5bSmrg esac 843a0195d5fSmrgfi 8446600fe5bSmrgAC_SUBST([am__include]) 8456600fe5bSmrgAC_SUBST([am__quote]) 8466600fe5bSmrgAC_MSG_RESULT([$_am_result]) 8476600fe5bSmrgrm -f confinc confmf 8486600fe5bSmrg]) 849a0195d5fSmrg 8506600fe5bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 851a0195d5fSmrg 8526600fe5bSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8536600fe5bSmrg# Free Software Foundation, Inc. 8546600fe5bSmrg# 8556600fe5bSmrg# This file is free software; the Free Software Foundation 8566600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 8576600fe5bSmrg# with or without modifications, as long as this notice is preserved. 858a0195d5fSmrg 8596600fe5bSmrg# serial 6 860a0195d5fSmrg 8616600fe5bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 8626600fe5bSmrg# ------------------------------ 8636600fe5bSmrgAC_DEFUN([AM_MISSING_PROG], 8646600fe5bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8656600fe5bSmrg$1=${$1-"${am_missing_run}$2"} 8666600fe5bSmrgAC_SUBST($1)]) 867a0195d5fSmrg 868a0195d5fSmrg 8696600fe5bSmrg# AM_MISSING_HAS_RUN 8706600fe5bSmrg# ------------------ 8716600fe5bSmrg# Define MISSING if not defined so far and test if it supports --run. 8726600fe5bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8736600fe5bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8746600fe5bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8756600fe5bSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8766600fe5bSmrgif test x"${MISSING+set}" != xset; then 8776600fe5bSmrg case $am_aux_dir in 8786600fe5bSmrg *\ * | *\ *) 8796600fe5bSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8806600fe5bSmrg *) 8816600fe5bSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8826600fe5bSmrg esac 883a0195d5fSmrgfi 8846600fe5bSmrg# Use eval to expand $SHELL 8856600fe5bSmrgif eval "$MISSING --run true"; then 8866600fe5bSmrg am_missing_run="$MISSING --run " 887a0195d5fSmrgelse 8886600fe5bSmrg am_missing_run= 8896600fe5bSmrg AC_MSG_WARN([`missing' script is too old or missing]) 890a0195d5fSmrgfi 8916600fe5bSmrg]) 892a0195d5fSmrg 8936600fe5bSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 894a0195d5fSmrg# 8956600fe5bSmrg# This file is free software; the Free Software Foundation 8966600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 8976600fe5bSmrg# with or without modifications, as long as this notice is preserved. 898a0195d5fSmrg 8996600fe5bSmrg# AM_PROG_MKDIR_P 9006600fe5bSmrg# --------------- 9016600fe5bSmrg# Check for `mkdir -p'. 9026600fe5bSmrgAC_DEFUN([AM_PROG_MKDIR_P], 9036600fe5bSmrg[AC_PREREQ([2.60])dnl 9046600fe5bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9056600fe5bSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9066600fe5bSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 9076600fe5bSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9086600fe5bSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9096600fe5bSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9106600fe5bSmrgdnl adjustment using top_builddir (which is defined more often than 9116600fe5bSmrgdnl MKDIR_P). 9126600fe5bSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9136600fe5bSmrgcase $mkdir_p in 9146600fe5bSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 9156600fe5bSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9166600fe5bSmrgesac 9176600fe5bSmrg]) 918a0195d5fSmrg 9196600fe5bSmrg# Helper functions for option handling. -*- Autoconf -*- 920a0195d5fSmrg 9216600fe5bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 922a0195d5fSmrg# 9236600fe5bSmrg# This file is free software; the Free Software Foundation 9246600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 9256600fe5bSmrg# with or without modifications, as long as this notice is preserved. 926a0195d5fSmrg 9276600fe5bSmrg# serial 4 928a0195d5fSmrg 9296600fe5bSmrg# _AM_MANGLE_OPTION(NAME) 9306600fe5bSmrg# ----------------------- 9316600fe5bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 9326600fe5bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 933a0195d5fSmrg 9346600fe5bSmrg# _AM_SET_OPTION(NAME) 9356600fe5bSmrg# ------------------------------ 9366600fe5bSmrg# Set option NAME. Presently that only means defining a flag for this option. 9376600fe5bSmrgAC_DEFUN([_AM_SET_OPTION], 9386600fe5bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 939a0195d5fSmrg 9406600fe5bSmrg# _AM_SET_OPTIONS(OPTIONS) 9416600fe5bSmrg# ---------------------------------- 9426600fe5bSmrg# OPTIONS is a space-separated list of Automake options. 9436600fe5bSmrgAC_DEFUN([_AM_SET_OPTIONS], 9446600fe5bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9456600fe5bSmrg 9466600fe5bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9476600fe5bSmrg# ------------------------------------------- 9486600fe5bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9496600fe5bSmrgAC_DEFUN([_AM_IF_OPTION], 9506600fe5bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9516600fe5bSmrg 9526600fe5bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 953a0195d5fSmrg 9546600fe5bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 9556600fe5bSmrg# Free Software Foundation, Inc. 956a0195d5fSmrg# 957a0195d5fSmrg# This file is free software; the Free Software Foundation 958a0195d5fSmrg# gives unlimited permission to copy and/or distribute it, 959a0195d5fSmrg# with or without modifications, as long as this notice is preserved. 960a0195d5fSmrg 9616600fe5bSmrg# serial 5 962a0195d5fSmrg 9636600fe5bSmrg# AM_SANITY_CHECK 9646600fe5bSmrg# --------------- 9656600fe5bSmrgAC_DEFUN([AM_SANITY_CHECK], 9666600fe5bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 9676600fe5bSmrg# Just in case 9686600fe5bSmrgsleep 1 9696600fe5bSmrgecho timestamp > conftest.file 9706600fe5bSmrg# Reject unsafe characters in $srcdir or the absolute working directory 9716600fe5bSmrg# name. Accept space and tab only in the latter. 9726600fe5bSmrgam_lf=' 9736600fe5bSmrg' 9746600fe5bSmrgcase `pwd` in 9756600fe5bSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 9766600fe5bSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 9776600fe5bSmrgesac 9786600fe5bSmrgcase $srcdir in 9796600fe5bSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9806600fe5bSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 9816600fe5bSmrgesac 982a0195d5fSmrg 9836600fe5bSmrg# Do `set' in a subshell so we don't clobber the current shell's 9846600fe5bSmrg# arguments. Must try -L first in case configure is actually a 9856600fe5bSmrg# symlink; some systems play weird games with the mod time of symlinks 9866600fe5bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9876600fe5bSmrg# directory). 9886600fe5bSmrgif ( 9896600fe5bSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9906600fe5bSmrg if test "$[*]" = "X"; then 9916600fe5bSmrg # -L didn't work. 9926600fe5bSmrg set X `ls -t "$srcdir/configure" conftest.file` 9936600fe5bSmrg fi 9946600fe5bSmrg rm -f conftest.file 9956600fe5bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9966600fe5bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 997a0195d5fSmrg 9986600fe5bSmrg # If neither matched, then we have a broken ls. This can happen 9996600fe5bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 10006600fe5bSmrg # broken ls alias from the environment. This has actually 10016600fe5bSmrg # happened. Such a system could not be considered "sane". 10026600fe5bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 10036600fe5bSmrgalias in your environment]) 10046600fe5bSmrg fi 1005a0195d5fSmrg 10066600fe5bSmrg test "$[2]" = conftest.file 10076600fe5bSmrg ) 10086600fe5bSmrgthen 10096600fe5bSmrg # Ok. 10106600fe5bSmrg : 10116600fe5bSmrgelse 10126600fe5bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 10136600fe5bSmrgCheck your system clock]) 10146600fe5bSmrgfi 10156600fe5bSmrgAC_MSG_RESULT(yes)]) 10166600fe5bSmrg 10176600fe5bSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 1018a0195d5fSmrg# 1019a0195d5fSmrg# This file is free software; the Free Software Foundation 1020a0195d5fSmrg# gives unlimited permission to copy and/or distribute it, 1021a0195d5fSmrg# with or without modifications, as long as this notice is preserved. 1022a0195d5fSmrg 10236600fe5bSmrg# serial 1 1024a0195d5fSmrg 10256600fe5bSmrg# AM_SILENT_RULES([DEFAULT]) 10266600fe5bSmrg# -------------------------- 10276600fe5bSmrg# Enable less verbose build rules; with the default set to DEFAULT 10286600fe5bSmrg# (`yes' being less verbose, `no' or empty being verbose). 10296600fe5bSmrgAC_DEFUN([AM_SILENT_RULES], 10306600fe5bSmrg[AC_ARG_ENABLE([silent-rules], 10316600fe5bSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 10326600fe5bSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 10336600fe5bSmrgcase $enable_silent_rules in 10346600fe5bSmrgyes) AM_DEFAULT_VERBOSITY=0;; 10356600fe5bSmrgno) AM_DEFAULT_VERBOSITY=1;; 10366600fe5bSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 10376600fe5bSmrgesac 10386600fe5bSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 10396600fe5bSmrgAM_BACKSLASH='\' 10406600fe5bSmrgAC_SUBST([AM_BACKSLASH])dnl 10416600fe5bSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1042a0195d5fSmrg]) 1043a0195d5fSmrg 10446600fe5bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 10456600fe5bSmrg# 10466600fe5bSmrg# This file is free software; the Free Software Foundation 10476600fe5bSmrg# gives unlimited permission to copy and/or distribute it, 10486600fe5bSmrg# with or without modifications, as long as this notice is preserved. 10496600fe5bSmrg 10506600fe5bSmrg# AM_PROG_INSTALL_STRIP 10516600fe5bSmrg# --------------------- 10526600fe5bSmrg# One issue with vendor `install' (even GNU) is that you can't 10536600fe5bSmrg# specify the program used to strip binaries. This is especially 10546600fe5bSmrg# annoying in cross-compiling environments, where the build's strip 10556600fe5bSmrg# is unlikely to handle the host's binaries. 10566600fe5bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 10576600fe5bSmrg# always use install-sh in `make install-strip', and initialize 10586600fe5bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 10596600fe5bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10606600fe5bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10616600fe5bSmrg# Installed binaries are usually stripped using `strip' when the user 10626600fe5bSmrg# run `make install-strip'. However `strip' might not be the right 10636600fe5bSmrg# tool to use in cross-compilation environments, therefore Automake 10646600fe5bSmrg# will honor the `STRIP' environment variable to overrule this program. 10656600fe5bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 10666600fe5bSmrgif test "$cross_compiling" != no; then 10676600fe5bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 10686600fe5bSmrgfi 10696600fe5bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10706600fe5bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1071a0195d5fSmrg 10726600fe5bSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1073a0195d5fSmrg# 1074a0195d5fSmrg# This file is free software; the Free Software Foundation 1075a0195d5fSmrg# gives unlimited permission to copy and/or distribute it, 1076a0195d5fSmrg# with or without modifications, as long as this notice is preserved. 1077a0195d5fSmrg 10786600fe5bSmrg# serial 2 1079a0195d5fSmrg 10806600fe5bSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10816600fe5bSmrg# --------------------------- 10826600fe5bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10836600fe5bSmrg# This macro is traced by Automake. 10846600fe5bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1085a0195d5fSmrg 10866600fe5bSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10876600fe5bSmrg# --------------------------- 10886600fe5bSmrg# Public sister of _AM_SUBST_NOTMAKE. 10896600fe5bSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10906600fe5bSmrg 10916600fe5bSmrg# Check how to create a tarball. -*- Autoconf -*- 10926600fe5bSmrg 10936600fe5bSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1094a0195d5fSmrg# 1095a0195d5fSmrg# This file is free software; the Free Software Foundation 1096a0195d5fSmrg# gives unlimited permission to copy and/or distribute it, 1097a0195d5fSmrg# with or without modifications, as long as this notice is preserved. 1098a0195d5fSmrg 10996600fe5bSmrg# serial 2 1100a0195d5fSmrg 11016600fe5bSmrg# _AM_PROG_TAR(FORMAT) 11026600fe5bSmrg# -------------------- 11036600fe5bSmrg# Check how to create a tarball in format FORMAT. 11046600fe5bSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 1105a0195d5fSmrg# 11066600fe5bSmrg# Substitute a variable $(am__tar) that is a command 11076600fe5bSmrg# writing to stdout a FORMAT-tarball containing the directory 11086600fe5bSmrg# $tardir. 11096600fe5bSmrg# tardir=directory && $(am__tar) > result.tar 11106600fe5bSmrg# 11116600fe5bSmrg# Substitute a variable $(am__untar) that extract such 11126600fe5bSmrg# a tarball read from stdin. 11136600fe5bSmrg# $(am__untar) < result.tar 11146600fe5bSmrgAC_DEFUN([_AM_PROG_TAR], 11156600fe5bSmrg[# Always define AMTAR for backward compatibility. 11166600fe5bSmrgAM_MISSING_PROG([AMTAR], [tar]) 11176600fe5bSmrgm4_if([$1], [v7], 11186600fe5bSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 11196600fe5bSmrg [m4_case([$1], [ustar],, [pax],, 11206600fe5bSmrg [m4_fatal([Unknown tar format])]) 11216600fe5bSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 11226600fe5bSmrg# Loop over all known methods to create a tar archive until one works. 11236600fe5bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11246600fe5bSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 11256600fe5bSmrg# Do not fold the above two line into one, because Tru64 sh and 11266600fe5bSmrg# Solaris sh will not grok spaces in the rhs of `-'. 11276600fe5bSmrgfor _am_tool in $_am_tools 11286600fe5bSmrgdo 11296600fe5bSmrg case $_am_tool in 11306600fe5bSmrg gnutar) 11316600fe5bSmrg for _am_tar in tar gnutar gtar; 11326600fe5bSmrg do 11336600fe5bSmrg AM_RUN_LOG([$_am_tar --version]) && break 11346600fe5bSmrg done 11356600fe5bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11366600fe5bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11376600fe5bSmrg am__untar="$_am_tar -xf -" 11386600fe5bSmrg ;; 11396600fe5bSmrg plaintar) 11406600fe5bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11416600fe5bSmrg # ustar tarball either. 11426600fe5bSmrg (tar --version) >/dev/null 2>&1 && continue 11436600fe5bSmrg am__tar='tar chf - "$$tardir"' 11446600fe5bSmrg am__tar_='tar chf - "$tardir"' 11456600fe5bSmrg am__untar='tar xf -' 11466600fe5bSmrg ;; 11476600fe5bSmrg pax) 11486600fe5bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11496600fe5bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11506600fe5bSmrg am__untar='pax -r' 11516600fe5bSmrg ;; 11526600fe5bSmrg cpio) 11536600fe5bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11546600fe5bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11556600fe5bSmrg am__untar='cpio -i -H $1 -d' 11566600fe5bSmrg ;; 11576600fe5bSmrg none) 11586600fe5bSmrg am__tar=false 11596600fe5bSmrg am__tar_=false 11606600fe5bSmrg am__untar=false 11616600fe5bSmrg ;; 11626600fe5bSmrg esac 1163a0195d5fSmrg 11646600fe5bSmrg # If the value was cached, stop now. We just wanted to have am__tar 11656600fe5bSmrg # and am__untar set. 11666600fe5bSmrg test -n "${am_cv_prog_tar_$1}" && break 1167a0195d5fSmrg 11686600fe5bSmrg # tar/untar a dummy directory, and stop if the command works 11696600fe5bSmrg rm -rf conftest.dir 1170a0195d5fSmrg mkdir conftest.dir 11716600fe5bSmrg echo GrepMe > conftest.dir/file 11726600fe5bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11736600fe5bSmrg rm -rf conftest.dir 11746600fe5bSmrg if test -s conftest.tar; then 11756600fe5bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11766600fe5bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1177a0195d5fSmrg fi 11786600fe5bSmrgdone 11796600fe5bSmrgrm -rf conftest.dir 11806600fe5bSmrg 11816600fe5bSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11826600fe5bSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11836600fe5bSmrgAC_SUBST([am__tar]) 11846600fe5bSmrgAC_SUBST([am__untar]) 11856600fe5bSmrg]) # _AM_PROG_TAR 11866600fe5bSmrg 11876600fe5bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 11886600fe5bSmrgdnl 11896600fe5bSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 11906600fe5bSmrgdnl 11916600fe5bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 11926f5dd5c2Smrgdnl copy of this software and associated documentation files (the "Software"), 11936f5dd5c2Smrgdnl to deal in the Software without restriction, including without limitation 11946f5dd5c2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 11956f5dd5c2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 11966f5dd5c2Smrgdnl Software is furnished to do so, subject to the following conditions: 11976600fe5bSmrgdnl 11986f5dd5c2Smrgdnl The above copyright notice and this permission notice (including the next 11996f5dd5c2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 12006f5dd5c2Smrgdnl Software. 12016600fe5bSmrgdnl 12026f5dd5c2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12036f5dd5c2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12046f5dd5c2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 12056f5dd5c2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 12066f5dd5c2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 12076f5dd5c2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 12086f5dd5c2Smrgdnl DEALINGS IN THE SOFTWARE. 12096600fe5bSmrg 12106600fe5bSmrg# XORG_MACROS_VERSION(required-version) 12116600fe5bSmrg# ------------------------------------- 12126600fe5bSmrg# Minimum version: 1.1.0 12136600fe5bSmrg# 12146600fe5bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 12156600fe5bSmrg# your configure.ac with the minimum required version, such as: 12166600fe5bSmrg# XORG_MACROS_VERSION(1.1) 12176600fe5bSmrg# 12186600fe5bSmrg# To ensure that this macro is defined, also add: 12196600fe5bSmrg# m4_ifndef([XORG_MACROS_VERSION], 12206600fe5bSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 12216600fe5bSmrg# 12226600fe5bSmrg# 12236600fe5bSmrg# See the "minimum version" comment for each macro you use to see what 12246600fe5bSmrg# version you require. 12256600fe5bSmrgm4_defun([XORG_MACROS_VERSION],[ 12266f5dd5c2Smrgm4_define([vers_have], [1.10.0]) 12276600fe5bSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 12286600fe5bSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 12296600fe5bSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 12306600fe5bSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 12316600fe5bSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 12326600fe5bSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 12336600fe5bSmrgm4_undefine([vers_have]) 12346600fe5bSmrgm4_undefine([maj_have]) 12356600fe5bSmrgm4_undefine([maj_needed]) 12366600fe5bSmrg]) # XORG_MACROS_VERSION 12376600fe5bSmrg 12386600fe5bSmrg# XORG_PROG_RAWCPP() 12396600fe5bSmrg# ------------------ 12406600fe5bSmrg# Minimum version: 1.0.0 12416600fe5bSmrg# 12426600fe5bSmrg# Find cpp program and necessary flags for use in pre-processing text files 12436600fe5bSmrg# such as man pages and config files 12446600fe5bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 12456600fe5bSmrgAC_REQUIRE([AC_PROG_CPP]) 12466600fe5bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 12476600fe5bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1248a0195d5fSmrg 12496600fe5bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 12506600fe5bSmrg# which is not the best choice for supporting other OS'es, but covers most 12516600fe5bSmrg# of the ones we need for now. 12526600fe5bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 12536600fe5bSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 12546600fe5bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 12556600fe5bSmrg AC_MSG_RESULT([no]) 12566600fe5bSmrgelse 12576600fe5bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 12586600fe5bSmrg RAWCPPFLAGS=-undef 12596600fe5bSmrg AC_MSG_RESULT([yes]) 12606600fe5bSmrg # under Cygwin unix is still defined even with -undef 12616600fe5bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 12626600fe5bSmrg RAWCPPFLAGS="-undef -ansi" 12636600fe5bSmrg AC_MSG_RESULT([yes, with -ansi]) 12646600fe5bSmrg else 12656600fe5bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 12666600fe5bSmrg fi 12676600fe5bSmrgfi 12686600fe5bSmrgrm -f conftest.$ac_ext 1269a0195d5fSmrg 12706600fe5bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 12716600fe5bSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 12726600fe5bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 12736600fe5bSmrg AC_MSG_RESULT([no]) 1274a0195d5fSmrgelse 12756600fe5bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 12766600fe5bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 12776600fe5bSmrg AC_MSG_RESULT([yes]) 12786600fe5bSmrg else 12796600fe5bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 12806600fe5bSmrg fi 1281a0195d5fSmrgfi 12826600fe5bSmrgrm -f conftest.$ac_ext 12836600fe5bSmrgAC_SUBST(RAWCPPFLAGS) 12846600fe5bSmrg]) # XORG_PROG_RAWCPP 1285a0195d5fSmrg 12866600fe5bSmrg# XORG_MANPAGE_SECTIONS() 12876600fe5bSmrg# ----------------------- 12886600fe5bSmrg# Minimum version: 1.0.0 12896600fe5bSmrg# 12906600fe5bSmrg# Determine which sections man pages go in for the different man page types 12916600fe5bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 12926600fe5bSmrg# Not sure if there's any better way than just hardcoding by OS name. 12936600fe5bSmrg# Override default settings by setting environment variables 12946f5dd5c2Smrg# Added MAN_SUBSTS in version 1.8 12956f5dd5c2Smrg# Added AC_PROG_SED in version 1.8 1296a0195d5fSmrg 12976600fe5bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 12986600fe5bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 12996f5dd5c2SmrgAC_REQUIRE([AC_PROG_SED]) 1300a0195d5fSmrg 13016600fe5bSmrgif test x$APP_MAN_SUFFIX = x ; then 13026600fe5bSmrg APP_MAN_SUFFIX=1 13036600fe5bSmrgfi 13046600fe5bSmrgif test x$APP_MAN_DIR = x ; then 13056600fe5bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 13066600fe5bSmrgfi 1307a0195d5fSmrg 13086600fe5bSmrgif test x$LIB_MAN_SUFFIX = x ; then 13096600fe5bSmrg LIB_MAN_SUFFIX=3 13106600fe5bSmrgfi 13116600fe5bSmrgif test x$LIB_MAN_DIR = x ; then 13126600fe5bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1313a0195d5fSmrgfi 1314a0195d5fSmrg 13156600fe5bSmrgif test x$FILE_MAN_SUFFIX = x ; then 13166600fe5bSmrg case $host_os in 13176600fe5bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 13186600fe5bSmrg *) FILE_MAN_SUFFIX=5 ;; 13196600fe5bSmrg esac 13206600fe5bSmrgfi 13216600fe5bSmrgif test x$FILE_MAN_DIR = x ; then 13226600fe5bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 13236600fe5bSmrgfi 1324a0195d5fSmrg 13256600fe5bSmrgif test x$MISC_MAN_SUFFIX = x ; then 13266600fe5bSmrg case $host_os in 13276600fe5bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 13286600fe5bSmrg *) MISC_MAN_SUFFIX=7 ;; 13296600fe5bSmrg esac 13306600fe5bSmrgfi 13316600fe5bSmrgif test x$MISC_MAN_DIR = x ; then 13326600fe5bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 13336600fe5bSmrgfi 1334a0195d5fSmrg 13356600fe5bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 13366600fe5bSmrg case $host_os in 13376600fe5bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 13386600fe5bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 13396600fe5bSmrg esac 13406600fe5bSmrgfi 13416600fe5bSmrgif test x$DRIVER_MAN_DIR = x ; then 13426600fe5bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 13436600fe5bSmrgfi 1344a0195d5fSmrg 13456600fe5bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 13466600fe5bSmrg case $host_os in 13476600fe5bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 13486600fe5bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 13496600fe5bSmrg esac 13506600fe5bSmrgfi 13516600fe5bSmrgif test x$ADMIN_MAN_DIR = x ; then 13526600fe5bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 13536600fe5bSmrgfi 1354a0195d5fSmrg 1355a0195d5fSmrg 13566600fe5bSmrgAC_SUBST([APP_MAN_SUFFIX]) 13576600fe5bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 13586600fe5bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 13596600fe5bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 13606600fe5bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 13616600fe5bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 13626600fe5bSmrgAC_SUBST([APP_MAN_DIR]) 13636600fe5bSmrgAC_SUBST([LIB_MAN_DIR]) 13646600fe5bSmrgAC_SUBST([FILE_MAN_DIR]) 13656600fe5bSmrgAC_SUBST([MISC_MAN_DIR]) 13666600fe5bSmrgAC_SUBST([DRIVER_MAN_DIR]) 13676600fe5bSmrgAC_SUBST([ADMIN_MAN_DIR]) 13686f5dd5c2Smrg 13696f5dd5c2SmrgXORG_MAN_PAGE="X Version 11" 13706f5dd5c2SmrgAC_SUBST([XORG_MAN_PAGE]) 13716f5dd5c2SmrgMAN_SUBSTS="\ 13726f5dd5c2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 13736f5dd5c2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 13746f5dd5c2Smrg -e 's|__xservername__|Xorg|g' \ 13756f5dd5c2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 13766f5dd5c2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 13776f5dd5c2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 13786f5dd5c2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 13796f5dd5c2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 13806f5dd5c2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 13816f5dd5c2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 13826f5dd5c2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 13836f5dd5c2SmrgAC_SUBST([MAN_SUBSTS]) 13846f5dd5c2Smrg 13856600fe5bSmrg]) # XORG_MANPAGE_SECTIONS 1386a0195d5fSmrg 13876f5dd5c2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 13886f5dd5c2Smrg# ------------------------ 13896f5dd5c2Smrg# Minimum version: 1.7.0 13906f5dd5c2Smrg# 13916f5dd5c2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 13926f5dd5c2Smrg# provided by xorg-sgml-doctools, if installed. 13936f5dd5c2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 13946f5dd5c2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 13956f5dd5c2SmrgXORG_SGML_PATH= 13966f5dd5c2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 13976f5dd5c2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 13986f5dd5c2Smrg [m4_ifval([$1],[:], 13996f5dd5c2Smrg [if test x"$cross_compiling" != x"yes" ; then 14006f5dd5c2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 14016f5dd5c2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 14026f5dd5c2Smrg fi]) 14036f5dd5c2Smrg ]) 14046f5dd5c2Smrg 14056f5dd5c2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 14066f5dd5c2Smrg# the path and the name of the doc stylesheet 14076f5dd5c2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 14086f5dd5c2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 14096f5dd5c2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 14106f5dd5c2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 14116f5dd5c2Smrgelse 14126f5dd5c2Smrg AC_MSG_RESULT([no]) 14136f5dd5c2Smrgfi 14146f5dd5c2Smrg 14156f5dd5c2SmrgAC_SUBST(XORG_SGML_PATH) 14166f5dd5c2SmrgAC_SUBST(STYLESHEET_SRCDIR) 14176f5dd5c2SmrgAC_SUBST(XSL_STYLESHEET) 14186f5dd5c2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 14196f5dd5c2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 14206f5dd5c2Smrg 14216600fe5bSmrg# XORG_CHECK_LINUXDOC 14226600fe5bSmrg# ------------------- 14236600fe5bSmrg# Minimum version: 1.0.0 1424a0195d5fSmrg# 14256600fe5bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 14266600fe5bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 14276600fe5bSmrg# Whether or not the necessary tools and files are found can be checked 14286600fe5bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 14296600fe5bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 14306f5dd5c2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 14316f5dd5c2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1432a0195d5fSmrg 14336600fe5bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1434a0195d5fSmrg 14356f5dd5c2SmrgAC_MSG_CHECKING([whether to build documentation]) 1436a0195d5fSmrg 14376f5dd5c2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 14386600fe5bSmrg BUILDDOC=yes 14396600fe5bSmrgelse 14406600fe5bSmrg BUILDDOC=no 1441a0195d5fSmrgfi 1442a0195d5fSmrg 14436600fe5bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1444a0195d5fSmrg 14456600fe5bSmrgAC_MSG_RESULT([$BUILDDOC]) 1446a0195d5fSmrg 14476f5dd5c2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1448a0195d5fSmrg 14496f5dd5c2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 14506600fe5bSmrg BUILDPDFDOC=yes 14516600fe5bSmrgelse 14526600fe5bSmrg BUILDPDFDOC=no 14536600fe5bSmrgfi 1454a0195d5fSmrg 14556600fe5bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1456a0195d5fSmrg 14576600fe5bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1458a0195d5fSmrg 14596f5dd5c2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 14606600fe5bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 14616600fe5bSmrgMAKE_PDF="$PS2PDF" 14626600fe5bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1463a0195d5fSmrg 14646600fe5bSmrgAC_SUBST(MAKE_TEXT) 14656600fe5bSmrgAC_SUBST(MAKE_PS) 14666600fe5bSmrgAC_SUBST(MAKE_PDF) 14676600fe5bSmrgAC_SUBST(MAKE_HTML) 14686600fe5bSmrg]) # XORG_CHECK_LINUXDOC 14696600fe5bSmrg 14706600fe5bSmrg# XORG_CHECK_DOCBOOK 14716600fe5bSmrg# ------------------- 14726600fe5bSmrg# Minimum version: 1.0.0 1473a0195d5fSmrg# 14746600fe5bSmrg# Checks for the ability to build output formats from SGML DocBook source. 14756600fe5bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 14766600fe5bSmrg# indicates whether the necessary tools and files are found and, if set, 14776600fe5bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 14786600fe5bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 14796f5dd5c2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 14806f5dd5c2Smrg 14816600fe5bSmrgBUILDTXTDOC=no 14826600fe5bSmrgBUILDPDFDOC=no 14836600fe5bSmrgBUILDPSDOC=no 14846600fe5bSmrgBUILDHTMLDOC=no 1485a0195d5fSmrg 14866600fe5bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 14876600fe5bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 14886600fe5bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 14896600fe5bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1490a0195d5fSmrg 14916f5dd5c2SmrgAC_MSG_CHECKING([whether to build text documentation]) 14926f5dd5c2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 14936600fe5bSmrg test x$BUILD_TXTDOC != xno; then 14946600fe5bSmrg BUILDTXTDOC=yes 14956600fe5bSmrgfi 14966600fe5bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 14976600fe5bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1498a0195d5fSmrg 14996f5dd5c2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 15006f5dd5c2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 15016600fe5bSmrg test x$BUILD_PDFDOC != xno; then 15026600fe5bSmrg BUILDPDFDOC=yes 1503a0195d5fSmrgfi 15046600fe5bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 15056600fe5bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1506a0195d5fSmrg 15076f5dd5c2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 15086f5dd5c2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 15096600fe5bSmrg test x$BUILD_PSDOC != xno; then 15106600fe5bSmrg BUILDPSDOC=yes 15116600fe5bSmrgfi 15126600fe5bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 15136600fe5bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1514a0195d5fSmrg 15156f5dd5c2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 15166f5dd5c2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 15176600fe5bSmrg test x$BUILD_HTMLDOC != xno; then 15186600fe5bSmrg BUILDHTMLDOC=yes 15196600fe5bSmrgfi 15206600fe5bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 15216600fe5bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1522a0195d5fSmrg 15236600fe5bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 15246600fe5bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 15256600fe5bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 15266600fe5bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1527a0195d5fSmrg 15286600fe5bSmrgAC_SUBST(MAKE_TEXT) 15296600fe5bSmrgAC_SUBST(MAKE_PS) 15306600fe5bSmrgAC_SUBST(MAKE_PDF) 15316600fe5bSmrgAC_SUBST(MAKE_HTML) 15326600fe5bSmrg]) # XORG_CHECK_DOCBOOK 1533a0195d5fSmrg 15346f5dd5c2Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 15356f5dd5c2Smrg# ---------------- 15366f5dd5c2Smrg# Minimum version: 1.5.0 15376f5dd5c2Smrg# 15386f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 15396f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 15406f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 15416f5dd5c2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 15426f5dd5c2Smrg# as whether or not to use the xmlto package. 15436f5dd5c2Smrg# 15446f5dd5c2Smrg# Interface to module: 15456f5dd5c2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 15466f5dd5c2Smrg# XMLTO: returns the path of the xmlto program found 15476f5dd5c2Smrg# returns the path set by the user in the environment 15486f5dd5c2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 15496f5dd5c2Smrg# 'no' user instructs the module not to use xmlto 15506f5dd5c2Smrg# 15516f5dd5c2Smrg# Added in version 1.10.0 15526f5dd5c2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 15536f5dd5c2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 15546f5dd5c2Smrg# 15556f5dd5c2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 15566f5dd5c2Smrg# 15576f5dd5c2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 15586f5dd5c2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 15596f5dd5c2SmrgAC_ARG_WITH(xmlto, 15606f5dd5c2Smrg AS_HELP_STRING([--with-xmlto], 15616f5dd5c2Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 15626f5dd5c2Smrg [use_xmlto=$withval], [use_xmlto=auto]) 15636f5dd5c2Smrg 15646f5dd5c2Smrgif test "x$use_xmlto" = x"auto"; then 15656f5dd5c2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 15666f5dd5c2Smrg if test "x$XMLTO" = "x"; then 15676f5dd5c2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 15686f5dd5c2Smrg have_xmlto=no 15696f5dd5c2Smrg else 15706f5dd5c2Smrg have_xmlto=yes 15716f5dd5c2Smrg fi 15726f5dd5c2Smrgelif test "x$use_xmlto" = x"yes" ; then 15736f5dd5c2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 15746f5dd5c2Smrg if test "x$XMLTO" = "x"; then 15756f5dd5c2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 15766f5dd5c2Smrg fi 15776f5dd5c2Smrg have_xmlto=yes 15786f5dd5c2Smrgelif test "x$use_xmlto" = x"no" ; then 15796f5dd5c2Smrg if test "x$XMLTO" != "x"; then 15806f5dd5c2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 15816f5dd5c2Smrg fi 15826f5dd5c2Smrg have_xmlto=no 15836f5dd5c2Smrgelse 15846f5dd5c2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 15856f5dd5c2Smrgfi 15866f5dd5c2Smrg 15876f5dd5c2Smrg# Test for a minimum version of xmlto, if provided. 15886f5dd5c2Smrgm4_ifval([$1], 15896f5dd5c2Smrg[if test "$have_xmlto" = yes; then 15906f5dd5c2Smrg # scrape the xmlto version 15916f5dd5c2Smrg AC_MSG_CHECKING([the xmlto version]) 15926f5dd5c2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 15936f5dd5c2Smrg AC_MSG_RESULT([$xmlto_version]) 15946f5dd5c2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 15956f5dd5c2Smrg [if test "x$use_xmlto" = xauto; then 15966f5dd5c2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 15976f5dd5c2Smrg have_xmlto=no 15986f5dd5c2Smrg else 15996f5dd5c2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 16006f5dd5c2Smrg fi]) 16016f5dd5c2Smrgfi]) 16026f5dd5c2Smrg 16036f5dd5c2Smrg# Test for the ability of xmlto to generate a text target 16046f5dd5c2Smrghave_xmlto_text=no 16056f5dd5c2Smrgcat > conftest.xml << "EOF" 16066f5dd5c2SmrgEOF 16076f5dd5c2SmrgAS_IF([test "$have_xmlto" = yes], 16086f5dd5c2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 16096f5dd5c2Smrg [have_xmlto_text=yes], 16106f5dd5c2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 16116f5dd5c2Smrgrm -f conftest.xml 16126f5dd5c2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 16136f5dd5c2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 16146f5dd5c2Smrg]) # XORG_WITH_XMLTO 16156f5dd5c2Smrg 16166f5dd5c2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 16176f5dd5c2Smrg# ---------------- 16186f5dd5c2Smrg# Minimum version: 1.5.0 16196f5dd5c2Smrg# 16206f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 16216f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 16226f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 16236f5dd5c2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 16246f5dd5c2Smrg# as whether or not to use the asciidoc package. 16256f5dd5c2Smrg# 16266f5dd5c2Smrg# Interface to module: 16276f5dd5c2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 16286f5dd5c2Smrg# ASCIIDOC: returns the path of the asciidoc program found 16296f5dd5c2Smrg# returns the path set by the user in the environment 16306f5dd5c2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 16316f5dd5c2Smrg# 'no' user instructs the module not to use asciidoc 16326f5dd5c2Smrg# 16336f5dd5c2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 16346f5dd5c2Smrg# 16356f5dd5c2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 16366f5dd5c2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 16376f5dd5c2SmrgAC_ARG_WITH(asciidoc, 16386f5dd5c2Smrg AS_HELP_STRING([--with-asciidoc], 16396f5dd5c2Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 16406f5dd5c2Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 16416f5dd5c2Smrg 16426f5dd5c2Smrgif test "x$use_asciidoc" = x"auto"; then 16436f5dd5c2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 16446f5dd5c2Smrg if test "x$ASCIIDOC" = "x"; then 16456f5dd5c2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 16466f5dd5c2Smrg have_asciidoc=no 16476f5dd5c2Smrg else 16486f5dd5c2Smrg have_asciidoc=yes 16496f5dd5c2Smrg fi 16506f5dd5c2Smrgelif test "x$use_asciidoc" = x"yes" ; then 16516f5dd5c2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 16526f5dd5c2Smrg if test "x$ASCIIDOC" = "x"; then 16536f5dd5c2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 16546f5dd5c2Smrg fi 16556f5dd5c2Smrg have_asciidoc=yes 16566f5dd5c2Smrgelif test "x$use_asciidoc" = x"no" ; then 16576f5dd5c2Smrg if test "x$ASCIIDOC" != "x"; then 16586f5dd5c2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 16596f5dd5c2Smrg fi 16606f5dd5c2Smrg have_asciidoc=no 16616f5dd5c2Smrgelse 16626f5dd5c2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 16636f5dd5c2Smrgfi 16646f5dd5c2Smrgm4_ifval([$1], 16656f5dd5c2Smrg[if test "$have_asciidoc" = yes; then 16666f5dd5c2Smrg # scrape the asciidoc version 16676f5dd5c2Smrg AC_MSG_CHECKING([the asciidoc version]) 16686f5dd5c2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 16696f5dd5c2Smrg AC_MSG_RESULT([$asciidoc_version]) 16706f5dd5c2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 16716f5dd5c2Smrg [if test "x$use_asciidoc" = xauto; then 16726f5dd5c2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 16736f5dd5c2Smrg have_asciidoc=no 16746f5dd5c2Smrg else 16756f5dd5c2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 16766f5dd5c2Smrg fi]) 16776f5dd5c2Smrgfi]) 16786f5dd5c2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 16796f5dd5c2Smrg]) # XORG_WITH_ASCIIDOC 16806f5dd5c2Smrg 16816f5dd5c2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 16826f5dd5c2Smrg# -------------------------------- 16836f5dd5c2Smrg# Minimum version: 1.5.0 16846f5dd5c2Smrg# 16856f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 16866f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 16876f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 16886f5dd5c2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 16896f5dd5c2Smrg# as whether or not to use the doxygen package. 16906f5dd5c2Smrg# 16916f5dd5c2Smrg# Interface to module: 16926f5dd5c2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 16936f5dd5c2Smrg# DOXYGEN: returns the path of the doxygen program found 16946f5dd5c2Smrg# returns the path set by the user in the environment 16956f5dd5c2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 16966f5dd5c2Smrg# 'no' user instructs the module not to use doxygen 16976f5dd5c2Smrg# 16986f5dd5c2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 16996f5dd5c2Smrg# 17006f5dd5c2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 17016f5dd5c2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 17026f5dd5c2SmrgAC_ARG_WITH(doxygen, 17036f5dd5c2Smrg AS_HELP_STRING([--with-doxygen], 17046f5dd5c2Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 17056f5dd5c2Smrg [use_doxygen=$withval], [use_doxygen=auto]) 17066f5dd5c2Smrg 17076f5dd5c2Smrgif test "x$use_doxygen" = x"auto"; then 17086f5dd5c2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 17096f5dd5c2Smrg if test "x$DOXYGEN" = "x"; then 17106f5dd5c2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 17116f5dd5c2Smrg have_doxygen=no 17126f5dd5c2Smrg else 17136f5dd5c2Smrg have_doxygen=yes 17146f5dd5c2Smrg fi 17156f5dd5c2Smrgelif test "x$use_doxygen" = x"yes" ; then 17166f5dd5c2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 17176f5dd5c2Smrg if test "x$DOXYGEN" = "x"; then 17186f5dd5c2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 17196f5dd5c2Smrg fi 17206f5dd5c2Smrg have_doxygen=yes 17216f5dd5c2Smrgelif test "x$use_doxygen" = x"no" ; then 17226f5dd5c2Smrg if test "x$DOXYGEN" != "x"; then 17236f5dd5c2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 17246f5dd5c2Smrg fi 17256f5dd5c2Smrg have_doxygen=no 17266f5dd5c2Smrgelse 17276f5dd5c2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 17286f5dd5c2Smrgfi 17296f5dd5c2Smrgm4_ifval([$1], 17306f5dd5c2Smrg[if test "$have_doxygen" = yes; then 17316f5dd5c2Smrg # scrape the doxygen version 17326f5dd5c2Smrg AC_MSG_CHECKING([the doxygen version]) 17336f5dd5c2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 17346f5dd5c2Smrg AC_MSG_RESULT([$doxygen_version]) 17356f5dd5c2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 17366f5dd5c2Smrg [if test "x$use_doxygen" = xauto; then 17376f5dd5c2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 17386f5dd5c2Smrg have_doxygen=no 17396f5dd5c2Smrg else 17406f5dd5c2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 17416f5dd5c2Smrg fi]) 17426f5dd5c2Smrgfi]) 17436f5dd5c2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 17446f5dd5c2Smrg]) # XORG_WITH_DOXYGEN 17456f5dd5c2Smrg 17466f5dd5c2Smrg# XORG_WITH_GROFF 17476f5dd5c2Smrg# ---------------- 17486f5dd5c2Smrg# Minimum version: 1.6.0 17496f5dd5c2Smrg# 17506f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 17516f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 17526f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 17536f5dd5c2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 17546f5dd5c2Smrg# as whether or not to use the groff package. 17556f5dd5c2Smrg# 17566f5dd5c2Smrg# Interface to module: 17576f5dd5c2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 17586f5dd5c2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 17596f5dd5c2Smrg# HAVE_GROFF_MS: the -ms macros package 17606f5dd5c2Smrg# GROFF: returns the path of the groff program found 17616f5dd5c2Smrg# returns the path set by the user in the environment 17626f5dd5c2Smrg# --with-groff: 'yes' user instructs the module to use groff 17636f5dd5c2Smrg# 'no' user instructs the module not to use groff 17646f5dd5c2Smrg# 17656f5dd5c2Smrg# Added in version 1.9.0: 17666f5dd5c2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 17676f5dd5c2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 17686f5dd5c2Smrg# psselect from the psutils package. 17696f5dd5c2Smrg# the ghostcript package. Refer to the grohtml man pages 17706f5dd5c2Smrg# 17716f5dd5c2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 17726f5dd5c2Smrg# 17736f5dd5c2Smrg# OS and distros often splits groff in a basic and full package, the former 17746f5dd5c2Smrg# having the groff program and the later having devices, fonts and macros 17756f5dd5c2Smrg# Checking for the groff executable is not enough. 17766f5dd5c2Smrg# 17776f5dd5c2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 17786f5dd5c2Smrg# unset HAVE_GROFF or GROFF env variables. 17796f5dd5c2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 17806f5dd5c2Smrg# 17816f5dd5c2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 17826f5dd5c2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 17836f5dd5c2SmrgAC_ARG_WITH(groff, 17846f5dd5c2Smrg AS_HELP_STRING([--with-groff], 17856f5dd5c2Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 17866f5dd5c2Smrg [use_groff=$withval], [use_groff=auto]) 17876f5dd5c2Smrg 17886f5dd5c2Smrgif test "x$use_groff" = x"auto"; then 17896f5dd5c2Smrg AC_PATH_PROG([GROFF], [groff]) 17906f5dd5c2Smrg if test "x$GROFF" = "x"; then 17916f5dd5c2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 17926f5dd5c2Smrg have_groff=no 17936f5dd5c2Smrg else 17946f5dd5c2Smrg have_groff=yes 17956f5dd5c2Smrg fi 17966f5dd5c2Smrgelif test "x$use_groff" = x"yes" ; then 17976f5dd5c2Smrg AC_PATH_PROG([GROFF], [groff]) 17986f5dd5c2Smrg if test "x$GROFF" = "x"; then 17996f5dd5c2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 18006f5dd5c2Smrg fi 18016f5dd5c2Smrg have_groff=yes 18026f5dd5c2Smrgelif test "x$use_groff" = x"no" ; then 18036f5dd5c2Smrg if test "x$GROFF" != "x"; then 18046f5dd5c2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 18056f5dd5c2Smrg fi 18066f5dd5c2Smrg have_groff=no 18076f5dd5c2Smrgelse 18086f5dd5c2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 18096f5dd5c2Smrgfi 18106f5dd5c2Smrg 18116f5dd5c2Smrg# We have groff, test for the presence of the macro packages 18126f5dd5c2Smrgif test "x$have_groff" = x"yes"; then 18136f5dd5c2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 18146f5dd5c2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 18156f5dd5c2Smrg groff_ms_works=yes 18166f5dd5c2Smrg else 18176f5dd5c2Smrg groff_ms_works=no 18186f5dd5c2Smrg fi 18196f5dd5c2Smrg AC_MSG_RESULT([$groff_ms_works]) 18206f5dd5c2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 18216f5dd5c2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 18226f5dd5c2Smrg groff_mm_works=yes 18236f5dd5c2Smrg else 18246f5dd5c2Smrg groff_mm_works=no 18256f5dd5c2Smrg fi 18266f5dd5c2Smrg AC_MSG_RESULT([$groff_mm_works]) 18276f5dd5c2Smrgfi 18286f5dd5c2Smrg 18296f5dd5c2Smrg# We have groff, test for HTML dependencies, one command per package 18306f5dd5c2Smrgif test "x$have_groff" = x"yes"; then 18316f5dd5c2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 18326f5dd5c2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 18336f5dd5c2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 18346f5dd5c2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 18356f5dd5c2Smrg have_groff_html=yes 18366f5dd5c2Smrg else 18376f5dd5c2Smrg have_groff_html=no 18386f5dd5c2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 18396f5dd5c2Smrg fi 18406f5dd5c2Smrgfi 18416f5dd5c2Smrg 18426f5dd5c2Smrg# Set Automake conditionals for Makefiles 18436f5dd5c2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 18446f5dd5c2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 18456f5dd5c2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 18466f5dd5c2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 18476f5dd5c2Smrg]) # XORG_WITH_GROFF 18486f5dd5c2Smrg 18496f5dd5c2Smrg# XORG_WITH_FOP 18506f5dd5c2Smrg# ---------------- 18516f5dd5c2Smrg# Minimum version: 1.6.0 18526f5dd5c2Smrg# 18536f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 18546f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 18556f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 18566f5dd5c2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 18576f5dd5c2Smrg# as whether or not to use the fop package. 18586f5dd5c2Smrg# 18596f5dd5c2Smrg# Interface to module: 18606f5dd5c2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 18616f5dd5c2Smrg# FOP: returns the path of the fop program found 18626f5dd5c2Smrg# returns the path set by the user in the environment 18636f5dd5c2Smrg# --with-fop: 'yes' user instructs the module to use fop 18646f5dd5c2Smrg# 'no' user instructs the module not to use fop 18656f5dd5c2Smrg# 18666f5dd5c2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 18676f5dd5c2Smrg# 18686f5dd5c2SmrgAC_DEFUN([XORG_WITH_FOP],[ 18696f5dd5c2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 18706f5dd5c2SmrgAC_ARG_WITH(fop, 18716f5dd5c2Smrg AS_HELP_STRING([--with-fop], 18726f5dd5c2Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 18736f5dd5c2Smrg [use_fop=$withval], [use_fop=auto]) 18746f5dd5c2Smrg 18756f5dd5c2Smrgif test "x$use_fop" = x"auto"; then 18766f5dd5c2Smrg AC_PATH_PROG([FOP], [fop]) 18776f5dd5c2Smrg if test "x$FOP" = "x"; then 18786f5dd5c2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 18796f5dd5c2Smrg have_fop=no 18806f5dd5c2Smrg else 18816f5dd5c2Smrg have_fop=yes 18826f5dd5c2Smrg fi 18836f5dd5c2Smrgelif test "x$use_fop" = x"yes" ; then 18846f5dd5c2Smrg AC_PATH_PROG([FOP], [fop]) 18856f5dd5c2Smrg if test "x$FOP" = "x"; then 18866f5dd5c2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 18876f5dd5c2Smrg fi 18886f5dd5c2Smrg have_fop=yes 18896f5dd5c2Smrgelif test "x$use_fop" = x"no" ; then 18906f5dd5c2Smrg if test "x$FOP" != "x"; then 18916f5dd5c2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 18926f5dd5c2Smrg fi 18936f5dd5c2Smrg have_fop=no 18946f5dd5c2Smrgelse 18956f5dd5c2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 18966f5dd5c2Smrgfi 18976f5dd5c2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 18986f5dd5c2Smrg]) # XORG_WITH_FOP 18996f5dd5c2Smrg 19006f5dd5c2Smrg# XORG_WITH_PS2PDF 19016f5dd5c2Smrg# ---------------- 19026f5dd5c2Smrg# Minimum version: 1.6.0 19036f5dd5c2Smrg# 19046f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 19056f5dd5c2Smrg# not at the appropriate level. This macro enables a module to test for the 19066f5dd5c2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 19076f5dd5c2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 19086f5dd5c2Smrg# as whether or not to use the ps2pdf package. 19096f5dd5c2Smrg# 19106f5dd5c2Smrg# Interface to module: 19116f5dd5c2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 19126f5dd5c2Smrg# PS2PDF: returns the path of the ps2pdf program found 19136f5dd5c2Smrg# returns the path set by the user in the environment 19146f5dd5c2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 19156f5dd5c2Smrg# 'no' user instructs the module not to use ps2pdf 19166f5dd5c2Smrg# 19176f5dd5c2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 19186f5dd5c2Smrg# 19196f5dd5c2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 19206f5dd5c2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 19216f5dd5c2SmrgAC_ARG_WITH(ps2pdf, 19226f5dd5c2Smrg AS_HELP_STRING([--with-ps2pdf], 19236f5dd5c2Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 19246f5dd5c2Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 19256f5dd5c2Smrg 19266f5dd5c2Smrgif test "x$use_ps2pdf" = x"auto"; then 19276f5dd5c2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 19286f5dd5c2Smrg if test "x$PS2PDF" = "x"; then 19296f5dd5c2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 19306f5dd5c2Smrg have_ps2pdf=no 19316f5dd5c2Smrg else 19326f5dd5c2Smrg have_ps2pdf=yes 19336f5dd5c2Smrg fi 19346f5dd5c2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 19356f5dd5c2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 19366f5dd5c2Smrg if test "x$PS2PDF" = "x"; then 19376f5dd5c2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 19386f5dd5c2Smrg fi 19396f5dd5c2Smrg have_ps2pdf=yes 19406f5dd5c2Smrgelif test "x$use_ps2pdf" = x"no" ; then 19416f5dd5c2Smrg if test "x$PS2PDF" != "x"; then 19426f5dd5c2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 19436f5dd5c2Smrg fi 19446f5dd5c2Smrg have_ps2pdf=no 19456f5dd5c2Smrgelse 19466f5dd5c2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 19476f5dd5c2Smrgfi 19486f5dd5c2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 19496f5dd5c2Smrg]) # XORG_WITH_PS2PDF 19506f5dd5c2Smrg 19516f5dd5c2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 19526f5dd5c2Smrg# ---------------- 19536f5dd5c2Smrg# Minimum version: 1.6.0 19546f5dd5c2Smrg# 19556f5dd5c2Smrg# Documentation tools are not always available on all platforms and sometimes 19566f5dd5c2Smrg# not at the appropriate level. This macro enables a builder to skip all 19576f5dd5c2Smrg# documentation targets except traditional man pages. 19586f5dd5c2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 19596f5dd5c2Smrg# maximum flexibilty in controlling documentation building. 19606f5dd5c2Smrg# Refer to: 19616f5dd5c2Smrg# XORG_WITH_XMLTO --with-xmlto 19626f5dd5c2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 19636f5dd5c2Smrg# XORG_WITH_DOXYGEN --with-doxygen 19646f5dd5c2Smrg# XORG_WITH_FOP --with-fop 19656f5dd5c2Smrg# XORG_WITH_GROFF --with-groff 19666f5dd5c2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 19676f5dd5c2Smrg# 19686f5dd5c2Smrg# Interface to module: 19696f5dd5c2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 19706f5dd5c2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 19716f5dd5c2Smrg# 'no' user instructs the module not to generate docs 19726f5dd5c2Smrg# parm1: specify the default value, yes or no. 19736f5dd5c2Smrg# 19746f5dd5c2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 19756f5dd5c2Smrgdefault=$1 19766f5dd5c2Smrgif test "x$default" = x ; then 19776f5dd5c2Smrg default="yes" 19786f5dd5c2Smrgfi 19796f5dd5c2SmrgAC_ARG_ENABLE(docs, 19806f5dd5c2Smrg AS_HELP_STRING([--enable-docs], 19816f5dd5c2Smrg [Enable building the documentation (default: yes)]), 19826f5dd5c2Smrg [build_docs=$enableval], [build_docs=$default]) 19836f5dd5c2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 19846f5dd5c2SmrgAC_MSG_CHECKING([whether to build documentation]) 19856f5dd5c2SmrgAC_MSG_RESULT([$build_docs]) 19866f5dd5c2Smrg]) # XORG_ENABLE_DOCS 19876f5dd5c2Smrg 19886f5dd5c2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 19896f5dd5c2Smrg# ---------------- 19906f5dd5c2Smrg# Minimum version: 1.6.0 19916f5dd5c2Smrg# 19926f5dd5c2Smrg# This macro enables a builder to skip all developer documentation. 19936f5dd5c2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 19946f5dd5c2Smrg# maximum flexibilty in controlling documentation building. 19956f5dd5c2Smrg# Refer to: 19966f5dd5c2Smrg# XORG_WITH_XMLTO --with-xmlto 19976f5dd5c2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 19986f5dd5c2Smrg# XORG_WITH_DOXYGEN --with-doxygen 19996f5dd5c2Smrg# XORG_WITH_FOP --with-fop 20006f5dd5c2Smrg# XORG_WITH_GROFF --with-groff 20016f5dd5c2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 20026f5dd5c2Smrg# 20036f5dd5c2Smrg# Interface to module: 20046f5dd5c2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 20056f5dd5c2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 20066f5dd5c2Smrg# 'no' user instructs the module not to generate developer docs 20076f5dd5c2Smrg# parm1: specify the default value, yes or no. 20086f5dd5c2Smrg# 20096f5dd5c2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 20106f5dd5c2Smrgdevel_default=$1 20116f5dd5c2Smrgif test "x$devel_default" = x ; then 20126f5dd5c2Smrg devel_default="yes" 20136f5dd5c2Smrgfi 20146f5dd5c2SmrgAC_ARG_ENABLE(devel-docs, 20156f5dd5c2Smrg AS_HELP_STRING([--enable-devel-docs], 20166f5dd5c2Smrg [Enable building the developer documentation (default: yes)]), 20176f5dd5c2Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 20186f5dd5c2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 20196f5dd5c2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 20206f5dd5c2SmrgAC_MSG_RESULT([$build_devel_docs]) 20216f5dd5c2Smrg]) # XORG_ENABLE_DEVEL_DOCS 20226f5dd5c2Smrg 20236f5dd5c2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 20246f5dd5c2Smrg# ---------------- 20256f5dd5c2Smrg# Minimum version: 1.6.0 20266f5dd5c2Smrg# 20276f5dd5c2Smrg# This macro enables a builder to skip all functional specification targets. 20286f5dd5c2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 20296f5dd5c2Smrg# maximum flexibilty in controlling documentation building. 20306f5dd5c2Smrg# Refer to: 20316f5dd5c2Smrg# XORG_WITH_XMLTO --with-xmlto 20326f5dd5c2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 20336f5dd5c2Smrg# XORG_WITH_DOXYGEN --with-doxygen 20346f5dd5c2Smrg# XORG_WITH_FOP --with-fop 20356f5dd5c2Smrg# XORG_WITH_GROFF --with-groff 20366f5dd5c2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 20376f5dd5c2Smrg# 20386f5dd5c2Smrg# Interface to module: 20396f5dd5c2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 20406f5dd5c2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 20416f5dd5c2Smrg# 'no' user instructs the module not to generate specs 20426f5dd5c2Smrg# parm1: specify the default value, yes or no. 20436f5dd5c2Smrg# 20446f5dd5c2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 20456f5dd5c2Smrgspec_default=$1 20466f5dd5c2Smrgif test "x$spec_default" = x ; then 20476f5dd5c2Smrg spec_default="yes" 20486f5dd5c2Smrgfi 20496f5dd5c2SmrgAC_ARG_ENABLE(specs, 20506f5dd5c2Smrg AS_HELP_STRING([--enable-specs], 20516f5dd5c2Smrg [Enable building the specs (default: yes)]), 20526f5dd5c2Smrg [build_specs=$enableval], [build_specs=$spec_default]) 20536f5dd5c2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 20546f5dd5c2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 20556f5dd5c2SmrgAC_MSG_RESULT([$build_specs]) 20566f5dd5c2Smrg]) # XORG_ENABLE_SPECS 20576f5dd5c2Smrg 20586600fe5bSmrg# XORG_CHECK_MALLOC_ZERO 20596600fe5bSmrg# ---------------------- 20606600fe5bSmrg# Minimum version: 1.0.0 20616600fe5bSmrg# 20626600fe5bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 20636600fe5bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 20646600fe5bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 20656600fe5bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 20666600fe5bSmrgAC_ARG_ENABLE(malloc0returnsnull, 20676600fe5bSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 20686600fe5bSmrg [malloc(0) returns NULL (default: auto)]), 20696600fe5bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 20706600fe5bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2071a0195d5fSmrg 20726600fe5bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 20736600fe5bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 20746600fe5bSmrg AC_RUN_IFELSE([ 20756600fe5bSmrgchar *malloc(); 20766600fe5bSmrgchar *realloc(); 20776600fe5bSmrgchar *calloc(); 20786600fe5bSmrgmain() { 20796600fe5bSmrg char *m0, *r0, *c0, *p; 20806600fe5bSmrg m0 = malloc(0); 20816600fe5bSmrg p = malloc(10); 20826600fe5bSmrg r0 = realloc(p,0); 20836600fe5bSmrg c0 = calloc(0); 20846600fe5bSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 20856600fe5bSmrg}], 20866600fe5bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 20876f5dd5c2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 20886f5dd5c2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 20896600fe5bSmrgfi 20906600fe5bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2091a0195d5fSmrg 20926600fe5bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 20936600fe5bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 20946600fe5bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 20956600fe5bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 20966600fe5bSmrgelse 20976600fe5bSmrg MALLOC_ZERO_CFLAGS="" 20986600fe5bSmrg XMALLOC_ZERO_CFLAGS="" 20996600fe5bSmrg XTMALLOC_ZERO_CFLAGS="" 21006600fe5bSmrgfi 2101a0195d5fSmrg 21026600fe5bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 21036600fe5bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 21046600fe5bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 21056600fe5bSmrg]) # XORG_CHECK_MALLOC_ZERO 2106a0195d5fSmrg 21076600fe5bSmrg# XORG_WITH_LINT() 21086600fe5bSmrg# ---------------- 21096600fe5bSmrg# Minimum version: 1.1.0 21106600fe5bSmrg# 21116f5dd5c2Smrg# This macro enables the use of a tool that flags some suspicious and 21126f5dd5c2Smrg# non-portable constructs (likely to be bugs) in C language source code. 21136f5dd5c2Smrg# It will attempt to locate the tool and use appropriate options. 21146f5dd5c2Smrg# There are various lint type tools on different platforms. 21156f5dd5c2Smrg# 21166f5dd5c2Smrg# Interface to module: 21176f5dd5c2Smrg# LINT: returns the path to the tool found on the platform 21186f5dd5c2Smrg# or the value set to LINT on the configure cmd line 21196f5dd5c2Smrg# also an Automake conditional 21206f5dd5c2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 21216f5dd5c2Smrg# 21226f5dd5c2Smrg# --with-lint: 'yes' user instructs the module to use lint 21236f5dd5c2Smrg# 'no' user instructs the module not to use lint (default) 21246f5dd5c2Smrg# 21256f5dd5c2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 21266f5dd5c2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 21276600fe5bSmrg# 21286600fe5bSmrgAC_DEFUN([XORG_WITH_LINT],[ 21296600fe5bSmrg 21306f5dd5c2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 21316f5dd5c2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 21326600fe5bSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 21336600fe5bSmrg [Use a lint-style source code checker (default: disabled)])], 21346600fe5bSmrg [use_lint=$withval], [use_lint=no]) 21356f5dd5c2Smrg 21366f5dd5c2Smrg# Obtain platform specific info like program name and options 21376f5dd5c2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 21386f5dd5c2Smrgcase $host_os in 21396f5dd5c2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 21406f5dd5c2Smrg lint_name=splint 21416f5dd5c2Smrg lint_options="-badflag" 21426f5dd5c2Smrg ;; 21436f5dd5c2Smrg *freebsd* | *netbsd*) 21446f5dd5c2Smrg lint_name=lint 21456f5dd5c2Smrg lint_options="-u -b" 21466f5dd5c2Smrg ;; 21476f5dd5c2Smrg *solaris*) 21486f5dd5c2Smrg lint_name=lint 21496f5dd5c2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 21506f5dd5c2Smrg ;; 21516f5dd5c2Smrgesac 21526f5dd5c2Smrg 21536f5dd5c2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 21546f5dd5c2Smrgif test "x$use_lint" = x"yes" ; then 21556f5dd5c2Smrg AC_PATH_PROG([LINT], [$lint_name]) 21566f5dd5c2Smrg if test "x$LINT" = "x"; then 21576f5dd5c2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 21586f5dd5c2Smrg fi 21596f5dd5c2Smrgelif test "x$use_lint" = x"no" ; then 21606f5dd5c2Smrg if test "x$LINT" != "x"; then 21616f5dd5c2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 21626f5dd5c2Smrg fi 21636600fe5bSmrgelse 21646f5dd5c2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2165a0195d5fSmrgfi 21666f5dd5c2Smrg 21676f5dd5c2Smrg# User supplied flags override default flags 21686f5dd5c2Smrgif test "x$LINT_FLAGS" != "x"; then 21696f5dd5c2Smrg lint_options=$LINT_FLAGS 2170a0195d5fSmrgfi 2171a0195d5fSmrg 21726f5dd5c2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 21736f5dd5c2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2174a0195d5fSmrg 21756600fe5bSmrg]) # XORG_WITH_LINT 2176a0195d5fSmrg 21776600fe5bSmrg# XORG_LINT_LIBRARY(LIBNAME) 21786600fe5bSmrg# -------------------------- 21796600fe5bSmrg# Minimum version: 1.1.0 21806600fe5bSmrg# 21816600fe5bSmrg# Sets up flags for building lint libraries for checking programs that call 21826600fe5bSmrg# functions in the library. 21836600fe5bSmrg# 21846f5dd5c2Smrg# Interface to module: 21856f5dd5c2Smrg# LINTLIB - Automake variable with the name of lint library file to make 21866f5dd5c2Smrg# MAKE_LINT_LIB - Automake conditional 21876f5dd5c2Smrg# 21886f5dd5c2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 21896f5dd5c2Smrg# - 'no' user instructs the module not to create a lint library (default) 2190a0195d5fSmrg 21916600fe5bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 21926600fe5bSmrgAC_REQUIRE([XORG_WITH_LINT]) 21936600fe5bSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 21946600fe5bSmrg [Create lint library (default: disabled)])], 21956600fe5bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 21966f5dd5c2Smrg 21976f5dd5c2Smrgif test "x$make_lint_lib" = x"yes" ; then 21986f5dd5c2Smrg LINTLIB=llib-l$1.ln 21996f5dd5c2Smrg if test "x$LINT" = "x"; then 22006f5dd5c2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 22016f5dd5c2Smrg fi 22026f5dd5c2Smrgelif test "x$make_lint_lib" != x"no" ; then 22036f5dd5c2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 22046600fe5bSmrgfi 22056f5dd5c2Smrg 22066600fe5bSmrgAC_SUBST(LINTLIB) 22076600fe5bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2208a0195d5fSmrg 22096600fe5bSmrg]) # XORG_LINT_LIBRARY 2210a0195d5fSmrg 22116600fe5bSmrg# XORG_CWARNFLAGS 22126600fe5bSmrg# --------------- 22136600fe5bSmrg# Minimum version: 1.2.0 22146600fe5bSmrg# 22156600fe5bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 22166600fe5bSmrg# 22176600fe5bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 22186f5dd5c2SmrgAC_REQUIRE([AC_PROG_CC_C99]) 22196600fe5bSmrgif test "x$GCC" = xyes ; then 22206600fe5bSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 22216600fe5bSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 22226f5dd5c2Smrg-Wbad-function-cast -Wformat=2" 22236600fe5bSmrg case `$CC -dumpversion` in 22246600fe5bSmrg 3.4.* | 4.*) 22256600fe5bSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 22266600fe5bSmrg ;; 22276600fe5bSmrg esac 2228a0195d5fSmrgelse 22296600fe5bSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 22306600fe5bSmrg if test "x$SUNCC" = "xyes"; then 22316600fe5bSmrg CWARNFLAGS="-v" 22326600fe5bSmrg fi 2233a0195d5fSmrgfi 22346600fe5bSmrgAC_SUBST(CWARNFLAGS) 22356600fe5bSmrg]) # XORG_CWARNFLAGS 2236a0195d5fSmrg 22376600fe5bSmrg# XORG_STRICT_OPTION 22386600fe5bSmrg# ----------------------- 22396600fe5bSmrg# Minimum version: 1.3.0 2240a0195d5fSmrg# 22416600fe5bSmrg# Add configure option to enable strict compilation 22426600fe5bSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 22436f5dd5c2Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 22446600fe5bSmrgAC_REQUIRE([AC_PROG_CC_C99]) 22456600fe5bSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 22466600fe5bSmrg 22476600fe5bSmrgAC_ARG_ENABLE(strict-compilation, 22486600fe5bSmrg AS_HELP_STRING([--enable-strict-compilation], 22496600fe5bSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 22506600fe5bSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 22516600fe5bSmrgif test "x$STRICT_COMPILE" = "xyes"; then 22526600fe5bSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 22536600fe5bSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 22546600fe5bSmrg if test "x$GCC" = xyes ; then 22556600fe5bSmrg STRICT_CFLAGS="-pedantic -Werror" 22566600fe5bSmrg elif test "x$SUNCC" = "xyes"; then 22576600fe5bSmrg STRICT_CFLAGS="-errwarn" 22586600fe5bSmrg elif test "x$INTELCC" = "xyes"; then 22596600fe5bSmrg STRICT_CFLAGS="-Werror" 22606600fe5bSmrg fi 22616600fe5bSmrgfi 22626600fe5bSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 22636600fe5bSmrgAC_SUBST([CWARNFLAGS]) 22646600fe5bSmrg]) # XORG_STRICT_OPTION 2265a0195d5fSmrg 22666600fe5bSmrg# XORG_DEFAULT_OPTIONS 22676600fe5bSmrg# -------------------- 22686600fe5bSmrg# Minimum version: 1.3.0 2269a0195d5fSmrg# 22706600fe5bSmrg# Defines default options for X.Org modules. 22716600fe5bSmrg# 22726600fe5bSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 22736f5dd5c2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 22746600fe5bSmrgXORG_CWARNFLAGS 22756600fe5bSmrgXORG_STRICT_OPTION 22766600fe5bSmrgXORG_RELEASE_VERSION 22776600fe5bSmrgXORG_CHANGELOG 22786f5dd5c2SmrgXORG_INSTALL 22796600fe5bSmrgXORG_MANPAGE_SECTIONS 22806f5dd5c2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 22816f5dd5c2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 22826600fe5bSmrg]) # XORG_DEFAULT_OPTIONS 22836f5dd5c2Smrg 22846f5dd5c2Smrg# XORG_INSTALL() 22856f5dd5c2Smrg# ---------------- 22866f5dd5c2Smrg# Minimum version: 1.4.0 22876f5dd5c2Smrg# 22886f5dd5c2Smrg# Defines the variable INSTALL_CMD as the command to copy 22896f5dd5c2Smrg# INSTALL from $prefix/share/util-macros. 22906f5dd5c2Smrg# 22916f5dd5c2SmrgAC_DEFUN([XORG_INSTALL], [ 22926f5dd5c2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 22936f5dd5c2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 22946f5dd5c2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 22956f5dd5c2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 22966f5dd5c2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 22976f5dd5c2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 22986f5dd5c2SmrgAC_SUBST([INSTALL_CMD]) 22996f5dd5c2Smrg]) # XORG_INSTALL 23006600fe5bSmrgdnl Copyright 2005 Red Hat, Inc 23016600fe5bSmrgdnl 23026600fe5bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 23036600fe5bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 23046600fe5bSmrgdnl the above copyright notice appear in all copies and that both that 23056600fe5bSmrgdnl copyright notice and this permission notice appear in supporting 23066600fe5bSmrgdnl documentation. 23076600fe5bSmrgdnl 23086600fe5bSmrgdnl The above copyright notice and this permission notice shall be included 23096600fe5bSmrgdnl in all copies or substantial portions of the Software. 23106600fe5bSmrgdnl 23116600fe5bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23126600fe5bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23136600fe5bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23146600fe5bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 23156600fe5bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 23166600fe5bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23176600fe5bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 23186600fe5bSmrgdnl 23196600fe5bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 23206600fe5bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 23216600fe5bSmrgdnl other dealings in this Software without prior written authorization 23226600fe5bSmrgdnl from the copyright holders. 23236600fe5bSmrgdnl 2324a0195d5fSmrg 23256600fe5bSmrg# XORG_RELEASE_VERSION 23266600fe5bSmrg# -------------------- 23276f5dd5c2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 23286600fe5bSmrg 23296600fe5bSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 23306600fe5bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 23316600fe5bSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 23326600fe5bSmrg [Major version of this package]) 23336600fe5bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 23346600fe5bSmrg if test "x$PVM" = "x"; then 23356600fe5bSmrg PVM="0" 23366600fe5bSmrg fi 23376600fe5bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 23386600fe5bSmrg [$PVM], 23396600fe5bSmrg [Minor version of this package]) 23406600fe5bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 23416600fe5bSmrg if test "x$PVP" = "x"; then 23426600fe5bSmrg PVP="0" 23436600fe5bSmrg fi 23446600fe5bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 23456600fe5bSmrg [$PVP], 23466600fe5bSmrg [Patch version of this package]) 23476600fe5bSmrg]) 2348a0195d5fSmrg 23496600fe5bSmrg# XORG_CHANGELOG() 23506600fe5bSmrg# ---------------- 23516600fe5bSmrg# Minimum version: 1.2.0 23526600fe5bSmrg# 23536600fe5bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 23546600fe5bSmrg# ChangeLog from git. 23556600fe5bSmrg# 23566600fe5bSmrg# 23576600fe5bSmrgAC_DEFUN([XORG_CHANGELOG], [ 23586f5dd5c2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 23596f5dd5c2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 23606f5dd5c2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 23616600fe5bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 23626600fe5bSmrgAC_SUBST([CHANGELOG_CMD]) 23636600fe5bSmrg]) # XORG_CHANGELOG 2364a0195d5fSmrg 2365