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