aclocal.m4 revision 5b944e2a
15b944e2aSmrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 2b1297603Smrg 3b1297603Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 45b944e2aSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5b1297603Smrg# This file is free software; the Free Software Foundation 6b1297603Smrg# gives unlimited permission to copy and/or distribute it, 7b1297603Smrg# with or without modifications, as long as this notice is preserved. 8b1297603Smrg 9b1297603Smrg# This program is distributed in the hope that it will be useful, 10b1297603Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11b1297603Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12b1297603Smrg# PARTICULAR PURPOSE. 13b1297603Smrg 145b944e2aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 155b944e2aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 165b944e2aSmrgm4_if(AC_AUTOCONF_VERSION, [2.63],, 175b944e2aSmrg[m4_warning([this file was generated for autoconf 2.63. 185b944e2aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 195b944e2aSmrgIf you have problems, you may need to regenerate the build system entirely. 205b944e2aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 215b944e2aSmrg 22b1297603Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 23b1297603Smrg# 24b1297603Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 25b1297603Smrg# 26b1297603Smrg# This program is free software; you can redistribute it and/or modify 27b1297603Smrg# it under the terms of the GNU General Public License as published by 28b1297603Smrg# the Free Software Foundation; either version 2 of the License, or 29b1297603Smrg# (at your option) any later version. 30b1297603Smrg# 31b1297603Smrg# This program is distributed in the hope that it will be useful, but 32b1297603Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 33b1297603Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 34b1297603Smrg# General Public License for more details. 35b1297603Smrg# 36b1297603Smrg# You should have received a copy of the GNU General Public License 37b1297603Smrg# along with this program; if not, write to the Free Software 38b1297603Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 39b1297603Smrg# 40b1297603Smrg# As a special exception to the GNU General Public License, if you 41b1297603Smrg# distribute this file as part of a program that contains a 42b1297603Smrg# configuration script generated by Autoconf, you may include it under 43b1297603Smrg# the same distribution terms that you use for the rest of that program. 44b1297603Smrg 45b1297603Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 46b1297603Smrg# ---------------------------------- 47b1297603SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 48b1297603Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 49b1297603Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 50b1297603SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 51b1297603Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 52b1297603Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 53b1297603Smrgfi 54b1297603Smrgif test -n "$PKG_CONFIG"; then 55b1297603Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 56b1297603Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 57b1297603Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 58b1297603Smrg AC_MSG_RESULT([yes]) 59b1297603Smrg else 60b1297603Smrg AC_MSG_RESULT([no]) 61b1297603Smrg PKG_CONFIG="" 62b1297603Smrg fi 63b1297603Smrg 64b1297603Smrgfi[]dnl 65b1297603Smrg])# PKG_PROG_PKG_CONFIG 66b1297603Smrg 67b1297603Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 68b1297603Smrg# 69b1297603Smrg# Check to see whether a particular set of modules exists. Similar 70b1297603Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 71b1297603Smrg# 72b1297603Smrg# 73b1297603Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 74b1297603Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 75b1297603Smrg# PKG_CHECK_EXISTS manually 76b1297603Smrg# -------------------------------------------------------------- 77b1297603SmrgAC_DEFUN([PKG_CHECK_EXISTS], 78b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 79b1297603Smrgif test -n "$PKG_CONFIG" && \ 80b1297603Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 81b1297603Smrg m4_ifval([$2], [$2], [:]) 82b1297603Smrgm4_ifvaln([$3], [else 83b1297603Smrg $3])dnl 84b1297603Smrgfi]) 85b1297603Smrg 86b1297603Smrg 87b1297603Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 88b1297603Smrg# --------------------------------------------- 89b1297603Smrgm4_define([_PKG_CONFIG], 905b944e2aSmrg[if test -n "$$1"; then 915b944e2aSmrg pkg_cv_[]$1="$$1" 925b944e2aSmrg elif test -n "$PKG_CONFIG"; then 935b944e2aSmrg PKG_CHECK_EXISTS([$3], 945b944e2aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 955b944e2aSmrg [pkg_failed=yes]) 965b944e2aSmrg else 975b944e2aSmrg pkg_failed=untried 98b1297603Smrgfi[]dnl 99b1297603Smrg])# _PKG_CONFIG 100b1297603Smrg 101b1297603Smrg# _PKG_SHORT_ERRORS_SUPPORTED 102b1297603Smrg# ----------------------------- 103b1297603SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 104b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 105b1297603Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 106b1297603Smrg _pkg_short_errors_supported=yes 107b1297603Smrgelse 108b1297603Smrg _pkg_short_errors_supported=no 109b1297603Smrgfi[]dnl 110b1297603Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 111b1297603Smrg 112b1297603Smrg 113b1297603Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 114b1297603Smrg# [ACTION-IF-NOT-FOUND]) 115b1297603Smrg# 116b1297603Smrg# 117b1297603Smrg# Note that if there is a possibility the first call to 118b1297603Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 119b1297603Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 120b1297603Smrg# 121b1297603Smrg# 122b1297603Smrg# -------------------------------------------------------------- 123b1297603SmrgAC_DEFUN([PKG_CHECK_MODULES], 124b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 125b1297603SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 126b1297603SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 127b1297603Smrg 128b1297603Smrgpkg_failed=no 129b1297603SmrgAC_MSG_CHECKING([for $1]) 130b1297603Smrg 131b1297603Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 132b1297603Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 133b1297603Smrg 134b1297603Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 135b1297603Smrgand $1[]_LIBS to avoid the need to call pkg-config. 136b1297603SmrgSee the pkg-config man page for more details.]) 137b1297603Smrg 138b1297603Smrgif test $pkg_failed = yes; then 139b1297603Smrg _PKG_SHORT_ERRORS_SUPPORTED 140b1297603Smrg if test $_pkg_short_errors_supported = yes; then 1415b944e2aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 142b1297603Smrg else 1435b944e2aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 144b1297603Smrg fi 145b1297603Smrg # Put the nasty error message in config.log where it belongs 146b1297603Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 147b1297603Smrg 148b1297603Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 149b1297603Smrg[Package requirements ($2) were not met: 150b1297603Smrg 151b1297603Smrg$$1_PKG_ERRORS 152b1297603Smrg 153b1297603SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 154b1297603Smrginstalled software in a non-standard prefix. 155b1297603Smrg 156b1297603Smrg_PKG_TEXT 157b1297603Smrg])], 158b1297603Smrg [AC_MSG_RESULT([no]) 159b1297603Smrg $4]) 160b1297603Smrgelif test $pkg_failed = untried; then 161b1297603Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 162b1297603Smrg[The pkg-config script could not be found or is too old. Make sure it 163b1297603Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 164b1297603Smrgpath to pkg-config. 165b1297603Smrg 166b1297603Smrg_PKG_TEXT 167b1297603Smrg 1685b944e2aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 169b1297603Smrg [$4]) 170b1297603Smrgelse 171b1297603Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 172b1297603Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 173b1297603Smrg AC_MSG_RESULT([yes]) 174b1297603Smrg ifelse([$3], , :, [$3]) 175b1297603Smrgfi[]dnl 176b1297603Smrg])# PKG_CHECK_MODULES 177b1297603Smrg 1785b944e2aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 1795b944e2aSmrg# 1805b944e2aSmrg# This file is free software; the Free Software Foundation 1815b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 1825b944e2aSmrg# with or without modifications, as long as this notice is preserved. 183b1297603Smrg 1845b944e2aSmrg# AM_AUTOMAKE_VERSION(VERSION) 1855b944e2aSmrg# ---------------------------- 1865b944e2aSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1875b944e2aSmrg# generated from the m4 files accompanying Automake X.Y. 1885b944e2aSmrg# (This private macro should not be called outside this file.) 1895b944e2aSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1905b944e2aSmrg[am__api_version='1.10' 1915b944e2aSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1925b944e2aSmrgdnl require some minimum version. Point them to the right macro. 1935b944e2aSmrgm4_if([$1], [1.10.1], [], 1945b944e2aSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1955b944e2aSmrg]) 1965b944e2aSmrg 1975b944e2aSmrg# _AM_AUTOCONF_VERSION(VERSION) 1985b944e2aSmrg# ----------------------------- 1995b944e2aSmrg# aclocal traces this macro to find the Autoconf version. 2005b944e2aSmrg# This is a private macro too. Using m4_define simplifies 2015b944e2aSmrg# the logic in aclocal, which can simply ignore this definition. 2025b944e2aSmrgm4_define([_AM_AUTOCONF_VERSION], []) 2035b944e2aSmrg 2045b944e2aSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 2055b944e2aSmrg# ------------------------------- 2065b944e2aSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 2075b944e2aSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 2085b944e2aSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2095b944e2aSmrg[AM_AUTOMAKE_VERSION([1.10.1])dnl 2105b944e2aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 2115b944e2aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 2125b944e2aSmrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 2135b944e2aSmrg 2145b944e2aSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2155b944e2aSmrg 2165b944e2aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 217b1297603Smrg# 2185b944e2aSmrg# This file is free software; the Free Software Foundation 2195b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 2205b944e2aSmrg# with or without modifications, as long as this notice is preserved. 2215b944e2aSmrg 2225b944e2aSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 2235b944e2aSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 2245b944e2aSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 225b1297603Smrg# 2265b944e2aSmrg# Of course, Automake must honor this variable whenever it calls a 2275b944e2aSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 2285b944e2aSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 2295b944e2aSmrg# depending on how configure is run. This is pretty annoying, since 2305b944e2aSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2315b944e2aSmrg# source directory, any form will work fine, but in subdirectories a 2325b944e2aSmrg# relative path needs to be adjusted first. 233b1297603Smrg# 2345b944e2aSmrg# $ac_aux_dir/missing 2355b944e2aSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 2365b944e2aSmrg# $top_srcdir/$ac_aux_dir/missing 2375b944e2aSmrg# fails if $ac_aux_dir is absolute, 2385b944e2aSmrg# fails when called from a subdirectory in a VPATH build with 2395b944e2aSmrg# a relative $ac_aux_dir 240b1297603Smrg# 2415b944e2aSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 2425b944e2aSmrg# are both prefixed by $srcdir. In an in-source build this is usually 2435b944e2aSmrg# harmless because $srcdir is `.', but things will broke when you 2445b944e2aSmrg# start a VPATH build or use an absolute $srcdir. 2455b944e2aSmrg# 2465b944e2aSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 2475b944e2aSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 2485b944e2aSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 2495b944e2aSmrg# and then we would define $MISSING as 2505b944e2aSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 2515b944e2aSmrg# This will work as long as MISSING is not called from configure, because 2525b944e2aSmrg# unfortunately $(top_srcdir) has no meaning in configure. 2535b944e2aSmrg# However there are other variables, like CC, which are often used in 2545b944e2aSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 2555b944e2aSmrg# 2565b944e2aSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 2575b944e2aSmrg# absolute PATH. The drawback is that using absolute paths prevent a 2585b944e2aSmrg# configured tree to be moved without reconfiguration. 259b1297603Smrg 2605b944e2aSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 2615b944e2aSmrg[dnl Rely on autoconf to set up CDPATH properly. 2625b944e2aSmrgAC_PREREQ([2.50])dnl 2635b944e2aSmrg# expand $ac_aux_dir to an absolute path 2645b944e2aSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 2655b944e2aSmrg]) 2665b944e2aSmrg 2675b944e2aSmrg# AM_CONDITIONAL -*- Autoconf -*- 2685b944e2aSmrg 2695b944e2aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 2705b944e2aSmrg# Free Software Foundation, Inc. 271b1297603Smrg# 2725b944e2aSmrg# This file is free software; the Free Software Foundation 2735b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 2745b944e2aSmrg# with or without modifications, as long as this notice is preserved. 275b1297603Smrg 2765b944e2aSmrg# serial 8 277b1297603Smrg 2785b944e2aSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 2795b944e2aSmrg# ------------------------------------- 2805b944e2aSmrg# Define a conditional. 2815b944e2aSmrgAC_DEFUN([AM_CONDITIONAL], 2825b944e2aSmrg[AC_PREREQ(2.52)dnl 2835b944e2aSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 2845b944e2aSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 2855b944e2aSmrgAC_SUBST([$1_TRUE])dnl 2865b944e2aSmrgAC_SUBST([$1_FALSE])dnl 2875b944e2aSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 2885b944e2aSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 2895b944e2aSmrgif $2; then 2905b944e2aSmrg $1_TRUE= 2915b944e2aSmrg $1_FALSE='#' 292b1297603Smrgelse 2935b944e2aSmrg $1_TRUE='#' 2945b944e2aSmrg $1_FALSE= 295b1297603Smrgfi 2965b944e2aSmrgAC_CONFIG_COMMANDS_PRE( 2975b944e2aSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 2985b944e2aSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 2995b944e2aSmrgUsually this means the macro was only invoked conditionally.]]) 3005b944e2aSmrgfi])]) 301b1297603Smrg 3025b944e2aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 3035b944e2aSmrg# Free Software Foundation, Inc. 304b1297603Smrg# 3055b944e2aSmrg# This file is free software; the Free Software Foundation 3065b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 3075b944e2aSmrg# with or without modifications, as long as this notice is preserved. 308b1297603Smrg 3095b944e2aSmrg# serial 9 310b1297603Smrg 3115b944e2aSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 3125b944e2aSmrg# written in clear, in which case automake, when reading aclocal.m4, 3135b944e2aSmrg# will think it sees a *use*, and therefore will trigger all it's 3145b944e2aSmrg# C support machinery. Also note that it means that autoscan, seeing 3155b944e2aSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 316b1297603Smrg 317b1297603Smrg 3185b944e2aSmrg# _AM_DEPENDENCIES(NAME) 3195b944e2aSmrg# ---------------------- 3205b944e2aSmrg# See how the compiler implements dependency checking. 3215b944e2aSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 3225b944e2aSmrg# We try a few techniques and use that to set a single cache variable. 3235b944e2aSmrg# 3245b944e2aSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 3255b944e2aSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 3265b944e2aSmrg# dependency, and given that the user is not expected to run this macro, 3275b944e2aSmrg# just rely on AC_PROG_CC. 3285b944e2aSmrgAC_DEFUN([_AM_DEPENDENCIES], 3295b944e2aSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 3305b944e2aSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 3315b944e2aSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 3325b944e2aSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 333b1297603Smrg 3345b944e2aSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 3355b944e2aSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 3365b944e2aSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 3375b944e2aSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 3385b944e2aSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 3395b944e2aSmrg [depcc="$$1" am_compiler_list=]) 340b1297603Smrg 3415b944e2aSmrgAC_CACHE_CHECK([dependency style of $depcc], 3425b944e2aSmrg [am_cv_$1_dependencies_compiler_type], 3435b944e2aSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 3445b944e2aSmrg # We make a subdir and do the tests there. Otherwise we can end up 3455b944e2aSmrg # making bogus files that we don't know about and never remove. For 3465b944e2aSmrg # instance it was reported that on HP-UX the gcc test will end up 3475b944e2aSmrg # making a dummy file named `D' -- because `-MD' means `put the output 3485b944e2aSmrg # in D'. 3495b944e2aSmrg mkdir conftest.dir 3505b944e2aSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 3515b944e2aSmrg # using a relative directory. 3525b944e2aSmrg cp "$am_depcomp" conftest.dir 3535b944e2aSmrg cd conftest.dir 3545b944e2aSmrg # We will build objects and dependencies in a subdirectory because 3555b944e2aSmrg # it helps to detect inapplicable dependency modes. For instance 3565b944e2aSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 3575b944e2aSmrg # side effect of compilation, but ICC will put the dependencies in 3585b944e2aSmrg # the current directory while Tru64 will put them in the object 3595b944e2aSmrg # directory. 3605b944e2aSmrg mkdir sub 361b1297603Smrg 3625b944e2aSmrg am_cv_$1_dependencies_compiler_type=none 3635b944e2aSmrg if test "$am_compiler_list" = ""; then 3645b944e2aSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 3655b944e2aSmrg fi 3665b944e2aSmrg for depmode in $am_compiler_list; do 3675b944e2aSmrg # Setup a source with many dependencies, because some compilers 3685b944e2aSmrg # like to wrap large dependency lists on column 80 (with \), and 3695b944e2aSmrg # we should not choose a depcomp mode which is confused by this. 3705b944e2aSmrg # 3715b944e2aSmrg # We need to recreate these files for each test, as the compiler may 3725b944e2aSmrg # overwrite some of them when testing with obscure command lines. 3735b944e2aSmrg # This happens at least with the AIX C compiler. 3745b944e2aSmrg : > sub/conftest.c 3755b944e2aSmrg for i in 1 2 3 4 5 6; do 3765b944e2aSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 3775b944e2aSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 3785b944e2aSmrg # Solaris 8's {/usr,}/bin/sh. 3795b944e2aSmrg touch sub/conftst$i.h 3805b944e2aSmrg done 3815b944e2aSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 382b1297603Smrg 3835b944e2aSmrg case $depmode in 3845b944e2aSmrg nosideeffect) 3855b944e2aSmrg # after this tag, mechanisms are not by side-effect, so they'll 3865b944e2aSmrg # only be used when explicitly requested 3875b944e2aSmrg if test "x$enable_dependency_tracking" = xyes; then 3885b944e2aSmrg continue 3895b944e2aSmrg else 3905b944e2aSmrg break 3915b944e2aSmrg fi 3925b944e2aSmrg ;; 3935b944e2aSmrg none) break ;; 3945b944e2aSmrg esac 3955b944e2aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 3965b944e2aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 3975b944e2aSmrg # handle `-M -o', and we need to detect this. 3985b944e2aSmrg if depmode=$depmode \ 3995b944e2aSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 4005b944e2aSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 4015b944e2aSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 4025b944e2aSmrg >/dev/null 2>conftest.err && 4035b944e2aSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 4045b944e2aSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 4055b944e2aSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 4065b944e2aSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 4075b944e2aSmrg # icc doesn't choke on unknown options, it will just issue warnings 4085b944e2aSmrg # or remarks (even with -Werror). So we grep stderr for any message 4095b944e2aSmrg # that says an option was ignored or not supported. 4105b944e2aSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 4115b944e2aSmrg # icc: Command line warning: ignoring option '-M'; no argument required 4125b944e2aSmrg # The diagnosis changed in icc 8.0: 4135b944e2aSmrg # icc: Command line remark: option '-MP' not supported 4145b944e2aSmrg if (grep 'ignoring option' conftest.err || 4155b944e2aSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 4165b944e2aSmrg am_cv_$1_dependencies_compiler_type=$depmode 4175b944e2aSmrg break 4185b944e2aSmrg fi 4195b944e2aSmrg fi 4205b944e2aSmrg done 421b1297603Smrg 4225b944e2aSmrg cd .. 4235b944e2aSmrg rm -rf conftest.dir 424b1297603Smrgelse 4255b944e2aSmrg am_cv_$1_dependencies_compiler_type=none 426b1297603Smrgfi 4275b944e2aSmrg]) 4285b944e2aSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 4295b944e2aSmrgAM_CONDITIONAL([am__fastdep$1], [ 4305b944e2aSmrg test "x$enable_dependency_tracking" != xno \ 4315b944e2aSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 4325b944e2aSmrg]) 433b1297603Smrg 434b1297603Smrg 4355b944e2aSmrg# AM_SET_DEPDIR 4365b944e2aSmrg# ------------- 4375b944e2aSmrg# Choose a directory name for dependency files. 4385b944e2aSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 4395b944e2aSmrgAC_DEFUN([AM_SET_DEPDIR], 4405b944e2aSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 4415b944e2aSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 4425b944e2aSmrg]) 443b1297603Smrg 444b1297603Smrg 4455b944e2aSmrg# AM_DEP_TRACK 4465b944e2aSmrg# ------------ 4475b944e2aSmrgAC_DEFUN([AM_DEP_TRACK], 4485b944e2aSmrg[AC_ARG_ENABLE(dependency-tracking, 4495b944e2aSmrg[ --disable-dependency-tracking speeds up one-time build 4505b944e2aSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 4515b944e2aSmrgif test "x$enable_dependency_tracking" != xno; then 4525b944e2aSmrg am_depcomp="$ac_aux_dir/depcomp" 4535b944e2aSmrg AMDEPBACKSLASH='\' 454b1297603Smrgfi 4555b944e2aSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 4565b944e2aSmrgAC_SUBST([AMDEPBACKSLASH])dnl 4575b944e2aSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 4585b944e2aSmrg]) 459b1297603Smrg 4605b944e2aSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 461b1297603Smrg 4625b944e2aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 4635b944e2aSmrg# Free Software Foundation, Inc. 4645b944e2aSmrg# 4655b944e2aSmrg# This file is free software; the Free Software Foundation 4665b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 4675b944e2aSmrg# with or without modifications, as long as this notice is preserved. 468b1297603Smrg 4695b944e2aSmrg#serial 3 470b1297603Smrg 4715b944e2aSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 4725b944e2aSmrg# ------------------------------ 4735b944e2aSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 4745b944e2aSmrg[for mf in $CONFIG_FILES; do 4755b944e2aSmrg # Strip MF so we end up with the name of the file. 4765b944e2aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 4775b944e2aSmrg # Check whether this is an Automake generated Makefile or not. 4785b944e2aSmrg # We used to match only the files named `Makefile.in', but 4795b944e2aSmrg # some people rename them; so instead we look at the file content. 4805b944e2aSmrg # Grep'ing the first line is not enough: some people post-process 4815b944e2aSmrg # each Makefile.in and add a new line on top of each file to say so. 4825b944e2aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 4835b944e2aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 4845b944e2aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 4855b944e2aSmrg dirpart=`AS_DIRNAME("$mf")` 4865b944e2aSmrg else 4875b944e2aSmrg continue 4885b944e2aSmrg fi 4895b944e2aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 4905b944e2aSmrg # from the Makefile without running `make'. 4915b944e2aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 4925b944e2aSmrg test -z "$DEPDIR" && continue 4935b944e2aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 4945b944e2aSmrg test -z "am__include" && continue 4955b944e2aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 4965b944e2aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 4975b944e2aSmrg U=`sed -n 's/^U = //p' < "$mf"` 4985b944e2aSmrg # Find all dependency output files, they are included files with 4995b944e2aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 5005b944e2aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 5015b944e2aSmrg # expansion. 5025b944e2aSmrg for file in `sed -n " 5035b944e2aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 5045b944e2aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 5055b944e2aSmrg # Make sure the directory exists. 5065b944e2aSmrg test -f "$dirpart/$file" && continue 5075b944e2aSmrg fdir=`AS_DIRNAME(["$file"])` 5085b944e2aSmrg AS_MKDIR_P([$dirpart/$fdir]) 5095b944e2aSmrg # echo "creating $dirpart/$file" 5105b944e2aSmrg echo '# dummy' > "$dirpart/$file" 5115b944e2aSmrg done 5125b944e2aSmrgdone 5135b944e2aSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 514b1297603Smrg 5155b944e2aSmrg 5165b944e2aSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 5175b944e2aSmrg# ----------------------------- 5185b944e2aSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 519b1297603Smrg# 5205b944e2aSmrg# This code is only required when automatic dependency tracking 5215b944e2aSmrg# is enabled. FIXME. This creates each `.P' file that we will 5225b944e2aSmrg# need in order to bootstrap the dependency handling code. 5235b944e2aSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 5245b944e2aSmrg[AC_CONFIG_COMMANDS([depfiles], 5255b944e2aSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 5265b944e2aSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 5275b944e2aSmrg]) 528b1297603Smrg 5295b944e2aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 5305b944e2aSmrg# Free Software Foundation, Inc. 5315b944e2aSmrg# 5325b944e2aSmrg# This file is free software; the Free Software Foundation 5335b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 5345b944e2aSmrg# with or without modifications, as long as this notice is preserved. 535b1297603Smrg 5365b944e2aSmrg# serial 8 537b1297603Smrg 5385b944e2aSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 5395b944e2aSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 540b1297603Smrg 5415b944e2aSmrg# Do all the work for Automake. -*- Autoconf -*- 542b1297603Smrg 5435b944e2aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 5445b944e2aSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 5455b944e2aSmrg# 5465b944e2aSmrg# This file is free software; the Free Software Foundation 5475b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 5485b944e2aSmrg# with or without modifications, as long as this notice is preserved. 5495b944e2aSmrg 5505b944e2aSmrg# serial 13 5515b944e2aSmrg 5525b944e2aSmrg# This macro actually does too much. Some checks are only needed if 5535b944e2aSmrg# your package does certain things. But this isn't really a big deal. 5545b944e2aSmrg 5555b944e2aSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 5565b944e2aSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 5575b944e2aSmrg# ----------------------------------------------- 5585b944e2aSmrg# The call with PACKAGE and VERSION arguments is the old style 5595b944e2aSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 5605b944e2aSmrg# and VERSION should now be passed to AC_INIT and removed from 5615b944e2aSmrg# the call to AM_INIT_AUTOMAKE. 5625b944e2aSmrg# We support both call styles for the transition. After 5635b944e2aSmrg# the next Automake release, Autoconf can make the AC_INIT 5645b944e2aSmrg# arguments mandatory, and then we can depend on a new Autoconf 5655b944e2aSmrg# release and drop the old call support. 5665b944e2aSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 5675b944e2aSmrg[AC_PREREQ([2.60])dnl 5685b944e2aSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 5695b944e2aSmrgdnl the ones we care about. 5705b944e2aSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 5715b944e2aSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 5725b944e2aSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 5735b944e2aSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 5745b944e2aSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 5755b944e2aSmrg # is not polluted with repeated "-I." 5765b944e2aSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 5775b944e2aSmrg # test to see if srcdir already configured 5785b944e2aSmrg if test -f $srcdir/config.status; then 5795b944e2aSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 5805b944e2aSmrg fi 581b1297603Smrgfi 582b1297603Smrg 5835b944e2aSmrg# test whether we have cygpath 5845b944e2aSmrgif test -z "$CYGPATH_W"; then 5855b944e2aSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 5865b944e2aSmrg CYGPATH_W='cygpath -w' 5875b944e2aSmrg else 5885b944e2aSmrg CYGPATH_W=echo 5895b944e2aSmrg fi 590b1297603Smrgfi 5915b944e2aSmrgAC_SUBST([CYGPATH_W]) 592b1297603Smrg 5935b944e2aSmrg# Define the identity of the package. 5945b944e2aSmrgdnl Distinguish between old-style and new-style calls. 5955b944e2aSmrgm4_ifval([$2], 5965b944e2aSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 5975b944e2aSmrg AC_SUBST([PACKAGE], [$1])dnl 5985b944e2aSmrg AC_SUBST([VERSION], [$2])], 5995b944e2aSmrg[_AM_SET_OPTIONS([$1])dnl 6005b944e2aSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 6015b944e2aSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 6025b944e2aSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 6035b944e2aSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6045b944e2aSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 605b1297603Smrg 6065b944e2aSmrg_AM_IF_OPTION([no-define],, 6075b944e2aSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6085b944e2aSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 609b1297603Smrg 6105b944e2aSmrg# Some tools Automake needs. 6115b944e2aSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 6125b944e2aSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 6135b944e2aSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6145b944e2aSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 6155b944e2aSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6165b944e2aSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 6175b944e2aSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 6185b944e2aSmrgAM_PROG_INSTALL_SH 6195b944e2aSmrgAM_PROG_INSTALL_STRIP 6205b944e2aSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 6215b944e2aSmrg# We need awk for the "check" target. The system "awk" is bad on 6225b944e2aSmrg# some platforms. 6235b944e2aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 6245b944e2aSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 6255b944e2aSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 6265b944e2aSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 6275b944e2aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 6285b944e2aSmrg [_AM_PROG_TAR([v7])])]) 6295b944e2aSmrg_AM_IF_OPTION([no-dependencies],, 6305b944e2aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 6315b944e2aSmrg [_AM_DEPENDENCIES(CC)], 6325b944e2aSmrg [define([AC_PROG_CC], 6335b944e2aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 6345b944e2aSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 6355b944e2aSmrg [_AM_DEPENDENCIES(CXX)], 6365b944e2aSmrg [define([AC_PROG_CXX], 6375b944e2aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 6385b944e2aSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 6395b944e2aSmrg [_AM_DEPENDENCIES(OBJC)], 6405b944e2aSmrg [define([AC_PROG_OBJC], 6415b944e2aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 6425b944e2aSmrg]) 6435b944e2aSmrg]) 644b1297603Smrg 645b1297603Smrg 6465b944e2aSmrg# When config.status generates a header, we must update the stamp-h file. 6475b944e2aSmrg# This file resides in the same directory as the config header 6485b944e2aSmrg# that is generated. The stamp files are numbered to have different names. 649b1297603Smrg 6505b944e2aSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6515b944e2aSmrg# loop where config.status creates the headers, so we can generate 6525b944e2aSmrg# our stamp files there. 6535b944e2aSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6545b944e2aSmrg[# Compute $1's index in $config_headers. 6555b944e2aSmrg_am_arg=$1 6565b944e2aSmrg_am_stamp_count=1 6575b944e2aSmrgfor _am_header in $config_headers :; do 6585b944e2aSmrg case $_am_header in 6595b944e2aSmrg $_am_arg | $_am_arg:* ) 6605b944e2aSmrg break ;; 6615b944e2aSmrg * ) 6625b944e2aSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6635b944e2aSmrg esac 6645b944e2aSmrgdone 6655b944e2aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 666b1297603Smrg 6675b944e2aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 668b1297603Smrg# 6695b944e2aSmrg# This file is free software; the Free Software Foundation 6705b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 6715b944e2aSmrg# with or without modifications, as long as this notice is preserved. 6725b944e2aSmrg 6735b944e2aSmrg# AM_PROG_INSTALL_SH 6745b944e2aSmrg# ------------------ 6755b944e2aSmrg# Define $install_sh. 6765b944e2aSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6775b944e2aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6785b944e2aSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 6795b944e2aSmrgAC_SUBST(install_sh)]) 6805b944e2aSmrg 6815b944e2aSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 682b1297603Smrg# 6835b944e2aSmrg# This file is free software; the Free Software Foundation 6845b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 6855b944e2aSmrg# with or without modifications, as long as this notice is preserved. 686b1297603Smrg 6875b944e2aSmrg# serial 2 6885b944e2aSmrg 6895b944e2aSmrg# Check whether the underlying file-system supports filenames 6905b944e2aSmrg# with a leading dot. For instance MS-DOS doesn't. 6915b944e2aSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6925b944e2aSmrg[rm -rf .tst 2>/dev/null 6935b944e2aSmrgmkdir .tst 2>/dev/null 6945b944e2aSmrgif test -d .tst; then 6955b944e2aSmrg am__leading_dot=. 696b1297603Smrgelse 6975b944e2aSmrg am__leading_dot=_ 698b1297603Smrgfi 6995b944e2aSmrgrmdir .tst 2>/dev/null 7005b944e2aSmrgAC_SUBST([am__leading_dot])]) 701b1297603Smrg 7025b944e2aSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 7035b944e2aSmrg# From Jim Meyering 704b1297603Smrg 7055b944e2aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 7065b944e2aSmrg# Free Software Foundation, Inc. 707b1297603Smrg# 7085b944e2aSmrg# This file is free software; the Free Software Foundation 7095b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 7105b944e2aSmrg# with or without modifications, as long as this notice is preserved. 711b1297603Smrg 7125b944e2aSmrg# serial 4 713b1297603Smrg 7145b944e2aSmrgAC_DEFUN([AM_MAINTAINER_MODE], 7155b944e2aSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 7165b944e2aSmrg dnl maintainer-mode is disabled by default 7175b944e2aSmrg AC_ARG_ENABLE(maintainer-mode, 7185b944e2aSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 7195b944e2aSmrg (and sometimes confusing) to the casual installer], 7205b944e2aSmrg USE_MAINTAINER_MODE=$enableval, 7215b944e2aSmrg USE_MAINTAINER_MODE=no) 7225b944e2aSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 7235b944e2aSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 7245b944e2aSmrg MAINT=$MAINTAINER_MODE_TRUE 7255b944e2aSmrg AC_SUBST(MAINT)dnl 7265b944e2aSmrg] 7275b944e2aSmrg) 728b1297603Smrg 7295b944e2aSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 730b1297603Smrg 7315b944e2aSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 732b1297603Smrg 7335b944e2aSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 734b1297603Smrg# 735b1297603Smrg# This file is free software; the Free Software Foundation 736b1297603Smrg# gives unlimited permission to copy and/or distribute it, 737b1297603Smrg# with or without modifications, as long as this notice is preserved. 738b1297603Smrg 7395b944e2aSmrg# serial 3 740b1297603Smrg 7415b944e2aSmrg# AM_MAKE_INCLUDE() 7425b944e2aSmrg# ----------------- 7435b944e2aSmrg# Check to see how make treats includes. 7445b944e2aSmrgAC_DEFUN([AM_MAKE_INCLUDE], 7455b944e2aSmrg[am_make=${MAKE-make} 7465b944e2aSmrgcat > confinc << 'END' 7475b944e2aSmrgam__doit: 7485b944e2aSmrg @echo done 7495b944e2aSmrg.PHONY: am__doit 7505b944e2aSmrgEND 7515b944e2aSmrg# If we don't find an include directive, just comment out the code. 7525b944e2aSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7535b944e2aSmrgam__include="#" 7545b944e2aSmrgam__quote= 7555b944e2aSmrg_am_result=none 7565b944e2aSmrg# First try GNU make style include. 7575b944e2aSmrgecho "include confinc" > confmf 7585b944e2aSmrg# We grep out `Entering directory' and `Leaving directory' 7595b944e2aSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 7605b944e2aSmrg# In particular we don't look at `^make:' because GNU make might 7615b944e2aSmrg# be invoked under some other name (usually "gmake"), in which 7625b944e2aSmrg# case it prints its new name instead of `make'. 7635b944e2aSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7645b944e2aSmrg am__include=include 7655b944e2aSmrg am__quote= 7665b944e2aSmrg _am_result=GNU 7675b944e2aSmrgfi 7685b944e2aSmrg# Now try BSD make style include. 7695b944e2aSmrgif test "$am__include" = "#"; then 7705b944e2aSmrg echo '.include "confinc"' > confmf 7715b944e2aSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7725b944e2aSmrg am__include=.include 7735b944e2aSmrg am__quote="\"" 7745b944e2aSmrg _am_result=BSD 7755b944e2aSmrg fi 7765b944e2aSmrgfi 7775b944e2aSmrgAC_SUBST([am__include]) 7785b944e2aSmrgAC_SUBST([am__quote]) 7795b944e2aSmrgAC_MSG_RESULT([$_am_result]) 7805b944e2aSmrgrm -f confinc confmf 7815b944e2aSmrg]) 782b1297603Smrg 7835b944e2aSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 784b1297603Smrg 7855b944e2aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 7865b944e2aSmrg# Free Software Foundation, Inc. 787b1297603Smrg# 788b1297603Smrg# This file is free software; the Free Software Foundation 789b1297603Smrg# gives unlimited permission to copy and/or distribute it, 790b1297603Smrg# with or without modifications, as long as this notice is preserved. 791b1297603Smrg 7925b944e2aSmrg# serial 5 793b1297603Smrg 7945b944e2aSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7955b944e2aSmrg# ------------------------------ 7965b944e2aSmrgAC_DEFUN([AM_MISSING_PROG], 7975b944e2aSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7985b944e2aSmrg$1=${$1-"${am_missing_run}$2"} 7995b944e2aSmrgAC_SUBST($1)]) 800b1297603Smrg 801b1297603Smrg 8025b944e2aSmrg# AM_MISSING_HAS_RUN 8035b944e2aSmrg# ------------------ 8045b944e2aSmrg# Define MISSING if not defined so far and test if it supports --run. 8055b944e2aSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8065b944e2aSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8075b944e2aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8085b944e2aSmrgAC_REQUIRE_AUX_FILE([missing])dnl 8095b944e2aSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 8105b944e2aSmrg# Use eval to expand $SHELL 8115b944e2aSmrgif eval "$MISSING --run true"; then 8125b944e2aSmrg am_missing_run="$MISSING --run " 8135b944e2aSmrgelse 8145b944e2aSmrg am_missing_run= 8155b944e2aSmrg AC_MSG_WARN([`missing' script is too old or missing]) 8165b944e2aSmrgfi 8175b944e2aSmrg]) 8185b944e2aSmrg 8195b944e2aSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 820b1297603Smrg# 821b1297603Smrg# This file is free software; the Free Software Foundation 822b1297603Smrg# gives unlimited permission to copy and/or distribute it, 823b1297603Smrg# with or without modifications, as long as this notice is preserved. 824b1297603Smrg 8255b944e2aSmrg# AM_PROG_MKDIR_P 8265b944e2aSmrg# --------------- 8275b944e2aSmrg# Check for `mkdir -p'. 8285b944e2aSmrgAC_DEFUN([AM_PROG_MKDIR_P], 8295b944e2aSmrg[AC_PREREQ([2.60])dnl 8305b944e2aSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8315b944e2aSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8325b944e2aSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 8335b944e2aSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8345b944e2aSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8355b944e2aSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8365b944e2aSmrgdnl adjustment using top_builddir (which is defined more often than 8375b944e2aSmrgdnl MKDIR_P). 8385b944e2aSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8395b944e2aSmrgcase $mkdir_p in 8405b944e2aSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 8415b944e2aSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8425b944e2aSmrgesac 8435b944e2aSmrg]) 844b1297603Smrg 8455b944e2aSmrg# Helper functions for option handling. -*- Autoconf -*- 846b1297603Smrg 8475b944e2aSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 848b1297603Smrg# 849b1297603Smrg# This file is free software; the Free Software Foundation 850b1297603Smrg# gives unlimited permission to copy and/or distribute it, 851b1297603Smrg# with or without modifications, as long as this notice is preserved. 852b1297603Smrg 8535b944e2aSmrg# serial 3 854b1297603Smrg 8555b944e2aSmrg# _AM_MANGLE_OPTION(NAME) 8565b944e2aSmrg# ----------------------- 8575b944e2aSmrgAC_DEFUN([_AM_MANGLE_OPTION], 8585b944e2aSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 859b1297603Smrg 8605b944e2aSmrg# _AM_SET_OPTION(NAME) 8615b944e2aSmrg# ------------------------------ 8625b944e2aSmrg# Set option NAME. Presently that only means defining a flag for this option. 8635b944e2aSmrgAC_DEFUN([_AM_SET_OPTION], 8645b944e2aSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 865b1297603Smrg 8665b944e2aSmrg# _AM_SET_OPTIONS(OPTIONS) 8675b944e2aSmrg# ---------------------------------- 8685b944e2aSmrg# OPTIONS is a space-separated list of Automake options. 8695b944e2aSmrgAC_DEFUN([_AM_SET_OPTIONS], 8705b944e2aSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 871b1297603Smrg 8725b944e2aSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8735b944e2aSmrg# ------------------------------------------- 8745b944e2aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8755b944e2aSmrgAC_DEFUN([_AM_IF_OPTION], 8765b944e2aSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 877b1297603Smrg 8785b944e2aSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 879b1297603Smrg 8805b944e2aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8815b944e2aSmrg# Free Software Foundation, Inc. 8825b944e2aSmrg# 8835b944e2aSmrg# This file is free software; the Free Software Foundation 8845b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 8855b944e2aSmrg# with or without modifications, as long as this notice is preserved. 886b1297603Smrg 8875b944e2aSmrg# serial 4 888b1297603Smrg 8895b944e2aSmrg# AM_SANITY_CHECK 8905b944e2aSmrg# --------------- 8915b944e2aSmrgAC_DEFUN([AM_SANITY_CHECK], 8925b944e2aSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8935b944e2aSmrg# Just in case 8945b944e2aSmrgsleep 1 8955b944e2aSmrgecho timestamp > conftest.file 8965b944e2aSmrg# Do `set' in a subshell so we don't clobber the current shell's 8975b944e2aSmrg# arguments. Must try -L first in case configure is actually a 8985b944e2aSmrg# symlink; some systems play weird games with the mod time of symlinks 8995b944e2aSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9005b944e2aSmrg# directory). 9015b944e2aSmrgif ( 9025b944e2aSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 9035b944e2aSmrg if test "$[*]" = "X"; then 9045b944e2aSmrg # -L didn't work. 9055b944e2aSmrg set X `ls -t $srcdir/configure conftest.file` 9065b944e2aSmrg fi 9075b944e2aSmrg rm -f conftest.file 9085b944e2aSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9095b944e2aSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9105b944e2aSmrg 9115b944e2aSmrg # If neither matched, then we have a broken ls. This can happen 9125b944e2aSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9135b944e2aSmrg # broken ls alias from the environment. This has actually 9145b944e2aSmrg # happened. Such a system could not be considered "sane". 9155b944e2aSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9165b944e2aSmrgalias in your environment]) 9175b944e2aSmrg fi 9185b944e2aSmrg 9195b944e2aSmrg test "$[2]" = conftest.file 9205b944e2aSmrg ) 9215b944e2aSmrgthen 9225b944e2aSmrg # Ok. 9235b944e2aSmrg : 924b1297603Smrgelse 9255b944e2aSmrg AC_MSG_ERROR([newly created file is older than distributed files! 9265b944e2aSmrgCheck your system clock]) 927b1297603Smrgfi 9285b944e2aSmrgAC_MSG_RESULT(yes)]) 929b1297603Smrg 9305b944e2aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9315b944e2aSmrg# 9325b944e2aSmrg# This file is free software; the Free Software Foundation 9335b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 9345b944e2aSmrg# with or without modifications, as long as this notice is preserved. 935b1297603Smrg 9365b944e2aSmrg# AM_PROG_INSTALL_STRIP 9375b944e2aSmrg# --------------------- 9385b944e2aSmrg# One issue with vendor `install' (even GNU) is that you can't 9395b944e2aSmrg# specify the program used to strip binaries. This is especially 9405b944e2aSmrg# annoying in cross-compiling environments, where the build's strip 9415b944e2aSmrg# is unlikely to handle the host's binaries. 9425b944e2aSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9435b944e2aSmrg# always use install-sh in `make install-strip', and initialize 9445b944e2aSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9455b944e2aSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9465b944e2aSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9475b944e2aSmrg# Installed binaries are usually stripped using `strip' when the user 9485b944e2aSmrg# run `make install-strip'. However `strip' might not be the right 9495b944e2aSmrg# tool to use in cross-compilation environments, therefore Automake 9505b944e2aSmrg# will honor the `STRIP' environment variable to overrule this program. 9515b944e2aSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9525b944e2aSmrgif test "$cross_compiling" != no; then 9535b944e2aSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9545b944e2aSmrgfi 9555b944e2aSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9565b944e2aSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 957b1297603Smrg 9585b944e2aSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 9595b944e2aSmrg# 9605b944e2aSmrg# This file is free software; the Free Software Foundation 9615b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 9625b944e2aSmrg# with or without modifications, as long as this notice is preserved. 963b1297603Smrg 9645b944e2aSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9655b944e2aSmrg# --------------------------- 9665b944e2aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9675b944e2aSmrg# This macro is traced by Automake. 9685b944e2aSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 969b1297603Smrg 9705b944e2aSmrg# Check how to create a tarball. -*- Autoconf -*- 971b1297603Smrg 9725b944e2aSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 973b1297603Smrg# 974b1297603Smrg# This file is free software; the Free Software Foundation 975b1297603Smrg# gives unlimited permission to copy and/or distribute it, 976b1297603Smrg# with or without modifications, as long as this notice is preserved. 977b1297603Smrg 9785b944e2aSmrg# serial 2 979b1297603Smrg 9805b944e2aSmrg# _AM_PROG_TAR(FORMAT) 9815b944e2aSmrg# -------------------- 9825b944e2aSmrg# Check how to create a tarball in format FORMAT. 9835b944e2aSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9845b944e2aSmrg# 9855b944e2aSmrg# Substitute a variable $(am__tar) that is a command 9865b944e2aSmrg# writing to stdout a FORMAT-tarball containing the directory 9875b944e2aSmrg# $tardir. 9885b944e2aSmrg# tardir=directory && $(am__tar) > result.tar 9895b944e2aSmrg# 9905b944e2aSmrg# Substitute a variable $(am__untar) that extract such 9915b944e2aSmrg# a tarball read from stdin. 9925b944e2aSmrg# $(am__untar) < result.tar 9935b944e2aSmrgAC_DEFUN([_AM_PROG_TAR], 9945b944e2aSmrg[# Always define AMTAR for backward compatibility. 9955b944e2aSmrgAM_MISSING_PROG([AMTAR], [tar]) 9965b944e2aSmrgm4_if([$1], [v7], 9975b944e2aSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9985b944e2aSmrg [m4_case([$1], [ustar],, [pax],, 9995b944e2aSmrg [m4_fatal([Unknown tar format])]) 10005b944e2aSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 10015b944e2aSmrg# Loop over all known methods to create a tar archive until one works. 10025b944e2aSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10035b944e2aSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 10045b944e2aSmrg# Do not fold the above two line into one, because Tru64 sh and 10055b944e2aSmrg# Solaris sh will not grok spaces in the rhs of `-'. 10065b944e2aSmrgfor _am_tool in $_am_tools 10075b944e2aSmrgdo 10085b944e2aSmrg case $_am_tool in 10095b944e2aSmrg gnutar) 10105b944e2aSmrg for _am_tar in tar gnutar gtar; 10115b944e2aSmrg do 10125b944e2aSmrg AM_RUN_LOG([$_am_tar --version]) && break 10135b944e2aSmrg done 10145b944e2aSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10155b944e2aSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10165b944e2aSmrg am__untar="$_am_tar -xf -" 10175b944e2aSmrg ;; 10185b944e2aSmrg plaintar) 10195b944e2aSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 10205b944e2aSmrg # ustar tarball either. 10215b944e2aSmrg (tar --version) >/dev/null 2>&1 && continue 10225b944e2aSmrg am__tar='tar chf - "$$tardir"' 10235b944e2aSmrg am__tar_='tar chf - "$tardir"' 10245b944e2aSmrg am__untar='tar xf -' 10255b944e2aSmrg ;; 10265b944e2aSmrg pax) 10275b944e2aSmrg am__tar='pax -L -x $1 -w "$$tardir"' 10285b944e2aSmrg am__tar_='pax -L -x $1 -w "$tardir"' 10295b944e2aSmrg am__untar='pax -r' 10305b944e2aSmrg ;; 10315b944e2aSmrg cpio) 10325b944e2aSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10335b944e2aSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10345b944e2aSmrg am__untar='cpio -i -H $1 -d' 10355b944e2aSmrg ;; 10365b944e2aSmrg none) 10375b944e2aSmrg am__tar=false 10385b944e2aSmrg am__tar_=false 10395b944e2aSmrg am__untar=false 10405b944e2aSmrg ;; 10415b944e2aSmrg esac 10425b944e2aSmrg 10435b944e2aSmrg # If the value was cached, stop now. We just wanted to have am__tar 10445b944e2aSmrg # and am__untar set. 10455b944e2aSmrg test -n "${am_cv_prog_tar_$1}" && break 10465b944e2aSmrg 10475b944e2aSmrg # tar/untar a dummy directory, and stop if the command works 10485b944e2aSmrg rm -rf conftest.dir 10495b944e2aSmrg mkdir conftest.dir 10505b944e2aSmrg echo GrepMe > conftest.dir/file 10515b944e2aSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10525b944e2aSmrg rm -rf conftest.dir 10535b944e2aSmrg if test -s conftest.tar; then 10545b944e2aSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10555b944e2aSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10565b944e2aSmrg fi 1057b1297603Smrgdone 10585b944e2aSmrgrm -rf conftest.dir 1059b1297603Smrg 10605b944e2aSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10615b944e2aSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10625b944e2aSmrgAC_SUBST([am__tar]) 10635b944e2aSmrgAC_SUBST([am__untar]) 10645b944e2aSmrg]) # _AM_PROG_TAR 1065b1297603Smrg 10665b944e2aSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 10675b944e2aSmrgdnl 10685b944e2aSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 10695b944e2aSmrgdnl 10705b944e2aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10715b944e2aSmrgdnl copy of this software and associated documentation files (the 10725b944e2aSmrgdnl "Software"), to deal in the Software without restriction, including 10735b944e2aSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 10745b944e2aSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 10755b944e2aSmrgdnl to whom the Software is furnished to do so, provided that the above 10765b944e2aSmrgdnl copyright notice(s) and this permission notice appear in all copies of 10775b944e2aSmrgdnl the Software and that both the above copyright notice(s) and this 10785b944e2aSmrgdnl permission notice appear in supporting documentation. 10795b944e2aSmrgdnl 10805b944e2aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10815b944e2aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10825b944e2aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 10835b944e2aSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 10845b944e2aSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 10855b944e2aSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 10865b944e2aSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 10875b944e2aSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 10885b944e2aSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 10895b944e2aSmrgdnl 10905b944e2aSmrgdnl Except as contained in this notice, the name of a copyright holder 10915b944e2aSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 10925b944e2aSmrgdnl or other dealings in this Software without prior written authorization 10935b944e2aSmrgdnl of the copyright holder. 1094b1297603Smrg 10955b944e2aSmrg# XORG_MACROS_VERSION(required-version) 10965b944e2aSmrg# ------------------------------------- 10975b944e2aSmrg# Minimum version: 1.1.0 1098b1297603Smrg# 10995b944e2aSmrg# If you're using a macro added in Version 1.1 or newer, include this in 11005b944e2aSmrg# your configure.ac with the minimum required version, such as: 11015b944e2aSmrg# XORG_MACROS_VERSION(1.1) 11025b944e2aSmrg# 11035b944e2aSmrg# To force at least a version with this macro defined, also add: 11045b944e2aSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 11055b944e2aSmrg# 11065b944e2aSmrg# 11075b944e2aSmrg# See the "minimum version" comment for each macro you use to see what 11085b944e2aSmrg# version you require. 11095b944e2aSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 11105b944e2aSmrg [XORG_MACROS_needed_version=$1 11115b944e2aSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 11125b944e2aSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 11135b944e2aSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 11145b944e2aSmrg [XORG_MACROS_version=1.2.0 11155b944e2aSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 11165b944e2aSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 11175b944e2aSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 11185b944e2aSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 11195b944e2aSmrg fi 11205b944e2aSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 11215b944e2aSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 11225b944e2aSmrg fi 11235b944e2aSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 11245b944e2aSmrg]) # XORG_MACROS_VERSION 1125b1297603Smrg 11265b944e2aSmrg# XORG_PROG_RAWCPP() 11275b944e2aSmrg# ------------------ 11285b944e2aSmrg# Minimum version: 1.0.0 11295b944e2aSmrg# 11305b944e2aSmrg# Find cpp program and necessary flags for use in pre-processing text files 11315b944e2aSmrg# such as man pages and config files 11325b944e2aSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 11335b944e2aSmrgAC_REQUIRE([AC_PROG_CPP]) 11345b944e2aSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 11355b944e2aSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1136b1297603Smrg 11375b944e2aSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 11385b944e2aSmrg# which is not the best choice for supporting other OS'es, but covers most 11395b944e2aSmrg# of the ones we need for now. 11405b944e2aSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 11415b944e2aSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 11425b944e2aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11435b944e2aSmrg AC_MSG_RESULT([no]) 11445b944e2aSmrgelse 11455b944e2aSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11465b944e2aSmrg RAWCPPFLAGS=-undef 11475b944e2aSmrg AC_MSG_RESULT([yes]) 11485b944e2aSmrg # under Cygwin unix is still defined even with -undef 11495b944e2aSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11505b944e2aSmrg RAWCPPFLAGS="-undef -ansi" 11515b944e2aSmrg AC_MSG_RESULT([yes, with -ansi]) 11525b944e2aSmrg else 11535b944e2aSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11545b944e2aSmrg fi 11555b944e2aSmrgfi 11565b944e2aSmrgrm -f conftest.$ac_ext 1157b1297603Smrg 11585b944e2aSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11595b944e2aSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11605b944e2aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11615b944e2aSmrg AC_MSG_RESULT([no]) 11625b944e2aSmrgelse 11635b944e2aSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11645b944e2aSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11655b944e2aSmrg AC_MSG_RESULT([yes]) 11665b944e2aSmrg else 11675b944e2aSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11685b944e2aSmrg fi 11695b944e2aSmrgfi 11705b944e2aSmrgrm -f conftest.$ac_ext 11715b944e2aSmrgAC_SUBST(RAWCPPFLAGS) 11725b944e2aSmrg]) # XORG_PROG_RAWCPP 1173b1297603Smrg 11745b944e2aSmrg# XORG_MANPAGE_SECTIONS() 11755b944e2aSmrg# ----------------------- 11765b944e2aSmrg# Minimum version: 1.0.0 1177b1297603Smrg# 11785b944e2aSmrg# Determine which sections man pages go in for the different man page types 11795b944e2aSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11805b944e2aSmrg# Not sure if there's any better way than just hardcoding by OS name. 11815b944e2aSmrg# Override default settings by setting environment variables 1182b1297603Smrg 11835b944e2aSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11845b944e2aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1185b1297603Smrg 11865b944e2aSmrgif test x$APP_MAN_SUFFIX = x ; then 11875b944e2aSmrg APP_MAN_SUFFIX=1 11885b944e2aSmrgfi 11895b944e2aSmrgif test x$APP_MAN_DIR = x ; then 11905b944e2aSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1191b1297603Smrgfi 1192b1297603Smrg 11935b944e2aSmrgif test x$LIB_MAN_SUFFIX = x ; then 11945b944e2aSmrg LIB_MAN_SUFFIX=3 11955b944e2aSmrgfi 11965b944e2aSmrgif test x$LIB_MAN_DIR = x ; then 11975b944e2aSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1198b1297603Smrgfi 1199b1297603Smrg 12005b944e2aSmrgif test x$FILE_MAN_SUFFIX = x ; then 12015b944e2aSmrg case $host_os in 12025b944e2aSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 12035b944e2aSmrg *) FILE_MAN_SUFFIX=5 ;; 12045b944e2aSmrg esac 12055b944e2aSmrgfi 12065b944e2aSmrgif test x$FILE_MAN_DIR = x ; then 12075b944e2aSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 12085b944e2aSmrgfi 1209b1297603Smrg 12105b944e2aSmrgif test x$MISC_MAN_SUFFIX = x ; then 12115b944e2aSmrg case $host_os in 12125b944e2aSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 12135b944e2aSmrg *) MISC_MAN_SUFFIX=7 ;; 12145b944e2aSmrg esac 12155b944e2aSmrgfi 12165b944e2aSmrgif test x$MISC_MAN_DIR = x ; then 12175b944e2aSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 12185b944e2aSmrgfi 1219b1297603Smrg 12205b944e2aSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 12215b944e2aSmrg case $host_os in 12225b944e2aSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 12235b944e2aSmrg *) DRIVER_MAN_SUFFIX=4 ;; 12245b944e2aSmrg esac 12255b944e2aSmrgfi 12265b944e2aSmrgif test x$DRIVER_MAN_DIR = x ; then 12275b944e2aSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 12285b944e2aSmrgfi 1229b1297603Smrg 12305b944e2aSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 12315b944e2aSmrg case $host_os in 12325b944e2aSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 12335b944e2aSmrg *) ADMIN_MAN_SUFFIX=8 ;; 12345b944e2aSmrg esac 12355b944e2aSmrgfi 12365b944e2aSmrgif test x$ADMIN_MAN_DIR = x ; then 12375b944e2aSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12385b944e2aSmrgfi 1239b1297603Smrg 1240b1297603Smrg 12415b944e2aSmrgAC_SUBST([APP_MAN_SUFFIX]) 12425b944e2aSmrgAC_SUBST([LIB_MAN_SUFFIX]) 12435b944e2aSmrgAC_SUBST([FILE_MAN_SUFFIX]) 12445b944e2aSmrgAC_SUBST([MISC_MAN_SUFFIX]) 12455b944e2aSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12465b944e2aSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12475b944e2aSmrgAC_SUBST([APP_MAN_DIR]) 12485b944e2aSmrgAC_SUBST([LIB_MAN_DIR]) 12495b944e2aSmrgAC_SUBST([FILE_MAN_DIR]) 12505b944e2aSmrgAC_SUBST([MISC_MAN_DIR]) 12515b944e2aSmrgAC_SUBST([DRIVER_MAN_DIR]) 12525b944e2aSmrgAC_SUBST([ADMIN_MAN_DIR]) 12535b944e2aSmrg]) # XORG_MANPAGE_SECTIONS 1254b1297603Smrg 12555b944e2aSmrg# XORG_CHECK_LINUXDOC 12565b944e2aSmrg# ------------------- 12575b944e2aSmrg# Minimum version: 1.0.0 1258b1297603Smrg# 12595b944e2aSmrg# Defines the variable MAKE_TEXT if the necessary tools and 12605b944e2aSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12615b944e2aSmrg# Whether or not the necessary tools and files are found can be checked 12625b944e2aSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12635b944e2aSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12645b944e2aSmrgif test x$XORG_SGML_PATH = x ; then 12655b944e2aSmrg XORG_SGML_PATH=$prefix/share/sgml 12665b944e2aSmrgfi 12675b944e2aSmrgHAVE_DEFS_ENT= 1268b1297603Smrg 12695b944e2aSmrgif test x"$cross_compiling" = x"yes" ; then 12705b944e2aSmrg HAVE_DEFS_ENT=no 12715b944e2aSmrgelse 12725b944e2aSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12735b944e2aSmrgfi 1274b1297603Smrg 12755b944e2aSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12765b944e2aSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1277b1297603Smrg 12785b944e2aSmrgAC_MSG_CHECKING([Whether to build documentation]) 1279b1297603Smrg 12805b944e2aSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 12815b944e2aSmrg BUILDDOC=yes 1282b1297603Smrgelse 12835b944e2aSmrg BUILDDOC=no 1284b1297603Smrgfi 1285b1297603Smrg 12865b944e2aSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1287b1297603Smrg 12885b944e2aSmrgAC_MSG_RESULT([$BUILDDOC]) 1289b1297603Smrg 12905b944e2aSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1291b1297603Smrg 12925b944e2aSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 12935b944e2aSmrg BUILDPDFDOC=yes 12945b944e2aSmrgelse 12955b944e2aSmrg BUILDPDFDOC=no 12965b944e2aSmrgfi 1297b1297603Smrg 12985b944e2aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1299b1297603Smrg 13005b944e2aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1301b1297603Smrg 13025b944e2aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 13035b944e2aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 13045b944e2aSmrgMAKE_PDF="$PS2PDF" 13055b944e2aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1306b1297603Smrg 13075b944e2aSmrgAC_SUBST(MAKE_TEXT) 13085b944e2aSmrgAC_SUBST(MAKE_PS) 13095b944e2aSmrgAC_SUBST(MAKE_PDF) 13105b944e2aSmrgAC_SUBST(MAKE_HTML) 13115b944e2aSmrg]) # XORG_CHECK_LINUXDOC 1312b1297603Smrg 13135b944e2aSmrg# XORG_CHECK_DOCBOOK 13145b944e2aSmrg# ------------------- 13155b944e2aSmrg# Minimum version: 1.0.0 13165b944e2aSmrg# 13175b944e2aSmrg# Checks for the ability to build output formats from SGML DocBook source. 13185b944e2aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 13195b944e2aSmrg# indicates whether the necessary tools and files are found and, if set, 13205b944e2aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 13215b944e2aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 13225b944e2aSmrgif test x$XORG_SGML_PATH = x ; then 13235b944e2aSmrg XORG_SGML_PATH=$prefix/share/sgml 1324b1297603Smrgfi 13255b944e2aSmrgHAVE_DEFS_ENT= 13265b944e2aSmrgBUILDTXTDOC=no 13275b944e2aSmrgBUILDPDFDOC=no 13285b944e2aSmrgBUILDPSDOC=no 13295b944e2aSmrgBUILDHTMLDOC=no 1330b1297603Smrg 13315b944e2aSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1332b1297603Smrg 13335b944e2aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 13345b944e2aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 13355b944e2aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 13365b944e2aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1337b1297603Smrg 13385b944e2aSmrgAC_MSG_CHECKING([Whether to build text documentation]) 13395b944e2aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 13405b944e2aSmrg test x$BUILD_TXTDOC != xno; then 13415b944e2aSmrg BUILDTXTDOC=yes 1342b1297603Smrgfi 13435b944e2aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13445b944e2aSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1345b1297603Smrg 13465b944e2aSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 13475b944e2aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 13485b944e2aSmrg test x$BUILD_PDFDOC != xno; then 13495b944e2aSmrg BUILDPDFDOC=yes 1350b1297603Smrgfi 13515b944e2aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13525b944e2aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1353b1297603Smrg 13545b944e2aSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 13555b944e2aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 13565b944e2aSmrg test x$BUILD_PSDOC != xno; then 13575b944e2aSmrg BUILDPSDOC=yes 13585b944e2aSmrgfi 13595b944e2aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13605b944e2aSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1361b1297603Smrg 13625b944e2aSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 13635b944e2aSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 13645b944e2aSmrg test x$BUILD_HTMLDOC != xno; then 13655b944e2aSmrg BUILDHTMLDOC=yes 13665b944e2aSmrgfi 13675b944e2aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13685b944e2aSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1369b1297603Smrg 13705b944e2aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13715b944e2aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13725b944e2aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13735b944e2aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1374b1297603Smrg 13755b944e2aSmrgAC_SUBST(MAKE_TEXT) 13765b944e2aSmrgAC_SUBST(MAKE_PS) 13775b944e2aSmrgAC_SUBST(MAKE_PDF) 13785b944e2aSmrgAC_SUBST(MAKE_HTML) 13795b944e2aSmrg]) # XORG_CHECK_DOCBOOK 1380b1297603Smrg 13815b944e2aSmrg# XORG_CHECK_MALLOC_ZERO 13825b944e2aSmrg# ---------------------- 13835b944e2aSmrg# Minimum version: 1.0.0 13845b944e2aSmrg# 13855b944e2aSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 13865b944e2aSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 13875b944e2aSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 13885b944e2aSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 13895b944e2aSmrgAC_ARG_ENABLE(malloc0returnsnull, 13905b944e2aSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 13915b944e2aSmrg [malloc(0) returns NULL (default: auto)]), 13925b944e2aSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 13935b944e2aSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1394b1297603Smrg 13955b944e2aSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 13965b944e2aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 13975b944e2aSmrg AC_RUN_IFELSE([ 13985b944e2aSmrgchar *malloc(); 13995b944e2aSmrgchar *realloc(); 14005b944e2aSmrgchar *calloc(); 14015b944e2aSmrgmain() { 14025b944e2aSmrg char *m0, *r0, *c0, *p; 14035b944e2aSmrg m0 = malloc(0); 14045b944e2aSmrg p = malloc(10); 14055b944e2aSmrg r0 = realloc(p,0); 14065b944e2aSmrg c0 = calloc(0); 14075b944e2aSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 14085b944e2aSmrg}], 14095b944e2aSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 14105b944e2aSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 14115b944e2aSmrgfi 14125b944e2aSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1413b1297603Smrg 14145b944e2aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 14155b944e2aSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 14165b944e2aSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 14175b944e2aSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 14185b944e2aSmrgelse 14195b944e2aSmrg MALLOC_ZERO_CFLAGS="" 14205b944e2aSmrg XMALLOC_ZERO_CFLAGS="" 14215b944e2aSmrg XTMALLOC_ZERO_CFLAGS="" 14225b944e2aSmrgfi 1423b1297603Smrg 14245b944e2aSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 14255b944e2aSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 14265b944e2aSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 14275b944e2aSmrg]) # XORG_CHECK_MALLOC_ZERO 1428b1297603Smrg 14295b944e2aSmrg# XORG_WITH_LINT() 14305b944e2aSmrg# ---------------- 14315b944e2aSmrg# Minimum version: 1.1.0 1432b1297603Smrg# 14335b944e2aSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 14345b944e2aSmrg# is specified. (Use --with-lint=sparse for sparse.) 14355b944e2aSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 14365b944e2aSmrg# Sets $LINT_FLAGS to flags to pass to source checker 14375b944e2aSmrg# Sets LINT automake conditional if enabled (default: disabled) 14385b944e2aSmrg# 14395b944e2aSmrgAC_DEFUN([XORG_WITH_LINT],[ 1440b1297603Smrg 14415b944e2aSmrg# Allow checking code with lint, sparse, etc. 14425b944e2aSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 14435b944e2aSmrg [Use a lint-style source code checker (default: disabled)])], 14445b944e2aSmrg [use_lint=$withval], [use_lint=no]) 14455b944e2aSmrgif test "x$use_lint" = "xyes" ; then 14465b944e2aSmrg LINT="lint" 1447b1297603Smrgelse 14485b944e2aSmrg LINT="$use_lint" 14495b944e2aSmrgfi 14505b944e2aSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 14515b944e2aSmrg case $LINT in 14525b944e2aSmrg lint|*/lint) 14535b944e2aSmrg case $host_os in 14545b944e2aSmrg solaris*) 14555b944e2aSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 14565b944e2aSmrg ;; 14575b944e2aSmrg esac 14585b944e2aSmrg ;; 14595b944e2aSmrg esac 1460b1297603Smrgfi 1461b1297603Smrg 14625b944e2aSmrgAC_SUBST(LINT) 14635b944e2aSmrgAC_SUBST(LINT_FLAGS) 14645b944e2aSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 14655b944e2aSmrg 14665b944e2aSmrg]) # XORG_WITH_LINT 14675b944e2aSmrg 14685b944e2aSmrg# XORG_LINT_LIBRARY(LIBNAME) 14695b944e2aSmrg# -------------------------- 14705b944e2aSmrg# Minimum version: 1.1.0 14715b944e2aSmrg# 14725b944e2aSmrg# Sets up flags for building lint libraries for checking programs that call 14735b944e2aSmrg# functions in the library. 14745b944e2aSmrg# Disabled by default, enable with --enable-lint-library 14755b944e2aSmrg# Sets: 14765b944e2aSmrg# @LINTLIB@ - name of lint library file to make 14775b944e2aSmrg# MAKE_LINT_LIB - automake conditional 1478b1297603Smrg# 1479b1297603Smrg 14805b944e2aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 14815b944e2aSmrgAC_REQUIRE([XORG_WITH_LINT]) 14825b944e2aSmrg# Build lint "library" for more indepth checks of programs calling this library 14835b944e2aSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 14845b944e2aSmrg [Create lint library (default: disabled)])], 14855b944e2aSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 14865b944e2aSmrgif test "x$make_lint_lib" != "xno" ; then 14875b944e2aSmrg if test "x$LINT" = "xno" ; then 14885b944e2aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 14895b944e2aSmrg fi 14905b944e2aSmrg if test "x$make_lint_lib" = "xyes" ; then 14915b944e2aSmrg LINTLIB=llib-l$1.ln 14925b944e2aSmrg else 14935b944e2aSmrg LINTLIB=$make_lint_lib 14945b944e2aSmrg fi 1495b1297603Smrgfi 14965b944e2aSmrgAC_SUBST(LINTLIB) 14975b944e2aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1498b1297603Smrg 14995b944e2aSmrg]) # XORG_LINT_LIBRARY 1500b1297603Smrg 15015b944e2aSmrg# XORG_CWARNFLAGS 15025b944e2aSmrg# --------------- 15035b944e2aSmrg# Minimum version: 1.2.0 1504b1297603Smrg# 15055b944e2aSmrg# Defines CWARNFLAGS to enable C compiler warnings. 15065b944e2aSmrg# 15075b944e2aSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 15085b944e2aSmrgAC_REQUIRE([AC_PROG_CC]) 15095b944e2aSmrgif test "x$GCC" = xyes ; then 15105b944e2aSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 15115b944e2aSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 15125b944e2aSmrg-Wbad-function-cast" 15135b944e2aSmrg case `gcc -dumpversion` in 15145b944e2aSmrg 4.*) 15155b944e2aSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 15165b944e2aSmrg ;; 15175b944e2aSmrg esac 15185b944e2aSmrgelse 15195b944e2aSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 15205b944e2aSmrg if test "x$SUNCC" = "xyes"; then 15215b944e2aSmrg CWARNFLAGS="-v" 15225b944e2aSmrg fi 15235b944e2aSmrgfi 15245b944e2aSmrgAC_SUBST(CWARNFLAGS) 15255b944e2aSmrg]) # XORG_CWARNFLAGS 15265b944e2aSmrgdnl Copyright 2005 Red Hat, Inc 15275b944e2aSmrgdnl 15285b944e2aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 15295b944e2aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 15305b944e2aSmrgdnl the above copyright notice appear in all copies and that both that 15315b944e2aSmrgdnl copyright notice and this permission notice appear in supporting 15325b944e2aSmrgdnl documentation. 15335b944e2aSmrgdnl 15345b944e2aSmrgdnl The above copyright notice and this permission notice shall be included 15355b944e2aSmrgdnl in all copies or substantial portions of the Software. 15365b944e2aSmrgdnl 15375b944e2aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15385b944e2aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15395b944e2aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15405b944e2aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 15415b944e2aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15425b944e2aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 15435b944e2aSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 15445b944e2aSmrgdnl 15455b944e2aSmrgdnl Except as contained in this notice, the name of the copyright holders shall 15465b944e2aSmrgdnl not be used in advertising or otherwise to promote the sale, use or 15475b944e2aSmrgdnl other dealings in this Software without prior written authorization 15485b944e2aSmrgdnl from the copyright holders. 15495b944e2aSmrgdnl 1550b1297603Smrg 15515b944e2aSmrg# XORG_RELEASE_VERSION 1552b1297603Smrg# -------------------- 15535b944e2aSmrg# Adds --with/without-release-string and changes the PACKAGE and 15545b944e2aSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 15555b944e2aSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 15565b944e2aSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 15575b944e2aSmrg 15585b944e2aSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 15595b944e2aSmrg AC_ARG_WITH(release-version, 15605b944e2aSmrg AC_HELP_STRING([--with-release-version=STRING], 15615b944e2aSmrg [Use release version string in package name]), 15625b944e2aSmrg [RELEASE_VERSION="$withval"], 15635b944e2aSmrg [RELEASE_VERSION=""]) 15645b944e2aSmrg if test "x$RELEASE_VERSION" != "x"; then 15655b944e2aSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 15665b944e2aSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 15675b944e2aSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 15685b944e2aSmrg fi 15695b944e2aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 15705b944e2aSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 15715b944e2aSmrg [Major version of this package]) 15725b944e2aSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 15735b944e2aSmrg if test "x$PVM" = "x"; then 15745b944e2aSmrg PVM="0" 15755b944e2aSmrg fi 15765b944e2aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 15775b944e2aSmrg [$PVM], 15785b944e2aSmrg [Minor version of this package]) 15795b944e2aSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 15805b944e2aSmrg if test "x$PVP" = "x"; then 15815b944e2aSmrg PVP="0" 15825b944e2aSmrg fi 15835b944e2aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 15845b944e2aSmrg [$PVP], 15855b944e2aSmrg [Patch version of this package]) 15865b944e2aSmrg]) 15875b944e2aSmrg 15885b944e2aSmrg# XORG_CHANGELOG() 15895b944e2aSmrg# ---------------- 15905b944e2aSmrg# Minimum version: 1.2.0 1591b1297603Smrg# 15925b944e2aSmrg# Defines the variable CHANGELOG_CMD as the command to generate 15935b944e2aSmrg# ChangeLog from git. 1594b1297603Smrg# 15955b944e2aSmrgAC_DEFUN([XORG_CHANGELOG], [ 15965b944e2aSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 15975b944e2aSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 15985b944e2aSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 15995b944e2aSmrgAC_SUBST([CHANGELOG_CMD]) 16005b944e2aSmrg]) # XORG_CHANGELOG 1601b1297603Smrg 1602