aclocal.m4 revision bdf0f55d
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, 17[m4_warning([this file was generated for autoconf 2.67. 18You have another version of autoconf. It may work, but is not guaranteed to. 19If you have problems, you may need to regenerate the build system entirely. 20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 21 22# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 23# serial 1 (pkg-config-0.24) 24# 25# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 26# 27# This program is free software; you can redistribute it and/or modify 28# it under the terms of the GNU General Public License as published by 29# the Free Software Foundation; either version 2 of the License, or 30# (at your option) any later version. 31# 32# This program is distributed in the hope that it will be useful, but 33# WITHOUT ANY WARRANTY; without even the implied warranty of 34# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 35# General Public License for more details. 36# 37# You should have received a copy of the GNU General Public License 38# along with this program; if not, write to the Free Software 39# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 40# 41# As a special exception to the GNU General Public License, if you 42# distribute this file as part of a program that contains a 43# configuration script generated by Autoconf, you may include it under 44# the same distribution terms that you use for the rest of that program. 45 46# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 47# ---------------------------------- 48AC_DEFUN([PKG_PROG_PKG_CONFIG], 49[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 50m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 51AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 52AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 53AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 54 55if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 57fi 58if test -n "$PKG_CONFIG"; then 59 _pkg_min_version=m4_default([$1], [0.9.0]) 60 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 61 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 62 AC_MSG_RESULT([yes]) 63 else 64 AC_MSG_RESULT([no]) 65 PKG_CONFIG="" 66 fi 67fi[]dnl 68])# PKG_PROG_PKG_CONFIG 69 70# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 71# 72# Check to see whether a particular set of modules exists. Similar 73# to PKG_CHECK_MODULES(), but does not set variables or print errors. 74# 75# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 76# only at the first occurence in configure.ac, so if the first place 77# it's called might be skipped (such as if it is within an "if", you 78# have to call PKG_CHECK_EXISTS manually 79# -------------------------------------------------------------- 80AC_DEFUN([PKG_CHECK_EXISTS], 81[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 82if test -n "$PKG_CONFIG" && \ 83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 84 m4_default([$2], [:]) 85m4_ifvaln([$3], [else 86 $3])dnl 87fi]) 88 89# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 90# --------------------------------------------- 91m4_define([_PKG_CONFIG], 92[if test -n "$$1"; then 93 pkg_cv_[]$1="$$1" 94 elif test -n "$PKG_CONFIG"; then 95 PKG_CHECK_EXISTS([$3], 96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 97 [pkg_failed=yes]) 98 else 99 pkg_failed=untried 100fi[]dnl 101])# _PKG_CONFIG 102 103# _PKG_SHORT_ERRORS_SUPPORTED 104# ----------------------------- 105AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 106[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 108 _pkg_short_errors_supported=yes 109else 110 _pkg_short_errors_supported=no 111fi[]dnl 112])# _PKG_SHORT_ERRORS_SUPPORTED 113 114 115# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 116# [ACTION-IF-NOT-FOUND]) 117# 118# 119# Note that if there is a possibility the first call to 120# PKG_CHECK_MODULES might not happen, you should be sure to include an 121# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 122# 123# 124# -------------------------------------------------------------- 125AC_DEFUN([PKG_CHECK_MODULES], 126[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 127AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 128AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 129 130pkg_failed=no 131AC_MSG_CHECKING([for $1]) 132 133_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 134_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 135 136m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 137and $1[]_LIBS to avoid the need to call pkg-config. 138See the pkg-config man page for more details.]) 139 140if test $pkg_failed = yes; then 141 AC_MSG_RESULT([no]) 142 _PKG_SHORT_ERRORS_SUPPORTED 143 if test $_pkg_short_errors_supported = yes; then 144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 145 else 146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 147 fi 148 # Put the nasty error message in config.log where it belongs 149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 150 151 m4_default([$4], [AC_MSG_ERROR( 152[Package requirements ($2) were not met: 153 154$$1_PKG_ERRORS 155 156Consider adjusting the PKG_CONFIG_PATH environment variable if you 157installed software in a non-standard prefix. 158 159_PKG_TEXT])[]dnl 160 ]) 161elif test $pkg_failed = untried; then 162 AC_MSG_RESULT([no]) 163 m4_default([$4], [AC_MSG_FAILURE( 164[The pkg-config script could not be found or is too old. Make sure it 165is in your PATH or set the PKG_CONFIG environment variable to the full 166path to pkg-config. 167 168_PKG_TEXT 169 170To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 171 ]) 172else 173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 175 AC_MSG_RESULT([yes]) 176 $3 177fi[]dnl 178])# PKG_CHECK_MODULES 179 180dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 181dnl 182dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 183dnl 184dnl Permission is hereby granted, free of charge, to any person obtaining a 185dnl copy of this software and associated documentation files (the "Software"), 186dnl to deal in the Software without restriction, including without limitation 187dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 188dnl and/or sell copies of the Software, and to permit persons to whom the 189dnl Software is furnished to do so, subject to the following conditions: 190dnl 191dnl The above copyright notice and this permission notice (including the next 192dnl paragraph) shall be included in all copies or substantial portions of the 193dnl Software. 194dnl 195dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 196dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 197dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 198dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 199dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 200dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 201dnl DEALINGS IN THE SOFTWARE. 202 203# XORG_MACROS_VERSION(required-version) 204# ------------------------------------- 205# Minimum version: 1.1.0 206# 207# If you're using a macro added in Version 1.1 or newer, include this in 208# your configure.ac with the minimum required version, such as: 209# XORG_MACROS_VERSION(1.1) 210# 211# To ensure that this macro is defined, also add: 212# m4_ifndef([XORG_MACROS_VERSION], 213# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 214# 215# 216# See the "minimum version" comment for each macro you use to see what 217# version you require. 218m4_defun([XORG_MACROS_VERSION],[ 219m4_define([vers_have], [1.10.0]) 220m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 221m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 222m4_if(m4_cmp(maj_have, maj_needed), 0,, 223 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 224m4_if(m4_version_compare(vers_have, [$1]), -1, 225 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 226m4_undefine([vers_have]) 227m4_undefine([maj_have]) 228m4_undefine([maj_needed]) 229]) # XORG_MACROS_VERSION 230 231# XORG_PROG_RAWCPP() 232# ------------------ 233# Minimum version: 1.0.0 234# 235# Find cpp program and necessary flags for use in pre-processing text files 236# such as man pages and config files 237AC_DEFUN([XORG_PROG_RAWCPP],[ 238AC_REQUIRE([AC_PROG_CPP]) 239AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 240 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 241 242# Check for flag to avoid builtin definitions - assumes unix is predefined, 243# which is not the best choice for supporting other OS'es, but covers most 244# of the ones we need for now. 245AC_MSG_CHECKING([if $RAWCPP requires -undef]) 246AC_LANG_CONFTEST([Does cpp redefine unix ?]) 247if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 248 AC_MSG_RESULT([no]) 249else 250 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 251 RAWCPPFLAGS=-undef 252 AC_MSG_RESULT([yes]) 253 # under Cygwin unix is still defined even with -undef 254 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 255 RAWCPPFLAGS="-undef -ansi" 256 AC_MSG_RESULT([yes, with -ansi]) 257 else 258 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 259 fi 260fi 261rm -f conftest.$ac_ext 262 263AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 264AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 265if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 266 AC_MSG_RESULT([no]) 267else 268 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 269 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 270 AC_MSG_RESULT([yes]) 271 else 272 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 273 fi 274fi 275rm -f conftest.$ac_ext 276AC_SUBST(RAWCPPFLAGS) 277]) # XORG_PROG_RAWCPP 278 279# XORG_MANPAGE_SECTIONS() 280# ----------------------- 281# Minimum version: 1.0.0 282# 283# Determine which sections man pages go in for the different man page types 284# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 285# Not sure if there's any better way than just hardcoding by OS name. 286# Override default settings by setting environment variables 287# Added MAN_SUBSTS in version 1.8 288# Added AC_PROG_SED in version 1.8 289 290AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 291AC_REQUIRE([AC_CANONICAL_HOST]) 292AC_REQUIRE([AC_PROG_SED]) 293 294if test x$APP_MAN_SUFFIX = x ; then 295 APP_MAN_SUFFIX=1 296fi 297if test x$APP_MAN_DIR = x ; then 298 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 299fi 300 301if test x$LIB_MAN_SUFFIX = x ; then 302 LIB_MAN_SUFFIX=3 303fi 304if test x$LIB_MAN_DIR = x ; then 305 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 306fi 307 308if test x$FILE_MAN_SUFFIX = x ; then 309 case $host_os in 310 solaris*) FILE_MAN_SUFFIX=4 ;; 311 *) FILE_MAN_SUFFIX=5 ;; 312 esac 313fi 314if test x$FILE_MAN_DIR = x ; then 315 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 316fi 317 318if test x$MISC_MAN_SUFFIX = x ; then 319 case $host_os in 320 solaris*) MISC_MAN_SUFFIX=5 ;; 321 *) MISC_MAN_SUFFIX=7 ;; 322 esac 323fi 324if test x$MISC_MAN_DIR = x ; then 325 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 326fi 327 328if test x$DRIVER_MAN_SUFFIX = x ; then 329 case $host_os in 330 solaris*) DRIVER_MAN_SUFFIX=7 ;; 331 *) DRIVER_MAN_SUFFIX=4 ;; 332 esac 333fi 334if test x$DRIVER_MAN_DIR = x ; then 335 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 336fi 337 338if test x$ADMIN_MAN_SUFFIX = x ; then 339 case $host_os in 340 solaris*) ADMIN_MAN_SUFFIX=1m ;; 341 *) ADMIN_MAN_SUFFIX=8 ;; 342 esac 343fi 344if test x$ADMIN_MAN_DIR = x ; then 345 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 346fi 347 348 349AC_SUBST([APP_MAN_SUFFIX]) 350AC_SUBST([LIB_MAN_SUFFIX]) 351AC_SUBST([FILE_MAN_SUFFIX]) 352AC_SUBST([MISC_MAN_SUFFIX]) 353AC_SUBST([DRIVER_MAN_SUFFIX]) 354AC_SUBST([ADMIN_MAN_SUFFIX]) 355AC_SUBST([APP_MAN_DIR]) 356AC_SUBST([LIB_MAN_DIR]) 357AC_SUBST([FILE_MAN_DIR]) 358AC_SUBST([MISC_MAN_DIR]) 359AC_SUBST([DRIVER_MAN_DIR]) 360AC_SUBST([ADMIN_MAN_DIR]) 361 362XORG_MAN_PAGE="X Version 11" 363AC_SUBST([XORG_MAN_PAGE]) 364MAN_SUBSTS="\ 365 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 366 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 367 -e 's|__xservername__|Xorg|g' \ 368 -e 's|__xconfigfile__|xorg.conf|g' \ 369 -e 's|__projectroot__|\$(prefix)|g' \ 370 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 371 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 372 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 373 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 374 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 375 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 376AC_SUBST([MAN_SUBSTS]) 377 378]) # XORG_MANPAGE_SECTIONS 379 380# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 381# ------------------------ 382# Minimum version: 1.7.0 383# 384# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 385# provided by xorg-sgml-doctools, if installed. 386AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 387AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 388XORG_SGML_PATH= 389PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 390 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 391 [m4_ifval([$1],[:], 392 [if test x"$cross_compiling" != x"yes" ; then 393 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 394 [XORG_SGML_PATH=$prefix/share/sgml]) 395 fi]) 396 ]) 397 398# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 399# the path and the name of the doc stylesheet 400if test "x$XORG_SGML_PATH" != "x" ; then 401 AC_MSG_RESULT([$XORG_SGML_PATH]) 402 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 403 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 404else 405 AC_MSG_RESULT([no]) 406fi 407 408AC_SUBST(XORG_SGML_PATH) 409AC_SUBST(STYLESHEET_SRCDIR) 410AC_SUBST(XSL_STYLESHEET) 411AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 412]) # XORG_CHECK_SGML_DOCTOOLS 413 414# XORG_CHECK_LINUXDOC 415# ------------------- 416# Minimum version: 1.0.0 417# 418# Defines the variable MAKE_TEXT if the necessary tools and 419# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 420# Whether or not the necessary tools and files are found can be checked 421# with the AM_CONDITIONAL "BUILD_LINUXDOC" 422AC_DEFUN([XORG_CHECK_LINUXDOC],[ 423AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 424AC_REQUIRE([XORG_WITH_PS2PDF]) 425 426AC_PATH_PROG(LINUXDOC, linuxdoc) 427 428AC_MSG_CHECKING([whether to build documentation]) 429 430if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 431 BUILDDOC=yes 432else 433 BUILDDOC=no 434fi 435 436AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 437 438AC_MSG_RESULT([$BUILDDOC]) 439 440AC_MSG_CHECKING([whether to build pdf documentation]) 441 442if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 443 BUILDPDFDOC=yes 444else 445 BUILDPDFDOC=no 446fi 447 448AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 449 450AC_MSG_RESULT([$BUILDPDFDOC]) 451 452MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 453MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 454MAKE_PDF="$PS2PDF" 455MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 456 457AC_SUBST(MAKE_TEXT) 458AC_SUBST(MAKE_PS) 459AC_SUBST(MAKE_PDF) 460AC_SUBST(MAKE_HTML) 461]) # XORG_CHECK_LINUXDOC 462 463# XORG_CHECK_DOCBOOK 464# ------------------- 465# Minimum version: 1.0.0 466# 467# Checks for the ability to build output formats from SGML DocBook source. 468# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 469# indicates whether the necessary tools and files are found and, if set, 470# $(MAKE_XXX) blah.sgml will produce blah.xxx. 471AC_DEFUN([XORG_CHECK_DOCBOOK],[ 472AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 473 474BUILDTXTDOC=no 475BUILDPDFDOC=no 476BUILDPSDOC=no 477BUILDHTMLDOC=no 478 479AC_PATH_PROG(DOCBOOKPS, docbook2ps) 480AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 481AC_PATH_PROG(DOCBOOKHTML, docbook2html) 482AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 483 484AC_MSG_CHECKING([whether to build text documentation]) 485if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 486 test x$BUILD_TXTDOC != xno; then 487 BUILDTXTDOC=yes 488fi 489AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 490AC_MSG_RESULT([$BUILDTXTDOC]) 491 492AC_MSG_CHECKING([whether to build PDF documentation]) 493if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 494 test x$BUILD_PDFDOC != xno; then 495 BUILDPDFDOC=yes 496fi 497AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 498AC_MSG_RESULT([$BUILDPDFDOC]) 499 500AC_MSG_CHECKING([whether to build PostScript documentation]) 501if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 502 test x$BUILD_PSDOC != xno; then 503 BUILDPSDOC=yes 504fi 505AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 506AC_MSG_RESULT([$BUILDPSDOC]) 507 508AC_MSG_CHECKING([whether to build HTML documentation]) 509if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 510 test x$BUILD_HTMLDOC != xno; then 511 BUILDHTMLDOC=yes 512fi 513AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 514AC_MSG_RESULT([$BUILDHTMLDOC]) 515 516MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 517MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 518MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 519MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 520 521AC_SUBST(MAKE_TEXT) 522AC_SUBST(MAKE_PS) 523AC_SUBST(MAKE_PDF) 524AC_SUBST(MAKE_HTML) 525]) # XORG_CHECK_DOCBOOK 526 527# XORG_WITH_XMLTO([MIN-VERSION]) 528# ---------------- 529# Minimum version: 1.5.0 530# 531# Documentation tools are not always available on all platforms and sometimes 532# not at the appropriate level. This macro enables a module to test for the 533# presence of the tool and obtain it's path in separate variables. Coupled with 534# the --with-xmlto option, it allows maximum flexibilty in making decisions 535# as whether or not to use the xmlto package. 536# 537# Interface to module: 538# HAVE_XMLTO: used in makefiles to conditionally generate documentation 539# XMLTO: returns the path of the xmlto program found 540# returns the path set by the user in the environment 541# --with-xmlto: 'yes' user instructs the module to use xmlto 542# 'no' user instructs the module not to use xmlto 543# 544# Added in version 1.10.0 545# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 546# xmlto for text output requires either lynx, links, or w3m browsers 547# 548# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 549# 550AC_DEFUN([XORG_WITH_XMLTO],[ 551AC_ARG_VAR([XMLTO], [Path to xmlto command]) 552AC_ARG_WITH(xmlto, 553 AS_HELP_STRING([--with-xmlto], 554 [Use xmlto to regenerate documentation (default: yes, if installed)]), 555 [use_xmlto=$withval], [use_xmlto=auto]) 556 557if test "x$use_xmlto" = x"auto"; then 558 AC_PATH_PROG([XMLTO], [xmlto]) 559 if test "x$XMLTO" = "x"; then 560 AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 561 have_xmlto=no 562 else 563 have_xmlto=yes 564 fi 565elif test "x$use_xmlto" = x"yes" ; then 566 AC_PATH_PROG([XMLTO], [xmlto]) 567 if test "x$XMLTO" = "x"; then 568 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 569 fi 570 have_xmlto=yes 571elif test "x$use_xmlto" = x"no" ; then 572 if test "x$XMLTO" != "x"; then 573 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 574 fi 575 have_xmlto=no 576else 577 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 578fi 579 580# Test for a minimum version of xmlto, if provided. 581m4_ifval([$1], 582[if test "$have_xmlto" = yes; then 583 # scrape the xmlto version 584 AC_MSG_CHECKING([the xmlto version]) 585 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 586 AC_MSG_RESULT([$xmlto_version]) 587 AS_VERSION_COMPARE([$xmlto_version], [$1], 588 [if test "x$use_xmlto" = xauto; then 589 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 590 have_xmlto=no 591 else 592 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 593 fi]) 594fi]) 595 596# Test for the ability of xmlto to generate a text target 597have_xmlto_text=no 598cat > conftest.xml << "EOF" 599EOF 600AS_IF([test "$have_xmlto" = yes], 601 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 602 [have_xmlto_text=yes], 603 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 604rm -f conftest.xml 605AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 606AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 607]) # XORG_WITH_XMLTO 608 609# XORG_WITH_ASCIIDOC([MIN-VERSION]) 610# ---------------- 611# Minimum version: 1.5.0 612# 613# Documentation tools are not always available on all platforms and sometimes 614# not at the appropriate level. This macro enables a module to test for the 615# presence of the tool and obtain it's path in separate variables. Coupled with 616# the --with-asciidoc option, it allows maximum flexibilty in making decisions 617# as whether or not to use the asciidoc package. 618# 619# Interface to module: 620# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 621# ASCIIDOC: returns the path of the asciidoc program found 622# returns the path set by the user in the environment 623# --with-asciidoc: 'yes' user instructs the module to use asciidoc 624# 'no' user instructs the module not to use asciidoc 625# 626# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 627# 628AC_DEFUN([XORG_WITH_ASCIIDOC],[ 629AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 630AC_ARG_WITH(asciidoc, 631 AS_HELP_STRING([--with-asciidoc], 632 [Use asciidoc to regenerate documentation (default: yes, if installed)]), 633 [use_asciidoc=$withval], [use_asciidoc=auto]) 634 635if test "x$use_asciidoc" = x"auto"; then 636 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 637 if test "x$ASCIIDOC" = "x"; then 638 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 639 have_asciidoc=no 640 else 641 have_asciidoc=yes 642 fi 643elif test "x$use_asciidoc" = x"yes" ; then 644 AC_PATH_PROG([ASCIIDOC], [asciidoc]) 645 if test "x$ASCIIDOC" = "x"; then 646 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 647 fi 648 have_asciidoc=yes 649elif test "x$use_asciidoc" = x"no" ; then 650 if test "x$ASCIIDOC" != "x"; then 651 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 652 fi 653 have_asciidoc=no 654else 655 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 656fi 657m4_ifval([$1], 658[if test "$have_asciidoc" = yes; then 659 # scrape the asciidoc version 660 AC_MSG_CHECKING([the asciidoc version]) 661 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 662 AC_MSG_RESULT([$asciidoc_version]) 663 AS_VERSION_COMPARE([$asciidoc_version], [$1], 664 [if test "x$use_asciidoc" = xauto; then 665 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 666 have_asciidoc=no 667 else 668 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 669 fi]) 670fi]) 671AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 672]) # XORG_WITH_ASCIIDOC 673 674# XORG_WITH_DOXYGEN([MIN-VERSION]) 675# -------------------------------- 676# Minimum version: 1.5.0 677# 678# Documentation tools are not always available on all platforms and sometimes 679# not at the appropriate level. This macro enables a module to test for the 680# presence of the tool and obtain it's path in separate variables. Coupled with 681# the --with-doxygen option, it allows maximum flexibilty in making decisions 682# as whether or not to use the doxygen package. 683# 684# Interface to module: 685# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 686# DOXYGEN: returns the path of the doxygen program found 687# returns the path set by the user in the environment 688# --with-doxygen: 'yes' user instructs the module to use doxygen 689# 'no' user instructs the module not to use doxygen 690# 691# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 692# 693AC_DEFUN([XORG_WITH_DOXYGEN],[ 694AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 695AC_ARG_WITH(doxygen, 696 AS_HELP_STRING([--with-doxygen], 697 [Use doxygen to regenerate documentation (default: yes, if installed)]), 698 [use_doxygen=$withval], [use_doxygen=auto]) 699 700if test "x$use_doxygen" = x"auto"; then 701 AC_PATH_PROG([DOXYGEN], [doxygen]) 702 if test "x$DOXYGEN" = "x"; then 703 AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 704 have_doxygen=no 705 else 706 have_doxygen=yes 707 fi 708elif test "x$use_doxygen" = x"yes" ; then 709 AC_PATH_PROG([DOXYGEN], [doxygen]) 710 if test "x$DOXYGEN" = "x"; then 711 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 712 fi 713 have_doxygen=yes 714elif test "x$use_doxygen" = x"no" ; then 715 if test "x$DOXYGEN" != "x"; then 716 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 717 fi 718 have_doxygen=no 719else 720 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 721fi 722m4_ifval([$1], 723[if test "$have_doxygen" = yes; then 724 # scrape the doxygen version 725 AC_MSG_CHECKING([the doxygen version]) 726 doxygen_version=`$DOXYGEN --version 2>/dev/null` 727 AC_MSG_RESULT([$doxygen_version]) 728 AS_VERSION_COMPARE([$doxygen_version], [$1], 729 [if test "x$use_doxygen" = xauto; then 730 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 731 have_doxygen=no 732 else 733 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 734 fi]) 735fi]) 736AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 737]) # XORG_WITH_DOXYGEN 738 739# XORG_WITH_GROFF 740# ---------------- 741# Minimum version: 1.6.0 742# 743# Documentation tools are not always available on all platforms and sometimes 744# not at the appropriate level. This macro enables a module to test for the 745# presence of the tool and obtain it's path in separate variables. Coupled with 746# the --with-groff option, it allows maximum flexibilty in making decisions 747# as whether or not to use the groff package. 748# 749# Interface to module: 750# HAVE_GROFF: used in makefiles to conditionally generate documentation 751# HAVE_GROFF_MM: the memorandum macros (-mm) package 752# HAVE_GROFF_MS: the -ms macros package 753# GROFF: returns the path of the groff program found 754# returns the path set by the user in the environment 755# --with-groff: 'yes' user instructs the module to use groff 756# 'no' user instructs the module not to use groff 757# 758# Added in version 1.9.0: 759# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 760# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 761# psselect from the psutils package. 762# the ghostcript package. Refer to the grohtml man pages 763# 764# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 765# 766# OS and distros often splits groff in a basic and full package, the former 767# having the groff program and the later having devices, fonts and macros 768# Checking for the groff executable is not enough. 769# 770# If macros are missing, we cannot assume that groff is useless, so we don't 771# unset HAVE_GROFF or GROFF env variables. 772# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 773# 774AC_DEFUN([XORG_WITH_GROFF],[ 775AC_ARG_VAR([GROFF], [Path to groff command]) 776AC_ARG_WITH(groff, 777 AS_HELP_STRING([--with-groff], 778 [Use groff to regenerate documentation (default: yes, if installed)]), 779 [use_groff=$withval], [use_groff=auto]) 780 781if test "x$use_groff" = x"auto"; then 782 AC_PATH_PROG([GROFF], [groff]) 783 if test "x$GROFF" = "x"; then 784 AC_MSG_WARN([groff not found - documentation targets will be skipped]) 785 have_groff=no 786 else 787 have_groff=yes 788 fi 789elif test "x$use_groff" = x"yes" ; then 790 AC_PATH_PROG([GROFF], [groff]) 791 if test "x$GROFF" = "x"; then 792 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 793 fi 794 have_groff=yes 795elif test "x$use_groff" = x"no" ; then 796 if test "x$GROFF" != "x"; then 797 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 798 fi 799 have_groff=no 800else 801 AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 802fi 803 804# We have groff, test for the presence of the macro packages 805if test "x$have_groff" = x"yes"; then 806 AC_MSG_CHECKING([for ${GROFF} -ms macros]) 807 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 808 groff_ms_works=yes 809 else 810 groff_ms_works=no 811 fi 812 AC_MSG_RESULT([$groff_ms_works]) 813 AC_MSG_CHECKING([for ${GROFF} -mm macros]) 814 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 815 groff_mm_works=yes 816 else 817 groff_mm_works=no 818 fi 819 AC_MSG_RESULT([$groff_mm_works]) 820fi 821 822# We have groff, test for HTML dependencies, one command per package 823if test "x$have_groff" = x"yes"; then 824 AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 825 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 826 AC_PATH_PROG(PSSELECT_PATH, [psselect]) 827 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 828 have_groff_html=yes 829 else 830 have_groff_html=no 831 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 832 fi 833fi 834 835# Set Automake conditionals for Makefiles 836AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 837AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 838AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 839AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 840]) # XORG_WITH_GROFF 841 842# XORG_WITH_FOP 843# ---------------- 844# Minimum version: 1.6.0 845# 846# Documentation tools are not always available on all platforms and sometimes 847# not at the appropriate level. This macro enables a module to test for the 848# presence of the tool and obtain it's path in separate variables. Coupled with 849# the --with-fop option, it allows maximum flexibilty in making decisions 850# as whether or not to use the fop package. 851# 852# Interface to module: 853# HAVE_FOP: used in makefiles to conditionally generate documentation 854# FOP: returns the path of the fop program found 855# returns the path set by the user in the environment 856# --with-fop: 'yes' user instructs the module to use fop 857# 'no' user instructs the module not to use fop 858# 859# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 860# 861AC_DEFUN([XORG_WITH_FOP],[ 862AC_ARG_VAR([FOP], [Path to fop command]) 863AC_ARG_WITH(fop, 864 AS_HELP_STRING([--with-fop], 865 [Use fop to regenerate documentation (default: yes, if installed)]), 866 [use_fop=$withval], [use_fop=auto]) 867 868if test "x$use_fop" = x"auto"; then 869 AC_PATH_PROG([FOP], [fop]) 870 if test "x$FOP" = "x"; then 871 AC_MSG_WARN([fop not found - documentation targets will be skipped]) 872 have_fop=no 873 else 874 have_fop=yes 875 fi 876elif test "x$use_fop" = x"yes" ; then 877 AC_PATH_PROG([FOP], [fop]) 878 if test "x$FOP" = "x"; then 879 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 880 fi 881 have_fop=yes 882elif test "x$use_fop" = x"no" ; then 883 if test "x$FOP" != "x"; then 884 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 885 fi 886 have_fop=no 887else 888 AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 889fi 890AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 891]) # XORG_WITH_FOP 892 893# XORG_WITH_PS2PDF 894# ---------------- 895# Minimum version: 1.6.0 896# 897# Documentation tools are not always available on all platforms and sometimes 898# not at the appropriate level. This macro enables a module to test for the 899# presence of the tool and obtain it's path in separate variables. Coupled with 900# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 901# as whether or not to use the ps2pdf package. 902# 903# Interface to module: 904# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 905# PS2PDF: returns the path of the ps2pdf program found 906# returns the path set by the user in the environment 907# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 908# 'no' user instructs the module not to use ps2pdf 909# 910# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 911# 912AC_DEFUN([XORG_WITH_PS2PDF],[ 913AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 914AC_ARG_WITH(ps2pdf, 915 AS_HELP_STRING([--with-ps2pdf], 916 [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 917 [use_ps2pdf=$withval], [use_ps2pdf=auto]) 918 919if test "x$use_ps2pdf" = x"auto"; then 920 AC_PATH_PROG([PS2PDF], [ps2pdf]) 921 if test "x$PS2PDF" = "x"; then 922 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 923 have_ps2pdf=no 924 else 925 have_ps2pdf=yes 926 fi 927elif test "x$use_ps2pdf" = x"yes" ; then 928 AC_PATH_PROG([PS2PDF], [ps2pdf]) 929 if test "x$PS2PDF" = "x"; then 930 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 931 fi 932 have_ps2pdf=yes 933elif test "x$use_ps2pdf" = x"no" ; then 934 if test "x$PS2PDF" != "x"; then 935 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 936 fi 937 have_ps2pdf=no 938else 939 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 940fi 941AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 942]) # XORG_WITH_PS2PDF 943 944# XORG_ENABLE_DOCS (enable_docs=yes) 945# ---------------- 946# Minimum version: 1.6.0 947# 948# Documentation tools are not always available on all platforms and sometimes 949# not at the appropriate level. This macro enables a builder to skip all 950# documentation targets except traditional man pages. 951# Combined with the specific tool checking macros XORG_WITH_*, it provides 952# maximum flexibilty in controlling documentation building. 953# Refer to: 954# XORG_WITH_XMLTO --with-xmlto 955# XORG_WITH_ASCIIDOC --with-asciidoc 956# XORG_WITH_DOXYGEN --with-doxygen 957# XORG_WITH_FOP --with-fop 958# XORG_WITH_GROFF --with-groff 959# XORG_WITH_PS2PDF --with-ps2pdf 960# 961# Interface to module: 962# ENABLE_DOCS: used in makefiles to conditionally generate documentation 963# --enable-docs: 'yes' user instructs the module to generate docs 964# 'no' user instructs the module not to generate docs 965# parm1: specify the default value, yes or no. 966# 967AC_DEFUN([XORG_ENABLE_DOCS],[ 968default=$1 969if test "x$default" = x ; then 970 default="yes" 971fi 972AC_ARG_ENABLE(docs, 973 AS_HELP_STRING([--enable-docs], 974 [Enable building the documentation (default: yes)]), 975 [build_docs=$enableval], [build_docs=$default]) 976AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 977AC_MSG_CHECKING([whether to build documentation]) 978AC_MSG_RESULT([$build_docs]) 979]) # XORG_ENABLE_DOCS 980 981# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 982# ---------------- 983# Minimum version: 1.6.0 984# 985# This macro enables a builder to skip all developer documentation. 986# Combined with the specific tool checking macros XORG_WITH_*, it provides 987# maximum flexibilty in controlling documentation building. 988# Refer to: 989# XORG_WITH_XMLTO --with-xmlto 990# XORG_WITH_ASCIIDOC --with-asciidoc 991# XORG_WITH_DOXYGEN --with-doxygen 992# XORG_WITH_FOP --with-fop 993# XORG_WITH_GROFF --with-groff 994# XORG_WITH_PS2PDF --with-ps2pdf 995# 996# Interface to module: 997# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 998# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 999# 'no' user instructs the module not to generate developer docs 1000# parm1: specify the default value, yes or no. 1001# 1002AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1003devel_default=$1 1004if test "x$devel_default" = x ; then 1005 devel_default="yes" 1006fi 1007AC_ARG_ENABLE(devel-docs, 1008 AS_HELP_STRING([--enable-devel-docs], 1009 [Enable building the developer documentation (default: yes)]), 1010 [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1011AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1012AC_MSG_CHECKING([whether to build developer documentation]) 1013AC_MSG_RESULT([$build_devel_docs]) 1014]) # XORG_ENABLE_DEVEL_DOCS 1015 1016# XORG_ENABLE_SPECS (enable_specs=yes) 1017# ---------------- 1018# Minimum version: 1.6.0 1019# 1020# This macro enables a builder to skip all functional specification targets. 1021# Combined with the specific tool checking macros XORG_WITH_*, it provides 1022# maximum flexibilty in controlling documentation building. 1023# Refer to: 1024# XORG_WITH_XMLTO --with-xmlto 1025# XORG_WITH_ASCIIDOC --with-asciidoc 1026# XORG_WITH_DOXYGEN --with-doxygen 1027# XORG_WITH_FOP --with-fop 1028# XORG_WITH_GROFF --with-groff 1029# XORG_WITH_PS2PDF --with-ps2pdf 1030# 1031# Interface to module: 1032# ENABLE_SPECS: used in makefiles to conditionally generate specs 1033# --enable-specs: 'yes' user instructs the module to generate specs 1034# 'no' user instructs the module not to generate specs 1035# parm1: specify the default value, yes or no. 1036# 1037AC_DEFUN([XORG_ENABLE_SPECS],[ 1038spec_default=$1 1039if test "x$spec_default" = x ; then 1040 spec_default="yes" 1041fi 1042AC_ARG_ENABLE(specs, 1043 AS_HELP_STRING([--enable-specs], 1044 [Enable building the specs (default: yes)]), 1045 [build_specs=$enableval], [build_specs=$spec_default]) 1046AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1047AC_MSG_CHECKING([whether to build functional specifications]) 1048AC_MSG_RESULT([$build_specs]) 1049]) # XORG_ENABLE_SPECS 1050 1051# XORG_CHECK_MALLOC_ZERO 1052# ---------------------- 1053# Minimum version: 1.0.0 1054# 1055# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1056# malloc(0) returns NULL. Packages should add one of these cflags to 1057# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1058AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1059AC_ARG_ENABLE(malloc0returnsnull, 1060 AS_HELP_STRING([--enable-malloc0returnsnull], 1061 [malloc(0) returns NULL (default: auto)]), 1062 [MALLOC_ZERO_RETURNS_NULL=$enableval], 1063 [MALLOC_ZERO_RETURNS_NULL=auto]) 1064 1065AC_MSG_CHECKING([whether malloc(0) returns NULL]) 1066if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1067 AC_RUN_IFELSE([ 1068char *malloc(); 1069char *realloc(); 1070char *calloc(); 1071main() { 1072 char *m0, *r0, *c0, *p; 1073 m0 = malloc(0); 1074 p = malloc(10); 1075 r0 = realloc(p,0); 1076 c0 = calloc(0); 1077 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1078}], 1079 [MALLOC_ZERO_RETURNS_NULL=yes], 1080 [MALLOC_ZERO_RETURNS_NULL=no], 1081 [MALLOC_ZERO_RETURNS_NULL=yes]) 1082fi 1083AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1084 1085if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1086 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1087 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1088 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1089else 1090 MALLOC_ZERO_CFLAGS="" 1091 XMALLOC_ZERO_CFLAGS="" 1092 XTMALLOC_ZERO_CFLAGS="" 1093fi 1094 1095AC_SUBST([MALLOC_ZERO_CFLAGS]) 1096AC_SUBST([XMALLOC_ZERO_CFLAGS]) 1097AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1098]) # XORG_CHECK_MALLOC_ZERO 1099 1100# XORG_WITH_LINT() 1101# ---------------- 1102# Minimum version: 1.1.0 1103# 1104# This macro enables the use of a tool that flags some suspicious and 1105# non-portable constructs (likely to be bugs) in C language source code. 1106# It will attempt to locate the tool and use appropriate options. 1107# There are various lint type tools on different platforms. 1108# 1109# Interface to module: 1110# LINT: returns the path to the tool found on the platform 1111# or the value set to LINT on the configure cmd line 1112# also an Automake conditional 1113# LINT_FLAGS: an Automake variable with appropriate flags 1114# 1115# --with-lint: 'yes' user instructs the module to use lint 1116# 'no' user instructs the module not to use lint (default) 1117# 1118# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1119# If the user sets the value of LINT_FLAGS, they are used verbatim. 1120# 1121AC_DEFUN([XORG_WITH_LINT],[ 1122 1123AC_ARG_VAR([LINT], [Path to a lint-style command]) 1124AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1125AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1126 [Use a lint-style source code checker (default: disabled)])], 1127 [use_lint=$withval], [use_lint=no]) 1128 1129# Obtain platform specific info like program name and options 1130# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1131case $host_os in 1132 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1133 lint_name=splint 1134 lint_options="-badflag" 1135 ;; 1136 *freebsd* | *netbsd*) 1137 lint_name=lint 1138 lint_options="-u -b" 1139 ;; 1140 *solaris*) 1141 lint_name=lint 1142 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1143 ;; 1144esac 1145 1146# Test for the presence of the program (either guessed by the code or spelled out by the user) 1147if test "x$use_lint" = x"yes" ; then 1148 AC_PATH_PROG([LINT], [$lint_name]) 1149 if test "x$LINT" = "x"; then 1150 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1151 fi 1152elif test "x$use_lint" = x"no" ; then 1153 if test "x$LINT" != "x"; then 1154 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1155 fi 1156else 1157 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1158fi 1159 1160# User supplied flags override default flags 1161if test "x$LINT_FLAGS" != "x"; then 1162 lint_options=$LINT_FLAGS 1163fi 1164 1165AC_SUBST([LINT_FLAGS],[$lint_options]) 1166AM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1167 1168]) # XORG_WITH_LINT 1169 1170# XORG_LINT_LIBRARY(LIBNAME) 1171# -------------------------- 1172# Minimum version: 1.1.0 1173# 1174# Sets up flags for building lint libraries for checking programs that call 1175# functions in the library. 1176# 1177# Interface to module: 1178# LINTLIB - Automake variable with the name of lint library file to make 1179# MAKE_LINT_LIB - Automake conditional 1180# 1181# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1182# - 'no' user instructs the module not to create a lint library (default) 1183 1184AC_DEFUN([XORG_LINT_LIBRARY],[ 1185AC_REQUIRE([XORG_WITH_LINT]) 1186AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1187 [Create lint library (default: disabled)])], 1188 [make_lint_lib=$enableval], [make_lint_lib=no]) 1189 1190if test "x$make_lint_lib" = x"yes" ; then 1191 LINTLIB=llib-l$1.ln 1192 if test "x$LINT" = "x"; then 1193 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1194 fi 1195elif test "x$make_lint_lib" != x"no" ; then 1196 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1197fi 1198 1199AC_SUBST(LINTLIB) 1200AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1201 1202]) # XORG_LINT_LIBRARY 1203 1204# XORG_CWARNFLAGS 1205# --------------- 1206# Minimum version: 1.2.0 1207# 1208# Defines CWARNFLAGS to enable C compiler warnings. 1209# 1210AC_DEFUN([XORG_CWARNFLAGS], [ 1211AC_REQUIRE([AC_PROG_CC_C99]) 1212if test "x$GCC" = xyes ; then 1213 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1214-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1215-Wbad-function-cast -Wformat=2" 1216 case `$CC -dumpversion` in 1217 3.4.* | 4.*) 1218 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1219 ;; 1220 esac 1221else 1222 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1223 if test "x$SUNCC" = "xyes"; then 1224 CWARNFLAGS="-v" 1225 fi 1226fi 1227AC_SUBST(CWARNFLAGS) 1228]) # XORG_CWARNFLAGS 1229 1230# XORG_STRICT_OPTION 1231# ----------------------- 1232# Minimum version: 1.3.0 1233# 1234# Add configure option to enable strict compilation 1235AC_DEFUN([XORG_STRICT_OPTION], [ 1236# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 1237AC_REQUIRE([AC_PROG_CC_C99]) 1238AC_REQUIRE([XORG_CWARNFLAGS]) 1239 1240AC_ARG_ENABLE(strict-compilation, 1241 AS_HELP_STRING([--enable-strict-compilation], 1242 [Enable all warnings from compiler and make them errors (default: disabled)]), 1243 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1244if test "x$STRICT_COMPILE" = "xyes"; then 1245 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1246 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1247 if test "x$GCC" = xyes ; then 1248 STRICT_CFLAGS="-pedantic -Werror" 1249 elif test "x$SUNCC" = "xyes"; then 1250 STRICT_CFLAGS="-errwarn" 1251 elif test "x$INTELCC" = "xyes"; then 1252 STRICT_CFLAGS="-Werror" 1253 fi 1254fi 1255CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 1256AC_SUBST([CWARNFLAGS]) 1257]) # XORG_STRICT_OPTION 1258 1259# XORG_DEFAULT_OPTIONS 1260# -------------------- 1261# Minimum version: 1.3.0 1262# 1263# Defines default options for X.Org modules. 1264# 1265AC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1266AC_REQUIRE([AC_PROG_INSTALL]) 1267XORG_CWARNFLAGS 1268XORG_STRICT_OPTION 1269XORG_RELEASE_VERSION 1270XORG_CHANGELOG 1271XORG_INSTALL 1272XORG_MANPAGE_SECTIONS 1273m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1274 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1275]) # XORG_DEFAULT_OPTIONS 1276 1277# XORG_INSTALL() 1278# ---------------- 1279# Minimum version: 1.4.0 1280# 1281# Defines the variable INSTALL_CMD as the command to copy 1282# INSTALL from $prefix/share/util-macros. 1283# 1284AC_DEFUN([XORG_INSTALL], [ 1285AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1286macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1287INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1288mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1289|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1290echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1291AC_SUBST([INSTALL_CMD]) 1292]) # XORG_INSTALL 1293dnl Copyright 2005 Red Hat, Inc 1294dnl 1295dnl Permission to use, copy, modify, distribute, and sell this software and its 1296dnl documentation for any purpose is hereby granted without fee, provided that 1297dnl the above copyright notice appear in all copies and that both that 1298dnl copyright notice and this permission notice appear in supporting 1299dnl documentation. 1300dnl 1301dnl The above copyright notice and this permission notice shall be included 1302dnl in all copies or substantial portions of the Software. 1303dnl 1304dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1305dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1306dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1307dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1308dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1309dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1310dnl OTHER DEALINGS IN THE SOFTWARE. 1311dnl 1312dnl Except as contained in this notice, the name of the copyright holders shall 1313dnl not be used in advertising or otherwise to promote the sale, use or 1314dnl other dealings in this Software without prior written authorization 1315dnl from the copyright holders. 1316dnl 1317 1318# XORG_RELEASE_VERSION 1319# -------------------- 1320# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1321 1322AC_DEFUN([XORG_RELEASE_VERSION],[ 1323 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1324 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1325 [Major version of this package]) 1326 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1327 if test "x$PVM" = "x"; then 1328 PVM="0" 1329 fi 1330 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1331 [$PVM], 1332 [Minor version of this package]) 1333 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1334 if test "x$PVP" = "x"; then 1335 PVP="0" 1336 fi 1337 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1338 [$PVP], 1339 [Patch version of this package]) 1340]) 1341 1342# XORG_CHANGELOG() 1343# ---------------- 1344# Minimum version: 1.2.0 1345# 1346# Defines the variable CHANGELOG_CMD as the command to generate 1347# ChangeLog from git. 1348# 1349# 1350AC_DEFUN([XORG_CHANGELOG], [ 1351CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1352mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1353|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1354echo 'git directory not found: installing possibly empty changelog.' >&2)" 1355AC_SUBST([CHANGELOG_CMD]) 1356]) # XORG_CHANGELOG 1357 1358# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 1359# 1360# This file is free software; the Free Software Foundation 1361# gives unlimited permission to copy and/or distribute it, 1362# with or without modifications, as long as this notice is preserved. 1363 1364# AM_AUTOMAKE_VERSION(VERSION) 1365# ---------------------------- 1366# Automake X.Y traces this macro to ensure aclocal.m4 has been 1367# generated from the m4 files accompanying Automake X.Y. 1368# (This private macro should not be called outside this file.) 1369AC_DEFUN([AM_AUTOMAKE_VERSION], 1370[am__api_version='1.11' 1371dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1372dnl require some minimum version. Point them to the right macro. 1373m4_if([$1], [1.11.1], [], 1374 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1375]) 1376 1377# _AM_AUTOCONF_VERSION(VERSION) 1378# ----------------------------- 1379# aclocal traces this macro to find the Autoconf version. 1380# This is a private macro too. Using m4_define simplifies 1381# the logic in aclocal, which can simply ignore this definition. 1382m4_define([_AM_AUTOCONF_VERSION], []) 1383 1384# AM_SET_CURRENT_AUTOMAKE_VERSION 1385# ------------------------------- 1386# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1387# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1388AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1389[AM_AUTOMAKE_VERSION([1.11.1])dnl 1390m4_ifndef([AC_AUTOCONF_VERSION], 1391 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1392_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1393 1394# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1395 1396# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1397# 1398# This file is free software; the Free Software Foundation 1399# gives unlimited permission to copy and/or distribute it, 1400# with or without modifications, as long as this notice is preserved. 1401 1402# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1403# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1404# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1405# 1406# Of course, Automake must honor this variable whenever it calls a 1407# tool from the auxiliary directory. The problem is that $srcdir (and 1408# therefore $ac_aux_dir as well) can be either absolute or relative, 1409# depending on how configure is run. This is pretty annoying, since 1410# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1411# source directory, any form will work fine, but in subdirectories a 1412# relative path needs to be adjusted first. 1413# 1414# $ac_aux_dir/missing 1415# fails when called from a subdirectory if $ac_aux_dir is relative 1416# $top_srcdir/$ac_aux_dir/missing 1417# fails if $ac_aux_dir is absolute, 1418# fails when called from a subdirectory in a VPATH build with 1419# a relative $ac_aux_dir 1420# 1421# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1422# are both prefixed by $srcdir. In an in-source build this is usually 1423# harmless because $srcdir is `.', but things will broke when you 1424# start a VPATH build or use an absolute $srcdir. 1425# 1426# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1427# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1428# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1429# and then we would define $MISSING as 1430# MISSING="\${SHELL} $am_aux_dir/missing" 1431# This will work as long as MISSING is not called from configure, because 1432# unfortunately $(top_srcdir) has no meaning in configure. 1433# However there are other variables, like CC, which are often used in 1434# configure, and could therefore not use this "fixed" $ac_aux_dir. 1435# 1436# Another solution, used here, is to always expand $ac_aux_dir to an 1437# absolute PATH. The drawback is that using absolute paths prevent a 1438# configured tree to be moved without reconfiguration. 1439 1440AC_DEFUN([AM_AUX_DIR_EXPAND], 1441[dnl Rely on autoconf to set up CDPATH properly. 1442AC_PREREQ([2.50])dnl 1443# expand $ac_aux_dir to an absolute path 1444am_aux_dir=`cd $ac_aux_dir && pwd` 1445]) 1446 1447# AM_CONDITIONAL -*- Autoconf -*- 1448 1449# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1450# Free Software Foundation, Inc. 1451# 1452# This file is free software; the Free Software Foundation 1453# gives unlimited permission to copy and/or distribute it, 1454# with or without modifications, as long as this notice is preserved. 1455 1456# serial 9 1457 1458# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1459# ------------------------------------- 1460# Define a conditional. 1461AC_DEFUN([AM_CONDITIONAL], 1462[AC_PREREQ(2.52)dnl 1463 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1464 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1465AC_SUBST([$1_TRUE])dnl 1466AC_SUBST([$1_FALSE])dnl 1467_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1468_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1469m4_define([_AM_COND_VALUE_$1], [$2])dnl 1470if $2; then 1471 $1_TRUE= 1472 $1_FALSE='#' 1473else 1474 $1_TRUE='#' 1475 $1_FALSE= 1476fi 1477AC_CONFIG_COMMANDS_PRE( 1478[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1479 AC_MSG_ERROR([[conditional "$1" was never defined. 1480Usually this means the macro was only invoked conditionally.]]) 1481fi])]) 1482 1483# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1484# Free Software Foundation, Inc. 1485# 1486# This file is free software; the Free Software Foundation 1487# gives unlimited permission to copy and/or distribute it, 1488# with or without modifications, as long as this notice is preserved. 1489 1490# serial 10 1491 1492# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1493# written in clear, in which case automake, when reading aclocal.m4, 1494# will think it sees a *use*, and therefore will trigger all it's 1495# C support machinery. Also note that it means that autoscan, seeing 1496# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1497 1498 1499# _AM_DEPENDENCIES(NAME) 1500# ---------------------- 1501# See how the compiler implements dependency checking. 1502# NAME is "CC", "CXX", "GCJ", or "OBJC". 1503# We try a few techniques and use that to set a single cache variable. 1504# 1505# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1506# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1507# dependency, and given that the user is not expected to run this macro, 1508# just rely on AC_PROG_CC. 1509AC_DEFUN([_AM_DEPENDENCIES], 1510[AC_REQUIRE([AM_SET_DEPDIR])dnl 1511AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1512AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1513AC_REQUIRE([AM_DEP_TRACK])dnl 1514 1515ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1516 [$1], CXX, [depcc="$CXX" am_compiler_list=], 1517 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1518 [$1], UPC, [depcc="$UPC" am_compiler_list=], 1519 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1520 [depcc="$$1" am_compiler_list=]) 1521 1522AC_CACHE_CHECK([dependency style of $depcc], 1523 [am_cv_$1_dependencies_compiler_type], 1524[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1525 # We make a subdir and do the tests there. Otherwise we can end up 1526 # making bogus files that we don't know about and never remove. For 1527 # instance it was reported that on HP-UX the gcc test will end up 1528 # making a dummy file named `D' -- because `-MD' means `put the output 1529 # in D'. 1530 mkdir conftest.dir 1531 # Copy depcomp to subdir because otherwise we won't find it if we're 1532 # using a relative directory. 1533 cp "$am_depcomp" conftest.dir 1534 cd conftest.dir 1535 # We will build objects and dependencies in a subdirectory because 1536 # it helps to detect inapplicable dependency modes. For instance 1537 # both Tru64's cc and ICC support -MD to output dependencies as a 1538 # side effect of compilation, but ICC will put the dependencies in 1539 # the current directory while Tru64 will put them in the object 1540 # directory. 1541 mkdir sub 1542 1543 am_cv_$1_dependencies_compiler_type=none 1544 if test "$am_compiler_list" = ""; then 1545 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1546 fi 1547 am__universal=false 1548 m4_case([$1], [CC], 1549 [case " $depcc " in #( 1550 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1551 esac], 1552 [CXX], 1553 [case " $depcc " in #( 1554 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1555 esac]) 1556 1557 for depmode in $am_compiler_list; do 1558 # Setup a source with many dependencies, because some compilers 1559 # like to wrap large dependency lists on column 80 (with \), and 1560 # we should not choose a depcomp mode which is confused by this. 1561 # 1562 # We need to recreate these files for each test, as the compiler may 1563 # overwrite some of them when testing with obscure command lines. 1564 # This happens at least with the AIX C compiler. 1565 : > sub/conftest.c 1566 for i in 1 2 3 4 5 6; do 1567 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1568 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1569 # Solaris 8's {/usr,}/bin/sh. 1570 touch sub/conftst$i.h 1571 done 1572 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1573 1574 # We check with `-c' and `-o' for the sake of the "dashmstdout" 1575 # mode. It turns out that the SunPro C++ compiler does not properly 1576 # handle `-M -o', and we need to detect this. Also, some Intel 1577 # versions had trouble with output in subdirs 1578 am__obj=sub/conftest.${OBJEXT-o} 1579 am__minus_obj="-o $am__obj" 1580 case $depmode in 1581 gcc) 1582 # This depmode causes a compiler race in universal mode. 1583 test "$am__universal" = false || continue 1584 ;; 1585 nosideeffect) 1586 # after this tag, mechanisms are not by side-effect, so they'll 1587 # only be used when explicitly requested 1588 if test "x$enable_dependency_tracking" = xyes; then 1589 continue 1590 else 1591 break 1592 fi 1593 ;; 1594 msvisualcpp | msvcmsys) 1595 # This compiler won't grok `-c -o', but also, the minuso test has 1596 # not run yet. These depmodes are late enough in the game, and 1597 # so weak that their functioning should not be impacted. 1598 am__obj=conftest.${OBJEXT-o} 1599 am__minus_obj= 1600 ;; 1601 none) break ;; 1602 esac 1603 if depmode=$depmode \ 1604 source=sub/conftest.c object=$am__obj \ 1605 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1606 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1607 >/dev/null 2>conftest.err && 1608 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1609 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1610 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1611 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1612 # icc doesn't choke on unknown options, it will just issue warnings 1613 # or remarks (even with -Werror). So we grep stderr for any message 1614 # that says an option was ignored or not supported. 1615 # When given -MP, icc 7.0 and 7.1 complain thusly: 1616 # icc: Command line warning: ignoring option '-M'; no argument required 1617 # The diagnosis changed in icc 8.0: 1618 # icc: Command line remark: option '-MP' not supported 1619 if (grep 'ignoring option' conftest.err || 1620 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1621 am_cv_$1_dependencies_compiler_type=$depmode 1622 break 1623 fi 1624 fi 1625 done 1626 1627 cd .. 1628 rm -rf conftest.dir 1629else 1630 am_cv_$1_dependencies_compiler_type=none 1631fi 1632]) 1633AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1634AM_CONDITIONAL([am__fastdep$1], [ 1635 test "x$enable_dependency_tracking" != xno \ 1636 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1637]) 1638 1639 1640# AM_SET_DEPDIR 1641# ------------- 1642# Choose a directory name for dependency files. 1643# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1644AC_DEFUN([AM_SET_DEPDIR], 1645[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1646AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1647]) 1648 1649 1650# AM_DEP_TRACK 1651# ------------ 1652AC_DEFUN([AM_DEP_TRACK], 1653[AC_ARG_ENABLE(dependency-tracking, 1654[ --disable-dependency-tracking speeds up one-time build 1655 --enable-dependency-tracking do not reject slow dependency extractors]) 1656if test "x$enable_dependency_tracking" != xno; then 1657 am_depcomp="$ac_aux_dir/depcomp" 1658 AMDEPBACKSLASH='\' 1659fi 1660AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1661AC_SUBST([AMDEPBACKSLASH])dnl 1662_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1663]) 1664 1665# Generate code to set up dependency tracking. -*- Autoconf -*- 1666 1667# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1668# Free Software Foundation, Inc. 1669# 1670# This file is free software; the Free Software Foundation 1671# gives unlimited permission to copy and/or distribute it, 1672# with or without modifications, as long as this notice is preserved. 1673 1674#serial 5 1675 1676# _AM_OUTPUT_DEPENDENCY_COMMANDS 1677# ------------------------------ 1678AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1679[{ 1680 # Autoconf 2.62 quotes --file arguments for eval, but not when files 1681 # are listed without --file. Let's play safe and only enable the eval 1682 # if we detect the quoting. 1683 case $CONFIG_FILES in 1684 *\'*) eval set x "$CONFIG_FILES" ;; 1685 *) set x $CONFIG_FILES ;; 1686 esac 1687 shift 1688 for mf 1689 do 1690 # Strip MF so we end up with the name of the file. 1691 mf=`echo "$mf" | sed -e 's/:.*$//'` 1692 # Check whether this is an Automake generated Makefile or not. 1693 # We used to match only the files named `Makefile.in', but 1694 # some people rename them; so instead we look at the file content. 1695 # Grep'ing the first line is not enough: some people post-process 1696 # each Makefile.in and add a new line on top of each file to say so. 1697 # Grep'ing the whole file is not good either: AIX grep has a line 1698 # limit of 2048, but all sed's we know have understand at least 4000. 1699 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1700 dirpart=`AS_DIRNAME("$mf")` 1701 else 1702 continue 1703 fi 1704 # Extract the definition of DEPDIR, am__include, and am__quote 1705 # from the Makefile without running `make'. 1706 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1707 test -z "$DEPDIR" && continue 1708 am__include=`sed -n 's/^am__include = //p' < "$mf"` 1709 test -z "am__include" && continue 1710 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1711 # When using ansi2knr, U may be empty or an underscore; expand it 1712 U=`sed -n 's/^U = //p' < "$mf"` 1713 # Find all dependency output files, they are included files with 1714 # $(DEPDIR) in their names. We invoke sed twice because it is the 1715 # simplest approach to changing $(DEPDIR) to its actual value in the 1716 # expansion. 1717 for file in `sed -n " 1718 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1719 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 1720 # Make sure the directory exists. 1721 test -f "$dirpart/$file" && continue 1722 fdir=`AS_DIRNAME(["$file"])` 1723 AS_MKDIR_P([$dirpart/$fdir]) 1724 # echo "creating $dirpart/$file" 1725 echo '# dummy' > "$dirpart/$file" 1726 done 1727 done 1728} 1729])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1730 1731 1732# AM_OUTPUT_DEPENDENCY_COMMANDS 1733# ----------------------------- 1734# This macro should only be invoked once -- use via AC_REQUIRE. 1735# 1736# This code is only required when automatic dependency tracking 1737# is enabled. FIXME. This creates each `.P' file that we will 1738# need in order to bootstrap the dependency handling code. 1739AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1740[AC_CONFIG_COMMANDS([depfiles], 1741 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1742 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1743]) 1744 1745# Do all the work for Automake. -*- Autoconf -*- 1746 1747# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1748# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1749# 1750# This file is free software; the Free Software Foundation 1751# gives unlimited permission to copy and/or distribute it, 1752# with or without modifications, as long as this notice is preserved. 1753 1754# serial 16 1755 1756# This macro actually does too much. Some checks are only needed if 1757# your package does certain things. But this isn't really a big deal. 1758 1759# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1760# AM_INIT_AUTOMAKE([OPTIONS]) 1761# ----------------------------------------------- 1762# The call with PACKAGE and VERSION arguments is the old style 1763# call (pre autoconf-2.50), which is being phased out. PACKAGE 1764# and VERSION should now be passed to AC_INIT and removed from 1765# the call to AM_INIT_AUTOMAKE. 1766# We support both call styles for the transition. After 1767# the next Automake release, Autoconf can make the AC_INIT 1768# arguments mandatory, and then we can depend on a new Autoconf 1769# release and drop the old call support. 1770AC_DEFUN([AM_INIT_AUTOMAKE], 1771[AC_PREREQ([2.62])dnl 1772dnl Autoconf wants to disallow AM_ names. We explicitly allow 1773dnl the ones we care about. 1774m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1775AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1776AC_REQUIRE([AC_PROG_INSTALL])dnl 1777if test "`cd $srcdir && pwd`" != "`pwd`"; then 1778 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1779 # is not polluted with repeated "-I." 1780 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1781 # test to see if srcdir already configured 1782 if test -f $srcdir/config.status; then 1783 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1784 fi 1785fi 1786 1787# test whether we have cygpath 1788if test -z "$CYGPATH_W"; then 1789 if (cygpath --version) >/dev/null 2>/dev/null; then 1790 CYGPATH_W='cygpath -w' 1791 else 1792 CYGPATH_W=echo 1793 fi 1794fi 1795AC_SUBST([CYGPATH_W]) 1796 1797# Define the identity of the package. 1798dnl Distinguish between old-style and new-style calls. 1799m4_ifval([$2], 1800[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1801 AC_SUBST([PACKAGE], [$1])dnl 1802 AC_SUBST([VERSION], [$2])], 1803[_AM_SET_OPTIONS([$1])dnl 1804dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1805m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1806 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1807 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1808 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1809 1810_AM_IF_OPTION([no-define],, 1811[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1812 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1813 1814# Some tools Automake needs. 1815AC_REQUIRE([AM_SANITY_CHECK])dnl 1816AC_REQUIRE([AC_ARG_PROGRAM])dnl 1817AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1818AM_MISSING_PROG(AUTOCONF, autoconf) 1819AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1820AM_MISSING_PROG(AUTOHEADER, autoheader) 1821AM_MISSING_PROG(MAKEINFO, makeinfo) 1822AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1823AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1824AC_REQUIRE([AM_PROG_MKDIR_P])dnl 1825# We need awk for the "check" target. The system "awk" is bad on 1826# some platforms. 1827AC_REQUIRE([AC_PROG_AWK])dnl 1828AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1829AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1830_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1831 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1832 [_AM_PROG_TAR([v7])])]) 1833_AM_IF_OPTION([no-dependencies],, 1834[AC_PROVIDE_IFELSE([AC_PROG_CC], 1835 [_AM_DEPENDENCIES(CC)], 1836 [define([AC_PROG_CC], 1837 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1838AC_PROVIDE_IFELSE([AC_PROG_CXX], 1839 [_AM_DEPENDENCIES(CXX)], 1840 [define([AC_PROG_CXX], 1841 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1842AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1843 [_AM_DEPENDENCIES(OBJC)], 1844 [define([AC_PROG_OBJC], 1845 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1846]) 1847_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1848dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1849dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1850dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1851AC_CONFIG_COMMANDS_PRE(dnl 1852[m4_provide_if([_AM_COMPILER_EXEEXT], 1853 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1854]) 1855 1856dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1857dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1858dnl mangled by Autoconf and run in a shell conditional statement. 1859m4_define([_AC_COMPILER_EXEEXT], 1860m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1861 1862 1863# When config.status generates a header, we must update the stamp-h file. 1864# This file resides in the same directory as the config header 1865# that is generated. The stamp files are numbered to have different names. 1866 1867# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1868# loop where config.status creates the headers, so we can generate 1869# our stamp files there. 1870AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1871[# Compute $1's index in $config_headers. 1872_am_arg=$1 1873_am_stamp_count=1 1874for _am_header in $config_headers :; do 1875 case $_am_header in 1876 $_am_arg | $_am_arg:* ) 1877 break ;; 1878 * ) 1879 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1880 esac 1881done 1882echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1883 1884# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 1885# 1886# This file is free software; the Free Software Foundation 1887# gives unlimited permission to copy and/or distribute it, 1888# with or without modifications, as long as this notice is preserved. 1889 1890# AM_PROG_INSTALL_SH 1891# ------------------ 1892# Define $install_sh. 1893AC_DEFUN([AM_PROG_INSTALL_SH], 1894[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1895if test x"${install_sh}" != xset; then 1896 case $am_aux_dir in 1897 *\ * | *\ *) 1898 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1899 *) 1900 install_sh="\${SHELL} $am_aux_dir/install-sh" 1901 esac 1902fi 1903AC_SUBST(install_sh)]) 1904 1905# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1906# 1907# This file is free software; the Free Software Foundation 1908# gives unlimited permission to copy and/or distribute it, 1909# with or without modifications, as long as this notice is preserved. 1910 1911# serial 2 1912 1913# Check whether the underlying file-system supports filenames 1914# with a leading dot. For instance MS-DOS doesn't. 1915AC_DEFUN([AM_SET_LEADING_DOT], 1916[rm -rf .tst 2>/dev/null 1917mkdir .tst 2>/dev/null 1918if test -d .tst; then 1919 am__leading_dot=. 1920else 1921 am__leading_dot=_ 1922fi 1923rmdir .tst 2>/dev/null 1924AC_SUBST([am__leading_dot])]) 1925 1926# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1927# From Jim Meyering 1928 1929# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1930# Free Software Foundation, Inc. 1931# 1932# This file is free software; the Free Software Foundation 1933# gives unlimited permission to copy and/or distribute it, 1934# with or without modifications, as long as this notice is preserved. 1935 1936# serial 5 1937 1938# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1939# ---------------------------------- 1940# Control maintainer-specific portions of Makefiles. 1941# Default is to disable them, unless `enable' is passed literally. 1942# For symmetry, `disable' may be passed as well. Anyway, the user 1943# can override the default with the --enable/--disable switch. 1944AC_DEFUN([AM_MAINTAINER_MODE], 1945[m4_case(m4_default([$1], [disable]), 1946 [enable], [m4_define([am_maintainer_other], [disable])], 1947 [disable], [m4_define([am_maintainer_other], [enable])], 1948 [m4_define([am_maintainer_other], [enable]) 1949 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1950AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 1951 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1952 AC_ARG_ENABLE([maintainer-mode], 1953[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1954 (and sometimes confusing) to the casual installer], 1955 [USE_MAINTAINER_MODE=$enableval], 1956 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1957 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1958 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1959 MAINT=$MAINTAINER_MODE_TRUE 1960 AC_SUBST([MAINT])dnl 1961] 1962) 1963 1964AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1965 1966# Check to see how 'make' treats includes. -*- Autoconf -*- 1967 1968# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1969# 1970# This file is free software; the Free Software Foundation 1971# gives unlimited permission to copy and/or distribute it, 1972# with or without modifications, as long as this notice is preserved. 1973 1974# serial 4 1975 1976# AM_MAKE_INCLUDE() 1977# ----------------- 1978# Check to see how make treats includes. 1979AC_DEFUN([AM_MAKE_INCLUDE], 1980[am_make=${MAKE-make} 1981cat > confinc << 'END' 1982am__doit: 1983 @echo this is the am__doit target 1984.PHONY: am__doit 1985END 1986# If we don't find an include directive, just comment out the code. 1987AC_MSG_CHECKING([for style of include used by $am_make]) 1988am__include="#" 1989am__quote= 1990_am_result=none 1991# First try GNU make style include. 1992echo "include confinc" > confmf 1993# Ignore all kinds of additional output from `make'. 1994case `$am_make -s -f confmf 2> /dev/null` in #( 1995*the\ am__doit\ target*) 1996 am__include=include 1997 am__quote= 1998 _am_result=GNU 1999 ;; 2000esac 2001# Now try BSD make style include. 2002if test "$am__include" = "#"; then 2003 echo '.include "confinc"' > confmf 2004 case `$am_make -s -f confmf 2> /dev/null` in #( 2005 *the\ am__doit\ target*) 2006 am__include=.include 2007 am__quote="\"" 2008 _am_result=BSD 2009 ;; 2010 esac 2011fi 2012AC_SUBST([am__include]) 2013AC_SUBST([am__quote]) 2014AC_MSG_RESULT([$_am_result]) 2015rm -f confinc confmf 2016]) 2017 2018# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 2019 2020# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 2021# Free Software Foundation, Inc. 2022# 2023# This file is free software; the Free Software Foundation 2024# gives unlimited permission to copy and/or distribute it, 2025# with or without modifications, as long as this notice is preserved. 2026 2027# serial 6 2028 2029# AM_MISSING_PROG(NAME, PROGRAM) 2030# ------------------------------ 2031AC_DEFUN([AM_MISSING_PROG], 2032[AC_REQUIRE([AM_MISSING_HAS_RUN]) 2033$1=${$1-"${am_missing_run}$2"} 2034AC_SUBST($1)]) 2035 2036 2037# AM_MISSING_HAS_RUN 2038# ------------------ 2039# Define MISSING if not defined so far and test if it supports --run. 2040# If it does, set am_missing_run to use it, otherwise, to nothing. 2041AC_DEFUN([AM_MISSING_HAS_RUN], 2042[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2043AC_REQUIRE_AUX_FILE([missing])dnl 2044if test x"${MISSING+set}" != xset; then 2045 case $am_aux_dir in 2046 *\ * | *\ *) 2047 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 2048 *) 2049 MISSING="\${SHELL} $am_aux_dir/missing" ;; 2050 esac 2051fi 2052# Use eval to expand $SHELL 2053if eval "$MISSING --run true"; then 2054 am_missing_run="$MISSING --run " 2055else 2056 am_missing_run= 2057 AC_MSG_WARN([`missing' script is too old or missing]) 2058fi 2059]) 2060 2061# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2062# 2063# This file is free software; the Free Software Foundation 2064# gives unlimited permission to copy and/or distribute it, 2065# with or without modifications, as long as this notice is preserved. 2066 2067# AM_PROG_MKDIR_P 2068# --------------- 2069# Check for `mkdir -p'. 2070AC_DEFUN([AM_PROG_MKDIR_P], 2071[AC_PREREQ([2.60])dnl 2072AC_REQUIRE([AC_PROG_MKDIR_P])dnl 2073dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 2074dnl while keeping a definition of mkdir_p for backward compatibility. 2075dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 2076dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 2077dnl Makefile.ins that do not define MKDIR_P, so we do our own 2078dnl adjustment using top_builddir (which is defined more often than 2079dnl MKDIR_P). 2080AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 2081case $mkdir_p in 2082 [[\\/$]]* | ?:[[\\/]]*) ;; 2083 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 2084esac 2085]) 2086 2087# Helper functions for option handling. -*- Autoconf -*- 2088 2089# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 2090# 2091# This file is free software; the Free Software Foundation 2092# gives unlimited permission to copy and/or distribute it, 2093# with or without modifications, as long as this notice is preserved. 2094 2095# serial 4 2096 2097# _AM_MANGLE_OPTION(NAME) 2098# ----------------------- 2099AC_DEFUN([_AM_MANGLE_OPTION], 2100[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 2101 2102# _AM_SET_OPTION(NAME) 2103# ------------------------------ 2104# Set option NAME. Presently that only means defining a flag for this option. 2105AC_DEFUN([_AM_SET_OPTION], 2106[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 2107 2108# _AM_SET_OPTIONS(OPTIONS) 2109# ---------------------------------- 2110# OPTIONS is a space-separated list of Automake options. 2111AC_DEFUN([_AM_SET_OPTIONS], 2112[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2113 2114# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2115# ------------------------------------------- 2116# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2117AC_DEFUN([_AM_IF_OPTION], 2118[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2119 2120# Check to make sure that the build environment is sane. -*- Autoconf -*- 2121 2122# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 2123# Free Software Foundation, Inc. 2124# 2125# This file is free software; the Free Software Foundation 2126# gives unlimited permission to copy and/or distribute it, 2127# with or without modifications, as long as this notice is preserved. 2128 2129# serial 5 2130 2131# AM_SANITY_CHECK 2132# --------------- 2133AC_DEFUN([AM_SANITY_CHECK], 2134[AC_MSG_CHECKING([whether build environment is sane]) 2135# Just in case 2136sleep 1 2137echo timestamp > conftest.file 2138# Reject unsafe characters in $srcdir or the absolute working directory 2139# name. Accept space and tab only in the latter. 2140am_lf=' 2141' 2142case `pwd` in 2143 *[[\\\"\#\$\&\'\`$am_lf]]*) 2144 AC_MSG_ERROR([unsafe absolute working directory name]);; 2145esac 2146case $srcdir in 2147 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 2148 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 2149esac 2150 2151# Do `set' in a subshell so we don't clobber the current shell's 2152# arguments. Must try -L first in case configure is actually a 2153# symlink; some systems play weird games with the mod time of symlinks 2154# (eg FreeBSD returns the mod time of the symlink's containing 2155# directory). 2156if ( 2157 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 2158 if test "$[*]" = "X"; then 2159 # -L didn't work. 2160 set X `ls -t "$srcdir/configure" conftest.file` 2161 fi 2162 rm -f conftest.file 2163 if test "$[*]" != "X $srcdir/configure conftest.file" \ 2164 && test "$[*]" != "X conftest.file $srcdir/configure"; then 2165 2166 # If neither matched, then we have a broken ls. This can happen 2167 # if, for instance, CONFIG_SHELL is bash and it inherits a 2168 # broken ls alias from the environment. This has actually 2169 # happened. Such a system could not be considered "sane". 2170 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2171alias in your environment]) 2172 fi 2173 2174 test "$[2]" = conftest.file 2175 ) 2176then 2177 # Ok. 2178 : 2179else 2180 AC_MSG_ERROR([newly created file is older than distributed files! 2181Check your system clock]) 2182fi 2183AC_MSG_RESULT(yes)]) 2184 2185# Copyright (C) 2009 Free Software Foundation, Inc. 2186# 2187# This file is free software; the Free Software Foundation 2188# gives unlimited permission to copy and/or distribute it, 2189# with or without modifications, as long as this notice is preserved. 2190 2191# serial 1 2192 2193# AM_SILENT_RULES([DEFAULT]) 2194# -------------------------- 2195# Enable less verbose build rules; with the default set to DEFAULT 2196# (`yes' being less verbose, `no' or empty being verbose). 2197AC_DEFUN([AM_SILENT_RULES], 2198[AC_ARG_ENABLE([silent-rules], 2199[ --enable-silent-rules less verbose build output (undo: `make V=1') 2200 --disable-silent-rules verbose build output (undo: `make V=0')]) 2201case $enable_silent_rules in 2202yes) AM_DEFAULT_VERBOSITY=0;; 2203no) AM_DEFAULT_VERBOSITY=1;; 2204*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 2205esac 2206AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 2207AM_BACKSLASH='\' 2208AC_SUBST([AM_BACKSLASH])dnl 2209_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 2210]) 2211 2212# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 2213# 2214# This file is free software; the Free Software Foundation 2215# gives unlimited permission to copy and/or distribute it, 2216# with or without modifications, as long as this notice is preserved. 2217 2218# AM_PROG_INSTALL_STRIP 2219# --------------------- 2220# One issue with vendor `install' (even GNU) is that you can't 2221# specify the program used to strip binaries. This is especially 2222# annoying in cross-compiling environments, where the build's strip 2223# is unlikely to handle the host's binaries. 2224# Fortunately install-sh will honor a STRIPPROG variable, so we 2225# always use install-sh in `make install-strip', and initialize 2226# STRIPPROG with the value of the STRIP variable (set by the user). 2227AC_DEFUN([AM_PROG_INSTALL_STRIP], 2228[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2229# Installed binaries are usually stripped using `strip' when the user 2230# run `make install-strip'. However `strip' might not be the right 2231# tool to use in cross-compilation environments, therefore Automake 2232# will honor the `STRIP' environment variable to overrule this program. 2233dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 2234if test "$cross_compiling" != no; then 2235 AC_CHECK_TOOL([STRIP], [strip], :) 2236fi 2237INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2238AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2239 2240# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 2241# 2242# This file is free software; the Free Software Foundation 2243# gives unlimited permission to copy and/or distribute it, 2244# with or without modifications, as long as this notice is preserved. 2245 2246# serial 2 2247 2248# _AM_SUBST_NOTMAKE(VARIABLE) 2249# --------------------------- 2250# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2251# This macro is traced by Automake. 2252AC_DEFUN([_AM_SUBST_NOTMAKE]) 2253 2254# AM_SUBST_NOTMAKE(VARIABLE) 2255# --------------------------- 2256# Public sister of _AM_SUBST_NOTMAKE. 2257AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2258 2259# Check how to create a tarball. -*- Autoconf -*- 2260 2261# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 2262# 2263# This file is free software; the Free Software Foundation 2264# gives unlimited permission to copy and/or distribute it, 2265# with or without modifications, as long as this notice is preserved. 2266 2267# serial 2 2268 2269# _AM_PROG_TAR(FORMAT) 2270# -------------------- 2271# Check how to create a tarball in format FORMAT. 2272# FORMAT should be one of `v7', `ustar', or `pax'. 2273# 2274# Substitute a variable $(am__tar) that is a command 2275# writing to stdout a FORMAT-tarball containing the directory 2276# $tardir. 2277# tardir=directory && $(am__tar) > result.tar 2278# 2279# Substitute a variable $(am__untar) that extract such 2280# a tarball read from stdin. 2281# $(am__untar) < result.tar 2282AC_DEFUN([_AM_PROG_TAR], 2283[# Always define AMTAR for backward compatibility. 2284AM_MISSING_PROG([AMTAR], [tar]) 2285m4_if([$1], [v7], 2286 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 2287 [m4_case([$1], [ustar],, [pax],, 2288 [m4_fatal([Unknown tar format])]) 2289AC_MSG_CHECKING([how to create a $1 tar archive]) 2290# Loop over all known methods to create a tar archive until one works. 2291_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 2292_am_tools=${am_cv_prog_tar_$1-$_am_tools} 2293# Do not fold the above two line into one, because Tru64 sh and 2294# Solaris sh will not grok spaces in the rhs of `-'. 2295for _am_tool in $_am_tools 2296do 2297 case $_am_tool in 2298 gnutar) 2299 for _am_tar in tar gnutar gtar; 2300 do 2301 AM_RUN_LOG([$_am_tar --version]) && break 2302 done 2303 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 2304 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 2305 am__untar="$_am_tar -xf -" 2306 ;; 2307 plaintar) 2308 # Must skip GNU tar: if it does not support --format= it doesn't create 2309 # ustar tarball either. 2310 (tar --version) >/dev/null 2>&1 && continue 2311 am__tar='tar chf - "$$tardir"' 2312 am__tar_='tar chf - "$tardir"' 2313 am__untar='tar xf -' 2314 ;; 2315 pax) 2316 am__tar='pax -L -x $1 -w "$$tardir"' 2317 am__tar_='pax -L -x $1 -w "$tardir"' 2318 am__untar='pax -r' 2319 ;; 2320 cpio) 2321 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 2322 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 2323 am__untar='cpio -i -H $1 -d' 2324 ;; 2325 none) 2326 am__tar=false 2327 am__tar_=false 2328 am__untar=false 2329 ;; 2330 esac 2331 2332 # If the value was cached, stop now. We just wanted to have am__tar 2333 # and am__untar set. 2334 test -n "${am_cv_prog_tar_$1}" && break 2335 2336 # tar/untar a dummy directory, and stop if the command works 2337 rm -rf conftest.dir 2338 mkdir conftest.dir 2339 echo GrepMe > conftest.dir/file 2340 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 2341 rm -rf conftest.dir 2342 if test -s conftest.tar; then 2343 AM_RUN_LOG([$am__untar <conftest.tar]) 2344 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 2345 fi 2346done 2347rm -rf conftest.dir 2348 2349AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 2350AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 2351AC_SUBST([am__tar]) 2352AC_SUBST([am__untar]) 2353]) # _AM_PROG_TAR 2354 2355m4_include([m4/ax_define_dir.m4]) 2356m4_include([m4/libtool.m4]) 2357m4_include([m4/ltoptions.m4]) 2358m4_include([m4/ltsugar.m4]) 2359m4_include([m4/ltversion.m4]) 2360m4_include([m4/lt~obsolete.m4]) 2361