1fa225cbcSrjs# generated automatically by aclocal 1.11 -*- Autoconf -*- 2fa225cbcSrjs 3fa225cbcSrjs# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4fa225cbcSrjs# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5fa225cbcSrjs# This file is free software; the Free Software Foundation 6fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 7fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 8fa225cbcSrjs 9fa225cbcSrjs# This program is distributed in the hope that it will be useful, 10fa225cbcSrjs# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fa225cbcSrjs# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fa225cbcSrjs# PARTICULAR PURPOSE. 13fa225cbcSrjs 14fa225cbcSrjsm4_ifndef([AC_AUTOCONF_VERSION], 15fa225cbcSrjs [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16fa225cbcSrjsm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, 17fa225cbcSrjs[m4_warning([this file was generated for autoconf 2.64. 18fa225cbcSrjsYou have another version of autoconf. It may work, but is not guaranteed to. 19fa225cbcSrjsIf you have problems, you may need to regenerate the build system entirely. 20fa225cbcSrjsTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21fa225cbcSrjs 22fa225cbcSrjs# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 23fa225cbcSrjs# 24fa225cbcSrjs# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 25fa225cbcSrjs# 26fa225cbcSrjs# This program is free software; you can redistribute it and/or modify 27fa225cbcSrjs# it under the terms of the GNU General Public License as published by 28fa225cbcSrjs# the Free Software Foundation; either version 2 of the License, or 29fa225cbcSrjs# (at your option) any later version. 30fa225cbcSrjs# 31fa225cbcSrjs# This program is distributed in the hope that it will be useful, but 32fa225cbcSrjs# WITHOUT ANY WARRANTY; without even the implied warranty of 33fa225cbcSrjs# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 34fa225cbcSrjs# General Public License for more details. 35fa225cbcSrjs# 36fa225cbcSrjs# You should have received a copy of the GNU General Public License 37fa225cbcSrjs# along with this program; if not, write to the Free Software 38fa225cbcSrjs# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 39fa225cbcSrjs# 40fa225cbcSrjs# As a special exception to the GNU General Public License, if you 41fa225cbcSrjs# distribute this file as part of a program that contains a 42fa225cbcSrjs# configuration script generated by Autoconf, you may include it under 43fa225cbcSrjs# the same distribution terms that you use for the rest of that program. 44fa225cbcSrjs 45fa225cbcSrjs# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 46fa225cbcSrjs# ---------------------------------- 47fa225cbcSrjsAC_DEFUN([PKG_PROG_PKG_CONFIG], 48fa225cbcSrjs[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 49fa225cbcSrjsm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 50fa225cbcSrjsAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 51fa225cbcSrjsif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 52fa225cbcSrjs AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 53fa225cbcSrjsfi 54fa225cbcSrjsif test -n "$PKG_CONFIG"; then 55fa225cbcSrjs _pkg_min_version=m4_default([$1], [0.9.0]) 56fa225cbcSrjs AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 57fa225cbcSrjs if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 58fa225cbcSrjs AC_MSG_RESULT([yes]) 59fa225cbcSrjs else 60fa225cbcSrjs AC_MSG_RESULT([no]) 61fa225cbcSrjs PKG_CONFIG="" 62fa225cbcSrjs fi 63fa225cbcSrjs 64fa225cbcSrjsfi[]dnl 65fa225cbcSrjs])# PKG_PROG_PKG_CONFIG 66fa225cbcSrjs 67fa225cbcSrjs# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 68fa225cbcSrjs# 69fa225cbcSrjs# Check to see whether a particular set of modules exists. Similar 70fa225cbcSrjs# to PKG_CHECK_MODULES(), but does not set variables or print errors. 71fa225cbcSrjs# 72fa225cbcSrjs# 73fa225cbcSrjs# Similar to PKG_CHECK_MODULES, make sure that the first instance of 74fa225cbcSrjs# this or PKG_CHECK_MODULES is called, or make sure to call 75fa225cbcSrjs# PKG_CHECK_EXISTS manually 76fa225cbcSrjs# -------------------------------------------------------------- 77fa225cbcSrjsAC_DEFUN([PKG_CHECK_EXISTS], 78fa225cbcSrjs[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 79fa225cbcSrjsif test -n "$PKG_CONFIG" && \ 80fa225cbcSrjs AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 81fa225cbcSrjs m4_ifval([$2], [$2], [:]) 82fa225cbcSrjsm4_ifvaln([$3], [else 83fa225cbcSrjs $3])dnl 84fa225cbcSrjsfi]) 85fa225cbcSrjs 86fa225cbcSrjs 87fa225cbcSrjs# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 88fa225cbcSrjs# --------------------------------------------- 89fa225cbcSrjsm4_define([_PKG_CONFIG], 90fa225cbcSrjs[if test -n "$PKG_CONFIG"; then 91fa225cbcSrjs if test -n "$$1"; then 92fa225cbcSrjs pkg_cv_[]$1="$$1" 93fa225cbcSrjs else 94fa225cbcSrjs PKG_CHECK_EXISTS([$3], 95fa225cbcSrjs [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 96fa225cbcSrjs [pkg_failed=yes]) 97fa225cbcSrjs fi 98fa225cbcSrjselse 99fa225cbcSrjs pkg_failed=untried 100fa225cbcSrjsfi[]dnl 101fa225cbcSrjs])# _PKG_CONFIG 102fa225cbcSrjs 103fa225cbcSrjs# _PKG_SHORT_ERRORS_SUPPORTED 104fa225cbcSrjs# ----------------------------- 105fa225cbcSrjsAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 106fa225cbcSrjs[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107fa225cbcSrjsif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 108fa225cbcSrjs _pkg_short_errors_supported=yes 109fa225cbcSrjselse 110fa225cbcSrjs _pkg_short_errors_supported=no 111fa225cbcSrjsfi[]dnl 112fa225cbcSrjs])# _PKG_SHORT_ERRORS_SUPPORTED 113fa225cbcSrjs 114fa225cbcSrjs 115fa225cbcSrjs# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 116fa225cbcSrjs# [ACTION-IF-NOT-FOUND]) 117fa225cbcSrjs# 118fa225cbcSrjs# 119fa225cbcSrjs# Note that if there is a possibility the first call to 120fa225cbcSrjs# PKG_CHECK_MODULES might not happen, you should be sure to include an 121fa225cbcSrjs# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 122fa225cbcSrjs# 123fa225cbcSrjs# 124fa225cbcSrjs# -------------------------------------------------------------- 125fa225cbcSrjsAC_DEFUN([PKG_CHECK_MODULES], 126fa225cbcSrjs[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 127fa225cbcSrjsAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 128fa225cbcSrjsAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 129fa225cbcSrjs 130fa225cbcSrjspkg_failed=no 131fa225cbcSrjsAC_MSG_CHECKING([for $1]) 132fa225cbcSrjs 133fa225cbcSrjs_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 134fa225cbcSrjs_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 135fa225cbcSrjs 136fa225cbcSrjsm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 137fa225cbcSrjsand $1[]_LIBS to avoid the need to call pkg-config. 138fa225cbcSrjsSee the pkg-config man page for more details.]) 139fa225cbcSrjs 140fa225cbcSrjsif test $pkg_failed = yes; then 141fa225cbcSrjs _PKG_SHORT_ERRORS_SUPPORTED 142fa225cbcSrjs if test $_pkg_short_errors_supported = yes; then 143fa225cbcSrjs $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 144fa225cbcSrjs else 145fa225cbcSrjs $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 146fa225cbcSrjs fi 147fa225cbcSrjs # Put the nasty error message in config.log where it belongs 148fa225cbcSrjs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 149fa225cbcSrjs 150fa225cbcSrjs ifelse([$4], , [AC_MSG_ERROR(dnl 151fa225cbcSrjs[Package requirements ($2) were not met: 152fa225cbcSrjs 153fa225cbcSrjs$$1_PKG_ERRORS 154fa225cbcSrjs 155fa225cbcSrjsConsider adjusting the PKG_CONFIG_PATH environment variable if you 156fa225cbcSrjsinstalled software in a non-standard prefix. 157fa225cbcSrjs 158fa225cbcSrjs_PKG_TEXT 159fa225cbcSrjs])], 160fa225cbcSrjs [AC_MSG_RESULT([no]) 161fa225cbcSrjs $4]) 162fa225cbcSrjselif test $pkg_failed = untried; then 163fa225cbcSrjs ifelse([$4], , [AC_MSG_FAILURE(dnl 164fa225cbcSrjs[The pkg-config script could not be found or is too old. Make sure it 165fa225cbcSrjsis in your PATH or set the PKG_CONFIG environment variable to the full 166fa225cbcSrjspath to pkg-config. 167fa225cbcSrjs 168fa225cbcSrjs_PKG_TEXT 169fa225cbcSrjs 170fa225cbcSrjsTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 171fa225cbcSrjs [$4]) 172fa225cbcSrjselse 173fa225cbcSrjs $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 174fa225cbcSrjs $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 175fa225cbcSrjs AC_MSG_RESULT([yes]) 176fa225cbcSrjs ifelse([$3], , :, [$3]) 177fa225cbcSrjsfi[]dnl 178fa225cbcSrjs])# PKG_CHECK_MODULES 179fa225cbcSrjs 180fa225cbcSrjs# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 181fa225cbcSrjs# 182fa225cbcSrjs# This file is free software; the Free Software Foundation 183fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 184fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 185fa225cbcSrjs 186fa225cbcSrjs# AM_AUTOMAKE_VERSION(VERSION) 187fa225cbcSrjs# ---------------------------- 188fa225cbcSrjs# Automake X.Y traces this macro to ensure aclocal.m4 has been 189fa225cbcSrjs# generated from the m4 files accompanying Automake X.Y. 190fa225cbcSrjs# (This private macro should not be called outside this file.) 191fa225cbcSrjsAC_DEFUN([AM_AUTOMAKE_VERSION], 192fa225cbcSrjs[am__api_version='1.11' 193fa225cbcSrjsdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 194fa225cbcSrjsdnl require some minimum version. Point them to the right macro. 195fa225cbcSrjsm4_if([$1], [1.11], [], 196fa225cbcSrjs [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 197fa225cbcSrjs]) 198fa225cbcSrjs 199fa225cbcSrjs# _AM_AUTOCONF_VERSION(VERSION) 200fa225cbcSrjs# ----------------------------- 201fa225cbcSrjs# aclocal traces this macro to find the Autoconf version. 202fa225cbcSrjs# This is a private macro too. Using m4_define simplifies 203fa225cbcSrjs# the logic in aclocal, which can simply ignore this definition. 204fa225cbcSrjsm4_define([_AM_AUTOCONF_VERSION], []) 205fa225cbcSrjs 206fa225cbcSrjs# AM_SET_CURRENT_AUTOMAKE_VERSION 207fa225cbcSrjs# ------------------------------- 208fa225cbcSrjs# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 209fa225cbcSrjs# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 210fa225cbcSrjsAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 211fa225cbcSrjs[AM_AUTOMAKE_VERSION([1.11])dnl 212fa225cbcSrjsm4_ifndef([AC_AUTOCONF_VERSION], 213fa225cbcSrjs [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 214fa225cbcSrjs_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 215fa225cbcSrjs 216fa225cbcSrjs# AM_AUX_DIR_EXPAND -*- Autoconf -*- 217fa225cbcSrjs 218fa225cbcSrjs# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 219fa225cbcSrjs# 220fa225cbcSrjs# This file is free software; the Free Software Foundation 221fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 222fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 223fa225cbcSrjs 224fa225cbcSrjs# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 225fa225cbcSrjs# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 226fa225cbcSrjs# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 227fa225cbcSrjs# 228fa225cbcSrjs# Of course, Automake must honor this variable whenever it calls a 229fa225cbcSrjs# tool from the auxiliary directory. The problem is that $srcdir (and 230fa225cbcSrjs# therefore $ac_aux_dir as well) can be either absolute or relative, 231fa225cbcSrjs# depending on how configure is run. This is pretty annoying, since 232fa225cbcSrjs# it makes $ac_aux_dir quite unusable in subdirectories: in the top 233fa225cbcSrjs# source directory, any form will work fine, but in subdirectories a 234fa225cbcSrjs# relative path needs to be adjusted first. 235fa225cbcSrjs# 236fa225cbcSrjs# $ac_aux_dir/missing 237fa225cbcSrjs# fails when called from a subdirectory if $ac_aux_dir is relative 238fa225cbcSrjs# $top_srcdir/$ac_aux_dir/missing 239fa225cbcSrjs# fails if $ac_aux_dir is absolute, 240fa225cbcSrjs# fails when called from a subdirectory in a VPATH build with 241fa225cbcSrjs# a relative $ac_aux_dir 242fa225cbcSrjs# 243fa225cbcSrjs# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 244fa225cbcSrjs# are both prefixed by $srcdir. In an in-source build this is usually 245fa225cbcSrjs# harmless because $srcdir is `.', but things will broke when you 246fa225cbcSrjs# start a VPATH build or use an absolute $srcdir. 247fa225cbcSrjs# 248fa225cbcSrjs# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 249fa225cbcSrjs# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 250fa225cbcSrjs# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 251fa225cbcSrjs# and then we would define $MISSING as 252fa225cbcSrjs# MISSING="\${SHELL} $am_aux_dir/missing" 253fa225cbcSrjs# This will work as long as MISSING is not called from configure, because 254fa225cbcSrjs# unfortunately $(top_srcdir) has no meaning in configure. 255fa225cbcSrjs# However there are other variables, like CC, which are often used in 256fa225cbcSrjs# configure, and could therefore not use this "fixed" $ac_aux_dir. 257fa225cbcSrjs# 258fa225cbcSrjs# Another solution, used here, is to always expand $ac_aux_dir to an 259fa225cbcSrjs# absolute PATH. The drawback is that using absolute paths prevent a 260fa225cbcSrjs# configured tree to be moved without reconfiguration. 261fa225cbcSrjs 262fa225cbcSrjsAC_DEFUN([AM_AUX_DIR_EXPAND], 263fa225cbcSrjs[dnl Rely on autoconf to set up CDPATH properly. 264fa225cbcSrjsAC_PREREQ([2.50])dnl 265fa225cbcSrjs# expand $ac_aux_dir to an absolute path 266fa225cbcSrjsam_aux_dir=`cd $ac_aux_dir && pwd` 267fa225cbcSrjs]) 268fa225cbcSrjs 269fa225cbcSrjs# AM_CONDITIONAL -*- Autoconf -*- 270fa225cbcSrjs 271fa225cbcSrjs# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 272fa225cbcSrjs# Free Software Foundation, Inc. 273fa225cbcSrjs# 274fa225cbcSrjs# This file is free software; the Free Software Foundation 275fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 276fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 277fa225cbcSrjs 278fa225cbcSrjs# serial 9 279fa225cbcSrjs 280fa225cbcSrjs# AM_CONDITIONAL(NAME, SHELL-CONDITION) 281fa225cbcSrjs# ------------------------------------- 282fa225cbcSrjs# Define a conditional. 283fa225cbcSrjsAC_DEFUN([AM_CONDITIONAL], 284fa225cbcSrjs[AC_PREREQ(2.52)dnl 285fa225cbcSrjs ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 286fa225cbcSrjs [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 287fa225cbcSrjsAC_SUBST([$1_TRUE])dnl 288fa225cbcSrjsAC_SUBST([$1_FALSE])dnl 289fa225cbcSrjs_AM_SUBST_NOTMAKE([$1_TRUE])dnl 290fa225cbcSrjs_AM_SUBST_NOTMAKE([$1_FALSE])dnl 291fa225cbcSrjsm4_define([_AM_COND_VALUE_$1], [$2])dnl 292fa225cbcSrjsif $2; then 293fa225cbcSrjs $1_TRUE= 294fa225cbcSrjs $1_FALSE='#' 295fa225cbcSrjselse 296fa225cbcSrjs $1_TRUE='#' 297fa225cbcSrjs $1_FALSE= 298fa225cbcSrjsfi 299fa225cbcSrjsAC_CONFIG_COMMANDS_PRE( 300fa225cbcSrjs[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 301fa225cbcSrjs AC_MSG_ERROR([[conditional "$1" was never defined. 302fa225cbcSrjsUsually this means the macro was only invoked conditionally.]]) 303fa225cbcSrjsfi])]) 304fa225cbcSrjs 305fa225cbcSrjs# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 306fa225cbcSrjs# Free Software Foundation, Inc. 307fa225cbcSrjs# 308fa225cbcSrjs# This file is free software; the Free Software Foundation 309fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 310fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 311fa225cbcSrjs 312fa225cbcSrjs# serial 10 313fa225cbcSrjs 314fa225cbcSrjs# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 315fa225cbcSrjs# written in clear, in which case automake, when reading aclocal.m4, 316fa225cbcSrjs# will think it sees a *use*, and therefore will trigger all it's 317fa225cbcSrjs# C support machinery. Also note that it means that autoscan, seeing 318fa225cbcSrjs# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 319fa225cbcSrjs 320fa225cbcSrjs 321fa225cbcSrjs# _AM_DEPENDENCIES(NAME) 322fa225cbcSrjs# ---------------------- 323fa225cbcSrjs# See how the compiler implements dependency checking. 324fa225cbcSrjs# NAME is "CC", "CXX", "GCJ", or "OBJC". 325fa225cbcSrjs# We try a few techniques and use that to set a single cache variable. 326fa225cbcSrjs# 327fa225cbcSrjs# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 328fa225cbcSrjs# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 329fa225cbcSrjs# dependency, and given that the user is not expected to run this macro, 330fa225cbcSrjs# just rely on AC_PROG_CC. 331fa225cbcSrjsAC_DEFUN([_AM_DEPENDENCIES], 332fa225cbcSrjs[AC_REQUIRE([AM_SET_DEPDIR])dnl 333fa225cbcSrjsAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 334fa225cbcSrjsAC_REQUIRE([AM_MAKE_INCLUDE])dnl 335fa225cbcSrjsAC_REQUIRE([AM_DEP_TRACK])dnl 336fa225cbcSrjs 337fa225cbcSrjsifelse([$1], CC, [depcc="$CC" am_compiler_list=], 338fa225cbcSrjs [$1], CXX, [depcc="$CXX" am_compiler_list=], 339fa225cbcSrjs [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 340fa225cbcSrjs [$1], UPC, [depcc="$UPC" am_compiler_list=], 341fa225cbcSrjs [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 342fa225cbcSrjs [depcc="$$1" am_compiler_list=]) 343fa225cbcSrjs 344fa225cbcSrjsAC_CACHE_CHECK([dependency style of $depcc], 345fa225cbcSrjs [am_cv_$1_dependencies_compiler_type], 346fa225cbcSrjs[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 347fa225cbcSrjs # We make a subdir and do the tests there. Otherwise we can end up 348fa225cbcSrjs # making bogus files that we don't know about and never remove. For 349fa225cbcSrjs # instance it was reported that on HP-UX the gcc test will end up 350fa225cbcSrjs # making a dummy file named `D' -- because `-MD' means `put the output 351fa225cbcSrjs # in D'. 352fa225cbcSrjs mkdir conftest.dir 353fa225cbcSrjs # Copy depcomp to subdir because otherwise we won't find it if we're 354fa225cbcSrjs # using a relative directory. 355fa225cbcSrjs cp "$am_depcomp" conftest.dir 356fa225cbcSrjs cd conftest.dir 357fa225cbcSrjs # We will build objects and dependencies in a subdirectory because 358fa225cbcSrjs # it helps to detect inapplicable dependency modes. For instance 359fa225cbcSrjs # both Tru64's cc and ICC support -MD to output dependencies as a 360fa225cbcSrjs # side effect of compilation, but ICC will put the dependencies in 361fa225cbcSrjs # the current directory while Tru64 will put them in the object 362fa225cbcSrjs # directory. 363fa225cbcSrjs mkdir sub 364fa225cbcSrjs 365fa225cbcSrjs am_cv_$1_dependencies_compiler_type=none 366fa225cbcSrjs if test "$am_compiler_list" = ""; then 367fa225cbcSrjs am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 368fa225cbcSrjs fi 369fa225cbcSrjs am__universal=false 370fa225cbcSrjs m4_case([$1], [CC], 371fa225cbcSrjs [case " $depcc " in #( 372fa225cbcSrjs *\ -arch\ *\ -arch\ *) am__universal=true ;; 373fa225cbcSrjs esac], 374fa225cbcSrjs [CXX], 375fa225cbcSrjs [case " $depcc " in #( 376fa225cbcSrjs *\ -arch\ *\ -arch\ *) am__universal=true ;; 377fa225cbcSrjs esac]) 378fa225cbcSrjs 379fa225cbcSrjs for depmode in $am_compiler_list; do 380fa225cbcSrjs # Setup a source with many dependencies, because some compilers 381fa225cbcSrjs # like to wrap large dependency lists on column 80 (with \), and 382fa225cbcSrjs # we should not choose a depcomp mode which is confused by this. 383fa225cbcSrjs # 384fa225cbcSrjs # We need to recreate these files for each test, as the compiler may 385fa225cbcSrjs # overwrite some of them when testing with obscure command lines. 386fa225cbcSrjs # This happens at least with the AIX C compiler. 387fa225cbcSrjs : > sub/conftest.c 388fa225cbcSrjs for i in 1 2 3 4 5 6; do 389fa225cbcSrjs echo '#include "conftst'$i'.h"' >> sub/conftest.c 390fa225cbcSrjs # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 391fa225cbcSrjs # Solaris 8's {/usr,}/bin/sh. 392fa225cbcSrjs touch sub/conftst$i.h 393fa225cbcSrjs done 394fa225cbcSrjs echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 395fa225cbcSrjs 396fa225cbcSrjs # We check with `-c' and `-o' for the sake of the "dashmstdout" 397fa225cbcSrjs # mode. It turns out that the SunPro C++ compiler does not properly 398fa225cbcSrjs # handle `-M -o', and we need to detect this. Also, some Intel 399fa225cbcSrjs # versions had trouble with output in subdirs 400fa225cbcSrjs am__obj=sub/conftest.${OBJEXT-o} 401fa225cbcSrjs am__minus_obj="-o $am__obj" 402fa225cbcSrjs case $depmode in 403fa225cbcSrjs gcc) 404fa225cbcSrjs # This depmode causes a compiler race in universal mode. 405fa225cbcSrjs test "$am__universal" = false || continue 406fa225cbcSrjs ;; 407fa225cbcSrjs nosideeffect) 408fa225cbcSrjs # after this tag, mechanisms are not by side-effect, so they'll 409fa225cbcSrjs # only be used when explicitly requested 410fa225cbcSrjs if test "x$enable_dependency_tracking" = xyes; then 411fa225cbcSrjs continue 412fa225cbcSrjs else 413fa225cbcSrjs break 414fa225cbcSrjs fi 415fa225cbcSrjs ;; 416fa225cbcSrjs msvisualcpp | msvcmsys) 417fa225cbcSrjs # This compiler won't grok `-c -o', but also, the minuso test has 418fa225cbcSrjs # not run yet. These depmodes are late enough in the game, and 419fa225cbcSrjs # so weak that their functioning should not be impacted. 420fa225cbcSrjs am__obj=conftest.${OBJEXT-o} 421fa225cbcSrjs am__minus_obj= 422fa225cbcSrjs ;; 423fa225cbcSrjs none) break ;; 424fa225cbcSrjs esac 425fa225cbcSrjs if depmode=$depmode \ 426fa225cbcSrjs source=sub/conftest.c object=$am__obj \ 427fa225cbcSrjs depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 428fa225cbcSrjs $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 429fa225cbcSrjs >/dev/null 2>conftest.err && 430fa225cbcSrjs grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 431fa225cbcSrjs grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 432fa225cbcSrjs grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 433fa225cbcSrjs ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 434fa225cbcSrjs # icc doesn't choke on unknown options, it will just issue warnings 435fa225cbcSrjs # or remarks (even with -Werror). So we grep stderr for any message 436fa225cbcSrjs # that says an option was ignored or not supported. 437fa225cbcSrjs # When given -MP, icc 7.0 and 7.1 complain thusly: 438fa225cbcSrjs # icc: Command line warning: ignoring option '-M'; no argument required 439fa225cbcSrjs # The diagnosis changed in icc 8.0: 440fa225cbcSrjs # icc: Command line remark: option '-MP' not supported 441fa225cbcSrjs if (grep 'ignoring option' conftest.err || 442fa225cbcSrjs grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 443fa225cbcSrjs am_cv_$1_dependencies_compiler_type=$depmode 444fa225cbcSrjs break 445fa225cbcSrjs fi 446fa225cbcSrjs fi 447fa225cbcSrjs done 448fa225cbcSrjs 449fa225cbcSrjs cd .. 450fa225cbcSrjs rm -rf conftest.dir 451fa225cbcSrjselse 452fa225cbcSrjs am_cv_$1_dependencies_compiler_type=none 453fa225cbcSrjsfi 454fa225cbcSrjs]) 455fa225cbcSrjsAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 456fa225cbcSrjsAM_CONDITIONAL([am__fastdep$1], [ 457fa225cbcSrjs test "x$enable_dependency_tracking" != xno \ 458fa225cbcSrjs && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 459fa225cbcSrjs]) 460fa225cbcSrjs 461fa225cbcSrjs 462fa225cbcSrjs# AM_SET_DEPDIR 463fa225cbcSrjs# ------------- 464fa225cbcSrjs# Choose a directory name for dependency files. 465fa225cbcSrjs# This macro is AC_REQUIREd in _AM_DEPENDENCIES 466fa225cbcSrjsAC_DEFUN([AM_SET_DEPDIR], 467fa225cbcSrjs[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 468fa225cbcSrjsAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 469fa225cbcSrjs]) 470fa225cbcSrjs 471fa225cbcSrjs 472fa225cbcSrjs# AM_DEP_TRACK 473fa225cbcSrjs# ------------ 474fa225cbcSrjsAC_DEFUN([AM_DEP_TRACK], 475fa225cbcSrjs[AC_ARG_ENABLE(dependency-tracking, 476fa225cbcSrjs[ --disable-dependency-tracking speeds up one-time build 477fa225cbcSrjs --enable-dependency-tracking do not reject slow dependency extractors]) 478fa225cbcSrjsif test "x$enable_dependency_tracking" != xno; then 479fa225cbcSrjs am_depcomp="$ac_aux_dir/depcomp" 480fa225cbcSrjs AMDEPBACKSLASH='\' 481fa225cbcSrjsfi 482fa225cbcSrjsAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 483fa225cbcSrjsAC_SUBST([AMDEPBACKSLASH])dnl 484fa225cbcSrjs_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 485fa225cbcSrjs]) 486fa225cbcSrjs 487fa225cbcSrjs# Generate code to set up dependency tracking. -*- Autoconf -*- 488fa225cbcSrjs 489fa225cbcSrjs# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 490fa225cbcSrjs# Free Software Foundation, Inc. 491fa225cbcSrjs# 492fa225cbcSrjs# This file is free software; the Free Software Foundation 493fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 494fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 495fa225cbcSrjs 496fa225cbcSrjs#serial 5 497fa225cbcSrjs 498fa225cbcSrjs# _AM_OUTPUT_DEPENDENCY_COMMANDS 499fa225cbcSrjs# ------------------------------ 500fa225cbcSrjsAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 501fa225cbcSrjs[{ 502fa225cbcSrjs # Autoconf 2.62 quotes --file arguments for eval, but not when files 503fa225cbcSrjs # are listed without --file. Let's play safe and only enable the eval 504fa225cbcSrjs # if we detect the quoting. 505fa225cbcSrjs case $CONFIG_FILES in 506fa225cbcSrjs *\'*) eval set x "$CONFIG_FILES" ;; 507fa225cbcSrjs *) set x $CONFIG_FILES ;; 508fa225cbcSrjs esac 509fa225cbcSrjs shift 510fa225cbcSrjs for mf 511fa225cbcSrjs do 512fa225cbcSrjs # Strip MF so we end up with the name of the file. 513fa225cbcSrjs mf=`echo "$mf" | sed -e 's/:.*$//'` 514fa225cbcSrjs # Check whether this is an Automake generated Makefile or not. 515fa225cbcSrjs # We used to match only the files named `Makefile.in', but 516fa225cbcSrjs # some people rename them; so instead we look at the file content. 517fa225cbcSrjs # Grep'ing the first line is not enough: some people post-process 518fa225cbcSrjs # each Makefile.in and add a new line on top of each file to say so. 519fa225cbcSrjs # Grep'ing the whole file is not good either: AIX grep has a line 520fa225cbcSrjs # limit of 2048, but all sed's we know have understand at least 4000. 521fa225cbcSrjs if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 522fa225cbcSrjs dirpart=`AS_DIRNAME("$mf")` 523fa225cbcSrjs else 524fa225cbcSrjs continue 525fa225cbcSrjs fi 526fa225cbcSrjs # Extract the definition of DEPDIR, am__include, and am__quote 527fa225cbcSrjs # from the Makefile without running `make'. 528fa225cbcSrjs DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 529fa225cbcSrjs test -z "$DEPDIR" && continue 530fa225cbcSrjs am__include=`sed -n 's/^am__include = //p' < "$mf"` 531fa225cbcSrjs test -z "am__include" && continue 532fa225cbcSrjs am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 533fa225cbcSrjs # When using ansi2knr, U may be empty or an underscore; expand it 534fa225cbcSrjs U=`sed -n 's/^U = //p' < "$mf"` 535fa225cbcSrjs # Find all dependency output files, they are included files with 536fa225cbcSrjs # $(DEPDIR) in their names. We invoke sed twice because it is the 537fa225cbcSrjs # simplest approach to changing $(DEPDIR) to its actual value in the 538fa225cbcSrjs # expansion. 539fa225cbcSrjs for file in `sed -n " 540fa225cbcSrjs s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 541fa225cbcSrjs sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 542fa225cbcSrjs # Make sure the directory exists. 543fa225cbcSrjs test -f "$dirpart/$file" && continue 544fa225cbcSrjs fdir=`AS_DIRNAME(["$file"])` 545fa225cbcSrjs AS_MKDIR_P([$dirpart/$fdir]) 546fa225cbcSrjs # echo "creating $dirpart/$file" 547fa225cbcSrjs echo '# dummy' > "$dirpart/$file" 548fa225cbcSrjs done 549fa225cbcSrjs done 550fa225cbcSrjs} 551fa225cbcSrjs])# _AM_OUTPUT_DEPENDENCY_COMMANDS 552fa225cbcSrjs 553fa225cbcSrjs 554fa225cbcSrjs# AM_OUTPUT_DEPENDENCY_COMMANDS 555fa225cbcSrjs# ----------------------------- 556fa225cbcSrjs# This macro should only be invoked once -- use via AC_REQUIRE. 557fa225cbcSrjs# 558fa225cbcSrjs# This code is only required when automatic dependency tracking 559fa225cbcSrjs# is enabled. FIXME. This creates each `.P' file that we will 560fa225cbcSrjs# need in order to bootstrap the dependency handling code. 561fa225cbcSrjsAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 562fa225cbcSrjs[AC_CONFIG_COMMANDS([depfiles], 563fa225cbcSrjs [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 564fa225cbcSrjs [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 565fa225cbcSrjs]) 566fa225cbcSrjs 567fa225cbcSrjs# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 568fa225cbcSrjs# Free Software Foundation, Inc. 569fa225cbcSrjs# 570fa225cbcSrjs# This file is free software; the Free Software Foundation 571fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 572fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 573fa225cbcSrjs 574fa225cbcSrjs# serial 8 575fa225cbcSrjs 576fa225cbcSrjs# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 577fa225cbcSrjsAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 578fa225cbcSrjs 579fa225cbcSrjs# Do all the work for Automake. -*- Autoconf -*- 580fa225cbcSrjs 581fa225cbcSrjs# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 582fa225cbcSrjs# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 583fa225cbcSrjs# 584fa225cbcSrjs# This file is free software; the Free Software Foundation 585fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 586fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 587fa225cbcSrjs 588fa225cbcSrjs# serial 16 589fa225cbcSrjs 590fa225cbcSrjs# This macro actually does too much. Some checks are only needed if 591fa225cbcSrjs# your package does certain things. But this isn't really a big deal. 592fa225cbcSrjs 593fa225cbcSrjs# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 594fa225cbcSrjs# AM_INIT_AUTOMAKE([OPTIONS]) 595fa225cbcSrjs# ----------------------------------------------- 596fa225cbcSrjs# The call with PACKAGE and VERSION arguments is the old style 597fa225cbcSrjs# call (pre autoconf-2.50), which is being phased out. PACKAGE 598fa225cbcSrjs# and VERSION should now be passed to AC_INIT and removed from 599fa225cbcSrjs# the call to AM_INIT_AUTOMAKE. 600fa225cbcSrjs# We support both call styles for the transition. After 601fa225cbcSrjs# the next Automake release, Autoconf can make the AC_INIT 602fa225cbcSrjs# arguments mandatory, and then we can depend on a new Autoconf 603fa225cbcSrjs# release and drop the old call support. 604fa225cbcSrjsAC_DEFUN([AM_INIT_AUTOMAKE], 605fa225cbcSrjs[AC_PREREQ([2.62])dnl 606fa225cbcSrjsdnl Autoconf wants to disallow AM_ names. We explicitly allow 607fa225cbcSrjsdnl the ones we care about. 608fa225cbcSrjsm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 609fa225cbcSrjsAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 610fa225cbcSrjsAC_REQUIRE([AC_PROG_INSTALL])dnl 611fa225cbcSrjsif test "`cd $srcdir && pwd`" != "`pwd`"; then 612fa225cbcSrjs # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 613fa225cbcSrjs # is not polluted with repeated "-I." 614fa225cbcSrjs AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 615fa225cbcSrjs # test to see if srcdir already configured 616fa225cbcSrjs if test -f $srcdir/config.status; then 617fa225cbcSrjs AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 618fa225cbcSrjs fi 619fa225cbcSrjsfi 620fa225cbcSrjs 621fa225cbcSrjs# test whether we have cygpath 622fa225cbcSrjsif test -z "$CYGPATH_W"; then 623fa225cbcSrjs if (cygpath --version) >/dev/null 2>/dev/null; then 624fa225cbcSrjs CYGPATH_W='cygpath -w' 625fa225cbcSrjs else 626fa225cbcSrjs CYGPATH_W=echo 627fa225cbcSrjs fi 628fa225cbcSrjsfi 629fa225cbcSrjsAC_SUBST([CYGPATH_W]) 630fa225cbcSrjs 631fa225cbcSrjs# Define the identity of the package. 632fa225cbcSrjsdnl Distinguish between old-style and new-style calls. 633fa225cbcSrjsm4_ifval([$2], 634fa225cbcSrjs[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 635fa225cbcSrjs AC_SUBST([PACKAGE], [$1])dnl 636fa225cbcSrjs AC_SUBST([VERSION], [$2])], 637fa225cbcSrjs[_AM_SET_OPTIONS([$1])dnl 638fa225cbcSrjsdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 639fa225cbcSrjsm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 640fa225cbcSrjs [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 641fa225cbcSrjs AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 642fa225cbcSrjs AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 643fa225cbcSrjs 644fa225cbcSrjs_AM_IF_OPTION([no-define],, 645fa225cbcSrjs[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 646fa225cbcSrjs AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 647fa225cbcSrjs 648fa225cbcSrjs# Some tools Automake needs. 649fa225cbcSrjsAC_REQUIRE([AM_SANITY_CHECK])dnl 650fa225cbcSrjsAC_REQUIRE([AC_ARG_PROGRAM])dnl 651fa225cbcSrjsAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 652fa225cbcSrjsAM_MISSING_PROG(AUTOCONF, autoconf) 653fa225cbcSrjsAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 654fa225cbcSrjsAM_MISSING_PROG(AUTOHEADER, autoheader) 655fa225cbcSrjsAM_MISSING_PROG(MAKEINFO, makeinfo) 656fa225cbcSrjsAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 657fa225cbcSrjsAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 658fa225cbcSrjsAC_REQUIRE([AM_PROG_MKDIR_P])dnl 659fa225cbcSrjs# We need awk for the "check" target. The system "awk" is bad on 660fa225cbcSrjs# some platforms. 661fa225cbcSrjsAC_REQUIRE([AC_PROG_AWK])dnl 662fa225cbcSrjsAC_REQUIRE([AC_PROG_MAKE_SET])dnl 663fa225cbcSrjsAC_REQUIRE([AM_SET_LEADING_DOT])dnl 664fa225cbcSrjs_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 665fa225cbcSrjs [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 666fa225cbcSrjs [_AM_PROG_TAR([v7])])]) 667fa225cbcSrjs_AM_IF_OPTION([no-dependencies],, 668fa225cbcSrjs[AC_PROVIDE_IFELSE([AC_PROG_CC], 669fa225cbcSrjs [_AM_DEPENDENCIES(CC)], 670fa225cbcSrjs [define([AC_PROG_CC], 671fa225cbcSrjs defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 672fa225cbcSrjsAC_PROVIDE_IFELSE([AC_PROG_CXX], 673fa225cbcSrjs [_AM_DEPENDENCIES(CXX)], 674fa225cbcSrjs [define([AC_PROG_CXX], 675fa225cbcSrjs defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 676fa225cbcSrjsAC_PROVIDE_IFELSE([AC_PROG_OBJC], 677fa225cbcSrjs [_AM_DEPENDENCIES(OBJC)], 678fa225cbcSrjs [define([AC_PROG_OBJC], 679fa225cbcSrjs defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 680fa225cbcSrjs]) 681fa225cbcSrjs_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 682fa225cbcSrjsdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 683fa225cbcSrjsdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 684fa225cbcSrjsdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 685fa225cbcSrjsAC_CONFIG_COMMANDS_PRE(dnl 686fa225cbcSrjs[m4_provide_if([_AM_COMPILER_EXEEXT], 687fa225cbcSrjs [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 688fa225cbcSrjs]) 689fa225cbcSrjs 690fa225cbcSrjsdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 691fa225cbcSrjsdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 692fa225cbcSrjsdnl mangled by Autoconf and run in a shell conditional statement. 693fa225cbcSrjsm4_define([_AC_COMPILER_EXEEXT], 694fa225cbcSrjsm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 695fa225cbcSrjs 696fa225cbcSrjs 697fa225cbcSrjs# When config.status generates a header, we must update the stamp-h file. 698fa225cbcSrjs# This file resides in the same directory as the config header 699fa225cbcSrjs# that is generated. The stamp files are numbered to have different names. 700fa225cbcSrjs 701fa225cbcSrjs# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 702fa225cbcSrjs# loop where config.status creates the headers, so we can generate 703fa225cbcSrjs# our stamp files there. 704fa225cbcSrjsAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 705fa225cbcSrjs[# Compute $1's index in $config_headers. 706fa225cbcSrjs_am_arg=$1 707fa225cbcSrjs_am_stamp_count=1 708fa225cbcSrjsfor _am_header in $config_headers :; do 709fa225cbcSrjs case $_am_header in 710fa225cbcSrjs $_am_arg | $_am_arg:* ) 711fa225cbcSrjs break ;; 712fa225cbcSrjs * ) 713fa225cbcSrjs _am_stamp_count=`expr $_am_stamp_count + 1` ;; 714fa225cbcSrjs esac 715fa225cbcSrjsdone 716fa225cbcSrjsecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 717fa225cbcSrjs 718fa225cbcSrjs# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 719fa225cbcSrjs# 720fa225cbcSrjs# This file is free software; the Free Software Foundation 721fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 722fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 723fa225cbcSrjs 724fa225cbcSrjs# AM_PROG_INSTALL_SH 725fa225cbcSrjs# ------------------ 726fa225cbcSrjs# Define $install_sh. 727fa225cbcSrjsAC_DEFUN([AM_PROG_INSTALL_SH], 728fa225cbcSrjs[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 729fa225cbcSrjsif test x"${install_sh}" != xset; then 730fa225cbcSrjs case $am_aux_dir in 731fa225cbcSrjs *\ * | *\ *) 732fa225cbcSrjs install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 733fa225cbcSrjs *) 734fa225cbcSrjs install_sh="\${SHELL} $am_aux_dir/install-sh" 735fa225cbcSrjs esac 736fa225cbcSrjsfi 737fa225cbcSrjsAC_SUBST(install_sh)]) 738fa225cbcSrjs 739fa225cbcSrjs# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 740fa225cbcSrjs# 741fa225cbcSrjs# This file is free software; the Free Software Foundation 742fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 743fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 744fa225cbcSrjs 745fa225cbcSrjs# serial 2 746fa225cbcSrjs 747fa225cbcSrjs# Check whether the underlying file-system supports filenames 748fa225cbcSrjs# with a leading dot. For instance MS-DOS doesn't. 749fa225cbcSrjsAC_DEFUN([AM_SET_LEADING_DOT], 750fa225cbcSrjs[rm -rf .tst 2>/dev/null 751fa225cbcSrjsmkdir .tst 2>/dev/null 752fa225cbcSrjsif test -d .tst; then 753fa225cbcSrjs am__leading_dot=. 754fa225cbcSrjselse 755fa225cbcSrjs am__leading_dot=_ 756fa225cbcSrjsfi 757fa225cbcSrjsrmdir .tst 2>/dev/null 758fa225cbcSrjsAC_SUBST([am__leading_dot])]) 759fa225cbcSrjs 760fa225cbcSrjs# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 761fa225cbcSrjs# From Jim Meyering 762fa225cbcSrjs 763fa225cbcSrjs# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 764fa225cbcSrjs# Free Software Foundation, Inc. 765fa225cbcSrjs# 766fa225cbcSrjs# This file is free software; the Free Software Foundation 767fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 768fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 769fa225cbcSrjs 770fa225cbcSrjs# serial 5 771fa225cbcSrjs 772fa225cbcSrjs# AM_MAINTAINER_MODE([DEFAULT-MODE]) 773fa225cbcSrjs# ---------------------------------- 774fa225cbcSrjs# Control maintainer-specific portions of Makefiles. 775fa225cbcSrjs# Default is to disable them, unless `enable' is passed literally. 776fa225cbcSrjs# For symmetry, `disable' may be passed as well. Anyway, the user 777fa225cbcSrjs# can override the default with the --enable/--disable switch. 778fa225cbcSrjsAC_DEFUN([AM_MAINTAINER_MODE], 779fa225cbcSrjs[m4_case(m4_default([$1], [disable]), 780fa225cbcSrjs [enable], [m4_define([am_maintainer_other], [disable])], 781fa225cbcSrjs [disable], [m4_define([am_maintainer_other], [enable])], 782fa225cbcSrjs [m4_define([am_maintainer_other], [enable]) 783fa225cbcSrjs m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 784fa225cbcSrjsAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 785fa225cbcSrjs dnl maintainer-mode's default is 'disable' unless 'enable' is passed 786fa225cbcSrjs AC_ARG_ENABLE([maintainer-mode], 787fa225cbcSrjs[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 788fa225cbcSrjs (and sometimes confusing) to the casual installer], 789fa225cbcSrjs [USE_MAINTAINER_MODE=$enableval], 790fa225cbcSrjs [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 791fa225cbcSrjs AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 792fa225cbcSrjs AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 793fa225cbcSrjs MAINT=$MAINTAINER_MODE_TRUE 794fa225cbcSrjs AC_SUBST([MAINT])dnl 795fa225cbcSrjs] 796fa225cbcSrjs) 797fa225cbcSrjs 798fa225cbcSrjsAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 799fa225cbcSrjs 800fa225cbcSrjs# Check to see how 'make' treats includes. -*- Autoconf -*- 801fa225cbcSrjs 802fa225cbcSrjs# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 803fa225cbcSrjs# 804fa225cbcSrjs# This file is free software; the Free Software Foundation 805fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 806fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 807fa225cbcSrjs 808fa225cbcSrjs# serial 4 809fa225cbcSrjs 810fa225cbcSrjs# AM_MAKE_INCLUDE() 811fa225cbcSrjs# ----------------- 812fa225cbcSrjs# Check to see how make treats includes. 813fa225cbcSrjsAC_DEFUN([AM_MAKE_INCLUDE], 814fa225cbcSrjs[am_make=${MAKE-make} 815fa225cbcSrjscat > confinc << 'END' 816fa225cbcSrjsam__doit: 817fa225cbcSrjs @echo this is the am__doit target 818fa225cbcSrjs.PHONY: am__doit 819fa225cbcSrjsEND 820fa225cbcSrjs# If we don't find an include directive, just comment out the code. 821fa225cbcSrjsAC_MSG_CHECKING([for style of include used by $am_make]) 822fa225cbcSrjsam__include="#" 823fa225cbcSrjsam__quote= 824fa225cbcSrjs_am_result=none 825fa225cbcSrjs# First try GNU make style include. 826fa225cbcSrjsecho "include confinc" > confmf 827fa225cbcSrjs# Ignore all kinds of additional output from `make'. 828fa225cbcSrjscase `$am_make -s -f confmf 2> /dev/null` in #( 829fa225cbcSrjs*the\ am__doit\ target*) 830fa225cbcSrjs am__include=include 831fa225cbcSrjs am__quote= 832fa225cbcSrjs _am_result=GNU 833fa225cbcSrjs ;; 834fa225cbcSrjsesac 835fa225cbcSrjs# Now try BSD make style include. 836fa225cbcSrjsif test "$am__include" = "#"; then 837fa225cbcSrjs echo '.include "confinc"' > confmf 838fa225cbcSrjs case `$am_make -s -f confmf 2> /dev/null` in #( 839fa225cbcSrjs *the\ am__doit\ target*) 840fa225cbcSrjs am__include=.include 841fa225cbcSrjs am__quote="\"" 842fa225cbcSrjs _am_result=BSD 843fa225cbcSrjs ;; 844fa225cbcSrjs esac 845fa225cbcSrjsfi 846fa225cbcSrjsAC_SUBST([am__include]) 847fa225cbcSrjsAC_SUBST([am__quote]) 848fa225cbcSrjsAC_MSG_RESULT([$_am_result]) 849fa225cbcSrjsrm -f confinc confmf 850fa225cbcSrjs]) 851fa225cbcSrjs 852fa225cbcSrjs# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 853fa225cbcSrjs# Free Software Foundation, Inc. 854fa225cbcSrjs# 855fa225cbcSrjs# This file is free software; the Free Software Foundation 856fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 857fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 858fa225cbcSrjs 859fa225cbcSrjs# serial 6 860fa225cbcSrjs 861fa225cbcSrjs# AM_PROG_CC_C_O 862fa225cbcSrjs# -------------- 863fa225cbcSrjs# Like AC_PROG_CC_C_O, but changed for automake. 864fa225cbcSrjsAC_DEFUN([AM_PROG_CC_C_O], 865fa225cbcSrjs[AC_REQUIRE([AC_PROG_CC_C_O])dnl 866fa225cbcSrjsAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 867fa225cbcSrjsAC_REQUIRE_AUX_FILE([compile])dnl 868fa225cbcSrjs# FIXME: we rely on the cache variable name because 869fa225cbcSrjs# there is no other way. 870fa225cbcSrjsset dummy $CC 871fa225cbcSrjsam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 872fa225cbcSrjseval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 873fa225cbcSrjsif test "$am_t" != yes; then 874fa225cbcSrjs # Losing compiler, so override with the script. 875fa225cbcSrjs # FIXME: It is wrong to rewrite CC. 876fa225cbcSrjs # But if we don't then we get into trouble of one sort or another. 877fa225cbcSrjs # A longer-term fix would be to have automake use am__CC in this case, 878fa225cbcSrjs # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 879fa225cbcSrjs CC="$am_aux_dir/compile $CC" 880fa225cbcSrjsfi 881fa225cbcSrjsdnl Make sure AC_PROG_CC is never called again, or it will override our 882fa225cbcSrjsdnl setting of CC. 883fa225cbcSrjsm4_define([AC_PROG_CC], 884fa225cbcSrjs [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 885fa225cbcSrjs]) 886fa225cbcSrjs 887fa225cbcSrjs# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 888fa225cbcSrjs 889fa225cbcSrjs# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 890fa225cbcSrjs# Free Software Foundation, Inc. 891fa225cbcSrjs# 892fa225cbcSrjs# This file is free software; the Free Software Foundation 893fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 894fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 895fa225cbcSrjs 896fa225cbcSrjs# serial 6 897fa225cbcSrjs 898fa225cbcSrjs# AM_MISSING_PROG(NAME, PROGRAM) 899fa225cbcSrjs# ------------------------------ 900fa225cbcSrjsAC_DEFUN([AM_MISSING_PROG], 901fa225cbcSrjs[AC_REQUIRE([AM_MISSING_HAS_RUN]) 902fa225cbcSrjs$1=${$1-"${am_missing_run}$2"} 903fa225cbcSrjsAC_SUBST($1)]) 904fa225cbcSrjs 905fa225cbcSrjs 906fa225cbcSrjs# AM_MISSING_HAS_RUN 907fa225cbcSrjs# ------------------ 908fa225cbcSrjs# Define MISSING if not defined so far and test if it supports --run. 909fa225cbcSrjs# If it does, set am_missing_run to use it, otherwise, to nothing. 910fa225cbcSrjsAC_DEFUN([AM_MISSING_HAS_RUN], 911fa225cbcSrjs[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 912fa225cbcSrjsAC_REQUIRE_AUX_FILE([missing])dnl 913fa225cbcSrjsif test x"${MISSING+set}" != xset; then 914fa225cbcSrjs case $am_aux_dir in 915fa225cbcSrjs *\ * | *\ *) 916fa225cbcSrjs MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 917fa225cbcSrjs *) 918fa225cbcSrjs MISSING="\${SHELL} $am_aux_dir/missing" ;; 919fa225cbcSrjs esac 920fa225cbcSrjsfi 921fa225cbcSrjs# Use eval to expand $SHELL 922fa225cbcSrjsif eval "$MISSING --run true"; then 923fa225cbcSrjs am_missing_run="$MISSING --run " 924fa225cbcSrjselse 925fa225cbcSrjs am_missing_run= 926fa225cbcSrjs AC_MSG_WARN([`missing' script is too old or missing]) 927fa225cbcSrjsfi 928fa225cbcSrjs]) 929fa225cbcSrjs 930fa225cbcSrjs# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 931fa225cbcSrjs# 932fa225cbcSrjs# This file is free software; the Free Software Foundation 933fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 934fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 935fa225cbcSrjs 936fa225cbcSrjs# AM_PROG_MKDIR_P 937fa225cbcSrjs# --------------- 938fa225cbcSrjs# Check for `mkdir -p'. 939fa225cbcSrjsAC_DEFUN([AM_PROG_MKDIR_P], 940fa225cbcSrjs[AC_PREREQ([2.60])dnl 941fa225cbcSrjsAC_REQUIRE([AC_PROG_MKDIR_P])dnl 942fa225cbcSrjsdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 943fa225cbcSrjsdnl while keeping a definition of mkdir_p for backward compatibility. 944fa225cbcSrjsdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 945fa225cbcSrjsdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 946fa225cbcSrjsdnl Makefile.ins that do not define MKDIR_P, so we do our own 947fa225cbcSrjsdnl adjustment using top_builddir (which is defined more often than 948fa225cbcSrjsdnl MKDIR_P). 949fa225cbcSrjsAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 950fa225cbcSrjscase $mkdir_p in 951fa225cbcSrjs [[\\/$]]* | ?:[[\\/]]*) ;; 952fa225cbcSrjs */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 953fa225cbcSrjsesac 954fa225cbcSrjs]) 955fa225cbcSrjs 956fa225cbcSrjs# Helper functions for option handling. -*- Autoconf -*- 957fa225cbcSrjs 958fa225cbcSrjs# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 959fa225cbcSrjs# 960fa225cbcSrjs# This file is free software; the Free Software Foundation 961fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 962fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 963fa225cbcSrjs 964fa225cbcSrjs# serial 4 965fa225cbcSrjs 966fa225cbcSrjs# _AM_MANGLE_OPTION(NAME) 967fa225cbcSrjs# ----------------------- 968fa225cbcSrjsAC_DEFUN([_AM_MANGLE_OPTION], 969fa225cbcSrjs[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 970fa225cbcSrjs 971fa225cbcSrjs# _AM_SET_OPTION(NAME) 972fa225cbcSrjs# ------------------------------ 973fa225cbcSrjs# Set option NAME. Presently that only means defining a flag for this option. 974fa225cbcSrjsAC_DEFUN([_AM_SET_OPTION], 975fa225cbcSrjs[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 976fa225cbcSrjs 977fa225cbcSrjs# _AM_SET_OPTIONS(OPTIONS) 978fa225cbcSrjs# ---------------------------------- 979fa225cbcSrjs# OPTIONS is a space-separated list of Automake options. 980fa225cbcSrjsAC_DEFUN([_AM_SET_OPTIONS], 981fa225cbcSrjs[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 982fa225cbcSrjs 983fa225cbcSrjs# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 984fa225cbcSrjs# ------------------------------------------- 985fa225cbcSrjs# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 986fa225cbcSrjsAC_DEFUN([_AM_IF_OPTION], 987fa225cbcSrjs[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 988fa225cbcSrjs 989fa225cbcSrjs# Check to make sure that the build environment is sane. -*- Autoconf -*- 990fa225cbcSrjs 991fa225cbcSrjs# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 992fa225cbcSrjs# Free Software Foundation, Inc. 993fa225cbcSrjs# 994fa225cbcSrjs# This file is free software; the Free Software Foundation 995fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 996fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 997fa225cbcSrjs 998fa225cbcSrjs# serial 5 999fa225cbcSrjs 1000fa225cbcSrjs# AM_SANITY_CHECK 1001fa225cbcSrjs# --------------- 1002fa225cbcSrjsAC_DEFUN([AM_SANITY_CHECK], 1003fa225cbcSrjs[AC_MSG_CHECKING([whether build environment is sane]) 1004fa225cbcSrjs# Just in case 1005fa225cbcSrjssleep 1 1006fa225cbcSrjsecho timestamp > conftest.file 1007fa225cbcSrjs# Reject unsafe characters in $srcdir or the absolute working directory 1008fa225cbcSrjs# name. Accept space and tab only in the latter. 1009fa225cbcSrjsam_lf=' 1010fa225cbcSrjs' 1011fa225cbcSrjscase `pwd` in 1012fa225cbcSrjs *[[\\\"\#\$\&\'\`$am_lf]]*) 1013fa225cbcSrjs AC_MSG_ERROR([unsafe absolute working directory name]);; 1014fa225cbcSrjsesac 1015fa225cbcSrjscase $srcdir in 1016fa225cbcSrjs *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1017fa225cbcSrjs AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1018fa225cbcSrjsesac 1019fa225cbcSrjs 1020fa225cbcSrjs# Do `set' in a subshell so we don't clobber the current shell's 1021fa225cbcSrjs# arguments. Must try -L first in case configure is actually a 1022fa225cbcSrjs# symlink; some systems play weird games with the mod time of symlinks 1023fa225cbcSrjs# (eg FreeBSD returns the mod time of the symlink's containing 1024fa225cbcSrjs# directory). 1025fa225cbcSrjsif ( 1026fa225cbcSrjs set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1027fa225cbcSrjs if test "$[*]" = "X"; then 1028fa225cbcSrjs # -L didn't work. 1029fa225cbcSrjs set X `ls -t "$srcdir/configure" conftest.file` 1030fa225cbcSrjs fi 1031fa225cbcSrjs rm -f conftest.file 1032fa225cbcSrjs if test "$[*]" != "X $srcdir/configure conftest.file" \ 1033fa225cbcSrjs && test "$[*]" != "X conftest.file $srcdir/configure"; then 1034fa225cbcSrjs 1035fa225cbcSrjs # If neither matched, then we have a broken ls. This can happen 1036fa225cbcSrjs # if, for instance, CONFIG_SHELL is bash and it inherits a 1037fa225cbcSrjs # broken ls alias from the environment. This has actually 1038fa225cbcSrjs # happened. Such a system could not be considered "sane". 1039fa225cbcSrjs AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1040fa225cbcSrjsalias in your environment]) 1041fa225cbcSrjs fi 1042fa225cbcSrjs 1043fa225cbcSrjs test "$[2]" = conftest.file 1044fa225cbcSrjs ) 1045fa225cbcSrjsthen 1046fa225cbcSrjs # Ok. 1047fa225cbcSrjs : 1048fa225cbcSrjselse 1049fa225cbcSrjs AC_MSG_ERROR([newly created file is older than distributed files! 1050fa225cbcSrjsCheck your system clock]) 1051fa225cbcSrjsfi 1052fa225cbcSrjsAC_MSG_RESULT(yes)]) 1053fa225cbcSrjs 1054fa225cbcSrjs# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1055fa225cbcSrjs# 1056fa225cbcSrjs# This file is free software; the Free Software Foundation 1057fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 1058fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 1059fa225cbcSrjs 1060fa225cbcSrjs# AM_PROG_INSTALL_STRIP 1061fa225cbcSrjs# --------------------- 1062fa225cbcSrjs# One issue with vendor `install' (even GNU) is that you can't 1063fa225cbcSrjs# specify the program used to strip binaries. This is especially 1064fa225cbcSrjs# annoying in cross-compiling environments, where the build's strip 1065fa225cbcSrjs# is unlikely to handle the host's binaries. 1066fa225cbcSrjs# Fortunately install-sh will honor a STRIPPROG variable, so we 1067fa225cbcSrjs# always use install-sh in `make install-strip', and initialize 1068fa225cbcSrjs# STRIPPROG with the value of the STRIP variable (set by the user). 1069fa225cbcSrjsAC_DEFUN([AM_PROG_INSTALL_STRIP], 1070fa225cbcSrjs[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1071fa225cbcSrjs# Installed binaries are usually stripped using `strip' when the user 1072fa225cbcSrjs# run `make install-strip'. However `strip' might not be the right 1073fa225cbcSrjs# tool to use in cross-compilation environments, therefore Automake 1074fa225cbcSrjs# will honor the `STRIP' environment variable to overrule this program. 1075fa225cbcSrjsdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1076fa225cbcSrjsif test "$cross_compiling" != no; then 1077fa225cbcSrjs AC_CHECK_TOOL([STRIP], [strip], :) 1078fa225cbcSrjsfi 1079fa225cbcSrjsINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1080fa225cbcSrjsAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1081fa225cbcSrjs 1082fa225cbcSrjs# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1083fa225cbcSrjs# 1084fa225cbcSrjs# This file is free software; the Free Software Foundation 1085fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 1086fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 1087fa225cbcSrjs 1088fa225cbcSrjs# serial 2 1089fa225cbcSrjs 1090fa225cbcSrjs# _AM_SUBST_NOTMAKE(VARIABLE) 1091fa225cbcSrjs# --------------------------- 1092fa225cbcSrjs# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1093fa225cbcSrjs# This macro is traced by Automake. 1094fa225cbcSrjsAC_DEFUN([_AM_SUBST_NOTMAKE]) 1095fa225cbcSrjs 1096fa225cbcSrjs# AM_SUBST_NOTMAKE(VARIABLE) 1097fa225cbcSrjs# --------------------------- 1098fa225cbcSrjs# Public sister of _AM_SUBST_NOTMAKE. 1099fa225cbcSrjsAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1100fa225cbcSrjs 1101fa225cbcSrjs# Check how to create a tarball. -*- Autoconf -*- 1102fa225cbcSrjs 1103fa225cbcSrjs# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1104fa225cbcSrjs# 1105fa225cbcSrjs# This file is free software; the Free Software Foundation 1106fa225cbcSrjs# gives unlimited permission to copy and/or distribute it, 1107fa225cbcSrjs# with or without modifications, as long as this notice is preserved. 1108fa225cbcSrjs 1109fa225cbcSrjs# serial 2 1110fa225cbcSrjs 1111fa225cbcSrjs# _AM_PROG_TAR(FORMAT) 1112fa225cbcSrjs# -------------------- 1113fa225cbcSrjs# Check how to create a tarball in format FORMAT. 1114fa225cbcSrjs# FORMAT should be one of `v7', `ustar', or `pax'. 1115fa225cbcSrjs# 1116fa225cbcSrjs# Substitute a variable $(am__tar) that is a command 1117fa225cbcSrjs# writing to stdout a FORMAT-tarball containing the directory 1118fa225cbcSrjs# $tardir. 1119fa225cbcSrjs# tardir=directory && $(am__tar) > result.tar 1120fa225cbcSrjs# 1121fa225cbcSrjs# Substitute a variable $(am__untar) that extract such 1122fa225cbcSrjs# a tarball read from stdin. 1123fa225cbcSrjs# $(am__untar) < result.tar 1124fa225cbcSrjsAC_DEFUN([_AM_PROG_TAR], 1125fa225cbcSrjs[# Always define AMTAR for backward compatibility. 1126fa225cbcSrjsAM_MISSING_PROG([AMTAR], [tar]) 1127fa225cbcSrjsm4_if([$1], [v7], 1128fa225cbcSrjs [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1129fa225cbcSrjs [m4_case([$1], [ustar],, [pax],, 1130fa225cbcSrjs [m4_fatal([Unknown tar format])]) 1131fa225cbcSrjsAC_MSG_CHECKING([how to create a $1 tar archive]) 1132fa225cbcSrjs# Loop over all known methods to create a tar archive until one works. 1133fa225cbcSrjs_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1134fa225cbcSrjs_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1135fa225cbcSrjs# Do not fold the above two line into one, because Tru64 sh and 1136fa225cbcSrjs# Solaris sh will not grok spaces in the rhs of `-'. 1137fa225cbcSrjsfor _am_tool in $_am_tools 1138fa225cbcSrjsdo 1139fa225cbcSrjs case $_am_tool in 1140fa225cbcSrjs gnutar) 1141fa225cbcSrjs for _am_tar in tar gnutar gtar; 1142fa225cbcSrjs do 1143fa225cbcSrjs AM_RUN_LOG([$_am_tar --version]) && break 1144fa225cbcSrjs done 1145fa225cbcSrjs am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1146fa225cbcSrjs am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1147fa225cbcSrjs am__untar="$_am_tar -xf -" 1148fa225cbcSrjs ;; 1149fa225cbcSrjs plaintar) 1150fa225cbcSrjs # Must skip GNU tar: if it does not support --format= it doesn't create 1151fa225cbcSrjs # ustar tarball either. 1152fa225cbcSrjs (tar --version) >/dev/null 2>&1 && continue 1153fa225cbcSrjs am__tar='tar chf - "$$tardir"' 1154fa225cbcSrjs am__tar_='tar chf - "$tardir"' 1155fa225cbcSrjs am__untar='tar xf -' 1156fa225cbcSrjs ;; 1157fa225cbcSrjs pax) 1158fa225cbcSrjs am__tar='pax -L -x $1 -w "$$tardir"' 1159fa225cbcSrjs am__tar_='pax -L -x $1 -w "$tardir"' 1160fa225cbcSrjs am__untar='pax -r' 1161fa225cbcSrjs ;; 1162fa225cbcSrjs cpio) 1163fa225cbcSrjs am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1164fa225cbcSrjs am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1165fa225cbcSrjs am__untar='cpio -i -H $1 -d' 1166fa225cbcSrjs ;; 1167fa225cbcSrjs none) 1168fa225cbcSrjs am__tar=false 1169fa225cbcSrjs am__tar_=false 1170fa225cbcSrjs am__untar=false 1171fa225cbcSrjs ;; 1172fa225cbcSrjs esac 1173fa225cbcSrjs 1174fa225cbcSrjs # If the value was cached, stop now. We just wanted to have am__tar 1175fa225cbcSrjs # and am__untar set. 1176fa225cbcSrjs test -n "${am_cv_prog_tar_$1}" && break 1177fa225cbcSrjs 1178fa225cbcSrjs # tar/untar a dummy directory, and stop if the command works 1179fa225cbcSrjs rm -rf conftest.dir 1180fa225cbcSrjs mkdir conftest.dir 1181fa225cbcSrjs echo GrepMe > conftest.dir/file 1182fa225cbcSrjs AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1183fa225cbcSrjs rm -rf conftest.dir 1184fa225cbcSrjs if test -s conftest.tar; then 1185fa225cbcSrjs AM_RUN_LOG([$am__untar <conftest.tar]) 1186fa225cbcSrjs grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1187fa225cbcSrjs fi 1188fa225cbcSrjsdone 1189fa225cbcSrjsrm -rf conftest.dir 1190fa225cbcSrjs 1191fa225cbcSrjsAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1192fa225cbcSrjsAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1193fa225cbcSrjsAC_SUBST([am__tar]) 1194fa225cbcSrjsAC_SUBST([am__untar]) 1195fa225cbcSrjs]) # _AM_PROG_TAR 1196fa225cbcSrjs 1197fa225cbcSrjsm4_include([m4/dolt.m4]) 1198fa225cbcSrjsm4_include([m4/libtool.m4]) 1199fa225cbcSrjsm4_include([m4/ltoptions.m4]) 1200fa225cbcSrjsm4_include([m4/ltsugar.m4]) 1201fa225cbcSrjsm4_include([m4/ltversion.m4]) 1202fa225cbcSrjsm4_include([m4/lt~obsolete.m4]) 1203fa225cbcSrjsm4_include([m4/shave.m4]) 1204fa225cbcSrjsdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1205fa225cbcSrjsdnl 1206fa225cbcSrjsdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1207fa225cbcSrjsdnl 1208fa225cbcSrjsdnl Permission is hereby granted, free of charge, to any person obtaining a 1209fa225cbcSrjsdnl copy of this software and associated documentation files (the 1210fa225cbcSrjsdnl "Software"), to deal in the Software without restriction, including 1211fa225cbcSrjsdnl without limitation the rights to use, copy, modify, merge, publish, 1212fa225cbcSrjsdnl distribute, and/or sell copies of the Software, and to permit persons 1213fa225cbcSrjsdnl to whom the Software is furnished to do so, provided that the above 1214fa225cbcSrjsdnl copyright notice(s) and this permission notice appear in all copies of 1215fa225cbcSrjsdnl the Software and that both the above copyright notice(s) and this 1216fa225cbcSrjsdnl permission notice appear in supporting documentation. 1217fa225cbcSrjsdnl 1218fa225cbcSrjsdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1219fa225cbcSrjsdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1220fa225cbcSrjsdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1221fa225cbcSrjsdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1222fa225cbcSrjsdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1223fa225cbcSrjsdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1224fa225cbcSrjsdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1225fa225cbcSrjsdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 1226fa225cbcSrjsdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1227fa225cbcSrjsdnl 1228fa225cbcSrjsdnl Except as contained in this notice, the name of a copyright holder 1229fa225cbcSrjsdnl shall not be used in advertising or otherwise to promote the sale, use 1230fa225cbcSrjsdnl or other dealings in this Software without prior written authorization 1231fa225cbcSrjsdnl of the copyright holder. 1232fa225cbcSrjs 1233fa225cbcSrjs# XORG_MACROS_VERSION(required-version) 1234fa225cbcSrjs# ------------------------------------- 1235fa225cbcSrjs# Minimum version: 1.1.0 1236fa225cbcSrjs# 1237fa225cbcSrjs# If you're using a macro added in Version 1.1 or newer, include this in 1238fa225cbcSrjs# your configure.ac with the minimum required version, such as: 1239fa225cbcSrjs# XORG_MACROS_VERSION(1.1) 1240fa225cbcSrjs# 1241fa225cbcSrjs# To ensure that this macro is defined, also add: 1242fa225cbcSrjs# m4_ifndef([XORG_MACROS_VERSION], 1243fa225cbcSrjs# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1244fa225cbcSrjs# 1245fa225cbcSrjs# 1246fa225cbcSrjs# See the "minimum version" comment for each macro you use to see what 1247fa225cbcSrjs# version you require. 1248fa225cbcSrjsm4_defun([XORG_MACROS_VERSION],[ 1249fa225cbcSrjsm4_define([vers_have], [1.3.0]) 1250fa225cbcSrjsm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1251fa225cbcSrjsm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1252fa225cbcSrjsm4_if(m4_cmp(maj_have, maj_needed), 0,, 1253fa225cbcSrjs [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1254fa225cbcSrjsm4_if(m4_version_compare(vers_have, [$1]), -1, 1255fa225cbcSrjs [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1256fa225cbcSrjsm4_undefine([vers_have]) 1257fa225cbcSrjsm4_undefine([maj_have]) 1258fa225cbcSrjsm4_undefine([maj_needed]) 1259fa225cbcSrjs]) # XORG_MACROS_VERSION 1260fa225cbcSrjs 1261fa225cbcSrjs# XORG_PROG_RAWCPP() 1262fa225cbcSrjs# ------------------ 1263fa225cbcSrjs# Minimum version: 1.0.0 1264fa225cbcSrjs# 1265fa225cbcSrjs# Find cpp program and necessary flags for use in pre-processing text files 1266fa225cbcSrjs# such as man pages and config files 1267fa225cbcSrjsAC_DEFUN([XORG_PROG_RAWCPP],[ 1268fa225cbcSrjsAC_REQUIRE([AC_PROG_CPP]) 1269fa225cbcSrjsAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1270fa225cbcSrjs [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1271fa225cbcSrjs 1272fa225cbcSrjs# Check for flag to avoid builtin definitions - assumes unix is predefined, 1273fa225cbcSrjs# which is not the best choice for supporting other OS'es, but covers most 1274fa225cbcSrjs# of the ones we need for now. 1275fa225cbcSrjsAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1276fa225cbcSrjsAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1277fa225cbcSrjsif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1278fa225cbcSrjs AC_MSG_RESULT([no]) 1279fa225cbcSrjselse 1280fa225cbcSrjs if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1281fa225cbcSrjs RAWCPPFLAGS=-undef 1282fa225cbcSrjs AC_MSG_RESULT([yes]) 1283fa225cbcSrjs # under Cygwin unix is still defined even with -undef 1284fa225cbcSrjs elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1285fa225cbcSrjs RAWCPPFLAGS="-undef -ansi" 1286fa225cbcSrjs AC_MSG_RESULT([yes, with -ansi]) 1287fa225cbcSrjs else 1288fa225cbcSrjs AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1289fa225cbcSrjs fi 1290fa225cbcSrjsfi 1291fa225cbcSrjsrm -f conftest.$ac_ext 1292fa225cbcSrjs 1293fa225cbcSrjsAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1294fa225cbcSrjsAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1295fa225cbcSrjsif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1296fa225cbcSrjs AC_MSG_RESULT([no]) 1297fa225cbcSrjselse 1298fa225cbcSrjs if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1299fa225cbcSrjs RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1300fa225cbcSrjs AC_MSG_RESULT([yes]) 1301fa225cbcSrjs else 1302fa225cbcSrjs AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1303fa225cbcSrjs fi 1304fa225cbcSrjsfi 1305fa225cbcSrjsrm -f conftest.$ac_ext 1306fa225cbcSrjsAC_SUBST(RAWCPPFLAGS) 1307fa225cbcSrjs]) # XORG_PROG_RAWCPP 1308fa225cbcSrjs 1309fa225cbcSrjs# XORG_MANPAGE_SECTIONS() 1310fa225cbcSrjs# ----------------------- 1311fa225cbcSrjs# Minimum version: 1.0.0 1312fa225cbcSrjs# 1313fa225cbcSrjs# Determine which sections man pages go in for the different man page types 1314fa225cbcSrjs# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1315fa225cbcSrjs# Not sure if there's any better way than just hardcoding by OS name. 1316fa225cbcSrjs# Override default settings by setting environment variables 1317fa225cbcSrjs 1318fa225cbcSrjsAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1319fa225cbcSrjsAC_REQUIRE([AC_CANONICAL_HOST]) 1320fa225cbcSrjs 1321fa225cbcSrjsif test x$APP_MAN_SUFFIX = x ; then 1322fa225cbcSrjs APP_MAN_SUFFIX=1 1323fa225cbcSrjsfi 1324fa225cbcSrjsif test x$APP_MAN_DIR = x ; then 1325fa225cbcSrjs APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1326fa225cbcSrjsfi 1327fa225cbcSrjs 1328fa225cbcSrjsif test x$LIB_MAN_SUFFIX = x ; then 1329fa225cbcSrjs LIB_MAN_SUFFIX=3 1330fa225cbcSrjsfi 1331fa225cbcSrjsif test x$LIB_MAN_DIR = x ; then 1332fa225cbcSrjs LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1333fa225cbcSrjsfi 1334fa225cbcSrjs 1335fa225cbcSrjsif test x$FILE_MAN_SUFFIX = x ; then 1336fa225cbcSrjs case $host_os in 1337fa225cbcSrjs solaris*) FILE_MAN_SUFFIX=4 ;; 1338fa225cbcSrjs *) FILE_MAN_SUFFIX=5 ;; 1339fa225cbcSrjs esac 1340fa225cbcSrjsfi 1341fa225cbcSrjsif test x$FILE_MAN_DIR = x ; then 1342fa225cbcSrjs FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1343fa225cbcSrjsfi 1344fa225cbcSrjs 1345fa225cbcSrjsif test x$MISC_MAN_SUFFIX = x ; then 1346fa225cbcSrjs case $host_os in 1347fa225cbcSrjs solaris*) MISC_MAN_SUFFIX=5 ;; 1348fa225cbcSrjs *) MISC_MAN_SUFFIX=7 ;; 1349fa225cbcSrjs esac 1350fa225cbcSrjsfi 1351fa225cbcSrjsif test x$MISC_MAN_DIR = x ; then 1352fa225cbcSrjs MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1353fa225cbcSrjsfi 1354fa225cbcSrjs 1355fa225cbcSrjsif test x$DRIVER_MAN_SUFFIX = x ; then 1356fa225cbcSrjs case $host_os in 1357fa225cbcSrjs solaris*) DRIVER_MAN_SUFFIX=7 ;; 1358fa225cbcSrjs *) DRIVER_MAN_SUFFIX=4 ;; 1359fa225cbcSrjs esac 1360fa225cbcSrjsfi 1361fa225cbcSrjsif test x$DRIVER_MAN_DIR = x ; then 1362fa225cbcSrjs DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1363fa225cbcSrjsfi 1364fa225cbcSrjs 1365fa225cbcSrjsif test x$ADMIN_MAN_SUFFIX = x ; then 1366fa225cbcSrjs case $host_os in 1367fa225cbcSrjs solaris*) ADMIN_MAN_SUFFIX=1m ;; 1368fa225cbcSrjs *) ADMIN_MAN_SUFFIX=8 ;; 1369fa225cbcSrjs esac 1370fa225cbcSrjsfi 1371fa225cbcSrjsif test x$ADMIN_MAN_DIR = x ; then 1372fa225cbcSrjs ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1373fa225cbcSrjsfi 1374fa225cbcSrjs 1375fa225cbcSrjs 1376fa225cbcSrjsAC_SUBST([APP_MAN_SUFFIX]) 1377fa225cbcSrjsAC_SUBST([LIB_MAN_SUFFIX]) 1378fa225cbcSrjsAC_SUBST([FILE_MAN_SUFFIX]) 1379fa225cbcSrjsAC_SUBST([MISC_MAN_SUFFIX]) 1380fa225cbcSrjsAC_SUBST([DRIVER_MAN_SUFFIX]) 1381fa225cbcSrjsAC_SUBST([ADMIN_MAN_SUFFIX]) 1382fa225cbcSrjsAC_SUBST([APP_MAN_DIR]) 1383fa225cbcSrjsAC_SUBST([LIB_MAN_DIR]) 1384fa225cbcSrjsAC_SUBST([FILE_MAN_DIR]) 1385fa225cbcSrjsAC_SUBST([MISC_MAN_DIR]) 1386fa225cbcSrjsAC_SUBST([DRIVER_MAN_DIR]) 1387fa225cbcSrjsAC_SUBST([ADMIN_MAN_DIR]) 1388fa225cbcSrjs]) # XORG_MANPAGE_SECTIONS 1389fa225cbcSrjs 1390fa225cbcSrjs# XORG_CHECK_LINUXDOC 1391fa225cbcSrjs# ------------------- 1392fa225cbcSrjs# Minimum version: 1.0.0 1393fa225cbcSrjs# 1394fa225cbcSrjs# Defines the variable MAKE_TEXT if the necessary tools and 1395fa225cbcSrjs# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1396fa225cbcSrjs# Whether or not the necessary tools and files are found can be checked 1397fa225cbcSrjs# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1398fa225cbcSrjsAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1399fa225cbcSrjsif test x$XORG_SGML_PATH = x ; then 1400fa225cbcSrjs XORG_SGML_PATH=$prefix/share/sgml 1401fa225cbcSrjsfi 1402fa225cbcSrjsHAVE_DEFS_ENT= 1403fa225cbcSrjs 1404fa225cbcSrjsif test x"$cross_compiling" = x"yes" ; then 1405fa225cbcSrjs HAVE_DEFS_ENT=no 1406fa225cbcSrjselse 1407fa225cbcSrjs AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1408fa225cbcSrjsfi 1409fa225cbcSrjs 1410fa225cbcSrjsAC_PATH_PROG(LINUXDOC, linuxdoc) 1411fa225cbcSrjsAC_PATH_PROG(PS2PDF, ps2pdf) 1412fa225cbcSrjs 1413fa225cbcSrjsAC_MSG_CHECKING([Whether to build documentation]) 1414fa225cbcSrjs 1415fa225cbcSrjsif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1416fa225cbcSrjs BUILDDOC=yes 1417fa225cbcSrjselse 1418fa225cbcSrjs BUILDDOC=no 1419fa225cbcSrjsfi 1420fa225cbcSrjs 1421fa225cbcSrjsAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1422fa225cbcSrjs 1423fa225cbcSrjsAC_MSG_RESULT([$BUILDDOC]) 1424fa225cbcSrjs 1425fa225cbcSrjsAC_MSG_CHECKING([Whether to build pdf documentation]) 1426fa225cbcSrjs 1427fa225cbcSrjsif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1428fa225cbcSrjs BUILDPDFDOC=yes 1429fa225cbcSrjselse 1430fa225cbcSrjs BUILDPDFDOC=no 1431fa225cbcSrjsfi 1432fa225cbcSrjs 1433fa225cbcSrjsAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1434fa225cbcSrjs 1435fa225cbcSrjsAC_MSG_RESULT([$BUILDPDFDOC]) 1436fa225cbcSrjs 1437fa225cbcSrjsMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1438fa225cbcSrjsMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1439fa225cbcSrjsMAKE_PDF="$PS2PDF" 1440fa225cbcSrjsMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1441fa225cbcSrjs 1442fa225cbcSrjsAC_SUBST(MAKE_TEXT) 1443fa225cbcSrjsAC_SUBST(MAKE_PS) 1444fa225cbcSrjsAC_SUBST(MAKE_PDF) 1445fa225cbcSrjsAC_SUBST(MAKE_HTML) 1446fa225cbcSrjs]) # XORG_CHECK_LINUXDOC 1447fa225cbcSrjs 1448fa225cbcSrjs# XORG_CHECK_DOCBOOK 1449fa225cbcSrjs# ------------------- 1450fa225cbcSrjs# Minimum version: 1.0.0 1451fa225cbcSrjs# 1452fa225cbcSrjs# Checks for the ability to build output formats from SGML DocBook source. 1453fa225cbcSrjs# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1454fa225cbcSrjs# indicates whether the necessary tools and files are found and, if set, 1455fa225cbcSrjs# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1456fa225cbcSrjsAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1457fa225cbcSrjsif test x$XORG_SGML_PATH = x ; then 1458fa225cbcSrjs XORG_SGML_PATH=$prefix/share/sgml 1459fa225cbcSrjsfi 1460fa225cbcSrjsHAVE_DEFS_ENT= 1461fa225cbcSrjsBUILDTXTDOC=no 1462fa225cbcSrjsBUILDPDFDOC=no 1463fa225cbcSrjsBUILDPSDOC=no 1464fa225cbcSrjsBUILDHTMLDOC=no 1465fa225cbcSrjs 1466fa225cbcSrjsAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1467fa225cbcSrjs 1468fa225cbcSrjsAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1469fa225cbcSrjsAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1470fa225cbcSrjsAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1471fa225cbcSrjsAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1472fa225cbcSrjs 1473fa225cbcSrjsAC_MSG_CHECKING([Whether to build text documentation]) 1474fa225cbcSrjsif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1475fa225cbcSrjs test x$BUILD_TXTDOC != xno; then 1476fa225cbcSrjs BUILDTXTDOC=yes 1477fa225cbcSrjsfi 1478fa225cbcSrjsAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1479fa225cbcSrjsAC_MSG_RESULT([$BUILDTXTDOC]) 1480fa225cbcSrjs 1481fa225cbcSrjsAC_MSG_CHECKING([Whether to build PDF documentation]) 1482fa225cbcSrjsif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1483fa225cbcSrjs test x$BUILD_PDFDOC != xno; then 1484fa225cbcSrjs BUILDPDFDOC=yes 1485fa225cbcSrjsfi 1486fa225cbcSrjsAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1487fa225cbcSrjsAC_MSG_RESULT([$BUILDPDFDOC]) 1488fa225cbcSrjs 1489fa225cbcSrjsAC_MSG_CHECKING([Whether to build PostScript documentation]) 1490fa225cbcSrjsif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1491fa225cbcSrjs test x$BUILD_PSDOC != xno; then 1492fa225cbcSrjs BUILDPSDOC=yes 1493fa225cbcSrjsfi 1494fa225cbcSrjsAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1495fa225cbcSrjsAC_MSG_RESULT([$BUILDPSDOC]) 1496fa225cbcSrjs 1497fa225cbcSrjsAC_MSG_CHECKING([Whether to build HTML documentation]) 1498fa225cbcSrjsif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1499fa225cbcSrjs test x$BUILD_HTMLDOC != xno; then 1500fa225cbcSrjs BUILDHTMLDOC=yes 1501fa225cbcSrjsfi 1502fa225cbcSrjsAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1503fa225cbcSrjsAC_MSG_RESULT([$BUILDHTMLDOC]) 1504fa225cbcSrjs 1505fa225cbcSrjsMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1506fa225cbcSrjsMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1507fa225cbcSrjsMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1508fa225cbcSrjsMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1509fa225cbcSrjs 1510fa225cbcSrjsAC_SUBST(MAKE_TEXT) 1511fa225cbcSrjsAC_SUBST(MAKE_PS) 1512fa225cbcSrjsAC_SUBST(MAKE_PDF) 1513fa225cbcSrjsAC_SUBST(MAKE_HTML) 1514fa225cbcSrjs]) # XORG_CHECK_DOCBOOK 1515fa225cbcSrjs 1516fa225cbcSrjs# XORG_CHECK_MALLOC_ZERO 1517fa225cbcSrjs# ---------------------- 1518fa225cbcSrjs# Minimum version: 1.0.0 1519fa225cbcSrjs# 1520fa225cbcSrjs# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1521fa225cbcSrjs# malloc(0) returns NULL. Packages should add one of these cflags to 1522fa225cbcSrjs# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1523fa225cbcSrjsAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1524fa225cbcSrjsAC_ARG_ENABLE(malloc0returnsnull, 1525fa225cbcSrjs AS_HELP_STRING([--enable-malloc0returnsnull], 1526fa225cbcSrjs [malloc(0) returns NULL (default: auto)]), 1527fa225cbcSrjs [MALLOC_ZERO_RETURNS_NULL=$enableval], 1528fa225cbcSrjs [MALLOC_ZERO_RETURNS_NULL=auto]) 1529fa225cbcSrjs 1530fa225cbcSrjsAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1531fa225cbcSrjsif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1532fa225cbcSrjs AC_RUN_IFELSE([ 1533fa225cbcSrjschar *malloc(); 1534fa225cbcSrjschar *realloc(); 1535fa225cbcSrjschar *calloc(); 1536fa225cbcSrjsmain() { 1537fa225cbcSrjs char *m0, *r0, *c0, *p; 1538fa225cbcSrjs m0 = malloc(0); 1539fa225cbcSrjs p = malloc(10); 1540fa225cbcSrjs r0 = realloc(p,0); 1541fa225cbcSrjs c0 = calloc(0); 1542fa225cbcSrjs exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1543fa225cbcSrjs}], 1544fa225cbcSrjs [MALLOC_ZERO_RETURNS_NULL=yes], 1545fa225cbcSrjs [MALLOC_ZERO_RETURNS_NULL=no]) 1546fa225cbcSrjsfi 1547fa225cbcSrjsAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1548fa225cbcSrjs 1549fa225cbcSrjsif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1550fa225cbcSrjs MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1551fa225cbcSrjs XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1552fa225cbcSrjs XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1553fa225cbcSrjselse 1554fa225cbcSrjs MALLOC_ZERO_CFLAGS="" 1555fa225cbcSrjs XMALLOC_ZERO_CFLAGS="" 1556fa225cbcSrjs XTMALLOC_ZERO_CFLAGS="" 1557fa225cbcSrjsfi 1558fa225cbcSrjs 1559fa225cbcSrjsAC_SUBST([MALLOC_ZERO_CFLAGS]) 1560fa225cbcSrjsAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1561fa225cbcSrjsAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1562fa225cbcSrjs]) # XORG_CHECK_MALLOC_ZERO 1563fa225cbcSrjs 1564fa225cbcSrjs# XORG_WITH_LINT() 1565fa225cbcSrjs# ---------------- 1566fa225cbcSrjs# Minimum version: 1.1.0 1567fa225cbcSrjs# 1568fa225cbcSrjs# Sets up flags for source checkers such as lint and sparse if --with-lint 1569fa225cbcSrjs# is specified. (Use --with-lint=sparse for sparse.) 1570fa225cbcSrjs# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1571fa225cbcSrjs# Sets $LINT_FLAGS to flags to pass to source checker 1572fa225cbcSrjs# Sets LINT automake conditional if enabled (default: disabled) 1573fa225cbcSrjs# 1574fa225cbcSrjsAC_DEFUN([XORG_WITH_LINT],[ 1575fa225cbcSrjs 1576fa225cbcSrjs# Allow checking code with lint, sparse, etc. 1577fa225cbcSrjsAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1578fa225cbcSrjs [Use a lint-style source code checker (default: disabled)])], 1579fa225cbcSrjs [use_lint=$withval], [use_lint=no]) 1580fa225cbcSrjsif test "x$use_lint" = "xyes" ; then 1581fa225cbcSrjs LINT="lint" 1582fa225cbcSrjselse 1583fa225cbcSrjs LINT="$use_lint" 1584fa225cbcSrjsfi 1585fa225cbcSrjsif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1586fa225cbcSrjs case $LINT in 1587fa225cbcSrjs lint|*/lint) 1588fa225cbcSrjs case $host_os in 1589fa225cbcSrjs solaris*) 1590fa225cbcSrjs LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1591fa225cbcSrjs ;; 1592fa225cbcSrjs esac 1593fa225cbcSrjs ;; 1594fa225cbcSrjs esac 1595fa225cbcSrjsfi 1596fa225cbcSrjs 1597fa225cbcSrjsAC_SUBST(LINT) 1598fa225cbcSrjsAC_SUBST(LINT_FLAGS) 1599fa225cbcSrjsAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1600fa225cbcSrjs 1601fa225cbcSrjs]) # XORG_WITH_LINT 1602fa225cbcSrjs 1603fa225cbcSrjs# XORG_LINT_LIBRARY(LIBNAME) 1604fa225cbcSrjs# -------------------------- 1605fa225cbcSrjs# Minimum version: 1.1.0 1606fa225cbcSrjs# 1607fa225cbcSrjs# Sets up flags for building lint libraries for checking programs that call 1608fa225cbcSrjs# functions in the library. 1609fa225cbcSrjs# Disabled by default, enable with --enable-lint-library 1610fa225cbcSrjs# Sets: 1611fa225cbcSrjs# @LINTLIB@ - name of lint library file to make 1612fa225cbcSrjs# MAKE_LINT_LIB - automake conditional 1613fa225cbcSrjs# 1614fa225cbcSrjs 1615fa225cbcSrjsAC_DEFUN([XORG_LINT_LIBRARY],[ 1616fa225cbcSrjsAC_REQUIRE([XORG_WITH_LINT]) 1617fa225cbcSrjs# Build lint "library" for more indepth checks of programs calling this library 1618fa225cbcSrjsAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1619fa225cbcSrjs [Create lint library (default: disabled)])], 1620fa225cbcSrjs [make_lint_lib=$enableval], [make_lint_lib=no]) 1621fa225cbcSrjsif test "x$make_lint_lib" != "xno" ; then 1622fa225cbcSrjs if test "x$LINT" = "xno" ; then 1623fa225cbcSrjs AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1624fa225cbcSrjs fi 1625fa225cbcSrjs if test "x$make_lint_lib" = "xyes" ; then 1626fa225cbcSrjs LINTLIB=llib-l$1.ln 1627fa225cbcSrjs else 1628fa225cbcSrjs LINTLIB=$make_lint_lib 1629fa225cbcSrjs fi 1630fa225cbcSrjsfi 1631fa225cbcSrjsAC_SUBST(LINTLIB) 1632fa225cbcSrjsAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1633fa225cbcSrjs 1634fa225cbcSrjs]) # XORG_LINT_LIBRARY 1635fa225cbcSrjs 1636fa225cbcSrjs# XORG_CWARNFLAGS 1637fa225cbcSrjs# --------------- 1638fa225cbcSrjs# Minimum version: 1.2.0 1639fa225cbcSrjs# 1640fa225cbcSrjs# Defines CWARNFLAGS to enable C compiler warnings. 1641fa225cbcSrjs# 1642fa225cbcSrjsAC_DEFUN([XORG_CWARNFLAGS], [ 1643fa225cbcSrjsAC_REQUIRE([AC_PROG_CC]) 1644fa225cbcSrjsif test "x$GCC" = xyes ; then 1645fa225cbcSrjs CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1646fa225cbcSrjs-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1647fa225cbcSrjs-Wbad-function-cast" 1648fa225cbcSrjs case `$CC -dumpversion` in 1649fa225cbcSrjs 3.4.* | 4.*) 1650fa225cbcSrjs CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1651fa225cbcSrjs ;; 1652fa225cbcSrjs esac 1653fa225cbcSrjselse 1654fa225cbcSrjs AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1655fa225cbcSrjs if test "x$SUNCC" = "xyes"; then 1656fa225cbcSrjs CWARNFLAGS="-v" 1657fa225cbcSrjs fi 1658fa225cbcSrjsfi 1659fa225cbcSrjsAC_SUBST(CWARNFLAGS) 1660fa225cbcSrjsm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 1661fa225cbcSrjs]) # XORG_CWARNFLAGS 1662fa225cbcSrjs 1663fa225cbcSrjs# XORG_STRICT_OPTION 1664fa225cbcSrjs# ----------------------- 1665fa225cbcSrjs# Minimum version: 1.3.0 1666fa225cbcSrjs# 1667fa225cbcSrjs# Add configure option to enable strict compilation 1668fa225cbcSrjsAC_DEFUN([XORG_STRICT_OPTION], [ 1669fa225cbcSrjsAC_REQUIRE([AC_PROG_CC]) 1670fa225cbcSrjsAC_REQUIRE([AC_PROG_CC_C99]) 1671fa225cbcSrjsAC_REQUIRE([XORG_CWARNFLAGS]) 1672fa225cbcSrjs 1673fa225cbcSrjsAC_ARG_ENABLE(strict-compilation, 1674fa225cbcSrjs AS_HELP_STRING([--enable-strict-compilation], 1675fa225cbcSrjs [Enable all warnings from compiler and make them errors (default: disabled)]), 1676fa225cbcSrjs [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1677fa225cbcSrjsif test "x$STRICT_COMPILE" = "xyes"; then 1678fa225cbcSrjs AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1679fa225cbcSrjs AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1680fa225cbcSrjs if test "x$GCC" = xyes ; then 1681fa225cbcSrjs STRICT_CFLAGS="-pedantic -Werror" 1682fa225cbcSrjs elif test "x$SUNCC" = "xyes"; then 1683fa225cbcSrjs STRICT_CFLAGS="-errwarn" 1684fa225cbcSrjs elif test "x$INTELCC" = "xyes"; then 1685fa225cbcSrjs STRICT_CFLAGS="-Werror" 1686fa225cbcSrjs fi 1687fa225cbcSrjsfi 1688fa225cbcSrjsCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 1689fa225cbcSrjsAC_SUBST([CWARNFLAGS]) 1690fa225cbcSrjs]) # XORG_STRICT_OPTION 1691fa225cbcSrjs 1692fa225cbcSrjs# XORG_DEFAULT_OPTIONS 1693fa225cbcSrjs# -------------------- 1694fa225cbcSrjs# Minimum version: 1.3.0 1695fa225cbcSrjs# 1696fa225cbcSrjs# Defines default options for X.Org modules. 1697fa225cbcSrjs# 1698fa225cbcSrjsAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1699fa225cbcSrjsXORG_CWARNFLAGS 1700fa225cbcSrjsXORG_STRICT_OPTION 1701fa225cbcSrjsXORG_RELEASE_VERSION 1702fa225cbcSrjsXORG_CHANGELOG 1703fa225cbcSrjsXORG_MANPAGE_SECTIONS 1704fa225cbcSrjs]) # XORG_DEFAULT_OPTIONS 1705fa225cbcSrjsdnl Copyright 2005 Red Hat, Inc 1706fa225cbcSrjsdnl 1707fa225cbcSrjsdnl Permission to use, copy, modify, distribute, and sell this software and its 1708fa225cbcSrjsdnl documentation for any purpose is hereby granted without fee, provided that 1709fa225cbcSrjsdnl the above copyright notice appear in all copies and that both that 1710fa225cbcSrjsdnl copyright notice and this permission notice appear in supporting 1711fa225cbcSrjsdnl documentation. 1712fa225cbcSrjsdnl 1713fa225cbcSrjsdnl The above copyright notice and this permission notice shall be included 1714fa225cbcSrjsdnl in all copies or substantial portions of the Software. 1715fa225cbcSrjsdnl 1716fa225cbcSrjsdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1717fa225cbcSrjsdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1718fa225cbcSrjsdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1719fa225cbcSrjsdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1720fa225cbcSrjsdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1721fa225cbcSrjsdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1722fa225cbcSrjsdnl OTHER DEALINGS IN THE SOFTWARE. 1723fa225cbcSrjsdnl 1724fa225cbcSrjsdnl Except as contained in this notice, the name of the copyright holders shall 1725fa225cbcSrjsdnl not be used in advertising or otherwise to promote the sale, use or 1726fa225cbcSrjsdnl other dealings in this Software without prior written authorization 1727fa225cbcSrjsdnl from the copyright holders. 1728fa225cbcSrjsdnl 1729fa225cbcSrjs 1730fa225cbcSrjs# XORG_RELEASE_VERSION 1731fa225cbcSrjs# -------------------- 1732fa225cbcSrjs# Adds --with/without-release-string and changes the PACKAGE and 1733fa225cbcSrjs# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1734fa225cbcSrjs# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1735fa225cbcSrjs# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1736fa225cbcSrjs 1737fa225cbcSrjsAC_DEFUN([XORG_RELEASE_VERSION],[ 1738fa225cbcSrjs AC_ARG_WITH(release-version, 1739fa225cbcSrjs AS_HELP_STRING([--with-release-version=STRING], 1740fa225cbcSrjs [Use release version string in package name]), 1741fa225cbcSrjs [RELEASE_VERSION="$withval"], 1742fa225cbcSrjs [RELEASE_VERSION=""]) 1743fa225cbcSrjs if test "x$RELEASE_VERSION" != "x"; then 1744fa225cbcSrjs PACKAGE="$PACKAGE-$RELEASE_VERSION" 1745fa225cbcSrjs PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1746fa225cbcSrjs AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1747fa225cbcSrjs fi 1748fa225cbcSrjs AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1749fa225cbcSrjs [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1750fa225cbcSrjs [Major version of this package]) 1751fa225cbcSrjs PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1752fa225cbcSrjs if test "x$PVM" = "x"; then 1753fa225cbcSrjs PVM="0" 1754fa225cbcSrjs fi 1755fa225cbcSrjs AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1756fa225cbcSrjs [$PVM], 1757fa225cbcSrjs [Minor version of this package]) 1758fa225cbcSrjs PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1759fa225cbcSrjs if test "x$PVP" = "x"; then 1760fa225cbcSrjs PVP="0" 1761fa225cbcSrjs fi 1762fa225cbcSrjs AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1763fa225cbcSrjs [$PVP], 1764fa225cbcSrjs [Patch version of this package]) 1765fa225cbcSrjs]) 1766fa225cbcSrjs 1767fa225cbcSrjs# XORG_CHANGELOG() 1768fa225cbcSrjs# ---------------- 1769fa225cbcSrjs# Minimum version: 1.2.0 1770fa225cbcSrjs# 1771fa225cbcSrjs# Defines the variable CHANGELOG_CMD as the command to generate 1772fa225cbcSrjs# ChangeLog from git. 1773fa225cbcSrjs# 1774fa225cbcSrjs# Arrange that distcleancheck ignores ChangeLog left over by distclean. 1775fa225cbcSrjs# 1776fa225cbcSrjsAC_DEFUN([XORG_CHANGELOG], [ 1777fa225cbcSrjsCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 1778fa225cbcSrjsmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 1779fa225cbcSrjsecho 'git directory not found: installing possibly empty changelog.' >&2)" 1780fa225cbcSrjsAC_SUBST([CHANGELOG_CMD]) 1781fa225cbcSrjsAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 1782fa225cbcSrjs]) # XORG_CHANGELOG 1783fa225cbcSrjs 1784fa225cbcSrjsdnl Copyright 2005 Red Hat, Inc 1785fa225cbcSrjsdnl 1786fa225cbcSrjsdnl Permission to use, copy, modify, distribute, and sell this software and its 1787fa225cbcSrjsdnl documentation for any purpose is hereby granted without fee, provided that 1788fa225cbcSrjsdnl the above copyright notice appear in all copies and that both that 1789fa225cbcSrjsdnl copyright notice and this permission notice appear in supporting 1790fa225cbcSrjsdnl documentation. 1791fa225cbcSrjsdnl 1792fa225cbcSrjsdnl The above copyright notice and this permission notice shall be included 1793fa225cbcSrjsdnl in all copies or substantial portions of the Software. 1794fa225cbcSrjsdnl 1795fa225cbcSrjsdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1796fa225cbcSrjsdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1797fa225cbcSrjsdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1798fa225cbcSrjsdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1799fa225cbcSrjsdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1800fa225cbcSrjsdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1801fa225cbcSrjsdnl OTHER DEALINGS IN THE SOFTWARE. 1802fa225cbcSrjsdnl 1803fa225cbcSrjsdnl Except as contained in this notice, the name of the copyright holders shall 1804fa225cbcSrjsdnl not be used in advertising or otherwise to promote the sale, use or 1805fa225cbcSrjsdnl other dealings in this Software without prior written authorization 1806fa225cbcSrjsdnl from the copyright holders. 1807fa225cbcSrjsdnl 1808fa225cbcSrjs 1809fa225cbcSrjs# XORG_DRIVER_CHECK_EXT() 1810fa225cbcSrjs# -------------------------- 1811fa225cbcSrjs# Checks for the $1 define in xorg-server.h (from the sdk). If it 1812fa225cbcSrjs# is defined, then add $1 to $REQUIRED_MODULES. 1813fa225cbcSrjs 1814fa225cbcSrjsAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1815fa225cbcSrjs SAVE_CFLAGS="$CFLAGS" 1816fa225cbcSrjs CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 1817fa225cbcSrjs AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1818fa225cbcSrjs#include "xorg-server.h" 1819fa225cbcSrjs#if !defined $1 1820fa225cbcSrjs#error $1 not defined 1821fa225cbcSrjs#endif 1822fa225cbcSrjs ]])], 1823fa225cbcSrjs [_EXT_CHECK=yes], 1824fa225cbcSrjs [_EXT_CHECK=no]) 1825fa225cbcSrjs CFLAGS="$SAVE_CFLAGS" 1826fa225cbcSrjs AC_MSG_CHECKING([if $1 is defined]) 1827fa225cbcSrjs AC_MSG_RESULT([$_EXT_CHECK]) 1828fa225cbcSrjs if test "$_EXT_CHECK" != no; then 1829fa225cbcSrjs REQUIRED_MODULES="$REQUIRED_MODULES $2" 1830fa225cbcSrjs fi 1831fa225cbcSrjs]) 1832fa225cbcSrjs 1833