150718ea6Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2566738d7Smrg 350718ea6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 450718ea6Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5566738d7Smrg# This file is free software; the Free Software Foundation 6566738d7Smrg# gives unlimited permission to copy and/or distribute it, 7566738d7Smrg# with or without modifications, as long as this notice is preserved. 8566738d7Smrg 9566738d7Smrg# This program is distributed in the hope that it will be useful, 10566738d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11566738d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12566738d7Smrg# PARTICULAR PURPOSE. 13566738d7Smrg 1450718ea6Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1550718ea6Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1650718ea6Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1750718ea6Smrg[m4_warning([this file was generated for autoconf 2.63. 1850718ea6SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1950718ea6SmrgIf you have problems, you may need to regenerate the build system entirely. 2050718ea6SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21566738d7Smrg 2250718ea6Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2350718ea6Smrg# 2450718ea6Smrg# This file is free software; the Free Software Foundation 2550718ea6Smrg# gives unlimited permission to copy and/or distribute it, 2650718ea6Smrg# with or without modifications, as long as this notice is preserved. 2750718ea6Smrg 2850718ea6Smrg# AM_AUTOMAKE_VERSION(VERSION) 2950718ea6Smrg# ---------------------------- 3050718ea6Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3150718ea6Smrg# generated from the m4 files accompanying Automake X.Y. 3250718ea6Smrg# (This private macro should not be called outside this file.) 3350718ea6SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3450718ea6Smrg[am__api_version='1.11' 3550718ea6Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3650718ea6Smrgdnl require some minimum version. Point them to the right macro. 3750718ea6Smrgm4_if([$1], [1.11], [], 3850718ea6Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3950718ea6Smrg]) 4050718ea6Smrg 4150718ea6Smrg# _AM_AUTOCONF_VERSION(VERSION) 4250718ea6Smrg# ----------------------------- 4350718ea6Smrg# aclocal traces this macro to find the Autoconf version. 4450718ea6Smrg# This is a private macro too. Using m4_define simplifies 4550718ea6Smrg# the logic in aclocal, which can simply ignore this definition. 4650718ea6Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4750718ea6Smrg 4850718ea6Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4950718ea6Smrg# ------------------------------- 5050718ea6Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5150718ea6Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5250718ea6SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5350718ea6Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 5450718ea6Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5550718ea6Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5650718ea6Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5750718ea6Smrg 5850718ea6Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5950718ea6Smrg 6050718ea6Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6150718ea6Smrg# 6250718ea6Smrg# This file is free software; the Free Software Foundation 6350718ea6Smrg# gives unlimited permission to copy and/or distribute it, 6450718ea6Smrg# with or without modifications, as long as this notice is preserved. 6550718ea6Smrg 6650718ea6Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6750718ea6Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6850718ea6Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6950718ea6Smrg# 7050718ea6Smrg# Of course, Automake must honor this variable whenever it calls a 7150718ea6Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7250718ea6Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7350718ea6Smrg# depending on how configure is run. This is pretty annoying, since 7450718ea6Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7550718ea6Smrg# source directory, any form will work fine, but in subdirectories a 7650718ea6Smrg# relative path needs to be adjusted first. 7750718ea6Smrg# 7850718ea6Smrg# $ac_aux_dir/missing 7950718ea6Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8050718ea6Smrg# $top_srcdir/$ac_aux_dir/missing 8150718ea6Smrg# fails if $ac_aux_dir is absolute, 8250718ea6Smrg# fails when called from a subdirectory in a VPATH build with 8350718ea6Smrg# a relative $ac_aux_dir 8450718ea6Smrg# 8550718ea6Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8650718ea6Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8750718ea6Smrg# harmless because $srcdir is `.', but things will broke when you 8850718ea6Smrg# start a VPATH build or use an absolute $srcdir. 8950718ea6Smrg# 9050718ea6Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9150718ea6Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9250718ea6Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9350718ea6Smrg# and then we would define $MISSING as 9450718ea6Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9550718ea6Smrg# This will work as long as MISSING is not called from configure, because 9650718ea6Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9750718ea6Smrg# However there are other variables, like CC, which are often used in 9850718ea6Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9950718ea6Smrg# 10050718ea6Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10150718ea6Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10250718ea6Smrg# configured tree to be moved without reconfiguration. 10350718ea6Smrg 10450718ea6SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10550718ea6Smrg[dnl Rely on autoconf to set up CDPATH properly. 10650718ea6SmrgAC_PREREQ([2.50])dnl 10750718ea6Smrg# expand $ac_aux_dir to an absolute path 10850718ea6Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10950718ea6Smrg]) 11050718ea6Smrg 11150718ea6Smrg# AM_CONDITIONAL -*- Autoconf -*- 112566738d7Smrg 11350718ea6Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114566738d7Smrg# Free Software Foundation, Inc. 11550718ea6Smrg# 11650718ea6Smrg# This file is free software; the Free Software Foundation 11750718ea6Smrg# gives unlimited permission to copy and/or distribute it, 11850718ea6Smrg# with or without modifications, as long as this notice is preserved. 119566738d7Smrg 12050718ea6Smrg# serial 9 121566738d7Smrg 12250718ea6Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12350718ea6Smrg# ------------------------------------- 12450718ea6Smrg# Define a conditional. 12550718ea6SmrgAC_DEFUN([AM_CONDITIONAL], 12650718ea6Smrg[AC_PREREQ(2.52)dnl 12750718ea6Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12850718ea6Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12950718ea6SmrgAC_SUBST([$1_TRUE])dnl 13050718ea6SmrgAC_SUBST([$1_FALSE])dnl 13150718ea6Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13250718ea6Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13350718ea6Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13450718ea6Smrgif $2; then 13550718ea6Smrg $1_TRUE= 13650718ea6Smrg $1_FALSE='#' 13750718ea6Smrgelse 13850718ea6Smrg $1_TRUE='#' 13950718ea6Smrg $1_FALSE= 14050718ea6Smrgfi 14150718ea6SmrgAC_CONFIG_COMMANDS_PRE( 14250718ea6Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14350718ea6Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14450718ea6SmrgUsually this means the macro was only invoked conditionally.]]) 14550718ea6Smrgfi])]) 146566738d7Smrg 14750718ea6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14850718ea6Smrg# Free Software Foundation, Inc. 14950718ea6Smrg# 15050718ea6Smrg# This file is free software; the Free Software Foundation 15150718ea6Smrg# gives unlimited permission to copy and/or distribute it, 15250718ea6Smrg# with or without modifications, as long as this notice is preserved. 153566738d7Smrg 154566738d7Smrg# serial 10 155566738d7Smrg 15650718ea6Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15750718ea6Smrg# written in clear, in which case automake, when reading aclocal.m4, 15850718ea6Smrg# will think it sees a *use*, and therefore will trigger all it's 15950718ea6Smrg# C support machinery. Also note that it means that autoscan, seeing 16050718ea6Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161566738d7Smrg 16250718ea6Smrg 16350718ea6Smrg# _AM_DEPENDENCIES(NAME) 16450718ea6Smrg# ---------------------- 16550718ea6Smrg# See how the compiler implements dependency checking. 16650718ea6Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16750718ea6Smrg# We try a few techniques and use that to set a single cache variable. 16850718ea6Smrg# 16950718ea6Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17050718ea6Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17150718ea6Smrg# dependency, and given that the user is not expected to run this macro, 17250718ea6Smrg# just rely on AC_PROG_CC. 17350718ea6SmrgAC_DEFUN([_AM_DEPENDENCIES], 17450718ea6Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17550718ea6SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17650718ea6SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17750718ea6SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 17850718ea6Smrg 17950718ea6Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18050718ea6Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18150718ea6Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18250718ea6Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18350718ea6Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18450718ea6Smrg [depcc="$$1" am_compiler_list=]) 18550718ea6Smrg 18650718ea6SmrgAC_CACHE_CHECK([dependency style of $depcc], 18750718ea6Smrg [am_cv_$1_dependencies_compiler_type], 18850718ea6Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18950718ea6Smrg # We make a subdir and do the tests there. Otherwise we can end up 19050718ea6Smrg # making bogus files that we don't know about and never remove. For 19150718ea6Smrg # instance it was reported that on HP-UX the gcc test will end up 19250718ea6Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19350718ea6Smrg # in D'. 19450718ea6Smrg mkdir conftest.dir 19550718ea6Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19650718ea6Smrg # using a relative directory. 19750718ea6Smrg cp "$am_depcomp" conftest.dir 19850718ea6Smrg cd conftest.dir 19950718ea6Smrg # We will build objects and dependencies in a subdirectory because 20050718ea6Smrg # it helps to detect inapplicable dependency modes. For instance 20150718ea6Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20250718ea6Smrg # side effect of compilation, but ICC will put the dependencies in 20350718ea6Smrg # the current directory while Tru64 will put them in the object 20450718ea6Smrg # directory. 20550718ea6Smrg mkdir sub 20650718ea6Smrg 20750718ea6Smrg am_cv_$1_dependencies_compiler_type=none 20850718ea6Smrg if test "$am_compiler_list" = ""; then 20950718ea6Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21050718ea6Smrg fi 21150718ea6Smrg am__universal=false 21250718ea6Smrg m4_case([$1], [CC], 21350718ea6Smrg [case " $depcc " in #( 21450718ea6Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21550718ea6Smrg esac], 21650718ea6Smrg [CXX], 21750718ea6Smrg [case " $depcc " in #( 21850718ea6Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21950718ea6Smrg esac]) 22050718ea6Smrg 22150718ea6Smrg for depmode in $am_compiler_list; do 22250718ea6Smrg # Setup a source with many dependencies, because some compilers 22350718ea6Smrg # like to wrap large dependency lists on column 80 (with \), and 22450718ea6Smrg # we should not choose a depcomp mode which is confused by this. 22550718ea6Smrg # 22650718ea6Smrg # We need to recreate these files for each test, as the compiler may 22750718ea6Smrg # overwrite some of them when testing with obscure command lines. 22850718ea6Smrg # This happens at least with the AIX C compiler. 22950718ea6Smrg : > sub/conftest.c 23050718ea6Smrg for i in 1 2 3 4 5 6; do 23150718ea6Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23250718ea6Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23350718ea6Smrg # Solaris 8's {/usr,}/bin/sh. 23450718ea6Smrg touch sub/conftst$i.h 23550718ea6Smrg done 23650718ea6Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 23750718ea6Smrg 23850718ea6Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23950718ea6Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24050718ea6Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24150718ea6Smrg # versions had trouble with output in subdirs 24250718ea6Smrg am__obj=sub/conftest.${OBJEXT-o} 24350718ea6Smrg am__minus_obj="-o $am__obj" 24450718ea6Smrg case $depmode in 24550718ea6Smrg gcc) 24650718ea6Smrg # This depmode causes a compiler race in universal mode. 24750718ea6Smrg test "$am__universal" = false || continue 24850718ea6Smrg ;; 24950718ea6Smrg nosideeffect) 25050718ea6Smrg # after this tag, mechanisms are not by side-effect, so they'll 25150718ea6Smrg # only be used when explicitly requested 25250718ea6Smrg if test "x$enable_dependency_tracking" = xyes; then 25350718ea6Smrg continue 25450718ea6Smrg else 25550718ea6Smrg break 25650718ea6Smrg fi 25750718ea6Smrg ;; 25850718ea6Smrg msvisualcpp | msvcmsys) 25950718ea6Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26050718ea6Smrg # not run yet. These depmodes are late enough in the game, and 26150718ea6Smrg # so weak that their functioning should not be impacted. 26250718ea6Smrg am__obj=conftest.${OBJEXT-o} 26350718ea6Smrg am__minus_obj= 26450718ea6Smrg ;; 26550718ea6Smrg none) break ;; 26650718ea6Smrg esac 26750718ea6Smrg if depmode=$depmode \ 26850718ea6Smrg source=sub/conftest.c object=$am__obj \ 26950718ea6Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27050718ea6Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27150718ea6Smrg >/dev/null 2>conftest.err && 27250718ea6Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27350718ea6Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27450718ea6Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27550718ea6Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27650718ea6Smrg # icc doesn't choke on unknown options, it will just issue warnings 27750718ea6Smrg # or remarks (even with -Werror). So we grep stderr for any message 27850718ea6Smrg # that says an option was ignored or not supported. 27950718ea6Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28050718ea6Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28150718ea6Smrg # The diagnosis changed in icc 8.0: 28250718ea6Smrg # icc: Command line remark: option '-MP' not supported 28350718ea6Smrg if (grep 'ignoring option' conftest.err || 28450718ea6Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28550718ea6Smrg am_cv_$1_dependencies_compiler_type=$depmode 28650718ea6Smrg break 28750718ea6Smrg fi 28850718ea6Smrg fi 28950718ea6Smrg done 29050718ea6Smrg 29150718ea6Smrg cd .. 29250718ea6Smrg rm -rf conftest.dir 29350718ea6Smrgelse 29450718ea6Smrg am_cv_$1_dependencies_compiler_type=none 29550718ea6Smrgfi 29650718ea6Smrg]) 29750718ea6SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29850718ea6SmrgAM_CONDITIONAL([am__fastdep$1], [ 29950718ea6Smrg test "x$enable_dependency_tracking" != xno \ 30050718ea6Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30150718ea6Smrg]) 30250718ea6Smrg 30350718ea6Smrg 30450718ea6Smrg# AM_SET_DEPDIR 30550718ea6Smrg# ------------- 30650718ea6Smrg# Choose a directory name for dependency files. 30750718ea6Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30850718ea6SmrgAC_DEFUN([AM_SET_DEPDIR], 30950718ea6Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31050718ea6SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31150718ea6Smrg]) 31250718ea6Smrg 31350718ea6Smrg 31450718ea6Smrg# AM_DEP_TRACK 31550718ea6Smrg# ------------ 31650718ea6SmrgAC_DEFUN([AM_DEP_TRACK], 31750718ea6Smrg[AC_ARG_ENABLE(dependency-tracking, 31850718ea6Smrg[ --disable-dependency-tracking speeds up one-time build 31950718ea6Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32050718ea6Smrgif test "x$enable_dependency_tracking" != xno; then 32150718ea6Smrg am_depcomp="$ac_aux_dir/depcomp" 32250718ea6Smrg AMDEPBACKSLASH='\' 32350718ea6Smrgfi 32450718ea6SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32550718ea6SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32650718ea6Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32750718ea6Smrg]) 32850718ea6Smrg 32950718ea6Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33050718ea6Smrg 33150718ea6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33250718ea6Smrg# Free Software Foundation, Inc. 33350718ea6Smrg# 33450718ea6Smrg# This file is free software; the Free Software Foundation 33550718ea6Smrg# gives unlimited permission to copy and/or distribute it, 33650718ea6Smrg# with or without modifications, as long as this notice is preserved. 33750718ea6Smrg 33850718ea6Smrg#serial 5 33950718ea6Smrg 34050718ea6Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34150718ea6Smrg# ------------------------------ 34250718ea6SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34350718ea6Smrg[{ 34450718ea6Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34550718ea6Smrg # are listed without --file. Let's play safe and only enable the eval 34650718ea6Smrg # if we detect the quoting. 34750718ea6Smrg case $CONFIG_FILES in 34850718ea6Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34950718ea6Smrg *) set x $CONFIG_FILES ;; 35050718ea6Smrg esac 35150718ea6Smrg shift 35250718ea6Smrg for mf 35350718ea6Smrg do 35450718ea6Smrg # Strip MF so we end up with the name of the file. 35550718ea6Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35650718ea6Smrg # Check whether this is an Automake generated Makefile or not. 35750718ea6Smrg # We used to match only the files named `Makefile.in', but 35850718ea6Smrg # some people rename them; so instead we look at the file content. 35950718ea6Smrg # Grep'ing the first line is not enough: some people post-process 36050718ea6Smrg # each Makefile.in and add a new line on top of each file to say so. 36150718ea6Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36250718ea6Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36350718ea6Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36450718ea6Smrg dirpart=`AS_DIRNAME("$mf")` 36550718ea6Smrg else 36650718ea6Smrg continue 36750718ea6Smrg fi 36850718ea6Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36950718ea6Smrg # from the Makefile without running `make'. 37050718ea6Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37150718ea6Smrg test -z "$DEPDIR" && continue 37250718ea6Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37350718ea6Smrg test -z "am__include" && continue 37450718ea6Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37550718ea6Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37650718ea6Smrg U=`sed -n 's/^U = //p' < "$mf"` 37750718ea6Smrg # Find all dependency output files, they are included files with 37850718ea6Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37950718ea6Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38050718ea6Smrg # expansion. 38150718ea6Smrg for file in `sed -n " 38250718ea6Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38350718ea6Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38450718ea6Smrg # Make sure the directory exists. 38550718ea6Smrg test -f "$dirpart/$file" && continue 38650718ea6Smrg fdir=`AS_DIRNAME(["$file"])` 38750718ea6Smrg AS_MKDIR_P([$dirpart/$fdir]) 38850718ea6Smrg # echo "creating $dirpart/$file" 38950718ea6Smrg echo '# dummy' > "$dirpart/$file" 39050718ea6Smrg done 39150718ea6Smrg done 39250718ea6Smrg} 39350718ea6Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 39450718ea6Smrg 39550718ea6Smrg 39650718ea6Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39750718ea6Smrg# ----------------------------- 39850718ea6Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39950718ea6Smrg# 40050718ea6Smrg# This code is only required when automatic dependency tracking 40150718ea6Smrg# is enabled. FIXME. This creates each `.P' file that we will 40250718ea6Smrg# need in order to bootstrap the dependency handling code. 40350718ea6SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40450718ea6Smrg[AC_CONFIG_COMMANDS([depfiles], 40550718ea6Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40650718ea6Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 40750718ea6Smrg]) 40850718ea6Smrg 40950718ea6Smrg# Do all the work for Automake. -*- Autoconf -*- 41050718ea6Smrg 41150718ea6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 41250718ea6Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 41350718ea6Smrg# 41450718ea6Smrg# This file is free software; the Free Software Foundation 41550718ea6Smrg# gives unlimited permission to copy and/or distribute it, 41650718ea6Smrg# with or without modifications, as long as this notice is preserved. 41750718ea6Smrg 41850718ea6Smrg# serial 16 41950718ea6Smrg 42050718ea6Smrg# This macro actually does too much. Some checks are only needed if 42150718ea6Smrg# your package does certain things. But this isn't really a big deal. 422566738d7Smrg 423566738d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 424566738d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 425566738d7Smrg# ----------------------------------------------- 426566738d7Smrg# The call with PACKAGE and VERSION arguments is the old style 427566738d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 428566738d7Smrg# and VERSION should now be passed to AC_INIT and removed from 429566738d7Smrg# the call to AM_INIT_AUTOMAKE. 430566738d7Smrg# We support both call styles for the transition. After 431566738d7Smrg# the next Automake release, Autoconf can make the AC_INIT 432566738d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 433566738d7Smrg# release and drop the old call support. 434566738d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43550718ea6Smrg[AC_PREREQ([2.62])dnl 43650718ea6Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43750718ea6Smrgdnl the ones we care about. 43850718ea6Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43950718ea6SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44050718ea6SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44150718ea6Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44250718ea6Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44350718ea6Smrg # is not polluted with repeated "-I." 44450718ea6Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44550718ea6Smrg # test to see if srcdir already configured 44650718ea6Smrg if test -f $srcdir/config.status; then 44750718ea6Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44850718ea6Smrg fi 449566738d7Smrgfi 450566738d7Smrg 451566738d7Smrg# test whether we have cygpath 452566738d7Smrgif test -z "$CYGPATH_W"; then 453566738d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 454566738d7Smrg CYGPATH_W='cygpath -w' 455566738d7Smrg else 456566738d7Smrg CYGPATH_W=echo 457566738d7Smrg fi 458566738d7Smrgfi 459566738d7SmrgAC_SUBST([CYGPATH_W]) 460566738d7Smrg 461566738d7Smrg# Define the identity of the package. 462566738d7Smrgdnl Distinguish between old-style and new-style calls. 463566738d7Smrgm4_ifval([$2], 464566738d7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465566738d7Smrg AC_SUBST([PACKAGE], [$1])dnl 466566738d7Smrg AC_SUBST([VERSION], [$2])], 467566738d7Smrg[_AM_SET_OPTIONS([$1])dnl 46850718ea6Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46950718ea6Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 47050718ea6Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 471566738d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 472566738d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473566738d7Smrg 474566738d7Smrg_AM_IF_OPTION([no-define],, 475566738d7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 476566738d7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477566738d7Smrg 478566738d7Smrg# Some tools Automake needs. 479566738d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 480566738d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 481566738d7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 482566738d7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 483566738d7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 484566738d7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 485566738d7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 48650718ea6SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48750718ea6SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 48850718ea6SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 489566738d7Smrg# We need awk for the "check" target. The system "awk" is bad on 490566738d7Smrg# some platforms. 491566738d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 492566738d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 493566738d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 49450718ea6Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 49550718ea6Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 49650718ea6Smrg [_AM_PROG_TAR([v7])])]) 497566738d7Smrg_AM_IF_OPTION([no-dependencies],, 498566738d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 49950718ea6Smrg [_AM_DEPENDENCIES(CC)], 50050718ea6Smrg [define([AC_PROG_CC], 50150718ea6Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 502566738d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 50350718ea6Smrg [_AM_DEPENDENCIES(CXX)], 50450718ea6Smrg [define([AC_PROG_CXX], 50550718ea6Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 50650718ea6SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 50750718ea6Smrg [_AM_DEPENDENCIES(OBJC)], 50850718ea6Smrg [define([AC_PROG_OBJC], 50950718ea6Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 510566738d7Smrg]) 51150718ea6Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 51250718ea6Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 51350718ea6Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 51450718ea6Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 51550718ea6SmrgAC_CONFIG_COMMANDS_PRE(dnl 51650718ea6Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 51750718ea6Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518566738d7Smrg]) 519566738d7Smrg 52050718ea6Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 52150718ea6Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 52250718ea6Smrgdnl mangled by Autoconf and run in a shell conditional statement. 52350718ea6Smrgm4_define([_AC_COMPILER_EXEEXT], 52450718ea6Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 52550718ea6Smrg 52650718ea6Smrg 52750718ea6Smrg# When config.status generates a header, we must update the stamp-h file. 52850718ea6Smrg# This file resides in the same directory as the config header 52950718ea6Smrg# that is generated. The stamp files are numbered to have different names. 53050718ea6Smrg 53150718ea6Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 53250718ea6Smrg# loop where config.status creates the headers, so we can generate 53350718ea6Smrg# our stamp files there. 53450718ea6SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 53550718ea6Smrg[# Compute $1's index in $config_headers. 53650718ea6Smrg_am_arg=$1 53750718ea6Smrg_am_stamp_count=1 53850718ea6Smrgfor _am_header in $config_headers :; do 53950718ea6Smrg case $_am_header in 54050718ea6Smrg $_am_arg | $_am_arg:* ) 54150718ea6Smrg break ;; 54250718ea6Smrg * ) 54350718ea6Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 54450718ea6Smrg esac 54550718ea6Smrgdone 54650718ea6Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 54750718ea6Smrg 54850718ea6Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 54950718ea6Smrg# 55050718ea6Smrg# This file is free software; the Free Software Foundation 55150718ea6Smrg# gives unlimited permission to copy and/or distribute it, 55250718ea6Smrg# with or without modifications, as long as this notice is preserved. 55350718ea6Smrg 55450718ea6Smrg# AM_PROG_INSTALL_SH 55550718ea6Smrg# ------------------ 55650718ea6Smrg# Define $install_sh. 55750718ea6SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 55850718ea6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 55950718ea6Smrgif test x"${install_sh}" != xset; then 56050718ea6Smrg case $am_aux_dir in 56150718ea6Smrg *\ * | *\ *) 56250718ea6Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 56350718ea6Smrg *) 56450718ea6Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 56550718ea6Smrg esac 56650718ea6Smrgfi 56750718ea6SmrgAC_SUBST(install_sh)]) 56850718ea6Smrg 56950718ea6Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 57050718ea6Smrg# 57150718ea6Smrg# This file is free software; the Free Software Foundation 57250718ea6Smrg# gives unlimited permission to copy and/or distribute it, 57350718ea6Smrg# with or without modifications, as long as this notice is preserved. 57450718ea6Smrg 57550718ea6Smrg# serial 2 57650718ea6Smrg 57750718ea6Smrg# Check whether the underlying file-system supports filenames 57850718ea6Smrg# with a leading dot. For instance MS-DOS doesn't. 57950718ea6SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58050718ea6Smrg[rm -rf .tst 2>/dev/null 58150718ea6Smrgmkdir .tst 2>/dev/null 58250718ea6Smrgif test -d .tst; then 58350718ea6Smrg am__leading_dot=. 58450718ea6Smrgelse 58550718ea6Smrg am__leading_dot=_ 58650718ea6Smrgfi 58750718ea6Smrgrmdir .tst 2>/dev/null 58850718ea6SmrgAC_SUBST([am__leading_dot])]) 58950718ea6Smrg 59050718ea6Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 591566738d7Smrg 59250718ea6Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 59350718ea6Smrg# 59450718ea6Smrg# This file is free software; the Free Software Foundation 59550718ea6Smrg# gives unlimited permission to copy and/or distribute it, 59650718ea6Smrg# with or without modifications, as long as this notice is preserved. 597566738d7Smrg 59850718ea6Smrg# serial 4 599566738d7Smrg 60050718ea6Smrg# AM_MAKE_INCLUDE() 60150718ea6Smrg# ----------------- 60250718ea6Smrg# Check to see how make treats includes. 60350718ea6SmrgAC_DEFUN([AM_MAKE_INCLUDE], 60450718ea6Smrg[am_make=${MAKE-make} 60550718ea6Smrgcat > confinc << 'END' 60650718ea6Smrgam__doit: 60750718ea6Smrg @echo this is the am__doit target 60850718ea6Smrg.PHONY: am__doit 60950718ea6SmrgEND 61050718ea6Smrg# If we don't find an include directive, just comment out the code. 61150718ea6SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 61250718ea6Smrgam__include="#" 61350718ea6Smrgam__quote= 61450718ea6Smrg_am_result=none 61550718ea6Smrg# First try GNU make style include. 61650718ea6Smrgecho "include confinc" > confmf 61750718ea6Smrg# Ignore all kinds of additional output from `make'. 61850718ea6Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 61950718ea6Smrg*the\ am__doit\ target*) 62050718ea6Smrg am__include=include 62150718ea6Smrg am__quote= 62250718ea6Smrg _am_result=GNU 62350718ea6Smrg ;; 62450718ea6Smrgesac 62550718ea6Smrg# Now try BSD make style include. 62650718ea6Smrgif test "$am__include" = "#"; then 62750718ea6Smrg echo '.include "confinc"' > confmf 62850718ea6Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 62950718ea6Smrg *the\ am__doit\ target*) 63050718ea6Smrg am__include=.include 63150718ea6Smrg am__quote="\"" 63250718ea6Smrg _am_result=BSD 63350718ea6Smrg ;; 63450718ea6Smrg esac 63550718ea6Smrgfi 63650718ea6SmrgAC_SUBST([am__include]) 63750718ea6SmrgAC_SUBST([am__quote]) 63850718ea6SmrgAC_MSG_RESULT([$_am_result]) 63950718ea6Smrgrm -f confinc confmf 64050718ea6Smrg]) 641566738d7Smrg 64250718ea6Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 643566738d7Smrg 64450718ea6Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 64550718ea6Smrg# Free Software Foundation, Inc. 64650718ea6Smrg# 64750718ea6Smrg# This file is free software; the Free Software Foundation 64850718ea6Smrg# gives unlimited permission to copy and/or distribute it, 64950718ea6Smrg# with or without modifications, as long as this notice is preserved. 650566738d7Smrg 65150718ea6Smrg# serial 6 652566738d7Smrg 65350718ea6Smrg# AM_MISSING_PROG(NAME, PROGRAM) 65450718ea6Smrg# ------------------------------ 65550718ea6SmrgAC_DEFUN([AM_MISSING_PROG], 65650718ea6Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 65750718ea6Smrg$1=${$1-"${am_missing_run}$2"} 65850718ea6SmrgAC_SUBST($1)]) 659566738d7Smrg 660566738d7Smrg 66150718ea6Smrg# AM_MISSING_HAS_RUN 66250718ea6Smrg# ------------------ 66350718ea6Smrg# Define MISSING if not defined so far and test if it supports --run. 66450718ea6Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 66550718ea6SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 66650718ea6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 66750718ea6SmrgAC_REQUIRE_AUX_FILE([missing])dnl 66850718ea6Smrgif test x"${MISSING+set}" != xset; then 66950718ea6Smrg case $am_aux_dir in 67050718ea6Smrg *\ * | *\ *) 67150718ea6Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 67250718ea6Smrg *) 67350718ea6Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 67450718ea6Smrg esac 67550718ea6Smrgfi 67650718ea6Smrg# Use eval to expand $SHELL 67750718ea6Smrgif eval "$MISSING --run true"; then 67850718ea6Smrg am_missing_run="$MISSING --run " 67950718ea6Smrgelse 68050718ea6Smrg am_missing_run= 68150718ea6Smrg AC_MSG_WARN([`missing' script is too old or missing]) 68250718ea6Smrgfi 68350718ea6Smrg]) 684566738d7Smrg 68550718ea6Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 68650718ea6Smrg# 68750718ea6Smrg# This file is free software; the Free Software Foundation 68850718ea6Smrg# gives unlimited permission to copy and/or distribute it, 68950718ea6Smrg# with or without modifications, as long as this notice is preserved. 690566738d7Smrg 69150718ea6Smrg# AM_PROG_MKDIR_P 69250718ea6Smrg# --------------- 69350718ea6Smrg# Check for `mkdir -p'. 69450718ea6SmrgAC_DEFUN([AM_PROG_MKDIR_P], 69550718ea6Smrg[AC_PREREQ([2.60])dnl 69650718ea6SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 69750718ea6Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 69850718ea6Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 69950718ea6Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 70050718ea6Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 70150718ea6Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 70250718ea6Smrgdnl adjustment using top_builddir (which is defined more often than 70350718ea6Smrgdnl MKDIR_P). 70450718ea6SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 70550718ea6Smrgcase $mkdir_p in 70650718ea6Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 70750718ea6Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 70850718ea6Smrgesac 70950718ea6Smrg]) 710566738d7Smrg 71150718ea6Smrg# Helper functions for option handling. -*- Autoconf -*- 712566738d7Smrg 71350718ea6Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 71450718ea6Smrg# 71550718ea6Smrg# This file is free software; the Free Software Foundation 71650718ea6Smrg# gives unlimited permission to copy and/or distribute it, 71750718ea6Smrg# with or without modifications, as long as this notice is preserved. 718566738d7Smrg 71950718ea6Smrg# serial 4 720566738d7Smrg 721566738d7Smrg# _AM_MANGLE_OPTION(NAME) 722566738d7Smrg# ----------------------- 723566738d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 724566738d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 725566738d7Smrg 726566738d7Smrg# _AM_SET_OPTION(NAME) 727566738d7Smrg# ------------------------------ 728566738d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 729566738d7SmrgAC_DEFUN([_AM_SET_OPTION], 730566738d7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 731566738d7Smrg 732566738d7Smrg# _AM_SET_OPTIONS(OPTIONS) 733566738d7Smrg# ---------------------------------- 734566738d7Smrg# OPTIONS is a space-separated list of Automake options. 735566738d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 73650718ea6Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 737566738d7Smrg 738566738d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 739566738d7Smrg# ------------------------------------------- 740566738d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 741566738d7SmrgAC_DEFUN([_AM_IF_OPTION], 742566738d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 743566738d7Smrg 74450718ea6Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 745566738d7Smrg 74650718ea6Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 74750718ea6Smrg# Free Software Foundation, Inc. 74850718ea6Smrg# 74950718ea6Smrg# This file is free software; the Free Software Foundation 75050718ea6Smrg# gives unlimited permission to copy and/or distribute it, 75150718ea6Smrg# with or without modifications, as long as this notice is preserved. 752566738d7Smrg 75350718ea6Smrg# serial 5 754566738d7Smrg 755566738d7Smrg# AM_SANITY_CHECK 756566738d7Smrg# --------------- 757566738d7SmrgAC_DEFUN([AM_SANITY_CHECK], 758566738d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 759566738d7Smrg# Just in case 760566738d7Smrgsleep 1 761566738d7Smrgecho timestamp > conftest.file 76250718ea6Smrg# Reject unsafe characters in $srcdir or the absolute working directory 76350718ea6Smrg# name. Accept space and tab only in the latter. 76450718ea6Smrgam_lf=' 76550718ea6Smrg' 76650718ea6Smrgcase `pwd` in 76750718ea6Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 76850718ea6Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 76950718ea6Smrgesac 77050718ea6Smrgcase $srcdir in 77150718ea6Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 77250718ea6Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 77350718ea6Smrgesac 77450718ea6Smrg 775566738d7Smrg# Do `set' in a subshell so we don't clobber the current shell's 776566738d7Smrg# arguments. Must try -L first in case configure is actually a 777566738d7Smrg# symlink; some systems play weird games with the mod time of symlinks 778566738d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 779566738d7Smrg# directory). 780566738d7Smrgif ( 78150718ea6Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 782566738d7Smrg if test "$[*]" = "X"; then 783566738d7Smrg # -L didn't work. 78450718ea6Smrg set X `ls -t "$srcdir/configure" conftest.file` 785566738d7Smrg fi 786566738d7Smrg rm -f conftest.file 787566738d7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 788566738d7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 789566738d7Smrg 790566738d7Smrg # If neither matched, then we have a broken ls. This can happen 791566738d7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 792566738d7Smrg # broken ls alias from the environment. This has actually 793566738d7Smrg # happened. Such a system could not be considered "sane". 794566738d7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 795566738d7Smrgalias in your environment]) 796566738d7Smrg fi 797566738d7Smrg 798566738d7Smrg test "$[2]" = conftest.file 799566738d7Smrg ) 800566738d7Smrgthen 801566738d7Smrg # Ok. 802566738d7Smrg : 803566738d7Smrgelse 804566738d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 805566738d7SmrgCheck your system clock]) 806566738d7Smrgfi 807566738d7SmrgAC_MSG_RESULT(yes)]) 808566738d7Smrg 80950718ea6Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 810566738d7Smrg# 81150718ea6Smrg# This file is free software; the Free Software Foundation 81250718ea6Smrg# gives unlimited permission to copy and/or distribute it, 81350718ea6Smrg# with or without modifications, as long as this notice is preserved. 814566738d7Smrg 81550718ea6Smrg# serial 1 816566738d7Smrg 81750718ea6Smrg# AM_SILENT_RULES([DEFAULT]) 81850718ea6Smrg# -------------------------- 81950718ea6Smrg# Enable less verbose build rules; with the default set to DEFAULT 82050718ea6Smrg# (`yes' being less verbose, `no' or empty being verbose). 82150718ea6SmrgAC_DEFUN([AM_SILENT_RULES], 82250718ea6Smrg[AC_ARG_ENABLE([silent-rules], 82350718ea6Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 82450718ea6Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 82550718ea6Smrgcase $enable_silent_rules in 82650718ea6Smrgyes) AM_DEFAULT_VERBOSITY=0;; 82750718ea6Smrgno) AM_DEFAULT_VERBOSITY=1;; 82850718ea6Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 82950718ea6Smrgesac 83050718ea6SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 83150718ea6SmrgAM_BACKSLASH='\' 83250718ea6SmrgAC_SUBST([AM_BACKSLASH])dnl 83350718ea6Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 834566738d7Smrg]) 835566738d7Smrg 83650718ea6Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 83750718ea6Smrg# 83850718ea6Smrg# This file is free software; the Free Software Foundation 83950718ea6Smrg# gives unlimited permission to copy and/or distribute it, 84050718ea6Smrg# with or without modifications, as long as this notice is preserved. 841566738d7Smrg 842566738d7Smrg# AM_PROG_INSTALL_STRIP 84350718ea6Smrg# --------------------- 844566738d7Smrg# One issue with vendor `install' (even GNU) is that you can't 845566738d7Smrg# specify the program used to strip binaries. This is especially 846566738d7Smrg# annoying in cross-compiling environments, where the build's strip 847566738d7Smrg# is unlikely to handle the host's binaries. 848566738d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 849566738d7Smrg# always use install-sh in `make install-strip', and initialize 850566738d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 851566738d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 852566738d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 853566738d7Smrg# Installed binaries are usually stripped using `strip' when the user 854566738d7Smrg# run `make install-strip'. However `strip' might not be the right 855566738d7Smrg# tool to use in cross-compilation environments, therefore Automake 856566738d7Smrg# will honor the `STRIP' environment variable to overrule this program. 857566738d7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 858566738d7Smrgif test "$cross_compiling" != no; then 859566738d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 860566738d7Smrgfi 86150718ea6SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 862566738d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 863566738d7Smrg 86450718ea6Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 86550718ea6Smrg# 86650718ea6Smrg# This file is free software; the Free Software Foundation 86750718ea6Smrg# gives unlimited permission to copy and/or distribute it, 86850718ea6Smrg# with or without modifications, as long as this notice is preserved. 86950718ea6Smrg 87050718ea6Smrg# serial 2 871566738d7Smrg 87250718ea6Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 87350718ea6Smrg# --------------------------- 87450718ea6Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 87550718ea6Smrg# This macro is traced by Automake. 87650718ea6SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 877566738d7Smrg 87850718ea6Smrg# AM_SUBST_NOTMAKE(VARIABLE) 87950718ea6Smrg# --------------------------- 88050718ea6Smrg# Public sister of _AM_SUBST_NOTMAKE. 88150718ea6SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 882566738d7Smrg 88350718ea6Smrg# Check how to create a tarball. -*- Autoconf -*- 884566738d7Smrg 88550718ea6Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 88650718ea6Smrg# 88750718ea6Smrg# This file is free software; the Free Software Foundation 88850718ea6Smrg# gives unlimited permission to copy and/or distribute it, 88950718ea6Smrg# with or without modifications, as long as this notice is preserved. 89050718ea6Smrg 89150718ea6Smrg# serial 2 89250718ea6Smrg 89350718ea6Smrg# _AM_PROG_TAR(FORMAT) 89450718ea6Smrg# -------------------- 89550718ea6Smrg# Check how to create a tarball in format FORMAT. 89650718ea6Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 89750718ea6Smrg# 89850718ea6Smrg# Substitute a variable $(am__tar) that is a command 89950718ea6Smrg# writing to stdout a FORMAT-tarball containing the directory 90050718ea6Smrg# $tardir. 90150718ea6Smrg# tardir=directory && $(am__tar) > result.tar 90250718ea6Smrg# 90350718ea6Smrg# Substitute a variable $(am__untar) that extract such 90450718ea6Smrg# a tarball read from stdin. 90550718ea6Smrg# $(am__untar) < result.tar 90650718ea6SmrgAC_DEFUN([_AM_PROG_TAR], 90750718ea6Smrg[# Always define AMTAR for backward compatibility. 90850718ea6SmrgAM_MISSING_PROG([AMTAR], [tar]) 90950718ea6Smrgm4_if([$1], [v7], 91050718ea6Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 91150718ea6Smrg [m4_case([$1], [ustar],, [pax],, 91250718ea6Smrg [m4_fatal([Unknown tar format])]) 91350718ea6SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 91450718ea6Smrg# Loop over all known methods to create a tar archive until one works. 91550718ea6Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 91650718ea6Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 91750718ea6Smrg# Do not fold the above two line into one, because Tru64 sh and 91850718ea6Smrg# Solaris sh will not grok spaces in the rhs of `-'. 91950718ea6Smrgfor _am_tool in $_am_tools 92050718ea6Smrgdo 92150718ea6Smrg case $_am_tool in 92250718ea6Smrg gnutar) 92350718ea6Smrg for _am_tar in tar gnutar gtar; 92450718ea6Smrg do 92550718ea6Smrg AM_RUN_LOG([$_am_tar --version]) && break 92650718ea6Smrg done 92750718ea6Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 92850718ea6Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 92950718ea6Smrg am__untar="$_am_tar -xf -" 93050718ea6Smrg ;; 93150718ea6Smrg plaintar) 93250718ea6Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 93350718ea6Smrg # ustar tarball either. 93450718ea6Smrg (tar --version) >/dev/null 2>&1 && continue 93550718ea6Smrg am__tar='tar chf - "$$tardir"' 93650718ea6Smrg am__tar_='tar chf - "$tardir"' 93750718ea6Smrg am__untar='tar xf -' 93850718ea6Smrg ;; 93950718ea6Smrg pax) 94050718ea6Smrg am__tar='pax -L -x $1 -w "$$tardir"' 94150718ea6Smrg am__tar_='pax -L -x $1 -w "$tardir"' 94250718ea6Smrg am__untar='pax -r' 94350718ea6Smrg ;; 94450718ea6Smrg cpio) 94550718ea6Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 94650718ea6Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 94750718ea6Smrg am__untar='cpio -i -H $1 -d' 94850718ea6Smrg ;; 94950718ea6Smrg none) 95050718ea6Smrg am__tar=false 95150718ea6Smrg am__tar_=false 95250718ea6Smrg am__untar=false 95350718ea6Smrg ;; 95450718ea6Smrg esac 95550718ea6Smrg 95650718ea6Smrg # If the value was cached, stop now. We just wanted to have am__tar 95750718ea6Smrg # and am__untar set. 95850718ea6Smrg test -n "${am_cv_prog_tar_$1}" && break 95950718ea6Smrg 96050718ea6Smrg # tar/untar a dummy directory, and stop if the command works 96150718ea6Smrg rm -rf conftest.dir 96250718ea6Smrg mkdir conftest.dir 96350718ea6Smrg echo GrepMe > conftest.dir/file 96450718ea6Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 96550718ea6Smrg rm -rf conftest.dir 96650718ea6Smrg if test -s conftest.tar; then 96750718ea6Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 96850718ea6Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 96950718ea6Smrg fi 97050718ea6Smrgdone 97150718ea6Smrgrm -rf conftest.dir 97250718ea6Smrg 97350718ea6SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 97450718ea6SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 97550718ea6SmrgAC_SUBST([am__tar]) 97650718ea6SmrgAC_SUBST([am__untar]) 97750718ea6Smrg]) # _AM_PROG_TAR 97850718ea6Smrg 97950718ea6Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98050718ea6Smrgdnl 98150718ea6Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 98250718ea6Smrgdnl 98350718ea6Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 98450718ea6Smrgdnl copy of this software and associated documentation files (the 98550718ea6Smrgdnl "Software"), to deal in the Software without restriction, including 98650718ea6Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 98750718ea6Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 98850718ea6Smrgdnl to whom the Software is furnished to do so, provided that the above 98950718ea6Smrgdnl copyright notice(s) and this permission notice appear in all copies of 99050718ea6Smrgdnl the Software and that both the above copyright notice(s) and this 99150718ea6Smrgdnl permission notice appear in supporting documentation. 99250718ea6Smrgdnl 99350718ea6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 99450718ea6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 99550718ea6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 99650718ea6Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 99750718ea6Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 99850718ea6Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 99950718ea6Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 100050718ea6Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 100150718ea6Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 100250718ea6Smrgdnl 100350718ea6Smrgdnl Except as contained in this notice, the name of a copyright holder 100450718ea6Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 100550718ea6Smrgdnl or other dealings in this Software without prior written authorization 100650718ea6Smrgdnl of the copyright holder. 100750718ea6Smrg 100850718ea6Smrg# XORG_MACROS_VERSION(required-version) 100950718ea6Smrg# ------------------------------------- 101050718ea6Smrg# Minimum version: 1.1.0 101150718ea6Smrg# 101250718ea6Smrg# If you're using a macro added in Version 1.1 or newer, include this in 101350718ea6Smrg# your configure.ac with the minimum required version, such as: 101450718ea6Smrg# XORG_MACROS_VERSION(1.1) 101550718ea6Smrg# 101650718ea6Smrg# To ensure that this macro is defined, also add: 101750718ea6Smrg# m4_ifndef([XORG_MACROS_VERSION], 101850718ea6Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 101950718ea6Smrg# 102050718ea6Smrg# 102150718ea6Smrg# See the "minimum version" comment for each macro you use to see what 102250718ea6Smrg# version you require. 102350718ea6Smrgm4_defun([XORG_MACROS_VERSION],[ 102450718ea6Smrgm4_define([vers_have], [1.3.0]) 102550718ea6Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 102650718ea6Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 102750718ea6Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 102850718ea6Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 102950718ea6Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 103050718ea6Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 103150718ea6Smrgm4_undefine([vers_have]) 103250718ea6Smrgm4_undefine([maj_have]) 103350718ea6Smrgm4_undefine([maj_needed]) 103450718ea6Smrg]) # XORG_MACROS_VERSION 103550718ea6Smrg 103650718ea6Smrg# XORG_PROG_RAWCPP() 103750718ea6Smrg# ------------------ 103850718ea6Smrg# Minimum version: 1.0.0 103950718ea6Smrg# 104050718ea6Smrg# Find cpp program and necessary flags for use in pre-processing text files 104150718ea6Smrg# such as man pages and config files 104250718ea6SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 104350718ea6SmrgAC_REQUIRE([AC_PROG_CPP]) 104450718ea6SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 104550718ea6Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 104650718ea6Smrg 104750718ea6Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 104850718ea6Smrg# which is not the best choice for supporting other OS'es, but covers most 104950718ea6Smrg# of the ones we need for now. 105050718ea6SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 105150718ea6SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 105250718ea6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 105350718ea6Smrg AC_MSG_RESULT([no]) 105450718ea6Smrgelse 105550718ea6Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 105650718ea6Smrg RAWCPPFLAGS=-undef 105750718ea6Smrg AC_MSG_RESULT([yes]) 105850718ea6Smrg # under Cygwin unix is still defined even with -undef 105950718ea6Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 106050718ea6Smrg RAWCPPFLAGS="-undef -ansi" 106150718ea6Smrg AC_MSG_RESULT([yes, with -ansi]) 106250718ea6Smrg else 106350718ea6Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 106450718ea6Smrg fi 106550718ea6Smrgfi 106650718ea6Smrgrm -f conftest.$ac_ext 1067566738d7Smrg 106850718ea6SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 106950718ea6SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 107050718ea6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 107150718ea6Smrg AC_MSG_RESULT([no]) 1072566738d7Smrgelse 107350718ea6Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 107450718ea6Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 107550718ea6Smrg AC_MSG_RESULT([yes]) 107650718ea6Smrg else 107750718ea6Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 107850718ea6Smrg fi 1079566738d7Smrgfi 108050718ea6Smrgrm -f conftest.$ac_ext 108150718ea6SmrgAC_SUBST(RAWCPPFLAGS) 108250718ea6Smrg]) # XORG_PROG_RAWCPP 1083566738d7Smrg 108450718ea6Smrg# XORG_MANPAGE_SECTIONS() 108550718ea6Smrg# ----------------------- 108650718ea6Smrg# Minimum version: 1.0.0 108750718ea6Smrg# 108850718ea6Smrg# Determine which sections man pages go in for the different man page types 108950718ea6Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 109050718ea6Smrg# Not sure if there's any better way than just hardcoding by OS name. 109150718ea6Smrg# Override default settings by setting environment variables 1092566738d7Smrg 109350718ea6SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 109450718ea6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1095566738d7Smrg 109650718ea6Smrgif test x$APP_MAN_SUFFIX = x ; then 109750718ea6Smrg APP_MAN_SUFFIX=1 109850718ea6Smrgfi 109950718ea6Smrgif test x$APP_MAN_DIR = x ; then 110050718ea6Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 110150718ea6Smrgfi 1102566738d7Smrg 110350718ea6Smrgif test x$LIB_MAN_SUFFIX = x ; then 110450718ea6Smrg LIB_MAN_SUFFIX=3 110550718ea6Smrgfi 110650718ea6Smrgif test x$LIB_MAN_DIR = x ; then 110750718ea6Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 110850718ea6Smrgfi 1109566738d7Smrg 111050718ea6Smrgif test x$FILE_MAN_SUFFIX = x ; then 111150718ea6Smrg case $host_os in 111250718ea6Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 111350718ea6Smrg *) FILE_MAN_SUFFIX=5 ;; 111450718ea6Smrg esac 111550718ea6Smrgfi 111650718ea6Smrgif test x$FILE_MAN_DIR = x ; then 111750718ea6Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 111850718ea6Smrgfi 1119566738d7Smrg 112050718ea6Smrgif test x$MISC_MAN_SUFFIX = x ; then 112150718ea6Smrg case $host_os in 112250718ea6Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 112350718ea6Smrg *) MISC_MAN_SUFFIX=7 ;; 112450718ea6Smrg esac 112550718ea6Smrgfi 112650718ea6Smrgif test x$MISC_MAN_DIR = x ; then 112750718ea6Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 112850718ea6Smrgfi 1129566738d7Smrg 113050718ea6Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 113150718ea6Smrg case $host_os in 113250718ea6Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 113350718ea6Smrg *) DRIVER_MAN_SUFFIX=4 ;; 113450718ea6Smrg esac 113550718ea6Smrgfi 113650718ea6Smrgif test x$DRIVER_MAN_DIR = x ; then 113750718ea6Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 113850718ea6Smrgfi 1139566738d7Smrg 114050718ea6Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 114150718ea6Smrg case $host_os in 114250718ea6Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 114350718ea6Smrg *) ADMIN_MAN_SUFFIX=8 ;; 114450718ea6Smrg esac 114550718ea6Smrgfi 114650718ea6Smrgif test x$ADMIN_MAN_DIR = x ; then 114750718ea6Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 114850718ea6Smrgfi 1149566738d7Smrg 1150566738d7Smrg 115150718ea6SmrgAC_SUBST([APP_MAN_SUFFIX]) 115250718ea6SmrgAC_SUBST([LIB_MAN_SUFFIX]) 115350718ea6SmrgAC_SUBST([FILE_MAN_SUFFIX]) 115450718ea6SmrgAC_SUBST([MISC_MAN_SUFFIX]) 115550718ea6SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 115650718ea6SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 115750718ea6SmrgAC_SUBST([APP_MAN_DIR]) 115850718ea6SmrgAC_SUBST([LIB_MAN_DIR]) 115950718ea6SmrgAC_SUBST([FILE_MAN_DIR]) 116050718ea6SmrgAC_SUBST([MISC_MAN_DIR]) 116150718ea6SmrgAC_SUBST([DRIVER_MAN_DIR]) 116250718ea6SmrgAC_SUBST([ADMIN_MAN_DIR]) 116350718ea6Smrg]) # XORG_MANPAGE_SECTIONS 116450718ea6Smrg 116550718ea6Smrg# XORG_CHECK_LINUXDOC 116650718ea6Smrg# ------------------- 116750718ea6Smrg# Minimum version: 1.0.0 1168566738d7Smrg# 116950718ea6Smrg# Defines the variable MAKE_TEXT if the necessary tools and 117050718ea6Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 117150718ea6Smrg# Whether or not the necessary tools and files are found can be checked 117250718ea6Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 117350718ea6SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 117450718ea6Smrgif test x$XORG_SGML_PATH = x ; then 117550718ea6Smrg XORG_SGML_PATH=$prefix/share/sgml 117650718ea6Smrgfi 117750718ea6SmrgHAVE_DEFS_ENT= 1178566738d7Smrg 117950718ea6Smrgif test x"$cross_compiling" = x"yes" ; then 118050718ea6Smrg HAVE_DEFS_ENT=no 1181566738d7Smrgelse 118250718ea6Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1183566738d7Smrgfi 1184566738d7Smrg 118550718ea6SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 118650718ea6SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1187566738d7Smrg 118850718ea6SmrgAC_MSG_CHECKING([Whether to build documentation]) 1189566738d7Smrg 119050718ea6Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 119150718ea6Smrg BUILDDOC=yes 119250718ea6Smrgelse 119350718ea6Smrg BUILDDOC=no 1194566738d7Smrgfi 1195566738d7Smrg 119650718ea6SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1197566738d7Smrg 119850718ea6SmrgAC_MSG_RESULT([$BUILDDOC]) 1199566738d7Smrg 120050718ea6SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1201566738d7Smrg 120250718ea6Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 120350718ea6Smrg BUILDPDFDOC=yes 120450718ea6Smrgelse 120550718ea6Smrg BUILDPDFDOC=no 120650718ea6Smrgfi 1207566738d7Smrg 120850718ea6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1209566738d7Smrg 121050718ea6SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1211566738d7Smrg 121250718ea6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 121350718ea6SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 121450718ea6SmrgMAKE_PDF="$PS2PDF" 121550718ea6SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1216566738d7Smrg 121750718ea6SmrgAC_SUBST(MAKE_TEXT) 121850718ea6SmrgAC_SUBST(MAKE_PS) 121950718ea6SmrgAC_SUBST(MAKE_PDF) 122050718ea6SmrgAC_SUBST(MAKE_HTML) 122150718ea6Smrg]) # XORG_CHECK_LINUXDOC 1222566738d7Smrg 122350718ea6Smrg# XORG_CHECK_DOCBOOK 122450718ea6Smrg# ------------------- 122550718ea6Smrg# Minimum version: 1.0.0 1226566738d7Smrg# 122750718ea6Smrg# Checks for the ability to build output formats from SGML DocBook source. 122850718ea6Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 122950718ea6Smrg# indicates whether the necessary tools and files are found and, if set, 123050718ea6Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 123150718ea6SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 123250718ea6Smrgif test x$XORG_SGML_PATH = x ; then 123350718ea6Smrg XORG_SGML_PATH=$prefix/share/sgml 123450718ea6Smrgfi 123550718ea6SmrgHAVE_DEFS_ENT= 123650718ea6SmrgBUILDTXTDOC=no 123750718ea6SmrgBUILDPDFDOC=no 123850718ea6SmrgBUILDPSDOC=no 123950718ea6SmrgBUILDHTMLDOC=no 124050718ea6Smrg 124150718ea6SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 124250718ea6Smrg 124350718ea6SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 124450718ea6SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 124550718ea6SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 124650718ea6SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 124750718ea6Smrg 124850718ea6SmrgAC_MSG_CHECKING([Whether to build text documentation]) 124950718ea6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 125050718ea6Smrg test x$BUILD_TXTDOC != xno; then 125150718ea6Smrg BUILDTXTDOC=yes 125250718ea6Smrgfi 125350718ea6SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 125450718ea6SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1255566738d7Smrg 125650718ea6SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 125750718ea6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 125850718ea6Smrg test x$BUILD_PDFDOC != xno; then 125950718ea6Smrg BUILDPDFDOC=yes 126050718ea6Smrgfi 126150718ea6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 126250718ea6SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1263566738d7Smrg 126450718ea6SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 126550718ea6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 126650718ea6Smrg test x$BUILD_PSDOC != xno; then 126750718ea6Smrg BUILDPSDOC=yes 126850718ea6Smrgfi 126950718ea6SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 127050718ea6SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1271566738d7Smrg 127250718ea6SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 127350718ea6Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 127450718ea6Smrg test x$BUILD_HTMLDOC != xno; then 127550718ea6Smrg BUILDHTMLDOC=yes 127650718ea6Smrgfi 127750718ea6SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 127850718ea6SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1279566738d7Smrg 128050718ea6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 128150718ea6SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 128250718ea6SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 128350718ea6SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1284566738d7Smrg 128550718ea6SmrgAC_SUBST(MAKE_TEXT) 128650718ea6SmrgAC_SUBST(MAKE_PS) 128750718ea6SmrgAC_SUBST(MAKE_PDF) 128850718ea6SmrgAC_SUBST(MAKE_HTML) 128950718ea6Smrg]) # XORG_CHECK_DOCBOOK 1290566738d7Smrg 129150718ea6Smrg# XORG_CHECK_MALLOC_ZERO 129250718ea6Smrg# ---------------------- 129350718ea6Smrg# Minimum version: 1.0.0 129450718ea6Smrg# 129550718ea6Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 129650718ea6Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 129750718ea6Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 129850718ea6SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 129950718ea6SmrgAC_ARG_ENABLE(malloc0returnsnull, 130050718ea6Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 130150718ea6Smrg [malloc(0) returns NULL (default: auto)]), 130250718ea6Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 130350718ea6Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 130450718ea6Smrg 130550718ea6SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 130650718ea6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 130750718ea6Smrg AC_RUN_IFELSE([ 130850718ea6Smrgchar *malloc(); 130950718ea6Smrgchar *realloc(); 131050718ea6Smrgchar *calloc(); 131150718ea6Smrgmain() { 131250718ea6Smrg char *m0, *r0, *c0, *p; 131350718ea6Smrg m0 = malloc(0); 131450718ea6Smrg p = malloc(10); 131550718ea6Smrg r0 = realloc(p,0); 131650718ea6Smrg c0 = calloc(0); 131750718ea6Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 131850718ea6Smrg}], 131950718ea6Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 132050718ea6Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 1321566738d7Smrgfi 132250718ea6SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 132350718ea6Smrg 132450718ea6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 132550718ea6Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 132650718ea6Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 132750718ea6Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 132850718ea6Smrgelse 132950718ea6Smrg MALLOC_ZERO_CFLAGS="" 133050718ea6Smrg XMALLOC_ZERO_CFLAGS="" 133150718ea6Smrg XTMALLOC_ZERO_CFLAGS="" 1332566738d7Smrgfi 1333566738d7Smrg 133450718ea6SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 133550718ea6SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 133650718ea6SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 133750718ea6Smrg]) # XORG_CHECK_MALLOC_ZERO 1338566738d7Smrg 133950718ea6Smrg# XORG_WITH_LINT() 134050718ea6Smrg# ---------------- 134150718ea6Smrg# Minimum version: 1.1.0 134250718ea6Smrg# 134350718ea6Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 134450718ea6Smrg# is specified. (Use --with-lint=sparse for sparse.) 134550718ea6Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 134650718ea6Smrg# Sets $LINT_FLAGS to flags to pass to source checker 134750718ea6Smrg# Sets LINT automake conditional if enabled (default: disabled) 134850718ea6Smrg# 134950718ea6SmrgAC_DEFUN([XORG_WITH_LINT],[ 135050718ea6Smrg 135150718ea6Smrg# Allow checking code with lint, sparse, etc. 135250718ea6SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 135350718ea6Smrg [Use a lint-style source code checker (default: disabled)])], 135450718ea6Smrg [use_lint=$withval], [use_lint=no]) 135550718ea6Smrgif test "x$use_lint" = "xyes" ; then 135650718ea6Smrg LINT="lint" 135750718ea6Smrgelse 135850718ea6Smrg LINT="$use_lint" 135950718ea6Smrgfi 136050718ea6Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 136150718ea6Smrg case $LINT in 136250718ea6Smrg lint|*/lint) 136350718ea6Smrg case $host_os in 136450718ea6Smrg solaris*) 136550718ea6Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 136650718ea6Smrg ;; 136750718ea6Smrg esac 136850718ea6Smrg ;; 136950718ea6Smrg esac 137050718ea6Smrgfi 1371566738d7Smrg 137250718ea6SmrgAC_SUBST(LINT) 137350718ea6SmrgAC_SUBST(LINT_FLAGS) 137450718ea6SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1375566738d7Smrg 137650718ea6Smrg]) # XORG_WITH_LINT 1377566738d7Smrg 137850718ea6Smrg# XORG_LINT_LIBRARY(LIBNAME) 137950718ea6Smrg# -------------------------- 138050718ea6Smrg# Minimum version: 1.1.0 138150718ea6Smrg# 138250718ea6Smrg# Sets up flags for building lint libraries for checking programs that call 138350718ea6Smrg# functions in the library. 138450718ea6Smrg# Disabled by default, enable with --enable-lint-library 138550718ea6Smrg# Sets: 138650718ea6Smrg# @LINTLIB@ - name of lint library file to make 138750718ea6Smrg# MAKE_LINT_LIB - automake conditional 138850718ea6Smrg# 1389566738d7Smrg 139050718ea6SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 139150718ea6SmrgAC_REQUIRE([XORG_WITH_LINT]) 139250718ea6Smrg# Build lint "library" for more indepth checks of programs calling this library 139350718ea6SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 139450718ea6Smrg [Create lint library (default: disabled)])], 139550718ea6Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 139650718ea6Smrgif test "x$make_lint_lib" != "xno" ; then 139750718ea6Smrg if test "x$LINT" = "xno" ; then 139850718ea6Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 139950718ea6Smrg fi 140050718ea6Smrg if test "x$make_lint_lib" = "xyes" ; then 140150718ea6Smrg LINTLIB=llib-l$1.ln 140250718ea6Smrg else 140350718ea6Smrg LINTLIB=$make_lint_lib 140450718ea6Smrg fi 140550718ea6Smrgfi 140650718ea6SmrgAC_SUBST(LINTLIB) 140750718ea6SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1408566738d7Smrg 140950718ea6Smrg]) # XORG_LINT_LIBRARY 1410566738d7Smrg 141150718ea6Smrg# XORG_CWARNFLAGS 141250718ea6Smrg# --------------- 141350718ea6Smrg# Minimum version: 1.2.0 141450718ea6Smrg# 141550718ea6Smrg# Defines CWARNFLAGS to enable C compiler warnings. 141650718ea6Smrg# 141750718ea6SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 141850718ea6SmrgAC_REQUIRE([AC_PROG_CC]) 141950718ea6Smrgif test "x$GCC" = xyes ; then 142050718ea6Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 142150718ea6Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 142250718ea6Smrg-Wbad-function-cast" 142350718ea6Smrg case `$CC -dumpversion` in 142450718ea6Smrg 3.4.* | 4.*) 142550718ea6Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 142650718ea6Smrg ;; 142750718ea6Smrg esac 1428566738d7Smrgelse 142950718ea6Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 143050718ea6Smrg if test "x$SUNCC" = "xyes"; then 143150718ea6Smrg CWARNFLAGS="-v" 143250718ea6Smrg fi 1433566738d7Smrgfi 143450718ea6SmrgAC_SUBST(CWARNFLAGS) 143550718ea6Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 143650718ea6Smrg]) # XORG_CWARNFLAGS 143750718ea6Smrg 143850718ea6Smrg# XORG_STRICT_OPTION 143950718ea6Smrg# ----------------------- 144050718ea6Smrg# Minimum version: 1.3.0 144150718ea6Smrg# 144250718ea6Smrg# Add configure option to enable strict compilation 144350718ea6SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 144450718ea6SmrgAC_REQUIRE([AC_PROG_CC]) 144550718ea6SmrgAC_REQUIRE([AC_PROG_CC_C99]) 144650718ea6SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 144750718ea6Smrg 144850718ea6SmrgAC_ARG_ENABLE(strict-compilation, 144950718ea6Smrg AS_HELP_STRING([--enable-strict-compilation], 145050718ea6Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 145150718ea6Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 145250718ea6Smrgif test "x$STRICT_COMPILE" = "xyes"; then 145350718ea6Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 145450718ea6Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 145550718ea6Smrg if test "x$GCC" = xyes ; then 145650718ea6Smrg STRICT_CFLAGS="-pedantic -Werror" 145750718ea6Smrg elif test "x$SUNCC" = "xyes"; then 145850718ea6Smrg STRICT_CFLAGS="-errwarn" 145950718ea6Smrg elif test "x$INTELCC" = "xyes"; then 146050718ea6Smrg STRICT_CFLAGS="-Werror" 146150718ea6Smrg fi 146250718ea6Smrgfi 146350718ea6SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 146450718ea6SmrgAC_SUBST([CWARNFLAGS]) 146550718ea6Smrg]) # XORG_STRICT_OPTION 1466566738d7Smrg 146750718ea6Smrg# XORG_DEFAULT_OPTIONS 146850718ea6Smrg# -------------------- 146950718ea6Smrg# Minimum version: 1.3.0 147050718ea6Smrg# 147150718ea6Smrg# Defines default options for X.Org modules. 147250718ea6Smrg# 147350718ea6SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 147450718ea6SmrgXORG_CWARNFLAGS 147550718ea6SmrgXORG_STRICT_OPTION 147650718ea6SmrgXORG_RELEASE_VERSION 147750718ea6SmrgXORG_CHANGELOG 147850718ea6SmrgXORG_MANPAGE_SECTIONS 147950718ea6Smrg]) # XORG_DEFAULT_OPTIONS 1480566738d7Smrgdnl Copyright 2005 Red Hat, Inc 1481566738d7Smrgdnl 1482566738d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1483566738d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1484566738d7Smrgdnl the above copyright notice appear in all copies and that both that 1485566738d7Smrgdnl copyright notice and this permission notice appear in supporting 1486566738d7Smrgdnl documentation. 1487566738d7Smrgdnl 1488566738d7Smrgdnl The above copyright notice and this permission notice shall be included 1489566738d7Smrgdnl in all copies or substantial portions of the Software. 1490566738d7Smrgdnl 1491566738d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1492566738d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1493566738d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1494566738d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1495566738d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1496566738d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1497566738d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1498566738d7Smrgdnl 1499566738d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1500566738d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1501566738d7Smrgdnl other dealings in this Software without prior written authorization 1502566738d7Smrgdnl from the copyright holders. 1503566738d7Smrgdnl 1504566738d7Smrg 1505566738d7Smrg# XORG_RELEASE_VERSION 1506566738d7Smrg# -------------------- 1507566738d7Smrg# Adds --with/without-release-string and changes the PACKAGE and 1508566738d7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 150950718ea6Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 151050718ea6Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1511566738d7Smrg 1512566738d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1513566738d7Smrg AC_ARG_WITH(release-version, 151450718ea6Smrg AS_HELP_STRING([--with-release-version=STRING], 1515566738d7Smrg [Use release version string in package name]), 1516566738d7Smrg [RELEASE_VERSION="$withval"], 1517566738d7Smrg [RELEASE_VERSION=""]) 1518566738d7Smrg if test "x$RELEASE_VERSION" != "x"; then 1519566738d7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1520566738d7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1521566738d7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1522566738d7Smrg fi 152350718ea6Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 152450718ea6Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 152550718ea6Smrg [Major version of this package]) 152650718ea6Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 152750718ea6Smrg if test "x$PVM" = "x"; then 152850718ea6Smrg PVM="0" 152950718ea6Smrg fi 153050718ea6Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 153150718ea6Smrg [$PVM], 153250718ea6Smrg [Minor version of this package]) 153350718ea6Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 153450718ea6Smrg if test "x$PVP" = "x"; then 153550718ea6Smrg PVP="0" 153650718ea6Smrg fi 153750718ea6Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 153850718ea6Smrg [$PVP], 153950718ea6Smrg [Patch version of this package]) 1540566738d7Smrg]) 1541566738d7Smrg 154250718ea6Smrg# XORG_CHANGELOG() 154350718ea6Smrg# ---------------- 154450718ea6Smrg# Minimum version: 1.2.0 154550718ea6Smrg# 154650718ea6Smrg# Defines the variable CHANGELOG_CMD as the command to generate 154750718ea6Smrg# ChangeLog from git. 154850718ea6Smrg# 154950718ea6Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 155050718ea6Smrg# 155150718ea6SmrgAC_DEFUN([XORG_CHANGELOG], [ 155250718ea6SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 155350718ea6Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 155450718ea6Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 155550718ea6SmrgAC_SUBST([CHANGELOG_CMD]) 155650718ea6SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 155750718ea6Smrg]) # XORG_CHANGELOG 155850718ea6Smrg 1559