aclocal.m4 revision bc5f02f5
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# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23# 24# This file is free software; the Free Software Foundation 25# gives unlimited permission to copy and/or distribute it, 26# with or without modifications, as long as this notice is preserved. 27 28# AM_AUTOMAKE_VERSION(VERSION) 29# ---------------------------- 30# Automake X.Y traces this macro to ensure aclocal.m4 has been 31# generated from the m4 files accompanying Automake X.Y. 32# (This private macro should not be called outside this file.) 33AC_DEFUN([AM_AUTOMAKE_VERSION], 34[am__api_version='1.11' 35dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36dnl require some minimum version. Point them to the right macro. 37m4_if([$1], [1.11], [], 38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39]) 40 41# _AM_AUTOCONF_VERSION(VERSION) 42# ----------------------------- 43# aclocal traces this macro to find the Autoconf version. 44# This is a private macro too. Using m4_define simplifies 45# the logic in aclocal, which can simply ignore this definition. 46m4_define([_AM_AUTOCONF_VERSION], []) 47 48# AM_SET_CURRENT_AUTOMAKE_VERSION 49# ------------------------------- 50# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53[AM_AUTOMAKE_VERSION([1.11])dnl 54m4_ifndef([AC_AUTOCONF_VERSION], 55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57 58# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59 60# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61# 62# This file is free software; the Free Software Foundation 63# gives unlimited permission to copy and/or distribute it, 64# with or without modifications, as long as this notice is preserved. 65 66# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69# 70# Of course, Automake must honor this variable whenever it calls a 71# tool from the auxiliary directory. The problem is that $srcdir (and 72# therefore $ac_aux_dir as well) can be either absolute or relative, 73# depending on how configure is run. This is pretty annoying, since 74# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75# source directory, any form will work fine, but in subdirectories a 76# relative path needs to be adjusted first. 77# 78# $ac_aux_dir/missing 79# fails when called from a subdirectory if $ac_aux_dir is relative 80# $top_srcdir/$ac_aux_dir/missing 81# fails if $ac_aux_dir is absolute, 82# fails when called from a subdirectory in a VPATH build with 83# a relative $ac_aux_dir 84# 85# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86# are both prefixed by $srcdir. In an in-source build this is usually 87# harmless because $srcdir is `.', but things will broke when you 88# start a VPATH build or use an absolute $srcdir. 89# 90# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93# and then we would define $MISSING as 94# MISSING="\${SHELL} $am_aux_dir/missing" 95# This will work as long as MISSING is not called from configure, because 96# unfortunately $(top_srcdir) has no meaning in configure. 97# However there are other variables, like CC, which are often used in 98# configure, and could therefore not use this "fixed" $ac_aux_dir. 99# 100# Another solution, used here, is to always expand $ac_aux_dir to an 101# absolute PATH. The drawback is that using absolute paths prevent a 102# configured tree to be moved without reconfiguration. 103 104AC_DEFUN([AM_AUX_DIR_EXPAND], 105[dnl Rely on autoconf to set up CDPATH properly. 106AC_PREREQ([2.50])dnl 107# expand $ac_aux_dir to an absolute path 108am_aux_dir=`cd $ac_aux_dir && pwd` 109]) 110 111# Do all the work for Automake. -*- Autoconf -*- 112 113# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 114# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 115# 116# This file is free software; the Free Software Foundation 117# gives unlimited permission to copy and/or distribute it, 118# with or without modifications, as long as this notice is preserved. 119 120# serial 16 121 122# This macro actually does too much. Some checks are only needed if 123# your package does certain things. But this isn't really a big deal. 124 125# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 126# AM_INIT_AUTOMAKE([OPTIONS]) 127# ----------------------------------------------- 128# The call with PACKAGE and VERSION arguments is the old style 129# call (pre autoconf-2.50), which is being phased out. PACKAGE 130# and VERSION should now be passed to AC_INIT and removed from 131# the call to AM_INIT_AUTOMAKE. 132# We support both call styles for the transition. After 133# the next Automake release, Autoconf can make the AC_INIT 134# arguments mandatory, and then we can depend on a new Autoconf 135# release and drop the old call support. 136AC_DEFUN([AM_INIT_AUTOMAKE], 137[AC_PREREQ([2.62])dnl 138dnl Autoconf wants to disallow AM_ names. We explicitly allow 139dnl the ones we care about. 140m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 141AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 142AC_REQUIRE([AC_PROG_INSTALL])dnl 143if test "`cd $srcdir && pwd`" != "`pwd`"; then 144 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 145 # is not polluted with repeated "-I." 146 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 147 # test to see if srcdir already configured 148 if test -f $srcdir/config.status; then 149 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 150 fi 151fi 152 153# test whether we have cygpath 154if test -z "$CYGPATH_W"; then 155 if (cygpath --version) >/dev/null 2>/dev/null; then 156 CYGPATH_W='cygpath -w' 157 else 158 CYGPATH_W=echo 159 fi 160fi 161AC_SUBST([CYGPATH_W]) 162 163# Define the identity of the package. 164dnl Distinguish between old-style and new-style calls. 165m4_ifval([$2], 166[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 167 AC_SUBST([PACKAGE], [$1])dnl 168 AC_SUBST([VERSION], [$2])], 169[_AM_SET_OPTIONS([$1])dnl 170dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 171m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 172 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 173 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 174 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 175 176_AM_IF_OPTION([no-define],, 177[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 178 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 179 180# Some tools Automake needs. 181AC_REQUIRE([AM_SANITY_CHECK])dnl 182AC_REQUIRE([AC_ARG_PROGRAM])dnl 183AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 184AM_MISSING_PROG(AUTOCONF, autoconf) 185AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 186AM_MISSING_PROG(AUTOHEADER, autoheader) 187AM_MISSING_PROG(MAKEINFO, makeinfo) 188AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 189AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 190AC_REQUIRE([AM_PROG_MKDIR_P])dnl 191# We need awk for the "check" target. The system "awk" is bad on 192# some platforms. 193AC_REQUIRE([AC_PROG_AWK])dnl 194AC_REQUIRE([AC_PROG_MAKE_SET])dnl 195AC_REQUIRE([AM_SET_LEADING_DOT])dnl 196_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 197 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 198 [_AM_PROG_TAR([v7])])]) 199_AM_IF_OPTION([no-dependencies],, 200[AC_PROVIDE_IFELSE([AC_PROG_CC], 201 [_AM_DEPENDENCIES(CC)], 202 [define([AC_PROG_CC], 203 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 204AC_PROVIDE_IFELSE([AC_PROG_CXX], 205 [_AM_DEPENDENCIES(CXX)], 206 [define([AC_PROG_CXX], 207 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 208AC_PROVIDE_IFELSE([AC_PROG_OBJC], 209 [_AM_DEPENDENCIES(OBJC)], 210 [define([AC_PROG_OBJC], 211 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 212]) 213_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 214dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 215dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 216dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 217AC_CONFIG_COMMANDS_PRE(dnl 218[m4_provide_if([_AM_COMPILER_EXEEXT], 219 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 220]) 221 222dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 223dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 224dnl mangled by Autoconf and run in a shell conditional statement. 225m4_define([_AC_COMPILER_EXEEXT], 226m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 227 228 229# When config.status generates a header, we must update the stamp-h file. 230# This file resides in the same directory as the config header 231# that is generated. The stamp files are numbered to have different names. 232 233# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 234# loop where config.status creates the headers, so we can generate 235# our stamp files there. 236AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 237[# Compute $1's index in $config_headers. 238_am_arg=$1 239_am_stamp_count=1 240for _am_header in $config_headers :; do 241 case $_am_header in 242 $_am_arg | $_am_arg:* ) 243 break ;; 244 * ) 245 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 246 esac 247done 248echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 249 250# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 251# 252# This file is free software; the Free Software Foundation 253# gives unlimited permission to copy and/or distribute it, 254# with or without modifications, as long as this notice is preserved. 255 256# AM_PROG_INSTALL_SH 257# ------------------ 258# Define $install_sh. 259AC_DEFUN([AM_PROG_INSTALL_SH], 260[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 261if test x"${install_sh}" != xset; then 262 case $am_aux_dir in 263 *\ * | *\ *) 264 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 265 *) 266 install_sh="\${SHELL} $am_aux_dir/install-sh" 267 esac 268fi 269AC_SUBST(install_sh)]) 270 271# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 272# 273# This file is free software; the Free Software Foundation 274# gives unlimited permission to copy and/or distribute it, 275# with or without modifications, as long as this notice is preserved. 276 277# serial 2 278 279# Check whether the underlying file-system supports filenames 280# with a leading dot. For instance MS-DOS doesn't. 281AC_DEFUN([AM_SET_LEADING_DOT], 282[rm -rf .tst 2>/dev/null 283mkdir .tst 2>/dev/null 284if test -d .tst; then 285 am__leading_dot=. 286else 287 am__leading_dot=_ 288fi 289rmdir .tst 2>/dev/null 290AC_SUBST([am__leading_dot])]) 291 292# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 293 294# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 295# Free Software Foundation, Inc. 296# 297# This file is free software; the Free Software Foundation 298# gives unlimited permission to copy and/or distribute it, 299# with or without modifications, as long as this notice is preserved. 300 301# serial 6 302 303# AM_MISSING_PROG(NAME, PROGRAM) 304# ------------------------------ 305AC_DEFUN([AM_MISSING_PROG], 306[AC_REQUIRE([AM_MISSING_HAS_RUN]) 307$1=${$1-"${am_missing_run}$2"} 308AC_SUBST($1)]) 309 310 311# AM_MISSING_HAS_RUN 312# ------------------ 313# Define MISSING if not defined so far and test if it supports --run. 314# If it does, set am_missing_run to use it, otherwise, to nothing. 315AC_DEFUN([AM_MISSING_HAS_RUN], 316[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 317AC_REQUIRE_AUX_FILE([missing])dnl 318if test x"${MISSING+set}" != xset; then 319 case $am_aux_dir in 320 *\ * | *\ *) 321 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 322 *) 323 MISSING="\${SHELL} $am_aux_dir/missing" ;; 324 esac 325fi 326# Use eval to expand $SHELL 327if eval "$MISSING --run true"; then 328 am_missing_run="$MISSING --run " 329else 330 am_missing_run= 331 AC_MSG_WARN([`missing' script is too old or missing]) 332fi 333]) 334 335# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 336# 337# This file is free software; the Free Software Foundation 338# gives unlimited permission to copy and/or distribute it, 339# with or without modifications, as long as this notice is preserved. 340 341# AM_PROG_MKDIR_P 342# --------------- 343# Check for `mkdir -p'. 344AC_DEFUN([AM_PROG_MKDIR_P], 345[AC_PREREQ([2.60])dnl 346AC_REQUIRE([AC_PROG_MKDIR_P])dnl 347dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 348dnl while keeping a definition of mkdir_p for backward compatibility. 349dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 350dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 351dnl Makefile.ins that do not define MKDIR_P, so we do our own 352dnl adjustment using top_builddir (which is defined more often than 353dnl MKDIR_P). 354AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 355case $mkdir_p in 356 [[\\/$]]* | ?:[[\\/]]*) ;; 357 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 358esac 359]) 360 361# Helper functions for option handling. -*- Autoconf -*- 362 363# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 364# 365# This file is free software; the Free Software Foundation 366# gives unlimited permission to copy and/or distribute it, 367# with or without modifications, as long as this notice is preserved. 368 369# serial 4 370 371# _AM_MANGLE_OPTION(NAME) 372# ----------------------- 373AC_DEFUN([_AM_MANGLE_OPTION], 374[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 375 376# _AM_SET_OPTION(NAME) 377# ------------------------------ 378# Set option NAME. Presently that only means defining a flag for this option. 379AC_DEFUN([_AM_SET_OPTION], 380[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 381 382# _AM_SET_OPTIONS(OPTIONS) 383# ---------------------------------- 384# OPTIONS is a space-separated list of Automake options. 385AC_DEFUN([_AM_SET_OPTIONS], 386[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 387 388# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 389# ------------------------------------------- 390# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 391AC_DEFUN([_AM_IF_OPTION], 392[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 393 394# Check to make sure that the build environment is sane. -*- Autoconf -*- 395 396# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 397# Free Software Foundation, Inc. 398# 399# This file is free software; the Free Software Foundation 400# gives unlimited permission to copy and/or distribute it, 401# with or without modifications, as long as this notice is preserved. 402 403# serial 5 404 405# AM_SANITY_CHECK 406# --------------- 407AC_DEFUN([AM_SANITY_CHECK], 408[AC_MSG_CHECKING([whether build environment is sane]) 409# Just in case 410sleep 1 411echo timestamp > conftest.file 412# Reject unsafe characters in $srcdir or the absolute working directory 413# name. Accept space and tab only in the latter. 414am_lf=' 415' 416case `pwd` in 417 *[[\\\"\#\$\&\'\`$am_lf]]*) 418 AC_MSG_ERROR([unsafe absolute working directory name]);; 419esac 420case $srcdir in 421 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 422 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 423esac 424 425# Do `set' in a subshell so we don't clobber the current shell's 426# arguments. Must try -L first in case configure is actually a 427# symlink; some systems play weird games with the mod time of symlinks 428# (eg FreeBSD returns the mod time of the symlink's containing 429# directory). 430if ( 431 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 432 if test "$[*]" = "X"; then 433 # -L didn't work. 434 set X `ls -t "$srcdir/configure" conftest.file` 435 fi 436 rm -f conftest.file 437 if test "$[*]" != "X $srcdir/configure conftest.file" \ 438 && test "$[*]" != "X conftest.file $srcdir/configure"; then 439 440 # If neither matched, then we have a broken ls. This can happen 441 # if, for instance, CONFIG_SHELL is bash and it inherits a 442 # broken ls alias from the environment. This has actually 443 # happened. Such a system could not be considered "sane". 444 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 445alias in your environment]) 446 fi 447 448 test "$[2]" = conftest.file 449 ) 450then 451 # Ok. 452 : 453else 454 AC_MSG_ERROR([newly created file is older than distributed files! 455Check your system clock]) 456fi 457AC_MSG_RESULT(yes)]) 458 459# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 460# 461# This file is free software; the Free Software Foundation 462# gives unlimited permission to copy and/or distribute it, 463# with or without modifications, as long as this notice is preserved. 464 465# AM_PROG_INSTALL_STRIP 466# --------------------- 467# One issue with vendor `install' (even GNU) is that you can't 468# specify the program used to strip binaries. This is especially 469# annoying in cross-compiling environments, where the build's strip 470# is unlikely to handle the host's binaries. 471# Fortunately install-sh will honor a STRIPPROG variable, so we 472# always use install-sh in `make install-strip', and initialize 473# STRIPPROG with the value of the STRIP variable (set by the user). 474AC_DEFUN([AM_PROG_INSTALL_STRIP], 475[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 476# Installed binaries are usually stripped using `strip' when the user 477# run `make install-strip'. However `strip' might not be the right 478# tool to use in cross-compilation environments, therefore Automake 479# will honor the `STRIP' environment variable to overrule this program. 480dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 481if test "$cross_compiling" != no; then 482 AC_CHECK_TOOL([STRIP], [strip], :) 483fi 484INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 485AC_SUBST([INSTALL_STRIP_PROGRAM])]) 486 487# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 488# 489# This file is free software; the Free Software Foundation 490# gives unlimited permission to copy and/or distribute it, 491# with or without modifications, as long as this notice is preserved. 492 493# serial 2 494 495# _AM_SUBST_NOTMAKE(VARIABLE) 496# --------------------------- 497# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 498# This macro is traced by Automake. 499AC_DEFUN([_AM_SUBST_NOTMAKE]) 500 501# AM_SUBST_NOTMAKE(VARIABLE) 502# --------------------------- 503# Public sister of _AM_SUBST_NOTMAKE. 504AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 505 506# Check how to create a tarball. -*- Autoconf -*- 507 508# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 509# 510# This file is free software; the Free Software Foundation 511# gives unlimited permission to copy and/or distribute it, 512# with or without modifications, as long as this notice is preserved. 513 514# serial 2 515 516# _AM_PROG_TAR(FORMAT) 517# -------------------- 518# Check how to create a tarball in format FORMAT. 519# FORMAT should be one of `v7', `ustar', or `pax'. 520# 521# Substitute a variable $(am__tar) that is a command 522# writing to stdout a FORMAT-tarball containing the directory 523# $tardir. 524# tardir=directory && $(am__tar) > result.tar 525# 526# Substitute a variable $(am__untar) that extract such 527# a tarball read from stdin. 528# $(am__untar) < result.tar 529AC_DEFUN([_AM_PROG_TAR], 530[# Always define AMTAR for backward compatibility. 531AM_MISSING_PROG([AMTAR], [tar]) 532m4_if([$1], [v7], 533 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 534 [m4_case([$1], [ustar],, [pax],, 535 [m4_fatal([Unknown tar format])]) 536AC_MSG_CHECKING([how to create a $1 tar archive]) 537# Loop over all known methods to create a tar archive until one works. 538_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 539_am_tools=${am_cv_prog_tar_$1-$_am_tools} 540# Do not fold the above two line into one, because Tru64 sh and 541# Solaris sh will not grok spaces in the rhs of `-'. 542for _am_tool in $_am_tools 543do 544 case $_am_tool in 545 gnutar) 546 for _am_tar in tar gnutar gtar; 547 do 548 AM_RUN_LOG([$_am_tar --version]) && break 549 done 550 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 551 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 552 am__untar="$_am_tar -xf -" 553 ;; 554 plaintar) 555 # Must skip GNU tar: if it does not support --format= it doesn't create 556 # ustar tarball either. 557 (tar --version) >/dev/null 2>&1 && continue 558 am__tar='tar chf - "$$tardir"' 559 am__tar_='tar chf - "$tardir"' 560 am__untar='tar xf -' 561 ;; 562 pax) 563 am__tar='pax -L -x $1 -w "$$tardir"' 564 am__tar_='pax -L -x $1 -w "$tardir"' 565 am__untar='pax -r' 566 ;; 567 cpio) 568 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 569 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 570 am__untar='cpio -i -H $1 -d' 571 ;; 572 none) 573 am__tar=false 574 am__tar_=false 575 am__untar=false 576 ;; 577 esac 578 579 # If the value was cached, stop now. We just wanted to have am__tar 580 # and am__untar set. 581 test -n "${am_cv_prog_tar_$1}" && break 582 583 # tar/untar a dummy directory, and stop if the command works 584 rm -rf conftest.dir 585 mkdir conftest.dir 586 echo GrepMe > conftest.dir/file 587 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 588 rm -rf conftest.dir 589 if test -s conftest.tar; then 590 AM_RUN_LOG([$am__untar <conftest.tar]) 591 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 592 fi 593done 594rm -rf conftest.dir 595 596AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 597AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 598AC_SUBST([am__tar]) 599AC_SUBST([am__untar]) 600]) # _AM_PROG_TAR 601 602dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 603dnl 604dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 605dnl 606dnl Permission is hereby granted, free of charge, to any person obtaining a 607dnl copy of this software and associated documentation files (the 608dnl "Software"), to deal in the Software without restriction, including 609dnl without limitation the rights to use, copy, modify, merge, publish, 610dnl distribute, and/or sell copies of the Software, and to permit persons 611dnl to whom the Software is furnished to do so, provided that the above 612dnl copyright notice(s) and this permission notice appear in all copies of 613dnl the Software and that both the above copyright notice(s) and this 614dnl permission notice appear in supporting documentation. 615dnl 616dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 617dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 618dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 619dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 620dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 621dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 622dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 623dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 624dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 625dnl 626dnl Except as contained in this notice, the name of a copyright holder 627dnl shall not be used in advertising or otherwise to promote the sale, use 628dnl or other dealings in this Software without prior written authorization 629dnl of the copyright holder. 630 631# XORG_MACROS_VERSION(required-version) 632# ------------------------------------- 633# Minimum version: 1.1.0 634# 635# If you're using a macro added in Version 1.1 or newer, include this in 636# your configure.ac with the minimum required version, such as: 637# XORG_MACROS_VERSION(1.1) 638# 639# To ensure that this macro is defined, also add: 640# m4_ifndef([XORG_MACROS_VERSION], 641# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 642# 643# 644# See the "minimum version" comment for each macro you use to see what 645# version you require. 646m4_defun([XORG_MACROS_VERSION],[ 647m4_define([vers_have], [1.2.2]) 648m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 649m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 650m4_if(m4_cmp(maj_have, maj_needed), 0,, 651 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 652m4_if(m4_version_compare(vers_have, [$1]), -1, 653 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 654m4_undefine([vers_have]) 655m4_undefine([maj_have]) 656m4_undefine([maj_needed]) 657]) # XORG_MACROS_VERSION 658 659# XORG_PROG_RAWCPP() 660# ------------------ 661# Minimum version: 1.0.0 662# 663# Find cpp program and necessary flags for use in pre-processing text files 664# such as man pages and config files 665AC_DEFUN([XORG_PROG_RAWCPP],[ 666AC_REQUIRE([AC_PROG_CPP]) 667AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 668 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 669 670# Check for flag to avoid builtin definitions - assumes unix is predefined, 671# which is not the best choice for supporting other OS'es, but covers most 672# of the ones we need for now. 673AC_MSG_CHECKING([if $RAWCPP requires -undef]) 674AC_LANG_CONFTEST([Does cpp redefine unix ?]) 675if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 676 AC_MSG_RESULT([no]) 677else 678 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 679 RAWCPPFLAGS=-undef 680 AC_MSG_RESULT([yes]) 681 # under Cygwin unix is still defined even with -undef 682 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 683 RAWCPPFLAGS="-undef -ansi" 684 AC_MSG_RESULT([yes, with -ansi]) 685 else 686 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 687 fi 688fi 689rm -f conftest.$ac_ext 690 691AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 692AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 693if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 694 AC_MSG_RESULT([no]) 695else 696 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 697 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 698 AC_MSG_RESULT([yes]) 699 else 700 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 701 fi 702fi 703rm -f conftest.$ac_ext 704AC_SUBST(RAWCPPFLAGS) 705]) # XORG_PROG_RAWCPP 706 707# XORG_MANPAGE_SECTIONS() 708# ----------------------- 709# Minimum version: 1.0.0 710# 711# Determine which sections man pages go in for the different man page types 712# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 713# Not sure if there's any better way than just hardcoding by OS name. 714# Override default settings by setting environment variables 715 716AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 717AC_REQUIRE([AC_CANONICAL_HOST]) 718 719if test x$APP_MAN_SUFFIX = x ; then 720 APP_MAN_SUFFIX=1 721fi 722if test x$APP_MAN_DIR = x ; then 723 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 724fi 725 726if test x$LIB_MAN_SUFFIX = x ; then 727 LIB_MAN_SUFFIX=3 728fi 729if test x$LIB_MAN_DIR = x ; then 730 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 731fi 732 733if test x$FILE_MAN_SUFFIX = x ; then 734 case $host_os in 735 solaris*) FILE_MAN_SUFFIX=4 ;; 736 *) FILE_MAN_SUFFIX=5 ;; 737 esac 738fi 739if test x$FILE_MAN_DIR = x ; then 740 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 741fi 742 743if test x$MISC_MAN_SUFFIX = x ; then 744 case $host_os in 745 solaris*) MISC_MAN_SUFFIX=5 ;; 746 *) MISC_MAN_SUFFIX=7 ;; 747 esac 748fi 749if test x$MISC_MAN_DIR = x ; then 750 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 751fi 752 753if test x$DRIVER_MAN_SUFFIX = x ; then 754 case $host_os in 755 solaris*) DRIVER_MAN_SUFFIX=7 ;; 756 *) DRIVER_MAN_SUFFIX=4 ;; 757 esac 758fi 759if test x$DRIVER_MAN_DIR = x ; then 760 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 761fi 762 763if test x$ADMIN_MAN_SUFFIX = x ; then 764 case $host_os in 765 solaris*) ADMIN_MAN_SUFFIX=1m ;; 766 *) ADMIN_MAN_SUFFIX=8 ;; 767 esac 768fi 769if test x$ADMIN_MAN_DIR = x ; then 770 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 771fi 772 773 774AC_SUBST([APP_MAN_SUFFIX]) 775AC_SUBST([LIB_MAN_SUFFIX]) 776AC_SUBST([FILE_MAN_SUFFIX]) 777AC_SUBST([MISC_MAN_SUFFIX]) 778AC_SUBST([DRIVER_MAN_SUFFIX]) 779AC_SUBST([ADMIN_MAN_SUFFIX]) 780AC_SUBST([APP_MAN_DIR]) 781AC_SUBST([LIB_MAN_DIR]) 782AC_SUBST([FILE_MAN_DIR]) 783AC_SUBST([MISC_MAN_DIR]) 784AC_SUBST([DRIVER_MAN_DIR]) 785AC_SUBST([ADMIN_MAN_DIR]) 786]) # XORG_MANPAGE_SECTIONS 787 788# XORG_CHECK_LINUXDOC 789# ------------------- 790# Minimum version: 1.0.0 791# 792# Defines the variable MAKE_TEXT if the necessary tools and 793# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 794# Whether or not the necessary tools and files are found can be checked 795# with the AM_CONDITIONAL "BUILD_LINUXDOC" 796AC_DEFUN([XORG_CHECK_LINUXDOC],[ 797if test x$XORG_SGML_PATH = x ; then 798 XORG_SGML_PATH=$prefix/share/sgml 799fi 800HAVE_DEFS_ENT= 801 802if test x"$cross_compiling" = x"yes" ; then 803 HAVE_DEFS_ENT=no 804else 805 AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 806fi 807 808AC_PATH_PROG(LINUXDOC, linuxdoc) 809AC_PATH_PROG(PS2PDF, ps2pdf) 810 811AC_MSG_CHECKING([Whether to build documentation]) 812 813if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 814 BUILDDOC=yes 815else 816 BUILDDOC=no 817fi 818 819AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 820 821AC_MSG_RESULT([$BUILDDOC]) 822 823AC_MSG_CHECKING([Whether to build pdf documentation]) 824 825if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 826 BUILDPDFDOC=yes 827else 828 BUILDPDFDOC=no 829fi 830 831AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 832 833AC_MSG_RESULT([$BUILDPDFDOC]) 834 835MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 836MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 837MAKE_PDF="$PS2PDF" 838MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 839 840AC_SUBST(MAKE_TEXT) 841AC_SUBST(MAKE_PS) 842AC_SUBST(MAKE_PDF) 843AC_SUBST(MAKE_HTML) 844]) # XORG_CHECK_LINUXDOC 845 846# XORG_CHECK_DOCBOOK 847# ------------------- 848# Minimum version: 1.0.0 849# 850# Checks for the ability to build output formats from SGML DocBook source. 851# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 852# indicates whether the necessary tools and files are found and, if set, 853# $(MAKE_XXX) blah.sgml will produce blah.xxx. 854AC_DEFUN([XORG_CHECK_DOCBOOK],[ 855if test x$XORG_SGML_PATH = x ; then 856 XORG_SGML_PATH=$prefix/share/sgml 857fi 858HAVE_DEFS_ENT= 859BUILDTXTDOC=no 860BUILDPDFDOC=no 861BUILDPSDOC=no 862BUILDHTMLDOC=no 863 864AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 865 866AC_PATH_PROG(DOCBOOKPS, docbook2ps) 867AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 868AC_PATH_PROG(DOCBOOKHTML, docbook2html) 869AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 870 871AC_MSG_CHECKING([Whether to build text documentation]) 872if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 873 test x$BUILD_TXTDOC != xno; then 874 BUILDTXTDOC=yes 875fi 876AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 877AC_MSG_RESULT([$BUILDTXTDOC]) 878 879AC_MSG_CHECKING([Whether to build PDF documentation]) 880if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 881 test x$BUILD_PDFDOC != xno; then 882 BUILDPDFDOC=yes 883fi 884AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 885AC_MSG_RESULT([$BUILDPDFDOC]) 886 887AC_MSG_CHECKING([Whether to build PostScript documentation]) 888if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 889 test x$BUILD_PSDOC != xno; then 890 BUILDPSDOC=yes 891fi 892AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 893AC_MSG_RESULT([$BUILDPSDOC]) 894 895AC_MSG_CHECKING([Whether to build HTML documentation]) 896if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 897 test x$BUILD_HTMLDOC != xno; then 898 BUILDHTMLDOC=yes 899fi 900AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 901AC_MSG_RESULT([$BUILDHTMLDOC]) 902 903MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 904MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 905MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 906MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 907 908AC_SUBST(MAKE_TEXT) 909AC_SUBST(MAKE_PS) 910AC_SUBST(MAKE_PDF) 911AC_SUBST(MAKE_HTML) 912]) # XORG_CHECK_DOCBOOK 913 914# XORG_CHECK_MALLOC_ZERO 915# ---------------------- 916# Minimum version: 1.0.0 917# 918# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 919# malloc(0) returns NULL. Packages should add one of these cflags to 920# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 921AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 922AC_ARG_ENABLE(malloc0returnsnull, 923 AC_HELP_STRING([--enable-malloc0returnsnull], 924 [malloc(0) returns NULL (default: auto)]), 925 [MALLOC_ZERO_RETURNS_NULL=$enableval], 926 [MALLOC_ZERO_RETURNS_NULL=auto]) 927 928AC_MSG_CHECKING([whether malloc(0) returns NULL]) 929if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 930 AC_RUN_IFELSE([ 931char *malloc(); 932char *realloc(); 933char *calloc(); 934main() { 935 char *m0, *r0, *c0, *p; 936 m0 = malloc(0); 937 p = malloc(10); 938 r0 = realloc(p,0); 939 c0 = calloc(0); 940 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 941}], 942 [MALLOC_ZERO_RETURNS_NULL=yes], 943 [MALLOC_ZERO_RETURNS_NULL=no]) 944fi 945AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 946 947if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 948 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 949 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 950 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 951else 952 MALLOC_ZERO_CFLAGS="" 953 XMALLOC_ZERO_CFLAGS="" 954 XTMALLOC_ZERO_CFLAGS="" 955fi 956 957AC_SUBST([MALLOC_ZERO_CFLAGS]) 958AC_SUBST([XMALLOC_ZERO_CFLAGS]) 959AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 960]) # XORG_CHECK_MALLOC_ZERO 961 962# XORG_WITH_LINT() 963# ---------------- 964# Minimum version: 1.1.0 965# 966# Sets up flags for source checkers such as lint and sparse if --with-lint 967# is specified. (Use --with-lint=sparse for sparse.) 968# Sets $LINT to name of source checker passed with --with-lint (default: lint) 969# Sets $LINT_FLAGS to flags to pass to source checker 970# Sets LINT automake conditional if enabled (default: disabled) 971# 972AC_DEFUN([XORG_WITH_LINT],[ 973 974# Allow checking code with lint, sparse, etc. 975AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 976 [Use a lint-style source code checker (default: disabled)])], 977 [use_lint=$withval], [use_lint=no]) 978if test "x$use_lint" = "xyes" ; then 979 LINT="lint" 980else 981 LINT="$use_lint" 982fi 983if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 984 case $LINT in 985 lint|*/lint) 986 case $host_os in 987 solaris*) 988 LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 989 ;; 990 esac 991 ;; 992 esac 993fi 994 995AC_SUBST(LINT) 996AC_SUBST(LINT_FLAGS) 997AM_CONDITIONAL(LINT, [test x$LINT != xno]) 998 999]) # XORG_WITH_LINT 1000 1001# XORG_LINT_LIBRARY(LIBNAME) 1002# -------------------------- 1003# Minimum version: 1.1.0 1004# 1005# Sets up flags for building lint libraries for checking programs that call 1006# functions in the library. 1007# Disabled by default, enable with --enable-lint-library 1008# Sets: 1009# @LINTLIB@ - name of lint library file to make 1010# MAKE_LINT_LIB - automake conditional 1011# 1012 1013AC_DEFUN([XORG_LINT_LIBRARY],[ 1014AC_REQUIRE([XORG_WITH_LINT]) 1015# Build lint "library" for more indepth checks of programs calling this library 1016AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1017 [Create lint library (default: disabled)])], 1018 [make_lint_lib=$enableval], [make_lint_lib=no]) 1019if test "x$make_lint_lib" != "xno" ; then 1020 if test "x$LINT" = "xno" ; then 1021 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1022 fi 1023 if test "x$make_lint_lib" = "xyes" ; then 1024 LINTLIB=llib-l$1.ln 1025 else 1026 LINTLIB=$make_lint_lib 1027 fi 1028fi 1029AC_SUBST(LINTLIB) 1030AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1031 1032]) # XORG_LINT_LIBRARY 1033 1034# XORG_CWARNFLAGS 1035# --------------- 1036# Minimum version: 1.2.0 1037# 1038# Defines CWARNFLAGS to enable C compiler warnings. 1039# 1040AC_DEFUN([XORG_CWARNFLAGS], [ 1041AC_REQUIRE([AC_PROG_CC]) 1042if test "x$GCC" = xyes ; then 1043 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1044-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1045-Wbad-function-cast" 1046 case `$CC -dumpversion` in 1047 3.4.* | 4.*) 1048 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1049 ;; 1050 esac 1051else 1052 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1053 if test "x$SUNCC" = "xyes"; then 1054 CWARNFLAGS="-v" 1055 fi 1056fi 1057AC_SUBST(CWARNFLAGS) 1058m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 1059]) # XORG_CWARNFLAGS 1060dnl Copyright 2005 Red Hat, Inc 1061dnl 1062dnl Permission to use, copy, modify, distribute, and sell this software and its 1063dnl documentation for any purpose is hereby granted without fee, provided that 1064dnl the above copyright notice appear in all copies and that both that 1065dnl copyright notice and this permission notice appear in supporting 1066dnl documentation. 1067dnl 1068dnl The above copyright notice and this permission notice shall be included 1069dnl in all copies or substantial portions of the Software. 1070dnl 1071dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1072dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1073dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1074dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1075dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1076dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1077dnl OTHER DEALINGS IN THE SOFTWARE. 1078dnl 1079dnl Except as contained in this notice, the name of the copyright holders shall 1080dnl not be used in advertising or otherwise to promote the sale, use or 1081dnl other dealings in this Software without prior written authorization 1082dnl from the copyright holders. 1083dnl 1084 1085# XORG_RELEASE_VERSION 1086# -------------------- 1087# Adds --with/without-release-string and changes the PACKAGE and 1088# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1089# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1090# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1091 1092AC_DEFUN([XORG_RELEASE_VERSION],[ 1093 AC_ARG_WITH(release-version, 1094 AC_HELP_STRING([--with-release-version=STRING], 1095 [Use release version string in package name]), 1096 [RELEASE_VERSION="$withval"], 1097 [RELEASE_VERSION=""]) 1098 if test "x$RELEASE_VERSION" != "x"; then 1099 PACKAGE="$PACKAGE-$RELEASE_VERSION" 1100 PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1101 AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1102 fi 1103 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1104 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1105 [Major version of this package]) 1106 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1107 if test "x$PVM" = "x"; then 1108 PVM="0" 1109 fi 1110 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1111 [$PVM], 1112 [Minor version of this package]) 1113 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1114 if test "x$PVP" = "x"; then 1115 PVP="0" 1116 fi 1117 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1118 [$PVP], 1119 [Patch version of this package]) 1120]) 1121 1122# XORG_CHANGELOG() 1123# ---------------- 1124# Minimum version: 1.2.0 1125# 1126# Defines the variable CHANGELOG_CMD as the command to generate 1127# ChangeLog from git. 1128# 1129# Arrange that distcleancheck ignores ChangeLog left over by distclean. 1130# 1131AC_DEFUN([XORG_CHANGELOG], [ 1132CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 1133mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 1134echo 'git directory not found: installing possibly empty changelog.' >&2)" 1135AC_SUBST([CHANGELOG_CMD]) 1136AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 1137]) # XORG_CHANGELOG 1138 1139