aclocal.m4 revision 1568b75b
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) 2001, 2003, 2005 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# AM_PROG_INSTALL_STRIP 1024# --------------------- 1025# One issue with vendor `install' (even GNU) is that you can't 1026# specify the program used to strip binaries. This is especially 1027# annoying in cross-compiling environments, where the build's strip 1028# is unlikely to handle the host's binaries. 1029# Fortunately install-sh will honor a STRIPPROG variable, so we 1030# always use install-sh in `make install-strip', and initialize 1031# STRIPPROG with the value of the STRIP variable (set by the user). 1032AC_DEFUN([AM_PROG_INSTALL_STRIP], 1033[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1034# Installed binaries are usually stripped using `strip' when the user 1035# run `make install-strip'. However `strip' might not be the right 1036# tool to use in cross-compilation environments, therefore Automake 1037# will honor the `STRIP' environment variable to overrule this program. 1038dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1039if test "$cross_compiling" != no; then 1040 AC_CHECK_TOOL([STRIP], [strip], :) 1041fi 1042INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1043AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1044 1045# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1046# 1047# This file is free software; the Free Software Foundation 1048# gives unlimited permission to copy and/or distribute it, 1049# with or without modifications, as long as this notice is preserved. 1050 1051# serial 2 1052 1053# _AM_SUBST_NOTMAKE(VARIABLE) 1054# --------------------------- 1055# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1056# This macro is traced by Automake. 1057AC_DEFUN([_AM_SUBST_NOTMAKE]) 1058 1059# AM_SUBST_NOTMAKE(VARIABLE) 1060# --------------------------- 1061# Public sister of _AM_SUBST_NOTMAKE. 1062AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1063 1064# Check how to create a tarball. -*- Autoconf -*- 1065 1066# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1067# 1068# This file is free software; the Free Software Foundation 1069# gives unlimited permission to copy and/or distribute it, 1070# with or without modifications, as long as this notice is preserved. 1071 1072# serial 2 1073 1074# _AM_PROG_TAR(FORMAT) 1075# -------------------- 1076# Check how to create a tarball in format FORMAT. 1077# FORMAT should be one of `v7', `ustar', or `pax'. 1078# 1079# Substitute a variable $(am__tar) that is a command 1080# writing to stdout a FORMAT-tarball containing the directory 1081# $tardir. 1082# tardir=directory && $(am__tar) > result.tar 1083# 1084# Substitute a variable $(am__untar) that extract such 1085# a tarball read from stdin. 1086# $(am__untar) < result.tar 1087AC_DEFUN([_AM_PROG_TAR], 1088[# Always define AMTAR for backward compatibility. 1089AM_MISSING_PROG([AMTAR], [tar]) 1090m4_if([$1], [v7], 1091 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1092 [m4_case([$1], [ustar],, [pax],, 1093 [m4_fatal([Unknown tar format])]) 1094AC_MSG_CHECKING([how to create a $1 tar archive]) 1095# Loop over all known methods to create a tar archive until one works. 1096_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1097_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1098# Do not fold the above two line into one, because Tru64 sh and 1099# Solaris sh will not grok spaces in the rhs of `-'. 1100for _am_tool in $_am_tools 1101do 1102 case $_am_tool in 1103 gnutar) 1104 for _am_tar in tar gnutar gtar; 1105 do 1106 AM_RUN_LOG([$_am_tar --version]) && break 1107 done 1108 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1109 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1110 am__untar="$_am_tar -xf -" 1111 ;; 1112 plaintar) 1113 # Must skip GNU tar: if it does not support --format= it doesn't create 1114 # ustar tarball either. 1115 (tar --version) >/dev/null 2>&1 && continue 1116 am__tar='tar chf - "$$tardir"' 1117 am__tar_='tar chf - "$tardir"' 1118 am__untar='tar xf -' 1119 ;; 1120 pax) 1121 am__tar='pax -L -x $1 -w "$$tardir"' 1122 am__tar_='pax -L -x $1 -w "$tardir"' 1123 am__untar='pax -r' 1124 ;; 1125 cpio) 1126 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1127 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1128 am__untar='cpio -i -H $1 -d' 1129 ;; 1130 none) 1131 am__tar=false 1132 am__tar_=false 1133 am__untar=false 1134 ;; 1135 esac 1136 1137 # If the value was cached, stop now. We just wanted to have am__tar 1138 # and am__untar set. 1139 test -n "${am_cv_prog_tar_$1}" && break 1140 1141 # tar/untar a dummy directory, and stop if the command works 1142 rm -rf conftest.dir 1143 mkdir conftest.dir 1144 echo GrepMe > conftest.dir/file 1145 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1146 rm -rf conftest.dir 1147 if test -s conftest.tar; then 1148 AM_RUN_LOG([$am__untar <conftest.tar]) 1149 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1150 fi 1151done 1152rm -rf conftest.dir 1153 1154AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1155AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1156AC_SUBST([am__tar]) 1157AC_SUBST([am__untar]) 1158]) # _AM_PROG_TAR 1159 1160dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1161dnl 1162dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1163dnl 1164dnl Permission is hereby granted, free of charge, to any person obtaining a 1165dnl copy of this software and associated documentation files (the 1166dnl "Software"), to deal in the Software without restriction, including 1167dnl without limitation the rights to use, copy, modify, merge, publish, 1168dnl distribute, and/or sell copies of the Software, and to permit persons 1169dnl to whom the Software is furnished to do so, provided that the above 1170dnl copyright notice(s) and this permission notice appear in all copies of 1171dnl the Software and that both the above copyright notice(s) and this 1172dnl permission notice appear in supporting documentation. 1173dnl 1174dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1175dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1176dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1177dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1178dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1179dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1180dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1181dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 1182dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1183dnl 1184dnl Except as contained in this notice, the name of a copyright holder 1185dnl shall not be used in advertising or otherwise to promote the sale, use 1186dnl or other dealings in this Software without prior written authorization 1187dnl of the copyright holder. 1188 1189# XORG_MACROS_VERSION(required-version) 1190# ------------------------------------- 1191# Minimum version: 1.1.0 1192# 1193# If you're using a macro added in Version 1.1 or newer, include this in 1194# your configure.ac with the minimum required version, such as: 1195# XORG_MACROS_VERSION(1.1) 1196# 1197# To ensure that this macro is defined, also add: 1198# m4_ifndef([XORG_MACROS_VERSION], 1199# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1200# 1201# 1202# See the "minimum version" comment for each macro you use to see what 1203# version you require. 1204AC_DEFUN([XORG_MACROS_VERSION],[ 1205 [XORG_MACROS_needed_version=$1 1206 XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 1207 XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 1208 AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 1209 [XORG_MACROS_version=1.2.1 1210 XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 1211 XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 1212 if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 1213 AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_needed_major}.x]) 1214 fi 1215 if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 1216 AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}.0 or newer]) 1217 fi 1218 AC_MSG_RESULT([yes, $XORG_MACROS_version]) 1219]) # XORG_MACROS_VERSION 1220 1221# XORG_PROG_RAWCPP() 1222# ------------------ 1223# Minimum version: 1.0.0 1224# 1225# Find cpp program and necessary flags for use in pre-processing text files 1226# such as man pages and config files 1227AC_DEFUN([XORG_PROG_RAWCPP],[ 1228AC_REQUIRE([AC_PROG_CPP]) 1229AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1230 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1231 1232# Check for flag to avoid builtin definitions - assumes unix is predefined, 1233# which is not the best choice for supporting other OS'es, but covers most 1234# of the ones we need for now. 1235AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1236AC_LANG_CONFTEST([Does cpp redefine unix ?]) 1237if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1238 AC_MSG_RESULT([no]) 1239else 1240 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1241 RAWCPPFLAGS=-undef 1242 AC_MSG_RESULT([yes]) 1243 # under Cygwin unix is still defined even with -undef 1244 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1245 RAWCPPFLAGS="-undef -ansi" 1246 AC_MSG_RESULT([yes, with -ansi]) 1247 else 1248 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1249 fi 1250fi 1251rm -f conftest.$ac_ext 1252 1253AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1254AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1255if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1256 AC_MSG_RESULT([no]) 1257else 1258 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1259 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1260 AC_MSG_RESULT([yes]) 1261 else 1262 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1263 fi 1264fi 1265rm -f conftest.$ac_ext 1266AC_SUBST(RAWCPPFLAGS) 1267]) # XORG_PROG_RAWCPP 1268 1269# XORG_MANPAGE_SECTIONS() 1270# ----------------------- 1271# Minimum version: 1.0.0 1272# 1273# Determine which sections man pages go in for the different man page types 1274# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1275# Not sure if there's any better way than just hardcoding by OS name. 1276# Override default settings by setting environment variables 1277 1278AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1279AC_REQUIRE([AC_CANONICAL_HOST]) 1280 1281if test x$APP_MAN_SUFFIX = x ; then 1282 APP_MAN_SUFFIX=1 1283fi 1284if test x$APP_MAN_DIR = x ; then 1285 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1286fi 1287 1288if test x$LIB_MAN_SUFFIX = x ; then 1289 LIB_MAN_SUFFIX=3 1290fi 1291if test x$LIB_MAN_DIR = x ; then 1292 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1293fi 1294 1295if test x$FILE_MAN_SUFFIX = x ; then 1296 case $host_os in 1297 solaris*) FILE_MAN_SUFFIX=4 ;; 1298 *) FILE_MAN_SUFFIX=5 ;; 1299 esac 1300fi 1301if test x$FILE_MAN_DIR = x ; then 1302 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1303fi 1304 1305if test x$MISC_MAN_SUFFIX = x ; then 1306 case $host_os in 1307 solaris*) MISC_MAN_SUFFIX=5 ;; 1308 *) MISC_MAN_SUFFIX=7 ;; 1309 esac 1310fi 1311if test x$MISC_MAN_DIR = x ; then 1312 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1313fi 1314 1315if test x$DRIVER_MAN_SUFFIX = x ; then 1316 case $host_os in 1317 solaris*) DRIVER_MAN_SUFFIX=7 ;; 1318 *) DRIVER_MAN_SUFFIX=4 ;; 1319 esac 1320fi 1321if test x$DRIVER_MAN_DIR = x ; then 1322 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1323fi 1324 1325if test x$ADMIN_MAN_SUFFIX = x ; then 1326 case $host_os in 1327 solaris*) ADMIN_MAN_SUFFIX=1m ;; 1328 *) ADMIN_MAN_SUFFIX=8 ;; 1329 esac 1330fi 1331if test x$ADMIN_MAN_DIR = x ; then 1332 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1333fi 1334 1335 1336AC_SUBST([APP_MAN_SUFFIX]) 1337AC_SUBST([LIB_MAN_SUFFIX]) 1338AC_SUBST([FILE_MAN_SUFFIX]) 1339AC_SUBST([MISC_MAN_SUFFIX]) 1340AC_SUBST([DRIVER_MAN_SUFFIX]) 1341AC_SUBST([ADMIN_MAN_SUFFIX]) 1342AC_SUBST([APP_MAN_DIR]) 1343AC_SUBST([LIB_MAN_DIR]) 1344AC_SUBST([FILE_MAN_DIR]) 1345AC_SUBST([MISC_MAN_DIR]) 1346AC_SUBST([DRIVER_MAN_DIR]) 1347AC_SUBST([ADMIN_MAN_DIR]) 1348]) # XORG_MANPAGE_SECTIONS 1349 1350# XORG_CHECK_LINUXDOC 1351# ------------------- 1352# Minimum version: 1.0.0 1353# 1354# Defines the variable MAKE_TEXT if the necessary tools and 1355# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1356# Whether or not the necessary tools and files are found can be checked 1357# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1358AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1359if test x$XORG_SGML_PATH = x ; then 1360 XORG_SGML_PATH=$prefix/share/sgml 1361fi 1362HAVE_DEFS_ENT= 1363 1364if test x"$cross_compiling" = x"yes" ; then 1365 HAVE_DEFS_ENT=no 1366else 1367 AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1368fi 1369 1370AC_PATH_PROG(LINUXDOC, linuxdoc) 1371AC_PATH_PROG(PS2PDF, ps2pdf) 1372 1373AC_MSG_CHECKING([Whether to build documentation]) 1374 1375if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1376 BUILDDOC=yes 1377else 1378 BUILDDOC=no 1379fi 1380 1381AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1382 1383AC_MSG_RESULT([$BUILDDOC]) 1384 1385AC_MSG_CHECKING([Whether to build pdf documentation]) 1386 1387if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1388 BUILDPDFDOC=yes 1389else 1390 BUILDPDFDOC=no 1391fi 1392 1393AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1394 1395AC_MSG_RESULT([$BUILDPDFDOC]) 1396 1397MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1398MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1399MAKE_PDF="$PS2PDF" 1400MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1401 1402AC_SUBST(MAKE_TEXT) 1403AC_SUBST(MAKE_PS) 1404AC_SUBST(MAKE_PDF) 1405AC_SUBST(MAKE_HTML) 1406]) # XORG_CHECK_LINUXDOC 1407 1408# XORG_CHECK_DOCBOOK 1409# ------------------- 1410# Minimum version: 1.0.0 1411# 1412# Checks for the ability to build output formats from SGML DocBook source. 1413# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1414# indicates whether the necessary tools and files are found and, if set, 1415# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1416AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1417if test x$XORG_SGML_PATH = x ; then 1418 XORG_SGML_PATH=$prefix/share/sgml 1419fi 1420HAVE_DEFS_ENT= 1421BUILDTXTDOC=no 1422BUILDPDFDOC=no 1423BUILDPSDOC=no 1424BUILDHTMLDOC=no 1425 1426AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1427 1428AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1429AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1430AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1431AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1432 1433AC_MSG_CHECKING([Whether to build text documentation]) 1434if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1435 test x$BUILD_TXTDOC != xno; then 1436 BUILDTXTDOC=yes 1437fi 1438AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1439AC_MSG_RESULT([$BUILDTXTDOC]) 1440 1441AC_MSG_CHECKING([Whether to build PDF documentation]) 1442if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1443 test x$BUILD_PDFDOC != xno; then 1444 BUILDPDFDOC=yes 1445fi 1446AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1447AC_MSG_RESULT([$BUILDPDFDOC]) 1448 1449AC_MSG_CHECKING([Whether to build PostScript documentation]) 1450if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1451 test x$BUILD_PSDOC != xno; then 1452 BUILDPSDOC=yes 1453fi 1454AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1455AC_MSG_RESULT([$BUILDPSDOC]) 1456 1457AC_MSG_CHECKING([Whether to build HTML documentation]) 1458if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1459 test x$BUILD_HTMLDOC != xno; then 1460 BUILDHTMLDOC=yes 1461fi 1462AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1463AC_MSG_RESULT([$BUILDHTMLDOC]) 1464 1465MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1466MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1467MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1468MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1469 1470AC_SUBST(MAKE_TEXT) 1471AC_SUBST(MAKE_PS) 1472AC_SUBST(MAKE_PDF) 1473AC_SUBST(MAKE_HTML) 1474]) # XORG_CHECK_DOCBOOK 1475 1476# XORG_CHECK_MALLOC_ZERO 1477# ---------------------- 1478# Minimum version: 1.0.0 1479# 1480# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1481# malloc(0) returns NULL. Packages should add one of these cflags to 1482# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1483AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1484AC_ARG_ENABLE(malloc0returnsnull, 1485 AC_HELP_STRING([--enable-malloc0returnsnull], 1486 [malloc(0) returns NULL (default: auto)]), 1487 [MALLOC_ZERO_RETURNS_NULL=$enableval], 1488 [MALLOC_ZERO_RETURNS_NULL=auto]) 1489 1490AC_MSG_CHECKING([whether malloc(0) returns NULL]) 1491if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1492 AC_RUN_IFELSE([ 1493char *malloc(); 1494char *realloc(); 1495char *calloc(); 1496main() { 1497 char *m0, *r0, *c0, *p; 1498 m0 = malloc(0); 1499 p = malloc(10); 1500 r0 = realloc(p,0); 1501 c0 = calloc(0); 1502 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1503}], 1504 [MALLOC_ZERO_RETURNS_NULL=yes], 1505 [MALLOC_ZERO_RETURNS_NULL=no]) 1506fi 1507AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1508 1509if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1510 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1511 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1512 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1513else 1514 MALLOC_ZERO_CFLAGS="" 1515 XMALLOC_ZERO_CFLAGS="" 1516 XTMALLOC_ZERO_CFLAGS="" 1517fi 1518 1519AC_SUBST([MALLOC_ZERO_CFLAGS]) 1520AC_SUBST([XMALLOC_ZERO_CFLAGS]) 1521AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1522]) # XORG_CHECK_MALLOC_ZERO 1523 1524# XORG_WITH_LINT() 1525# ---------------- 1526# Minimum version: 1.1.0 1527# 1528# Sets up flags for source checkers such as lint and sparse if --with-lint 1529# is specified. (Use --with-lint=sparse for sparse.) 1530# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1531# Sets $LINT_FLAGS to flags to pass to source checker 1532# Sets LINT automake conditional if enabled (default: disabled) 1533# 1534AC_DEFUN([XORG_WITH_LINT],[ 1535 1536# Allow checking code with lint, sparse, etc. 1537AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 1538 [Use a lint-style source code checker (default: disabled)])], 1539 [use_lint=$withval], [use_lint=no]) 1540if test "x$use_lint" = "xyes" ; then 1541 LINT="lint" 1542else 1543 LINT="$use_lint" 1544fi 1545if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1546 case $LINT in 1547 lint|*/lint) 1548 case $host_os in 1549 solaris*) 1550 LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1551 ;; 1552 esac 1553 ;; 1554 esac 1555fi 1556 1557AC_SUBST(LINT) 1558AC_SUBST(LINT_FLAGS) 1559AM_CONDITIONAL(LINT, [test x$LINT != xno]) 1560 1561]) # XORG_WITH_LINT 1562 1563# XORG_LINT_LIBRARY(LIBNAME) 1564# -------------------------- 1565# Minimum version: 1.1.0 1566# 1567# Sets up flags for building lint libraries for checking programs that call 1568# functions in the library. 1569# Disabled by default, enable with --enable-lint-library 1570# Sets: 1571# @LINTLIB@ - name of lint library file to make 1572# MAKE_LINT_LIB - automake conditional 1573# 1574 1575AC_DEFUN([XORG_LINT_LIBRARY],[ 1576AC_REQUIRE([XORG_WITH_LINT]) 1577# Build lint "library" for more indepth checks of programs calling this library 1578AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1579 [Create lint library (default: disabled)])], 1580 [make_lint_lib=$enableval], [make_lint_lib=no]) 1581if test "x$make_lint_lib" != "xno" ; then 1582 if test "x$LINT" = "xno" ; then 1583 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1584 fi 1585 if test "x$make_lint_lib" = "xyes" ; then 1586 LINTLIB=llib-l$1.ln 1587 else 1588 LINTLIB=$make_lint_lib 1589 fi 1590fi 1591AC_SUBST(LINTLIB) 1592AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1593 1594]) # XORG_LINT_LIBRARY 1595 1596# XORG_CWARNFLAGS 1597# --------------- 1598# Minimum version: 1.2.0 1599# 1600# Defines CWARNFLAGS to enable C compiler warnings. 1601# 1602AC_DEFUN([XORG_CWARNFLAGS], [ 1603AC_REQUIRE([AC_PROG_CC]) 1604if test "x$GCC" = xyes ; then 1605 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1606-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1607-Wbad-function-cast" 1608 case `gcc -dumpversion` in 1609 3.4.* | 4.*) 1610 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1611 ;; 1612 esac 1613else 1614 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1615 if test "x$SUNCC" = "xyes"; then 1616 CWARNFLAGS="-v" 1617 fi 1618fi 1619AC_SUBST(CWARNFLAGS) 1620]) # XORG_CWARNFLAGS 1621dnl Copyright 2005 Red Hat, Inc 1622dnl 1623dnl Permission to use, copy, modify, distribute, and sell this software and its 1624dnl documentation for any purpose is hereby granted without fee, provided that 1625dnl the above copyright notice appear in all copies and that both that 1626dnl copyright notice and this permission notice appear in supporting 1627dnl documentation. 1628dnl 1629dnl The above copyright notice and this permission notice shall be included 1630dnl in all copies or substantial portions of the Software. 1631dnl 1632dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1633dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1634dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1635dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1636dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1637dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1638dnl OTHER DEALINGS IN THE SOFTWARE. 1639dnl 1640dnl Except as contained in this notice, the name of the copyright holders shall 1641dnl not be used in advertising or otherwise to promote the sale, use or 1642dnl other dealings in this Software without prior written authorization 1643dnl from the copyright holders. 1644dnl 1645 1646# XORG_RELEASE_VERSION 1647# -------------------- 1648# Adds --with/without-release-string and changes the PACKAGE and 1649# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1650# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1651# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1652 1653AC_DEFUN([XORG_RELEASE_VERSION],[ 1654 AC_ARG_WITH(release-version, 1655 AC_HELP_STRING([--with-release-version=STRING], 1656 [Use release version string in package name]), 1657 [RELEASE_VERSION="$withval"], 1658 [RELEASE_VERSION=""]) 1659 if test "x$RELEASE_VERSION" != "x"; then 1660 PACKAGE="$PACKAGE-$RELEASE_VERSION" 1661 PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1662 AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1663 fi 1664 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1665 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1666 [Major version of this package]) 1667 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1668 if test "x$PVM" = "x"; then 1669 PVM="0" 1670 fi 1671 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1672 [$PVM], 1673 [Minor version of this package]) 1674 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1675 if test "x$PVP" = "x"; then 1676 PVP="0" 1677 fi 1678 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1679 [$PVP], 1680 [Patch version of this package]) 1681]) 1682 1683# XORG_CHANGELOG() 1684# ---------------- 1685# Minimum version: 1.2.0 1686# 1687# Defines the variable CHANGELOG_CMD as the command to generate 1688# ChangeLog from git. 1689# 1690# Arrange that distcleancheck ignores ChangeLog left over by distclean. 1691# 1692AC_DEFUN([XORG_CHANGELOG], [ 1693CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 1694mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 1695echo 'git directory not found: installing possibly empty changelog.' >&2)" 1696AC_SUBST([CHANGELOG_CMD]) 1697AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 1698]) # XORG_CHANGELOG 1699 1700