aclocal.m4 revision f5effb2e
1f5effb2eSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2fdb3d228Smrg 39b41ff1aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 49b41ff1aSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5fdb3d228Smrg# This file is free software; the Free Software Foundation 6fdb3d228Smrg# gives unlimited permission to copy and/or distribute it, 7fdb3d228Smrg# with or without modifications, as long as this notice is preserved. 8fdb3d228Smrg 9fdb3d228Smrg# This program is distributed in the hope that it will be useful, 10fdb3d228Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fdb3d228Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fdb3d228Smrg# PARTICULAR PURPOSE. 13fdb3d228Smrg 149b41ff1aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 159b41ff1aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16f5effb2eSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17f5effb2eSmrg[m4_warning([this file was generated for autoconf 2.65. 189b41ff1aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 199b41ff1aSmrgIf you have problems, you may need to regenerate the build system entirely. 209b41ff1aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21fdb3d228Smrg 229b41ff1aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 239b41ff1aSmrg# 249b41ff1aSmrg# This file is free software; the Free Software Foundation 259b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 269b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 27fdb3d228Smrg 28fdb3d228Smrg# AM_AUTOMAKE_VERSION(VERSION) 29fdb3d228Smrg# ---------------------------- 30fdb3d228Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31fdb3d228Smrg# generated from the m4 files accompanying Automake X.Y. 329b41ff1aSmrg# (This private macro should not be called outside this file.) 339b41ff1aSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 349b41ff1aSmrg[am__api_version='1.11' 359b41ff1aSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 369b41ff1aSmrgdnl require some minimum version. Point them to the right macro. 37f5effb2eSmrgm4_if([$1], [1.11.1], [], 389b41ff1aSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 399b41ff1aSmrg]) 409b41ff1aSmrg 419b41ff1aSmrg# _AM_AUTOCONF_VERSION(VERSION) 429b41ff1aSmrg# ----------------------------- 439b41ff1aSmrg# aclocal traces this macro to find the Autoconf version. 449b41ff1aSmrg# This is a private macro too. Using m4_define simplifies 459b41ff1aSmrg# the logic in aclocal, which can simply ignore this definition. 469b41ff1aSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47fdb3d228Smrg 48fdb3d228Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49fdb3d228Smrg# ------------------------------- 509b41ff1aSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 519b41ff1aSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52fdb3d228SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53f5effb2eSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 549b41ff1aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 559b41ff1aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 569b41ff1aSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57fdb3d228Smrg 589b41ff1aSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59fdb3d228Smrg 609b41ff1aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61fdb3d228Smrg# 629b41ff1aSmrg# This file is free software; the Free Software Foundation 639b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 649b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 65fdb3d228Smrg 66fdb3d228Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67fdb3d228Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68fdb3d228Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69fdb3d228Smrg# 70fdb3d228Smrg# Of course, Automake must honor this variable whenever it calls a 71fdb3d228Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72fdb3d228Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73fdb3d228Smrg# depending on how configure is run. This is pretty annoying, since 74fdb3d228Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75fdb3d228Smrg# source directory, any form will work fine, but in subdirectories a 76fdb3d228Smrg# relative path needs to be adjusted first. 77fdb3d228Smrg# 78fdb3d228Smrg# $ac_aux_dir/missing 79fdb3d228Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80fdb3d228Smrg# $top_srcdir/$ac_aux_dir/missing 81fdb3d228Smrg# fails if $ac_aux_dir is absolute, 82fdb3d228Smrg# fails when called from a subdirectory in a VPATH build with 83fdb3d228Smrg# a relative $ac_aux_dir 84fdb3d228Smrg# 85fdb3d228Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86fdb3d228Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87fdb3d228Smrg# harmless because $srcdir is `.', but things will broke when you 88fdb3d228Smrg# start a VPATH build or use an absolute $srcdir. 89fdb3d228Smrg# 90fdb3d228Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91fdb3d228Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92fdb3d228Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93fdb3d228Smrg# and then we would define $MISSING as 94fdb3d228Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95fdb3d228Smrg# This will work as long as MISSING is not called from configure, because 96fdb3d228Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97fdb3d228Smrg# However there are other variables, like CC, which are often used in 98fdb3d228Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99fdb3d228Smrg# 100fdb3d228Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101fdb3d228Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102fdb3d228Smrg# configured tree to be moved without reconfiguration. 103fdb3d228Smrg 1049b41ff1aSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1059b41ff1aSmrg[dnl Rely on autoconf to set up CDPATH properly. 1069b41ff1aSmrgAC_PREREQ([2.50])dnl 107fdb3d228Smrg# expand $ac_aux_dir to an absolute path 108fdb3d228Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109fdb3d228Smrg]) 110fdb3d228Smrg 1119b41ff1aSmrg# AM_CONDITIONAL -*- Autoconf -*- 112fdb3d228Smrg 1139b41ff1aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1149b41ff1aSmrg# Free Software Foundation, Inc. 1159b41ff1aSmrg# 1169b41ff1aSmrg# This file is free software; the Free Software Foundation 1179b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 1189b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 119fdb3d228Smrg 1209b41ff1aSmrg# serial 9 121fdb3d228Smrg 1229b41ff1aSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1239b41ff1aSmrg# ------------------------------------- 1249b41ff1aSmrg# Define a conditional. 1259b41ff1aSmrgAC_DEFUN([AM_CONDITIONAL], 1269b41ff1aSmrg[AC_PREREQ(2.52)dnl 1279b41ff1aSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1289b41ff1aSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1299b41ff1aSmrgAC_SUBST([$1_TRUE])dnl 1309b41ff1aSmrgAC_SUBST([$1_FALSE])dnl 1319b41ff1aSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1329b41ff1aSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1339b41ff1aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1349b41ff1aSmrgif $2; then 1359b41ff1aSmrg $1_TRUE= 1369b41ff1aSmrg $1_FALSE='#' 137fdb3d228Smrgelse 1389b41ff1aSmrg $1_TRUE='#' 1399b41ff1aSmrg $1_FALSE= 140fdb3d228Smrgfi 1419b41ff1aSmrgAC_CONFIG_COMMANDS_PRE( 1429b41ff1aSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1439b41ff1aSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1449b41ff1aSmrgUsually this means the macro was only invoked conditionally.]]) 1459b41ff1aSmrgfi])]) 146fdb3d228Smrg 1479b41ff1aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1489b41ff1aSmrg# Free Software Foundation, Inc. 1499b41ff1aSmrg# 1509b41ff1aSmrg# This file is free software; the Free Software Foundation 1519b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 1529b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 153fdb3d228Smrg 1549b41ff1aSmrg# serial 10 155fdb3d228Smrg 156fdb3d228Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157fdb3d228Smrg# written in clear, in which case automake, when reading aclocal.m4, 158fdb3d228Smrg# will think it sees a *use*, and therefore will trigger all it's 159fdb3d228Smrg# C support machinery. Also note that it means that autoscan, seeing 160fdb3d228Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161fdb3d228Smrg 162fdb3d228Smrg 163fdb3d228Smrg# _AM_DEPENDENCIES(NAME) 164fdb3d228Smrg# ---------------------- 165fdb3d228Smrg# See how the compiler implements dependency checking. 166fdb3d228Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167fdb3d228Smrg# We try a few techniques and use that to set a single cache variable. 168fdb3d228Smrg# 169fdb3d228Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170fdb3d228Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171fdb3d228Smrg# dependency, and given that the user is not expected to run this macro, 172fdb3d228Smrg# just rely on AC_PROG_CC. 173fdb3d228SmrgAC_DEFUN([_AM_DEPENDENCIES], 174fdb3d228Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175fdb3d228SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176fdb3d228SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177fdb3d228SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178fdb3d228Smrg 179fdb3d228Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180fdb3d228Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181fdb3d228Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1829b41ff1aSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183fdb3d228Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184fdb3d228Smrg [depcc="$$1" am_compiler_list=]) 185fdb3d228Smrg 186fdb3d228SmrgAC_CACHE_CHECK([dependency style of $depcc], 187fdb3d228Smrg [am_cv_$1_dependencies_compiler_type], 188fdb3d228Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189fdb3d228Smrg # We make a subdir and do the tests there. Otherwise we can end up 190fdb3d228Smrg # making bogus files that we don't know about and never remove. For 191fdb3d228Smrg # instance it was reported that on HP-UX the gcc test will end up 192fdb3d228Smrg # making a dummy file named `D' -- because `-MD' means `put the output 193fdb3d228Smrg # in D'. 194fdb3d228Smrg mkdir conftest.dir 195fdb3d228Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 196fdb3d228Smrg # using a relative directory. 197fdb3d228Smrg cp "$am_depcomp" conftest.dir 198fdb3d228Smrg cd conftest.dir 199fdb3d228Smrg # We will build objects and dependencies in a subdirectory because 200fdb3d228Smrg # it helps to detect inapplicable dependency modes. For instance 201fdb3d228Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 202fdb3d228Smrg # side effect of compilation, but ICC will put the dependencies in 203fdb3d228Smrg # the current directory while Tru64 will put them in the object 204fdb3d228Smrg # directory. 205fdb3d228Smrg mkdir sub 206fdb3d228Smrg 207fdb3d228Smrg am_cv_$1_dependencies_compiler_type=none 208fdb3d228Smrg if test "$am_compiler_list" = ""; then 209fdb3d228Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210fdb3d228Smrg fi 2119b41ff1aSmrg am__universal=false 2129b41ff1aSmrg m4_case([$1], [CC], 2139b41ff1aSmrg [case " $depcc " in #( 2149b41ff1aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2159b41ff1aSmrg esac], 2169b41ff1aSmrg [CXX], 2179b41ff1aSmrg [case " $depcc " in #( 2189b41ff1aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2199b41ff1aSmrg esac]) 2209b41ff1aSmrg 221fdb3d228Smrg for depmode in $am_compiler_list; do 222fdb3d228Smrg # Setup a source with many dependencies, because some compilers 223fdb3d228Smrg # like to wrap large dependency lists on column 80 (with \), and 224fdb3d228Smrg # we should not choose a depcomp mode which is confused by this. 225fdb3d228Smrg # 226fdb3d228Smrg # We need to recreate these files for each test, as the compiler may 227fdb3d228Smrg # overwrite some of them when testing with obscure command lines. 228fdb3d228Smrg # This happens at least with the AIX C compiler. 229fdb3d228Smrg : > sub/conftest.c 230fdb3d228Smrg for i in 1 2 3 4 5 6; do 231fdb3d228Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2329b41ff1aSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2339b41ff1aSmrg # Solaris 8's {/usr,}/bin/sh. 2349b41ff1aSmrg touch sub/conftst$i.h 235fdb3d228Smrg done 236fdb3d228Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237fdb3d228Smrg 2389b41ff1aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2399b41ff1aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2409b41ff1aSmrg # handle `-M -o', and we need to detect this. Also, some Intel 2419b41ff1aSmrg # versions had trouble with output in subdirs 2429b41ff1aSmrg am__obj=sub/conftest.${OBJEXT-o} 2439b41ff1aSmrg am__minus_obj="-o $am__obj" 244fdb3d228Smrg case $depmode in 2459b41ff1aSmrg gcc) 2469b41ff1aSmrg # This depmode causes a compiler race in universal mode. 2479b41ff1aSmrg test "$am__universal" = false || continue 2489b41ff1aSmrg ;; 249fdb3d228Smrg nosideeffect) 250fdb3d228Smrg # after this tag, mechanisms are not by side-effect, so they'll 251fdb3d228Smrg # only be used when explicitly requested 252fdb3d228Smrg if test "x$enable_dependency_tracking" = xyes; then 253fdb3d228Smrg continue 254fdb3d228Smrg else 255fdb3d228Smrg break 256fdb3d228Smrg fi 257fdb3d228Smrg ;; 2589b41ff1aSmrg msvisualcpp | msvcmsys) 2599b41ff1aSmrg # This compiler won't grok `-c -o', but also, the minuso test has 2609b41ff1aSmrg # not run yet. These depmodes are late enough in the game, and 2619b41ff1aSmrg # so weak that their functioning should not be impacted. 2629b41ff1aSmrg am__obj=conftest.${OBJEXT-o} 2639b41ff1aSmrg am__minus_obj= 2649b41ff1aSmrg ;; 265fdb3d228Smrg none) break ;; 266fdb3d228Smrg esac 267fdb3d228Smrg if depmode=$depmode \ 2689b41ff1aSmrg source=sub/conftest.c object=$am__obj \ 269fdb3d228Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2709b41ff1aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271fdb3d228Smrg >/dev/null 2>conftest.err && 2729b41ff1aSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273fdb3d228Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2749b41ff1aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275fdb3d228Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276fdb3d228Smrg # icc doesn't choke on unknown options, it will just issue warnings 2779b41ff1aSmrg # or remarks (even with -Werror). So we grep stderr for any message 2789b41ff1aSmrg # that says an option was ignored or not supported. 2799b41ff1aSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2809b41ff1aSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2819b41ff1aSmrg # The diagnosis changed in icc 8.0: 2829b41ff1aSmrg # icc: Command line remark: option '-MP' not supported 2839b41ff1aSmrg if (grep 'ignoring option' conftest.err || 2849b41ff1aSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285fdb3d228Smrg am_cv_$1_dependencies_compiler_type=$depmode 286fdb3d228Smrg break 287fdb3d228Smrg fi 288fdb3d228Smrg fi 289fdb3d228Smrg done 290fdb3d228Smrg 291fdb3d228Smrg cd .. 292fdb3d228Smrg rm -rf conftest.dir 293fdb3d228Smrgelse 294fdb3d228Smrg am_cv_$1_dependencies_compiler_type=none 295fdb3d228Smrgfi 296fdb3d228Smrg]) 297fdb3d228SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298fdb3d228SmrgAM_CONDITIONAL([am__fastdep$1], [ 299fdb3d228Smrg test "x$enable_dependency_tracking" != xno \ 300fdb3d228Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301fdb3d228Smrg]) 302fdb3d228Smrg 303fdb3d228Smrg 304fdb3d228Smrg# AM_SET_DEPDIR 305fdb3d228Smrg# ------------- 306fdb3d228Smrg# Choose a directory name for dependency files. 307fdb3d228Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308fdb3d228SmrgAC_DEFUN([AM_SET_DEPDIR], 309fdb3d228Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310fdb3d228SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311fdb3d228Smrg]) 312fdb3d228Smrg 313fdb3d228Smrg 314fdb3d228Smrg# AM_DEP_TRACK 315fdb3d228Smrg# ------------ 316fdb3d228SmrgAC_DEFUN([AM_DEP_TRACK], 317fdb3d228Smrg[AC_ARG_ENABLE(dependency-tracking, 3189b41ff1aSmrg[ --disable-dependency-tracking speeds up one-time build 3199b41ff1aSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320fdb3d228Smrgif test "x$enable_dependency_tracking" != xno; then 321fdb3d228Smrg am_depcomp="$ac_aux_dir/depcomp" 322fdb3d228Smrg AMDEPBACKSLASH='\' 323fdb3d228Smrgfi 324fdb3d228SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3259b41ff1aSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3269b41ff1aSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327fdb3d228Smrg]) 328fdb3d228Smrg 3299b41ff1aSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330fdb3d228Smrg 3319b41ff1aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3329b41ff1aSmrg# Free Software Foundation, Inc. 3339b41ff1aSmrg# 3349b41ff1aSmrg# This file is free software; the Free Software Foundation 3359b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 3369b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 337fdb3d228Smrg 3389b41ff1aSmrg#serial 5 339fdb3d228Smrg 340fdb3d228Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341fdb3d228Smrg# ------------------------------ 342fdb3d228SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3439b41ff1aSmrg[{ 3449b41ff1aSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3459b41ff1aSmrg # are listed without --file. Let's play safe and only enable the eval 3469b41ff1aSmrg # if we detect the quoting. 3479b41ff1aSmrg case $CONFIG_FILES in 3489b41ff1aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 3499b41ff1aSmrg *) set x $CONFIG_FILES ;; 3509b41ff1aSmrg esac 3519b41ff1aSmrg shift 3529b41ff1aSmrg for mf 3539b41ff1aSmrg do 3549b41ff1aSmrg # Strip MF so we end up with the name of the file. 3559b41ff1aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3569b41ff1aSmrg # Check whether this is an Automake generated Makefile or not. 3579b41ff1aSmrg # We used to match only the files named `Makefile.in', but 3589b41ff1aSmrg # some people rename them; so instead we look at the file content. 3599b41ff1aSmrg # Grep'ing the first line is not enough: some people post-process 3609b41ff1aSmrg # each Makefile.in and add a new line on top of each file to say so. 3619b41ff1aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 3629b41ff1aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3639b41ff1aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3649b41ff1aSmrg dirpart=`AS_DIRNAME("$mf")` 3659b41ff1aSmrg else 3669b41ff1aSmrg continue 3679b41ff1aSmrg fi 3689b41ff1aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3699b41ff1aSmrg # from the Makefile without running `make'. 3709b41ff1aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3719b41ff1aSmrg test -z "$DEPDIR" && continue 3729b41ff1aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3739b41ff1aSmrg test -z "am__include" && continue 3749b41ff1aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3759b41ff1aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 3769b41ff1aSmrg U=`sed -n 's/^U = //p' < "$mf"` 3779b41ff1aSmrg # Find all dependency output files, they are included files with 3789b41ff1aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3799b41ff1aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 3809b41ff1aSmrg # expansion. 3819b41ff1aSmrg for file in `sed -n " 3829b41ff1aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3839b41ff1aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3849b41ff1aSmrg # Make sure the directory exists. 3859b41ff1aSmrg test -f "$dirpart/$file" && continue 3869b41ff1aSmrg fdir=`AS_DIRNAME(["$file"])` 3879b41ff1aSmrg AS_MKDIR_P([$dirpart/$fdir]) 3889b41ff1aSmrg # echo "creating $dirpart/$file" 3899b41ff1aSmrg echo '# dummy' > "$dirpart/$file" 3909b41ff1aSmrg done 391fdb3d228Smrg done 3929b41ff1aSmrg} 393fdb3d228Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394fdb3d228Smrg 395fdb3d228Smrg 396fdb3d228Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397fdb3d228Smrg# ----------------------------- 398fdb3d228Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399fdb3d228Smrg# 400fdb3d228Smrg# This code is only required when automatic dependency tracking 401fdb3d228Smrg# is enabled. FIXME. This creates each `.P' file that we will 402fdb3d228Smrg# need in order to bootstrap the dependency handling code. 403fdb3d228SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404fdb3d228Smrg[AC_CONFIG_COMMANDS([depfiles], 405fdb3d228Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406fdb3d228Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407fdb3d228Smrg]) 408fdb3d228Smrg 4099b41ff1aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4109b41ff1aSmrg# Free Software Foundation, Inc. 4119b41ff1aSmrg# 4129b41ff1aSmrg# This file is free software; the Free Software Foundation 4139b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 4149b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 415fdb3d228Smrg 4169b41ff1aSmrg# serial 8 417fdb3d228Smrg 4189b41ff1aSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4199b41ff1aSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420fdb3d228Smrg 4219b41ff1aSmrg# Do all the work for Automake. -*- Autoconf -*- 422fdb3d228Smrg 4239b41ff1aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4249b41ff1aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4259b41ff1aSmrg# 4269b41ff1aSmrg# This file is free software; the Free Software Foundation 4279b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 4289b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 429fdb3d228Smrg 4309b41ff1aSmrg# serial 16 431fdb3d228Smrg 4329b41ff1aSmrg# This macro actually does too much. Some checks are only needed if 4339b41ff1aSmrg# your package does certain things. But this isn't really a big deal. 4349b41ff1aSmrg 4359b41ff1aSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4369b41ff1aSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4379b41ff1aSmrg# ----------------------------------------------- 4389b41ff1aSmrg# The call with PACKAGE and VERSION arguments is the old style 4399b41ff1aSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4409b41ff1aSmrg# and VERSION should now be passed to AC_INIT and removed from 4419b41ff1aSmrg# the call to AM_INIT_AUTOMAKE. 4429b41ff1aSmrg# We support both call styles for the transition. After 4439b41ff1aSmrg# the next Automake release, Autoconf can make the AC_INIT 4449b41ff1aSmrg# arguments mandatory, and then we can depend on a new Autoconf 4459b41ff1aSmrg# release and drop the old call support. 4469b41ff1aSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4479b41ff1aSmrg[AC_PREREQ([2.62])dnl 4489b41ff1aSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4499b41ff1aSmrgdnl the ones we care about. 4509b41ff1aSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4519b41ff1aSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4529b41ff1aSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4539b41ff1aSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4549b41ff1aSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4559b41ff1aSmrg # is not polluted with repeated "-I." 4569b41ff1aSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4579b41ff1aSmrg # test to see if srcdir already configured 4589b41ff1aSmrg if test -f $srcdir/config.status; then 4599b41ff1aSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4609b41ff1aSmrg fi 461fdb3d228Smrgfi 4629b41ff1aSmrg 4639b41ff1aSmrg# test whether we have cygpath 4649b41ff1aSmrgif test -z "$CYGPATH_W"; then 4659b41ff1aSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4669b41ff1aSmrg CYGPATH_W='cygpath -w' 4679b41ff1aSmrg else 4689b41ff1aSmrg CYGPATH_W=echo 4699b41ff1aSmrg fi 470fdb3d228Smrgfi 4719b41ff1aSmrgAC_SUBST([CYGPATH_W]) 472fdb3d228Smrg 4739b41ff1aSmrg# Define the identity of the package. 4749b41ff1aSmrgdnl Distinguish between old-style and new-style calls. 4759b41ff1aSmrgm4_ifval([$2], 4769b41ff1aSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4779b41ff1aSmrg AC_SUBST([PACKAGE], [$1])dnl 4789b41ff1aSmrg AC_SUBST([VERSION], [$2])], 4799b41ff1aSmrg[_AM_SET_OPTIONS([$1])dnl 4809b41ff1aSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4819b41ff1aSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4829b41ff1aSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4839b41ff1aSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4849b41ff1aSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485fdb3d228Smrg 4869b41ff1aSmrg_AM_IF_OPTION([no-define],, 4879b41ff1aSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4889b41ff1aSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489fdb3d228Smrg 4909b41ff1aSmrg# Some tools Automake needs. 4919b41ff1aSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4929b41ff1aSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4939b41ff1aSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4949b41ff1aSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4959b41ff1aSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4969b41ff1aSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4979b41ff1aSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4989b41ff1aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4999b41ff1aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5009b41ff1aSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5019b41ff1aSmrg# We need awk for the "check" target. The system "awk" is bad on 5029b41ff1aSmrg# some platforms. 5039b41ff1aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5049b41ff1aSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5059b41ff1aSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5069b41ff1aSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5079b41ff1aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5089b41ff1aSmrg [_AM_PROG_TAR([v7])])]) 5099b41ff1aSmrg_AM_IF_OPTION([no-dependencies],, 5109b41ff1aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5119b41ff1aSmrg [_AM_DEPENDENCIES(CC)], 5129b41ff1aSmrg [define([AC_PROG_CC], 5139b41ff1aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5149b41ff1aSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5159b41ff1aSmrg [_AM_DEPENDENCIES(CXX)], 5169b41ff1aSmrg [define([AC_PROG_CXX], 5179b41ff1aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5189b41ff1aSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5199b41ff1aSmrg [_AM_DEPENDENCIES(OBJC)], 5209b41ff1aSmrg [define([AC_PROG_OBJC], 5219b41ff1aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5229b41ff1aSmrg]) 5239b41ff1aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5249b41ff1aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5259b41ff1aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5269b41ff1aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5279b41ff1aSmrgAC_CONFIG_COMMANDS_PRE(dnl 5289b41ff1aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5299b41ff1aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5309b41ff1aSmrg]) 531fdb3d228Smrg 5329b41ff1aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5339b41ff1aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5349b41ff1aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5359b41ff1aSmrgm4_define([_AC_COMPILER_EXEEXT], 5369b41ff1aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537fdb3d228Smrg 538fdb3d228Smrg 5399b41ff1aSmrg# When config.status generates a header, we must update the stamp-h file. 5409b41ff1aSmrg# This file resides in the same directory as the config header 5419b41ff1aSmrg# that is generated. The stamp files are numbered to have different names. 5429b41ff1aSmrg 5439b41ff1aSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5449b41ff1aSmrg# loop where config.status creates the headers, so we can generate 5459b41ff1aSmrg# our stamp files there. 5469b41ff1aSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5479b41ff1aSmrg[# Compute $1's index in $config_headers. 5489b41ff1aSmrg_am_arg=$1 5499b41ff1aSmrg_am_stamp_count=1 5509b41ff1aSmrgfor _am_header in $config_headers :; do 5519b41ff1aSmrg case $_am_header in 5529b41ff1aSmrg $_am_arg | $_am_arg:* ) 5539b41ff1aSmrg break ;; 5549b41ff1aSmrg * ) 5559b41ff1aSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5569b41ff1aSmrg esac 5579b41ff1aSmrgdone 5589b41ff1aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559fdb3d228Smrg 5609b41ff1aSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5619b41ff1aSmrg# 5629b41ff1aSmrg# This file is free software; the Free Software Foundation 5639b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 5649b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 565fdb3d228Smrg 5669b41ff1aSmrg# AM_PROG_INSTALL_SH 5679b41ff1aSmrg# ------------------ 5689b41ff1aSmrg# Define $install_sh. 5699b41ff1aSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5709b41ff1aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5719b41ff1aSmrgif test x"${install_sh}" != xset; then 5729b41ff1aSmrg case $am_aux_dir in 5739b41ff1aSmrg *\ * | *\ *) 5749b41ff1aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5759b41ff1aSmrg *) 5769b41ff1aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5779b41ff1aSmrg esac 578fdb3d228Smrgfi 5799b41ff1aSmrgAC_SUBST(install_sh)]) 580fdb3d228Smrg 5819b41ff1aSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5829b41ff1aSmrg# 5839b41ff1aSmrg# This file is free software; the Free Software Foundation 5849b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 5859b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 586fdb3d228Smrg 5879b41ff1aSmrg# serial 2 588fdb3d228Smrg 5899b41ff1aSmrg# Check whether the underlying file-system supports filenames 5909b41ff1aSmrg# with a leading dot. For instance MS-DOS doesn't. 5919b41ff1aSmrgAC_DEFUN([AM_SET_LEADING_DOT], 5929b41ff1aSmrg[rm -rf .tst 2>/dev/null 5939b41ff1aSmrgmkdir .tst 2>/dev/null 5949b41ff1aSmrgif test -d .tst; then 5959b41ff1aSmrg am__leading_dot=. 5969b41ff1aSmrgelse 5979b41ff1aSmrg am__leading_dot=_ 5989b41ff1aSmrgfi 5999b41ff1aSmrgrmdir .tst 2>/dev/null 6009b41ff1aSmrgAC_SUBST([am__leading_dot])]) 601fdb3d228Smrg 6029b41ff1aSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6039b41ff1aSmrg# From Jim Meyering 604fdb3d228Smrg 6059b41ff1aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6069b41ff1aSmrg# Free Software Foundation, Inc. 6079b41ff1aSmrg# 6089b41ff1aSmrg# This file is free software; the Free Software Foundation 6099b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 6109b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 611fdb3d228Smrg 6129b41ff1aSmrg# serial 5 613fdb3d228Smrg 6149b41ff1aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6159b41ff1aSmrg# ---------------------------------- 6169b41ff1aSmrg# Control maintainer-specific portions of Makefiles. 6179b41ff1aSmrg# Default is to disable them, unless `enable' is passed literally. 6189b41ff1aSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 6199b41ff1aSmrg# can override the default with the --enable/--disable switch. 620fdb3d228SmrgAC_DEFUN([AM_MAINTAINER_MODE], 6219b41ff1aSmrg[m4_case(m4_default([$1], [disable]), 6229b41ff1aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 6239b41ff1aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 6249b41ff1aSmrg [m4_define([am_maintainer_other], [enable]) 6259b41ff1aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6269b41ff1aSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6279b41ff1aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6289b41ff1aSmrg AC_ARG_ENABLE([maintainer-mode], 6299b41ff1aSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6309b41ff1aSmrg (and sometimes confusing) to the casual installer], 6319b41ff1aSmrg [USE_MAINTAINER_MODE=$enableval], 6329b41ff1aSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633fdb3d228Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6349b41ff1aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635fdb3d228Smrg MAINT=$MAINTAINER_MODE_TRUE 6369b41ff1aSmrg AC_SUBST([MAINT])dnl 637fdb3d228Smrg] 638fdb3d228Smrg) 639fdb3d228Smrg 640fdb3d228SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641fdb3d228Smrg 6429b41ff1aSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643fdb3d228Smrg 6449b41ff1aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6459b41ff1aSmrg# 6469b41ff1aSmrg# This file is free software; the Free Software Foundation 6479b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 6489b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 649fdb3d228Smrg 6509b41ff1aSmrg# serial 4 651fdb3d228Smrg 6529b41ff1aSmrg# AM_MAKE_INCLUDE() 6539b41ff1aSmrg# ----------------- 6549b41ff1aSmrg# Check to see how make treats includes. 6559b41ff1aSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6569b41ff1aSmrg[am_make=${MAKE-make} 6579b41ff1aSmrgcat > confinc << 'END' 6589b41ff1aSmrgam__doit: 6599b41ff1aSmrg @echo this is the am__doit target 6609b41ff1aSmrg.PHONY: am__doit 6619b41ff1aSmrgEND 6629b41ff1aSmrg# If we don't find an include directive, just comment out the code. 6639b41ff1aSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6649b41ff1aSmrgam__include="#" 6659b41ff1aSmrgam__quote= 6669b41ff1aSmrg_am_result=none 6679b41ff1aSmrg# First try GNU make style include. 6689b41ff1aSmrgecho "include confinc" > confmf 6699b41ff1aSmrg# Ignore all kinds of additional output from `make'. 6709b41ff1aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6719b41ff1aSmrg*the\ am__doit\ target*) 6729b41ff1aSmrg am__include=include 6739b41ff1aSmrg am__quote= 6749b41ff1aSmrg _am_result=GNU 6759b41ff1aSmrg ;; 6769b41ff1aSmrgesac 6779b41ff1aSmrg# Now try BSD make style include. 6789b41ff1aSmrgif test "$am__include" = "#"; then 6799b41ff1aSmrg echo '.include "confinc"' > confmf 6809b41ff1aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 6819b41ff1aSmrg *the\ am__doit\ target*) 6829b41ff1aSmrg am__include=.include 6839b41ff1aSmrg am__quote="\"" 6849b41ff1aSmrg _am_result=BSD 6859b41ff1aSmrg ;; 6869b41ff1aSmrg esac 6879b41ff1aSmrgfi 6889b41ff1aSmrgAC_SUBST([am__include]) 6899b41ff1aSmrgAC_SUBST([am__quote]) 6909b41ff1aSmrgAC_MSG_RESULT([$_am_result]) 6919b41ff1aSmrgrm -f confinc confmf 6929b41ff1aSmrg]) 693fdb3d228Smrg 6949b41ff1aSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695fdb3d228Smrg 6969b41ff1aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6979b41ff1aSmrg# Free Software Foundation, Inc. 6989b41ff1aSmrg# 6999b41ff1aSmrg# This file is free software; the Free Software Foundation 7009b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 7019b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 702fdb3d228Smrg 703fdb3d228Smrg# serial 6 704fdb3d228Smrg 7059b41ff1aSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7069b41ff1aSmrg# ------------------------------ 7079b41ff1aSmrgAC_DEFUN([AM_MISSING_PROG], 7089b41ff1aSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7099b41ff1aSmrg$1=${$1-"${am_missing_run}$2"} 7109b41ff1aSmrgAC_SUBST($1)]) 711fdb3d228Smrg 712fdb3d228Smrg 7139b41ff1aSmrg# AM_MISSING_HAS_RUN 7149b41ff1aSmrg# ------------------ 7159b41ff1aSmrg# Define MISSING if not defined so far and test if it supports --run. 7169b41ff1aSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7179b41ff1aSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7189b41ff1aSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7199b41ff1aSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7209b41ff1aSmrgif test x"${MISSING+set}" != xset; then 7219b41ff1aSmrg case $am_aux_dir in 7229b41ff1aSmrg *\ * | *\ *) 7239b41ff1aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7249b41ff1aSmrg *) 7259b41ff1aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7269b41ff1aSmrg esac 727fdb3d228Smrgfi 7289b41ff1aSmrg# Use eval to expand $SHELL 7299b41ff1aSmrgif eval "$MISSING --run true"; then 7309b41ff1aSmrg am_missing_run="$MISSING --run " 7319b41ff1aSmrgelse 7329b41ff1aSmrg am_missing_run= 7339b41ff1aSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7349b41ff1aSmrgfi 7359b41ff1aSmrg]) 736fdb3d228Smrg 7379b41ff1aSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738fdb3d228Smrg# 7399b41ff1aSmrg# This file is free software; the Free Software Foundation 7409b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 7419b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 7429b41ff1aSmrg 7439b41ff1aSmrg# AM_PROG_MKDIR_P 7449b41ff1aSmrg# --------------- 7459b41ff1aSmrg# Check for `mkdir -p'. 7469b41ff1aSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7479b41ff1aSmrg[AC_PREREQ([2.60])dnl 7489b41ff1aSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7499b41ff1aSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7509b41ff1aSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 7519b41ff1aSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7529b41ff1aSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7539b41ff1aSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7549b41ff1aSmrgdnl adjustment using top_builddir (which is defined more often than 7559b41ff1aSmrgdnl MKDIR_P). 7569b41ff1aSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7579b41ff1aSmrgcase $mkdir_p in 7589b41ff1aSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 7599b41ff1aSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7609b41ff1aSmrgesac 7619b41ff1aSmrg]) 7629b41ff1aSmrg 7639b41ff1aSmrg# Helper functions for option handling. -*- Autoconf -*- 7649b41ff1aSmrg 7659b41ff1aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766fdb3d228Smrg# 7679b41ff1aSmrg# This file is free software; the Free Software Foundation 7689b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 7699b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 770fdb3d228Smrg 7719b41ff1aSmrg# serial 4 772fdb3d228Smrg 7739b41ff1aSmrg# _AM_MANGLE_OPTION(NAME) 7749b41ff1aSmrg# ----------------------- 7759b41ff1aSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7769b41ff1aSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777fdb3d228Smrg 7789b41ff1aSmrg# _AM_SET_OPTION(NAME) 7799b41ff1aSmrg# ------------------------------ 7809b41ff1aSmrg# Set option NAME. Presently that only means defining a flag for this option. 7819b41ff1aSmrgAC_DEFUN([_AM_SET_OPTION], 7829b41ff1aSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783fdb3d228Smrg 7849b41ff1aSmrg# _AM_SET_OPTIONS(OPTIONS) 7859b41ff1aSmrg# ---------------------------------- 7869b41ff1aSmrg# OPTIONS is a space-separated list of Automake options. 7879b41ff1aSmrgAC_DEFUN([_AM_SET_OPTIONS], 7889b41ff1aSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789fdb3d228Smrg 7909b41ff1aSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7919b41ff1aSmrg# ------------------------------------------- 7929b41ff1aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7939b41ff1aSmrgAC_DEFUN([_AM_IF_OPTION], 7949b41ff1aSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7959b41ff1aSmrg 7969b41ff1aSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7979b41ff1aSmrg 7989b41ff1aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7999b41ff1aSmrg# Free Software Foundation, Inc. 800fdb3d228Smrg# 8019b41ff1aSmrg# This file is free software; the Free Software Foundation 8029b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 8039b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 8049b41ff1aSmrg 8059b41ff1aSmrg# serial 5 8069b41ff1aSmrg 8079b41ff1aSmrg# AM_SANITY_CHECK 8089b41ff1aSmrg# --------------- 8099b41ff1aSmrgAC_DEFUN([AM_SANITY_CHECK], 8109b41ff1aSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8119b41ff1aSmrg# Just in case 8129b41ff1aSmrgsleep 1 8139b41ff1aSmrgecho timestamp > conftest.file 8149b41ff1aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8159b41ff1aSmrg# name. Accept space and tab only in the latter. 8169b41ff1aSmrgam_lf=' 8179b41ff1aSmrg' 8189b41ff1aSmrgcase `pwd` in 8199b41ff1aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8209b41ff1aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8219b41ff1aSmrgesac 8229b41ff1aSmrgcase $srcdir in 8239b41ff1aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8249b41ff1aSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8259b41ff1aSmrgesac 8269b41ff1aSmrg 8279b41ff1aSmrg# Do `set' in a subshell so we don't clobber the current shell's 8289b41ff1aSmrg# arguments. Must try -L first in case configure is actually a 8299b41ff1aSmrg# symlink; some systems play weird games with the mod time of symlinks 8309b41ff1aSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8319b41ff1aSmrg# directory). 8329b41ff1aSmrgif ( 8339b41ff1aSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8349b41ff1aSmrg if test "$[*]" = "X"; then 8359b41ff1aSmrg # -L didn't work. 8369b41ff1aSmrg set X `ls -t "$srcdir/configure" conftest.file` 8379b41ff1aSmrg fi 8389b41ff1aSmrg rm -f conftest.file 8399b41ff1aSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8409b41ff1aSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8419b41ff1aSmrg 8429b41ff1aSmrg # If neither matched, then we have a broken ls. This can happen 8439b41ff1aSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8449b41ff1aSmrg # broken ls alias from the environment. This has actually 8459b41ff1aSmrg # happened. Such a system could not be considered "sane". 8469b41ff1aSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8479b41ff1aSmrgalias in your environment]) 8489b41ff1aSmrg fi 8499b41ff1aSmrg 8509b41ff1aSmrg test "$[2]" = conftest.file 8519b41ff1aSmrg ) 8529b41ff1aSmrgthen 8539b41ff1aSmrg # Ok. 8549b41ff1aSmrg : 8559b41ff1aSmrgelse 8569b41ff1aSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8579b41ff1aSmrgCheck your system clock]) 8589b41ff1aSmrgfi 8599b41ff1aSmrgAC_MSG_RESULT(yes)]) 8609b41ff1aSmrg 8619b41ff1aSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862fdb3d228Smrg# 8639b41ff1aSmrg# This file is free software; the Free Software Foundation 8649b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 8659b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 8669b41ff1aSmrg 8679b41ff1aSmrg# serial 1 8689b41ff1aSmrg 8699b41ff1aSmrg# AM_SILENT_RULES([DEFAULT]) 8709b41ff1aSmrg# -------------------------- 8719b41ff1aSmrg# Enable less verbose build rules; with the default set to DEFAULT 8729b41ff1aSmrg# (`yes' being less verbose, `no' or empty being verbose). 8739b41ff1aSmrgAC_DEFUN([AM_SILENT_RULES], 8749b41ff1aSmrg[AC_ARG_ENABLE([silent-rules], 8759b41ff1aSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8769b41ff1aSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8779b41ff1aSmrgcase $enable_silent_rules in 8789b41ff1aSmrgyes) AM_DEFAULT_VERBOSITY=0;; 8799b41ff1aSmrgno) AM_DEFAULT_VERBOSITY=1;; 8809b41ff1aSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8819b41ff1aSmrgesac 8829b41ff1aSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8839b41ff1aSmrgAM_BACKSLASH='\' 8849b41ff1aSmrgAC_SUBST([AM_BACKSLASH])dnl 8859b41ff1aSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8869b41ff1aSmrg]) 8879b41ff1aSmrg 8889b41ff1aSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889fdb3d228Smrg# 8909b41ff1aSmrg# This file is free software; the Free Software Foundation 8919b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 8929b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 893fdb3d228Smrg 8949b41ff1aSmrg# AM_PROG_INSTALL_STRIP 8959b41ff1aSmrg# --------------------- 8969b41ff1aSmrg# One issue with vendor `install' (even GNU) is that you can't 8979b41ff1aSmrg# specify the program used to strip binaries. This is especially 8989b41ff1aSmrg# annoying in cross-compiling environments, where the build's strip 8999b41ff1aSmrg# is unlikely to handle the host's binaries. 9009b41ff1aSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9019b41ff1aSmrg# always use install-sh in `make install-strip', and initialize 9029b41ff1aSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9039b41ff1aSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9049b41ff1aSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9059b41ff1aSmrg# Installed binaries are usually stripped using `strip' when the user 9069b41ff1aSmrg# run `make install-strip'. However `strip' might not be the right 9079b41ff1aSmrg# tool to use in cross-compilation environments, therefore Automake 9089b41ff1aSmrg# will honor the `STRIP' environment variable to overrule this program. 9099b41ff1aSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9109b41ff1aSmrgif test "$cross_compiling" != no; then 9119b41ff1aSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9129b41ff1aSmrgfi 9139b41ff1aSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9149b41ff1aSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915fdb3d228Smrg 9169b41ff1aSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9179b41ff1aSmrg# 9189b41ff1aSmrg# This file is free software; the Free Software Foundation 9199b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 9209b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 921fdb3d228Smrg 9229b41ff1aSmrg# serial 2 923fdb3d228Smrg 9249b41ff1aSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9259b41ff1aSmrg# --------------------------- 9269b41ff1aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9279b41ff1aSmrg# This macro is traced by Automake. 9289b41ff1aSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929fdb3d228Smrg 9309b41ff1aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9319b41ff1aSmrg# --------------------------- 9329b41ff1aSmrg# Public sister of _AM_SUBST_NOTMAKE. 9339b41ff1aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934fdb3d228Smrg 9359b41ff1aSmrg# Check how to create a tarball. -*- Autoconf -*- 936fdb3d228Smrg 9379b41ff1aSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9389b41ff1aSmrg# 9399b41ff1aSmrg# This file is free software; the Free Software Foundation 9409b41ff1aSmrg# gives unlimited permission to copy and/or distribute it, 9419b41ff1aSmrg# with or without modifications, as long as this notice is preserved. 942fdb3d228Smrg 9439b41ff1aSmrg# serial 2 944fdb3d228Smrg 9459b41ff1aSmrg# _AM_PROG_TAR(FORMAT) 9469b41ff1aSmrg# -------------------- 9479b41ff1aSmrg# Check how to create a tarball in format FORMAT. 9489b41ff1aSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9499b41ff1aSmrg# 9509b41ff1aSmrg# Substitute a variable $(am__tar) that is a command 9519b41ff1aSmrg# writing to stdout a FORMAT-tarball containing the directory 9529b41ff1aSmrg# $tardir. 9539b41ff1aSmrg# tardir=directory && $(am__tar) > result.tar 9549b41ff1aSmrg# 9559b41ff1aSmrg# Substitute a variable $(am__untar) that extract such 9569b41ff1aSmrg# a tarball read from stdin. 9579b41ff1aSmrg# $(am__untar) < result.tar 9589b41ff1aSmrgAC_DEFUN([_AM_PROG_TAR], 9599b41ff1aSmrg[# Always define AMTAR for backward compatibility. 9609b41ff1aSmrgAM_MISSING_PROG([AMTAR], [tar]) 9619b41ff1aSmrgm4_if([$1], [v7], 9629b41ff1aSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9639b41ff1aSmrg [m4_case([$1], [ustar],, [pax],, 9649b41ff1aSmrg [m4_fatal([Unknown tar format])]) 9659b41ff1aSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9669b41ff1aSmrg# Loop over all known methods to create a tar archive until one works. 9679b41ff1aSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9689b41ff1aSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9699b41ff1aSmrg# Do not fold the above two line into one, because Tru64 sh and 9709b41ff1aSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9719b41ff1aSmrgfor _am_tool in $_am_tools 9729b41ff1aSmrgdo 9739b41ff1aSmrg case $_am_tool in 9749b41ff1aSmrg gnutar) 9759b41ff1aSmrg for _am_tar in tar gnutar gtar; 9769b41ff1aSmrg do 9779b41ff1aSmrg AM_RUN_LOG([$_am_tar --version]) && break 9789b41ff1aSmrg done 9799b41ff1aSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9809b41ff1aSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9819b41ff1aSmrg am__untar="$_am_tar -xf -" 9829b41ff1aSmrg ;; 9839b41ff1aSmrg plaintar) 9849b41ff1aSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9859b41ff1aSmrg # ustar tarball either. 9869b41ff1aSmrg (tar --version) >/dev/null 2>&1 && continue 9879b41ff1aSmrg am__tar='tar chf - "$$tardir"' 9889b41ff1aSmrg am__tar_='tar chf - "$tardir"' 9899b41ff1aSmrg am__untar='tar xf -' 9909b41ff1aSmrg ;; 9919b41ff1aSmrg pax) 9929b41ff1aSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9939b41ff1aSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9949b41ff1aSmrg am__untar='pax -r' 9959b41ff1aSmrg ;; 9969b41ff1aSmrg cpio) 9979b41ff1aSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9989b41ff1aSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9999b41ff1aSmrg am__untar='cpio -i -H $1 -d' 10009b41ff1aSmrg ;; 10019b41ff1aSmrg none) 10029b41ff1aSmrg am__tar=false 10039b41ff1aSmrg am__tar_=false 10049b41ff1aSmrg am__untar=false 10059b41ff1aSmrg ;; 10069b41ff1aSmrg esac 1007fdb3d228Smrg 10089b41ff1aSmrg # If the value was cached, stop now. We just wanted to have am__tar 10099b41ff1aSmrg # and am__untar set. 10109b41ff1aSmrg test -n "${am_cv_prog_tar_$1}" && break 10119b41ff1aSmrg 10129b41ff1aSmrg # tar/untar a dummy directory, and stop if the command works 10139b41ff1aSmrg rm -rf conftest.dir 10149b41ff1aSmrg mkdir conftest.dir 10159b41ff1aSmrg echo GrepMe > conftest.dir/file 10169b41ff1aSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10179b41ff1aSmrg rm -rf conftest.dir 10189b41ff1aSmrg if test -s conftest.tar; then 10199b41ff1aSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10209b41ff1aSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10219b41ff1aSmrg fi 10229b41ff1aSmrgdone 10239b41ff1aSmrgrm -rf conftest.dir 1024fdb3d228Smrg 10259b41ff1aSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10269b41ff1aSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10279b41ff1aSmrgAC_SUBST([am__tar]) 10289b41ff1aSmrgAC_SUBST([am__untar]) 10299b41ff1aSmrg]) # _AM_PROG_TAR 10309b41ff1aSmrg 10319b41ff1aSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032fdb3d228Smrgdnl 10339b41ff1aSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034fdb3d228Smrgdnl 10359b41ff1aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036f5effb2eSmrgdnl copy of this software and associated documentation files (the "Software"), 1037f5effb2eSmrgdnl to deal in the Software without restriction, including without limitation 1038f5effb2eSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039f5effb2eSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040f5effb2eSmrgdnl Software is furnished to do so, subject to the following conditions: 10419b41ff1aSmrgdnl 1042f5effb2eSmrgdnl The above copyright notice and this permission notice (including the next 1043f5effb2eSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1044f5effb2eSmrgdnl Software. 10459b41ff1aSmrgdnl 1046f5effb2eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047f5effb2eSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048f5effb2eSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049f5effb2eSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050f5effb2eSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051f5effb2eSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052f5effb2eSmrgdnl DEALINGS IN THE SOFTWARE. 10539b41ff1aSmrg 10549b41ff1aSmrg# XORG_MACROS_VERSION(required-version) 10559b41ff1aSmrg# ------------------------------------- 10569b41ff1aSmrg# Minimum version: 1.1.0 10579b41ff1aSmrg# 10589b41ff1aSmrg# If you're using a macro added in Version 1.1 or newer, include this in 10599b41ff1aSmrg# your configure.ac with the minimum required version, such as: 10609b41ff1aSmrg# XORG_MACROS_VERSION(1.1) 10619b41ff1aSmrg# 10629b41ff1aSmrg# To ensure that this macro is defined, also add: 10639b41ff1aSmrg# m4_ifndef([XORG_MACROS_VERSION], 10649b41ff1aSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10659b41ff1aSmrg# 10669b41ff1aSmrg# 10679b41ff1aSmrg# See the "minimum version" comment for each macro you use to see what 10689b41ff1aSmrg# version you require. 10699b41ff1aSmrgm4_defun([XORG_MACROS_VERSION],[ 1070f5effb2eSmrgm4_define([vers_have], [1.7.0]) 10719b41ff1aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 10729b41ff1aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 10739b41ff1aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 10749b41ff1aSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 10759b41ff1aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 10769b41ff1aSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 10779b41ff1aSmrgm4_undefine([vers_have]) 10789b41ff1aSmrgm4_undefine([maj_have]) 10799b41ff1aSmrgm4_undefine([maj_needed]) 10809b41ff1aSmrg]) # XORG_MACROS_VERSION 1081fdb3d228Smrg 1082fdb3d228Smrg# XORG_PROG_RAWCPP() 1083fdb3d228Smrg# ------------------ 10849b41ff1aSmrg# Minimum version: 1.0.0 10859b41ff1aSmrg# 1086fdb3d228Smrg# Find cpp program and necessary flags for use in pre-processing text files 1087fdb3d228Smrg# such as man pages and config files 1088fdb3d228SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1089fdb3d228SmrgAC_REQUIRE([AC_PROG_CPP]) 1090fdb3d228SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091fdb3d228Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092fdb3d228Smrg 1093fdb3d228Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094fdb3d228Smrg# which is not the best choice for supporting other OS'es, but covers most 1095fdb3d228Smrg# of the ones we need for now. 1096fdb3d228SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097fdb3d228SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098fdb3d228Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099fdb3d228Smrg AC_MSG_RESULT([no]) 1100fdb3d228Smrgelse 1101fdb3d228Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102fdb3d228Smrg RAWCPPFLAGS=-undef 1103fdb3d228Smrg AC_MSG_RESULT([yes]) 11049b41ff1aSmrg # under Cygwin unix is still defined even with -undef 11059b41ff1aSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11069b41ff1aSmrg RAWCPPFLAGS="-undef -ansi" 11079b41ff1aSmrg AC_MSG_RESULT([yes, with -ansi]) 1108fdb3d228Smrg else 1109fdb3d228Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110fdb3d228Smrg fi 1111fdb3d228Smrgfi 1112fdb3d228Smrgrm -f conftest.$ac_ext 1113fdb3d228Smrg 1114fdb3d228SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115fdb3d228SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116fdb3d228Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117fdb3d228Smrg AC_MSG_RESULT([no]) 1118fdb3d228Smrgelse 1119fdb3d228Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120fdb3d228Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121fdb3d228Smrg AC_MSG_RESULT([yes]) 1122fdb3d228Smrg else 1123fdb3d228Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124fdb3d228Smrg fi 1125fdb3d228Smrgfi 1126fdb3d228Smrgrm -f conftest.$ac_ext 1127fdb3d228SmrgAC_SUBST(RAWCPPFLAGS) 1128fdb3d228Smrg]) # XORG_PROG_RAWCPP 1129fdb3d228Smrg 1130fdb3d228Smrg# XORG_MANPAGE_SECTIONS() 1131fdb3d228Smrg# ----------------------- 11329b41ff1aSmrg# Minimum version: 1.0.0 11339b41ff1aSmrg# 1134fdb3d228Smrg# Determine which sections man pages go in for the different man page types 1135fdb3d228Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136fdb3d228Smrg# Not sure if there's any better way than just hardcoding by OS name. 1137fdb3d228Smrg# Override default settings by setting environment variables 1138f5effb2eSmrg# Added MAN_SUBSTS in version 1.8 1139fdb3d228Smrg 1140fdb3d228SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1141fdb3d228SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1142fdb3d228Smrg 1143fdb3d228Smrgif test x$APP_MAN_SUFFIX = x ; then 11449b41ff1aSmrg APP_MAN_SUFFIX=1 1145fdb3d228Smrgfi 1146fdb3d228Smrgif test x$APP_MAN_DIR = x ; then 11479b41ff1aSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1148fdb3d228Smrgfi 1149fdb3d228Smrg 1150fdb3d228Smrgif test x$LIB_MAN_SUFFIX = x ; then 11519b41ff1aSmrg LIB_MAN_SUFFIX=3 1152fdb3d228Smrgfi 1153fdb3d228Smrgif test x$LIB_MAN_DIR = x ; then 11549b41ff1aSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1155fdb3d228Smrgfi 1156fdb3d228Smrg 1157fdb3d228Smrgif test x$FILE_MAN_SUFFIX = x ; then 1158fdb3d228Smrg case $host_os in 1159fdb3d228Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1160fdb3d228Smrg *) FILE_MAN_SUFFIX=5 ;; 1161fdb3d228Smrg esac 1162fdb3d228Smrgfi 1163fdb3d228Smrgif test x$FILE_MAN_DIR = x ; then 11649b41ff1aSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1165fdb3d228Smrgfi 1166fdb3d228Smrg 1167fdb3d228Smrgif test x$MISC_MAN_SUFFIX = x ; then 1168fdb3d228Smrg case $host_os in 1169fdb3d228Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1170fdb3d228Smrg *) MISC_MAN_SUFFIX=7 ;; 1171fdb3d228Smrg esac 1172fdb3d228Smrgfi 1173fdb3d228Smrgif test x$MISC_MAN_DIR = x ; then 11749b41ff1aSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1175fdb3d228Smrgfi 1176fdb3d228Smrg 1177fdb3d228Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1178fdb3d228Smrg case $host_os in 1179fdb3d228Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1180fdb3d228Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1181fdb3d228Smrg esac 1182fdb3d228Smrgfi 1183fdb3d228Smrgif test x$DRIVER_MAN_DIR = x ; then 11849b41ff1aSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1185fdb3d228Smrgfi 1186fdb3d228Smrg 1187fdb3d228Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1188fdb3d228Smrg case $host_os in 1189fdb3d228Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1190fdb3d228Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1191fdb3d228Smrg esac 1192fdb3d228Smrgfi 1193fdb3d228Smrgif test x$ADMIN_MAN_DIR = x ; then 1194fdb3d228Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1195fdb3d228Smrgfi 1196fdb3d228Smrg 1197fdb3d228Smrg 1198fdb3d228SmrgAC_SUBST([APP_MAN_SUFFIX]) 1199fdb3d228SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1200fdb3d228SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1201fdb3d228SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1202fdb3d228SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1203fdb3d228SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1204fdb3d228SmrgAC_SUBST([APP_MAN_DIR]) 1205fdb3d228SmrgAC_SUBST([LIB_MAN_DIR]) 1206fdb3d228SmrgAC_SUBST([FILE_MAN_DIR]) 1207fdb3d228SmrgAC_SUBST([MISC_MAN_DIR]) 1208fdb3d228SmrgAC_SUBST([DRIVER_MAN_DIR]) 1209fdb3d228SmrgAC_SUBST([ADMIN_MAN_DIR]) 1210f5effb2eSmrg 1211f5effb2eSmrgXORG_MAN_PAGE="X Version 11" 1212f5effb2eSmrgAC_SUBST([XORG_MAN_PAGE]) 1213f5effb2eSmrgMAN_SUBSTS="\ 1214f5effb2eSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1215f5effb2eSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1216f5effb2eSmrg -e 's|__xservername__|Xorg|g' \ 1217f5effb2eSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1218f5effb2eSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1219f5effb2eSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1220f5effb2eSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1221f5effb2eSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1222f5effb2eSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1223f5effb2eSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1224f5effb2eSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1225f5effb2eSmrgAC_SUBST([MAN_SUBSTS]) 1226f5effb2eSmrg 1227fdb3d228Smrg]) # XORG_MANPAGE_SECTIONS 1228fdb3d228Smrg 1229f5effb2eSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1230f5effb2eSmrg# ------------------------ 1231f5effb2eSmrg# Minimum version: 1.7.0 1232f5effb2eSmrg# 1233f5effb2eSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1234f5effb2eSmrg# provided by xorg-sgml-doctools, if installed. 1235f5effb2eSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1236f5effb2eSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1237f5effb2eSmrgXORG_SGML_PATH= 1238f5effb2eSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1239f5effb2eSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1240f5effb2eSmrg [m4_ifval([$1],[:], 1241f5effb2eSmrg [if test x"$cross_compiling" != x"yes" ; then 1242f5effb2eSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1243f5effb2eSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1244f5effb2eSmrg fi]) 1245f5effb2eSmrg ]) 1246f5effb2eSmrg 1247f5effb2eSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1248f5effb2eSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1249f5effb2eSmrgelse 1250f5effb2eSmrg AC_MSG_RESULT([no]) 1251f5effb2eSmrgfi 1252f5effb2eSmrg 1253f5effb2eSmrgAC_SUBST(XORG_SGML_PATH) 1254f5effb2eSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1255f5effb2eSmrg 1256fdb3d228Smrg# XORG_CHECK_LINUXDOC 1257fdb3d228Smrg# ------------------- 12589b41ff1aSmrg# Minimum version: 1.0.0 12599b41ff1aSmrg# 1260fdb3d228Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1261fdb3d228Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1262fdb3d228Smrg# Whether or not the necessary tools and files are found can be checked 1263fdb3d228Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1264fdb3d228SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1265f5effb2eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1266f5effb2eSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1267fdb3d228Smrg 1268fdb3d228SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1269fdb3d228Smrg 1270f5effb2eSmrgAC_MSG_CHECKING([whether to build documentation]) 1271fdb3d228Smrg 1272f5effb2eSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1273fdb3d228Smrg BUILDDOC=yes 1274fdb3d228Smrgelse 1275fdb3d228Smrg BUILDDOC=no 1276fdb3d228Smrgfi 1277fdb3d228Smrg 1278fdb3d228SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1279fdb3d228Smrg 1280fdb3d228SmrgAC_MSG_RESULT([$BUILDDOC]) 1281fdb3d228Smrg 1282f5effb2eSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1283fdb3d228Smrg 1284f5effb2eSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1285fdb3d228Smrg BUILDPDFDOC=yes 1286fdb3d228Smrgelse 1287fdb3d228Smrg BUILDPDFDOC=no 1288fdb3d228Smrgfi 1289fdb3d228Smrg 1290fdb3d228SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1291fdb3d228Smrg 1292fdb3d228SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1293fdb3d228Smrg 1294f5effb2eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 12959b41ff1aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1296fdb3d228SmrgMAKE_PDF="$PS2PDF" 12979b41ff1aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1298fdb3d228Smrg 1299fdb3d228SmrgAC_SUBST(MAKE_TEXT) 1300fdb3d228SmrgAC_SUBST(MAKE_PS) 1301fdb3d228SmrgAC_SUBST(MAKE_PDF) 1302fdb3d228SmrgAC_SUBST(MAKE_HTML) 1303fdb3d228Smrg]) # XORG_CHECK_LINUXDOC 1304fdb3d228Smrg 13059b41ff1aSmrg# XORG_CHECK_DOCBOOK 13069b41ff1aSmrg# ------------------- 13079b41ff1aSmrg# Minimum version: 1.0.0 13089b41ff1aSmrg# 13099b41ff1aSmrg# Checks for the ability to build output formats from SGML DocBook source. 13109b41ff1aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 13119b41ff1aSmrg# indicates whether the necessary tools and files are found and, if set, 13129b41ff1aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 13139b41ff1aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1314f5effb2eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1315f5effb2eSmrg 13169b41ff1aSmrgBUILDTXTDOC=no 13179b41ff1aSmrgBUILDPDFDOC=no 13189b41ff1aSmrgBUILDPSDOC=no 13199b41ff1aSmrgBUILDHTMLDOC=no 13209b41ff1aSmrg 13219b41ff1aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 13229b41ff1aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 13239b41ff1aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 13249b41ff1aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 13259b41ff1aSmrg 1326f5effb2eSmrgAC_MSG_CHECKING([whether to build text documentation]) 1327f5effb2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 13289b41ff1aSmrg test x$BUILD_TXTDOC != xno; then 13299b41ff1aSmrg BUILDTXTDOC=yes 13309b41ff1aSmrgfi 13319b41ff1aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13329b41ff1aSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13339b41ff1aSmrg 1334f5effb2eSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1335f5effb2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 13369b41ff1aSmrg test x$BUILD_PDFDOC != xno; then 13379b41ff1aSmrg BUILDPDFDOC=yes 13389b41ff1aSmrgfi 13399b41ff1aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13409b41ff1aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13419b41ff1aSmrg 1342f5effb2eSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1343f5effb2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 13449b41ff1aSmrg test x$BUILD_PSDOC != xno; then 13459b41ff1aSmrg BUILDPSDOC=yes 13469b41ff1aSmrgfi 13479b41ff1aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13489b41ff1aSmrgAC_MSG_RESULT([$BUILDPSDOC]) 13499b41ff1aSmrg 1350f5effb2eSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1351f5effb2eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 13529b41ff1aSmrg test x$BUILD_HTMLDOC != xno; then 13539b41ff1aSmrg BUILDHTMLDOC=yes 13549b41ff1aSmrgfi 13559b41ff1aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13569b41ff1aSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13579b41ff1aSmrg 13589b41ff1aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13599b41ff1aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13609b41ff1aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13619b41ff1aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13629b41ff1aSmrg 13639b41ff1aSmrgAC_SUBST(MAKE_TEXT) 13649b41ff1aSmrgAC_SUBST(MAKE_PS) 13659b41ff1aSmrgAC_SUBST(MAKE_PDF) 13669b41ff1aSmrgAC_SUBST(MAKE_HTML) 13679b41ff1aSmrg]) # XORG_CHECK_DOCBOOK 13689b41ff1aSmrg 1369f5effb2eSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 1370f5effb2eSmrg# ---------------- 1371f5effb2eSmrg# Minimum version: 1.5.0 1372f5effb2eSmrg# 1373f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1374f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1375f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1376f5effb2eSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1377f5effb2eSmrg# as whether or not to use the xmlto package. 1378f5effb2eSmrg# 1379f5effb2eSmrg# Interface to module: 1380f5effb2eSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1381f5effb2eSmrg# XMLTO: returns the path of the xmlto program found 1382f5effb2eSmrg# returns the path set by the user in the environment 1383f5effb2eSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1384f5effb2eSmrg# 'no' user instructs the module not to use xmlto 1385f5effb2eSmrg# 1386f5effb2eSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1387f5effb2eSmrg# 1388f5effb2eSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1389f5effb2eSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1390f5effb2eSmrgAC_ARG_WITH(xmlto, 1391f5effb2eSmrg AS_HELP_STRING([--with-xmlto], 1392f5effb2eSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1393f5effb2eSmrg [use_xmlto=$withval], [use_xmlto=auto]) 1394f5effb2eSmrg 1395f5effb2eSmrgif test "x$use_xmlto" = x"auto"; then 1396f5effb2eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1397f5effb2eSmrg if test "x$XMLTO" = "x"; then 1398f5effb2eSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1399f5effb2eSmrg have_xmlto=no 1400f5effb2eSmrg else 1401f5effb2eSmrg have_xmlto=yes 1402f5effb2eSmrg fi 1403f5effb2eSmrgelif test "x$use_xmlto" = x"yes" ; then 1404f5effb2eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1405f5effb2eSmrg if test "x$XMLTO" = "x"; then 1406f5effb2eSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1407f5effb2eSmrg fi 1408f5effb2eSmrg have_xmlto=yes 1409f5effb2eSmrgelif test "x$use_xmlto" = x"no" ; then 1410f5effb2eSmrg if test "x$XMLTO" != "x"; then 1411f5effb2eSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1412f5effb2eSmrg fi 1413f5effb2eSmrg have_xmlto=no 1414f5effb2eSmrgelse 1415f5effb2eSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1416f5effb2eSmrgfi 1417f5effb2eSmrgm4_ifval([$1], 1418f5effb2eSmrg[if test "$have_xmlto" = yes; then 1419f5effb2eSmrg # scrape the xmlto version 1420f5effb2eSmrg AC_MSG_CHECKING([the xmlto version]) 1421f5effb2eSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1422f5effb2eSmrg AC_MSG_RESULT([$xmlto_version]) 1423f5effb2eSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1424f5effb2eSmrg [if test "x$use_xmlto" = xauto; then 1425f5effb2eSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1426f5effb2eSmrg have_xmlto=no 1427f5effb2eSmrg else 1428f5effb2eSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1429f5effb2eSmrg fi]) 1430f5effb2eSmrgfi]) 1431f5effb2eSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1432f5effb2eSmrg]) # XORG_WITH_XMLTO 1433f5effb2eSmrg 1434f5effb2eSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1435f5effb2eSmrg# ---------------- 1436f5effb2eSmrg# Minimum version: 1.5.0 1437f5effb2eSmrg# 1438f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1439f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1440f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1441f5effb2eSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1442f5effb2eSmrg# as whether or not to use the asciidoc package. 1443f5effb2eSmrg# 1444f5effb2eSmrg# Interface to module: 1445f5effb2eSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1446f5effb2eSmrg# ASCIIDOC: returns the path of the asciidoc program found 1447f5effb2eSmrg# returns the path set by the user in the environment 1448f5effb2eSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1449f5effb2eSmrg# 'no' user instructs the module not to use asciidoc 1450f5effb2eSmrg# 1451f5effb2eSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1452f5effb2eSmrg# 1453f5effb2eSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1454f5effb2eSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1455f5effb2eSmrgAC_ARG_WITH(asciidoc, 1456f5effb2eSmrg AS_HELP_STRING([--with-asciidoc], 1457f5effb2eSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1458f5effb2eSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1459f5effb2eSmrg 1460f5effb2eSmrgif test "x$use_asciidoc" = x"auto"; then 1461f5effb2eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1462f5effb2eSmrg if test "x$ASCIIDOC" = "x"; then 1463f5effb2eSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1464f5effb2eSmrg have_asciidoc=no 1465f5effb2eSmrg else 1466f5effb2eSmrg have_asciidoc=yes 1467f5effb2eSmrg fi 1468f5effb2eSmrgelif test "x$use_asciidoc" = x"yes" ; then 1469f5effb2eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1470f5effb2eSmrg if test "x$ASCIIDOC" = "x"; then 1471f5effb2eSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1472f5effb2eSmrg fi 1473f5effb2eSmrg have_asciidoc=yes 1474f5effb2eSmrgelif test "x$use_asciidoc" = x"no" ; then 1475f5effb2eSmrg if test "x$ASCIIDOC" != "x"; then 1476f5effb2eSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1477f5effb2eSmrg fi 1478f5effb2eSmrg have_asciidoc=no 1479f5effb2eSmrgelse 1480f5effb2eSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1481f5effb2eSmrgfi 1482f5effb2eSmrgm4_ifval([$1], 1483f5effb2eSmrg[if test "$have_asciidoc" = yes; then 1484f5effb2eSmrg # scrape the asciidoc version 1485f5effb2eSmrg AC_MSG_CHECKING([the asciidoc version]) 1486f5effb2eSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1487f5effb2eSmrg AC_MSG_RESULT([$asciidoc_version]) 1488f5effb2eSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1489f5effb2eSmrg [if test "x$use_asciidoc" = xauto; then 1490f5effb2eSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1491f5effb2eSmrg have_asciidoc=no 1492f5effb2eSmrg else 1493f5effb2eSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1494f5effb2eSmrg fi]) 1495f5effb2eSmrgfi]) 1496f5effb2eSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1497f5effb2eSmrg]) # XORG_WITH_ASCIIDOC 1498f5effb2eSmrg 1499f5effb2eSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1500f5effb2eSmrg# -------------------------------- 1501f5effb2eSmrg# Minimum version: 1.5.0 1502f5effb2eSmrg# 1503f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1504f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1505f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1506f5effb2eSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1507f5effb2eSmrg# as whether or not to use the doxygen package. 1508f5effb2eSmrg# 1509f5effb2eSmrg# Interface to module: 1510f5effb2eSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1511f5effb2eSmrg# DOXYGEN: returns the path of the doxygen program found 1512f5effb2eSmrg# returns the path set by the user in the environment 1513f5effb2eSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1514f5effb2eSmrg# 'no' user instructs the module not to use doxygen 1515f5effb2eSmrg# 1516f5effb2eSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1517f5effb2eSmrg# 1518f5effb2eSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1519f5effb2eSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1520f5effb2eSmrgAC_ARG_WITH(doxygen, 1521f5effb2eSmrg AS_HELP_STRING([--with-doxygen], 1522f5effb2eSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1523f5effb2eSmrg [use_doxygen=$withval], [use_doxygen=auto]) 1524f5effb2eSmrg 1525f5effb2eSmrgif test "x$use_doxygen" = x"auto"; then 1526f5effb2eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1527f5effb2eSmrg if test "x$DOXYGEN" = "x"; then 1528f5effb2eSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1529f5effb2eSmrg have_doxygen=no 1530f5effb2eSmrg else 1531f5effb2eSmrg have_doxygen=yes 1532f5effb2eSmrg fi 1533f5effb2eSmrgelif test "x$use_doxygen" = x"yes" ; then 1534f5effb2eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1535f5effb2eSmrg if test "x$DOXYGEN" = "x"; then 1536f5effb2eSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1537f5effb2eSmrg fi 1538f5effb2eSmrg have_doxygen=yes 1539f5effb2eSmrgelif test "x$use_doxygen" = x"no" ; then 1540f5effb2eSmrg if test "x$DOXYGEN" != "x"; then 1541f5effb2eSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1542f5effb2eSmrg fi 1543f5effb2eSmrg have_doxygen=no 1544f5effb2eSmrgelse 1545f5effb2eSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1546f5effb2eSmrgfi 1547f5effb2eSmrgm4_ifval([$1], 1548f5effb2eSmrg[if test "$have_doxygen" = yes; then 1549f5effb2eSmrg # scrape the doxygen version 1550f5effb2eSmrg AC_MSG_CHECKING([the doxygen version]) 1551f5effb2eSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1552f5effb2eSmrg AC_MSG_RESULT([$doxygen_version]) 1553f5effb2eSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1554f5effb2eSmrg [if test "x$use_doxygen" = xauto; then 1555f5effb2eSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1556f5effb2eSmrg have_doxygen=no 1557f5effb2eSmrg else 1558f5effb2eSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1559f5effb2eSmrg fi]) 1560f5effb2eSmrgfi]) 1561f5effb2eSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1562f5effb2eSmrg]) # XORG_WITH_DOXYGEN 1563f5effb2eSmrg 1564f5effb2eSmrg# XORG_WITH_GROFF 1565f5effb2eSmrg# ---------------- 1566f5effb2eSmrg# Minimum version: 1.6.0 1567f5effb2eSmrg# 1568f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1569f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1570f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1571f5effb2eSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1572f5effb2eSmrg# as whether or not to use the groff package. 1573f5effb2eSmrg# 1574f5effb2eSmrg# Interface to module: 1575f5effb2eSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1576f5effb2eSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1577f5effb2eSmrg# HAVE_GROFF_MS: the -ms macros package 1578f5effb2eSmrg# GROFF: returns the path of the groff program found 1579f5effb2eSmrg# returns the path set by the user in the environment 1580f5effb2eSmrg# --with-groff: 'yes' user instructs the module to use groff 1581f5effb2eSmrg# 'no' user instructs the module not to use groff 1582f5effb2eSmrg# 1583f5effb2eSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1584f5effb2eSmrg# 1585f5effb2eSmrg# OS and distros often splits groff in a basic and full package, the former 1586f5effb2eSmrg# having the groff program and the later having devices, fonts and macros 1587f5effb2eSmrg# Checking for the groff executable is not enough. 1588f5effb2eSmrg# 1589f5effb2eSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1590f5effb2eSmrg# unset HAVE_GROFF or GROFF env variables. 1591f5effb2eSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1592f5effb2eSmrg# 1593f5effb2eSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1594f5effb2eSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1595f5effb2eSmrgAC_ARG_WITH(groff, 1596f5effb2eSmrg AS_HELP_STRING([--with-groff], 1597f5effb2eSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 1598f5effb2eSmrg [use_groff=$withval], [use_groff=auto]) 1599f5effb2eSmrg 1600f5effb2eSmrgif test "x$use_groff" = x"auto"; then 1601f5effb2eSmrg AC_PATH_PROG([GROFF], [groff]) 1602f5effb2eSmrg if test "x$GROFF" = "x"; then 1603f5effb2eSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1604f5effb2eSmrg have_groff=no 1605f5effb2eSmrg else 1606f5effb2eSmrg have_groff=yes 1607f5effb2eSmrg fi 1608f5effb2eSmrgelif test "x$use_groff" = x"yes" ; then 1609f5effb2eSmrg AC_PATH_PROG([GROFF], [groff]) 1610f5effb2eSmrg if test "x$GROFF" = "x"; then 1611f5effb2eSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1612f5effb2eSmrg fi 1613f5effb2eSmrg have_groff=yes 1614f5effb2eSmrgelif test "x$use_groff" = x"no" ; then 1615f5effb2eSmrg if test "x$GROFF" != "x"; then 1616f5effb2eSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1617f5effb2eSmrg fi 1618f5effb2eSmrg have_groff=no 1619f5effb2eSmrgelse 1620f5effb2eSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1621f5effb2eSmrgfi 1622f5effb2eSmrg# We have groff, test for the presence of the macro packages 1623f5effb2eSmrgif test "x$have_groff" = x"yes"; then 1624f5effb2eSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1625f5effb2eSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1626f5effb2eSmrg groff_ms_works=yes 1627f5effb2eSmrg else 1628f5effb2eSmrg groff_ms_works=no 1629f5effb2eSmrg fi 1630f5effb2eSmrg AC_MSG_RESULT([$groff_ms_works]) 1631f5effb2eSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1632f5effb2eSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1633f5effb2eSmrg groff_mm_works=yes 1634f5effb2eSmrg else 1635f5effb2eSmrg groff_mm_works=no 1636f5effb2eSmrg fi 1637f5effb2eSmrg AC_MSG_RESULT([$groff_mm_works]) 1638f5effb2eSmrgfi 1639f5effb2eSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1640f5effb2eSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1641f5effb2eSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1642f5effb2eSmrg]) # XORG_WITH_GROFF 1643f5effb2eSmrg 1644f5effb2eSmrg# XORG_WITH_FOP 1645f5effb2eSmrg# ---------------- 1646f5effb2eSmrg# Minimum version: 1.6.0 1647f5effb2eSmrg# 1648f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1649f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1650f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1651f5effb2eSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1652f5effb2eSmrg# as whether or not to use the fop package. 1653f5effb2eSmrg# 1654f5effb2eSmrg# Interface to module: 1655f5effb2eSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1656f5effb2eSmrg# FOP: returns the path of the fop program found 1657f5effb2eSmrg# returns the path set by the user in the environment 1658f5effb2eSmrg# --with-fop: 'yes' user instructs the module to use fop 1659f5effb2eSmrg# 'no' user instructs the module not to use fop 1660f5effb2eSmrg# 1661f5effb2eSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1662f5effb2eSmrg# 1663f5effb2eSmrgAC_DEFUN([XORG_WITH_FOP],[ 1664f5effb2eSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1665f5effb2eSmrgAC_ARG_WITH(fop, 1666f5effb2eSmrg AS_HELP_STRING([--with-fop], 1667f5effb2eSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 1668f5effb2eSmrg [use_fop=$withval], [use_fop=auto]) 1669f5effb2eSmrg 1670f5effb2eSmrgif test "x$use_fop" = x"auto"; then 1671f5effb2eSmrg AC_PATH_PROG([FOP], [fop]) 1672f5effb2eSmrg if test "x$FOP" = "x"; then 1673f5effb2eSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1674f5effb2eSmrg have_fop=no 1675f5effb2eSmrg else 1676f5effb2eSmrg have_fop=yes 1677f5effb2eSmrg fi 1678f5effb2eSmrgelif test "x$use_fop" = x"yes" ; then 1679f5effb2eSmrg AC_PATH_PROG([FOP], [fop]) 1680f5effb2eSmrg if test "x$FOP" = "x"; then 1681f5effb2eSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1682f5effb2eSmrg fi 1683f5effb2eSmrg have_fop=yes 1684f5effb2eSmrgelif test "x$use_fop" = x"no" ; then 1685f5effb2eSmrg if test "x$FOP" != "x"; then 1686f5effb2eSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1687f5effb2eSmrg fi 1688f5effb2eSmrg have_fop=no 1689f5effb2eSmrgelse 1690f5effb2eSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1691f5effb2eSmrgfi 1692f5effb2eSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1693f5effb2eSmrg]) # XORG_WITH_FOP 1694f5effb2eSmrg 1695f5effb2eSmrg# XORG_WITH_PS2PDF 1696f5effb2eSmrg# ---------------- 1697f5effb2eSmrg# Minimum version: 1.6.0 1698f5effb2eSmrg# 1699f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1700f5effb2eSmrg# not at the appropriate level. This macro enables a module to test for the 1701f5effb2eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1702f5effb2eSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1703f5effb2eSmrg# as whether or not to use the ps2pdf package. 1704f5effb2eSmrg# 1705f5effb2eSmrg# Interface to module: 1706f5effb2eSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1707f5effb2eSmrg# PS2PDF: returns the path of the ps2pdf program found 1708f5effb2eSmrg# returns the path set by the user in the environment 1709f5effb2eSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1710f5effb2eSmrg# 'no' user instructs the module not to use ps2pdf 1711f5effb2eSmrg# 1712f5effb2eSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1713f5effb2eSmrg# 1714f5effb2eSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1715f5effb2eSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1716f5effb2eSmrgAC_ARG_WITH(ps2pdf, 1717f5effb2eSmrg AS_HELP_STRING([--with-ps2pdf], 1718f5effb2eSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1719f5effb2eSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1720f5effb2eSmrg 1721f5effb2eSmrgif test "x$use_ps2pdf" = x"auto"; then 1722f5effb2eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1723f5effb2eSmrg if test "x$PS2PDF" = "x"; then 1724f5effb2eSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1725f5effb2eSmrg have_ps2pdf=no 1726f5effb2eSmrg else 1727f5effb2eSmrg have_ps2pdf=yes 1728f5effb2eSmrg fi 1729f5effb2eSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1730f5effb2eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1731f5effb2eSmrg if test "x$PS2PDF" = "x"; then 1732f5effb2eSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1733f5effb2eSmrg fi 1734f5effb2eSmrg have_ps2pdf=yes 1735f5effb2eSmrgelif test "x$use_ps2pdf" = x"no" ; then 1736f5effb2eSmrg if test "x$PS2PDF" != "x"; then 1737f5effb2eSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1738f5effb2eSmrg fi 1739f5effb2eSmrg have_ps2pdf=no 1740f5effb2eSmrgelse 1741f5effb2eSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1742f5effb2eSmrgfi 1743f5effb2eSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1744f5effb2eSmrg]) # XORG_WITH_PS2PDF 1745f5effb2eSmrg 1746f5effb2eSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1747f5effb2eSmrg# ---------------- 1748f5effb2eSmrg# Minimum version: 1.6.0 1749f5effb2eSmrg# 1750f5effb2eSmrg# Documentation tools are not always available on all platforms and sometimes 1751f5effb2eSmrg# not at the appropriate level. This macro enables a builder to skip all 1752f5effb2eSmrg# documentation targets except traditional man pages. 1753f5effb2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1754f5effb2eSmrg# maximum flexibilty in controlling documentation building. 1755f5effb2eSmrg# Refer to: 1756f5effb2eSmrg# XORG_WITH_XMLTO --with-xmlto 1757f5effb2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1758f5effb2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 1759f5effb2eSmrg# XORG_WITH_FOP --with-fop 1760f5effb2eSmrg# XORG_WITH_GROFF --with-groff 1761f5effb2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1762f5effb2eSmrg# 1763f5effb2eSmrg# Interface to module: 1764f5effb2eSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1765f5effb2eSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1766f5effb2eSmrg# 'no' user instructs the module not to generate docs 1767f5effb2eSmrg# parm1: specify the default value, yes or no. 1768f5effb2eSmrg# 1769f5effb2eSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1770f5effb2eSmrgdefault=$1 1771f5effb2eSmrgif test "x$default" = x ; then 1772f5effb2eSmrg default="yes" 1773f5effb2eSmrgfi 1774f5effb2eSmrgAC_ARG_ENABLE(docs, 1775f5effb2eSmrg AS_HELP_STRING([--enable-docs], 1776f5effb2eSmrg [Enable building the documentation (default: yes)]), 1777f5effb2eSmrg [build_docs=$enableval], [build_docs=$default]) 1778f5effb2eSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1779f5effb2eSmrgAC_MSG_CHECKING([whether to build documentation]) 1780f5effb2eSmrgAC_MSG_RESULT([$build_docs]) 1781f5effb2eSmrg]) # XORG_ENABLE_DOCS 1782f5effb2eSmrg 1783f5effb2eSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1784f5effb2eSmrg# ---------------- 1785f5effb2eSmrg# Minimum version: 1.6.0 1786f5effb2eSmrg# 1787f5effb2eSmrg# This macro enables a builder to skip all developer documentation. 1788f5effb2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1789f5effb2eSmrg# maximum flexibilty in controlling documentation building. 1790f5effb2eSmrg# Refer to: 1791f5effb2eSmrg# XORG_WITH_XMLTO --with-xmlto 1792f5effb2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1793f5effb2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 1794f5effb2eSmrg# XORG_WITH_FOP --with-fop 1795f5effb2eSmrg# XORG_WITH_GROFF --with-groff 1796f5effb2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1797f5effb2eSmrg# 1798f5effb2eSmrg# Interface to module: 1799f5effb2eSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1800f5effb2eSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1801f5effb2eSmrg# 'no' user instructs the module not to generate developer docs 1802f5effb2eSmrg# parm1: specify the default value, yes or no. 1803f5effb2eSmrg# 1804f5effb2eSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1805f5effb2eSmrgdevel_default=$1 1806f5effb2eSmrgif test "x$devel_default" = x ; then 1807f5effb2eSmrg devel_default="yes" 1808f5effb2eSmrgfi 1809f5effb2eSmrgAC_ARG_ENABLE(devel-docs, 1810f5effb2eSmrg AS_HELP_STRING([--enable-devel-docs], 1811f5effb2eSmrg [Enable building the developer documentation (default: yes)]), 1812f5effb2eSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1813f5effb2eSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1814f5effb2eSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1815f5effb2eSmrgAC_MSG_RESULT([$build_devel_docs]) 1816f5effb2eSmrg]) # XORG_ENABLE_DEVEL_DOCS 1817f5effb2eSmrg 1818f5effb2eSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1819f5effb2eSmrg# ---------------- 1820f5effb2eSmrg# Minimum version: 1.6.0 1821f5effb2eSmrg# 1822f5effb2eSmrg# This macro enables a builder to skip all functional specification targets. 1823f5effb2eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1824f5effb2eSmrg# maximum flexibilty in controlling documentation building. 1825f5effb2eSmrg# Refer to: 1826f5effb2eSmrg# XORG_WITH_XMLTO --with-xmlto 1827f5effb2eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1828f5effb2eSmrg# XORG_WITH_DOXYGEN --with-doxygen 1829f5effb2eSmrg# XORG_WITH_FOP --with-fop 1830f5effb2eSmrg# XORG_WITH_GROFF --with-groff 1831f5effb2eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1832f5effb2eSmrg# 1833f5effb2eSmrg# Interface to module: 1834f5effb2eSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1835f5effb2eSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1836f5effb2eSmrg# 'no' user instructs the module not to generate specs 1837f5effb2eSmrg# parm1: specify the default value, yes or no. 1838f5effb2eSmrg# 1839f5effb2eSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1840f5effb2eSmrgspec_default=$1 1841f5effb2eSmrgif test "x$spec_default" = x ; then 1842f5effb2eSmrg spec_default="yes" 1843f5effb2eSmrgfi 1844f5effb2eSmrgAC_ARG_ENABLE(specs, 1845f5effb2eSmrg AS_HELP_STRING([--enable-specs], 1846f5effb2eSmrg [Enable building the specs (default: yes)]), 1847f5effb2eSmrg [build_specs=$enableval], [build_specs=$spec_default]) 1848f5effb2eSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1849f5effb2eSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1850f5effb2eSmrgAC_MSG_RESULT([$build_specs]) 1851f5effb2eSmrg]) # XORG_ENABLE_SPECS 1852f5effb2eSmrg 1853fdb3d228Smrg# XORG_CHECK_MALLOC_ZERO 1854fdb3d228Smrg# ---------------------- 18559b41ff1aSmrg# Minimum version: 1.0.0 18569b41ff1aSmrg# 1857fdb3d228Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1858fdb3d228Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1859fdb3d228Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1860fdb3d228SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1861fdb3d228SmrgAC_ARG_ENABLE(malloc0returnsnull, 18629b41ff1aSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1863fdb3d228Smrg [malloc(0) returns NULL (default: auto)]), 1864fdb3d228Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1865fdb3d228Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1866fdb3d228Smrg 1867fdb3d228SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1868fdb3d228Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1869fdb3d228Smrg AC_RUN_IFELSE([ 1870fdb3d228Smrgchar *malloc(); 1871fdb3d228Smrgchar *realloc(); 1872fdb3d228Smrgchar *calloc(); 1873fdb3d228Smrgmain() { 1874fdb3d228Smrg char *m0, *r0, *c0, *p; 1875fdb3d228Smrg m0 = malloc(0); 1876fdb3d228Smrg p = malloc(10); 1877fdb3d228Smrg r0 = realloc(p,0); 1878fdb3d228Smrg c0 = calloc(0); 1879fdb3d228Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1880fdb3d228Smrg}], 1881fdb3d228Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1882f5effb2eSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1883f5effb2eSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1884fdb3d228Smrgfi 1885fdb3d228SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1886fdb3d228Smrg 1887fdb3d228Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1888fdb3d228Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1889fdb3d228Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1890fdb3d228Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1891fdb3d228Smrgelse 1892fdb3d228Smrg MALLOC_ZERO_CFLAGS="" 1893fdb3d228Smrg XMALLOC_ZERO_CFLAGS="" 1894fdb3d228Smrg XTMALLOC_ZERO_CFLAGS="" 1895fdb3d228Smrgfi 1896fdb3d228Smrg 1897fdb3d228SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1898fdb3d228SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1899fdb3d228SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1900fdb3d228Smrg]) # XORG_CHECK_MALLOC_ZERO 1901fdb3d228Smrg 19029b41ff1aSmrg# XORG_WITH_LINT() 19039b41ff1aSmrg# ---------------- 19049b41ff1aSmrg# Minimum version: 1.1.0 19059b41ff1aSmrg# 19069b41ff1aSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 19079b41ff1aSmrg# is specified. (Use --with-lint=sparse for sparse.) 19089b41ff1aSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 19099b41ff1aSmrg# Sets $LINT_FLAGS to flags to pass to source checker 19109b41ff1aSmrg# Sets LINT automake conditional if enabled (default: disabled) 19119b41ff1aSmrg# 19129b41ff1aSmrgAC_DEFUN([XORG_WITH_LINT],[ 19139b41ff1aSmrg 19149b41ff1aSmrg# Allow checking code with lint, sparse, etc. 19159b41ff1aSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 19169b41ff1aSmrg [Use a lint-style source code checker (default: disabled)])], 19179b41ff1aSmrg [use_lint=$withval], [use_lint=no]) 19189b41ff1aSmrgif test "x$use_lint" = "xyes" ; then 19199b41ff1aSmrg LINT="lint" 19209b41ff1aSmrgelse 19219b41ff1aSmrg LINT="$use_lint" 19229b41ff1aSmrgfi 19239b41ff1aSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 19249b41ff1aSmrg case $LINT in 19259b41ff1aSmrg lint|*/lint) 19269b41ff1aSmrg case $host_os in 19279b41ff1aSmrg solaris*) 19289b41ff1aSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 19299b41ff1aSmrg ;; 19309b41ff1aSmrg esac 19319b41ff1aSmrg ;; 19329b41ff1aSmrg esac 19339b41ff1aSmrgfi 19349b41ff1aSmrg 19359b41ff1aSmrgAC_SUBST(LINT) 19369b41ff1aSmrgAC_SUBST(LINT_FLAGS) 19379b41ff1aSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 19389b41ff1aSmrg 19399b41ff1aSmrg]) # XORG_WITH_LINT 19409b41ff1aSmrg 19419b41ff1aSmrg# XORG_LINT_LIBRARY(LIBNAME) 19429b41ff1aSmrg# -------------------------- 19439b41ff1aSmrg# Minimum version: 1.1.0 19449b41ff1aSmrg# 19459b41ff1aSmrg# Sets up flags for building lint libraries for checking programs that call 19469b41ff1aSmrg# functions in the library. 19479b41ff1aSmrg# Disabled by default, enable with --enable-lint-library 19489b41ff1aSmrg# Sets: 19499b41ff1aSmrg# @LINTLIB@ - name of lint library file to make 19509b41ff1aSmrg# MAKE_LINT_LIB - automake conditional 19519b41ff1aSmrg# 19529b41ff1aSmrg 19539b41ff1aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 19549b41ff1aSmrgAC_REQUIRE([XORG_WITH_LINT]) 19559b41ff1aSmrg# Build lint "library" for more indepth checks of programs calling this library 19569b41ff1aSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 19579b41ff1aSmrg [Create lint library (default: disabled)])], 19589b41ff1aSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 19599b41ff1aSmrgif test "x$make_lint_lib" != "xno" ; then 19609b41ff1aSmrg if test "x$LINT" = "xno" ; then 19619b41ff1aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 19629b41ff1aSmrg fi 19639b41ff1aSmrg if test "x$make_lint_lib" = "xyes" ; then 19649b41ff1aSmrg LINTLIB=llib-l$1.ln 19659b41ff1aSmrg else 19669b41ff1aSmrg LINTLIB=$make_lint_lib 19679b41ff1aSmrg fi 19689b41ff1aSmrgfi 19699b41ff1aSmrgAC_SUBST(LINTLIB) 19709b41ff1aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 19719b41ff1aSmrg 19729b41ff1aSmrg]) # XORG_LINT_LIBRARY 19739b41ff1aSmrg 19749b41ff1aSmrg# XORG_CWARNFLAGS 19759b41ff1aSmrg# --------------- 19769b41ff1aSmrg# Minimum version: 1.2.0 19779b41ff1aSmrg# 19789b41ff1aSmrg# Defines CWARNFLAGS to enable C compiler warnings. 19799b41ff1aSmrg# 19809b41ff1aSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 19819b41ff1aSmrgAC_REQUIRE([AC_PROG_CC]) 19829b41ff1aSmrgif test "x$GCC" = xyes ; then 19839b41ff1aSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 19849b41ff1aSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1985f5effb2eSmrg-Wbad-function-cast -Wformat=2" 19869b41ff1aSmrg case `$CC -dumpversion` in 19879b41ff1aSmrg 3.4.* | 4.*) 19889b41ff1aSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 19899b41ff1aSmrg ;; 19909b41ff1aSmrg esac 19919b41ff1aSmrgelse 19929b41ff1aSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 19939b41ff1aSmrg if test "x$SUNCC" = "xyes"; then 19949b41ff1aSmrg CWARNFLAGS="-v" 19959b41ff1aSmrg fi 19969b41ff1aSmrgfi 19979b41ff1aSmrgAC_SUBST(CWARNFLAGS) 19989b41ff1aSmrg]) # XORG_CWARNFLAGS 19999b41ff1aSmrg 20009b41ff1aSmrg# XORG_STRICT_OPTION 20019b41ff1aSmrg# ----------------------- 20029b41ff1aSmrg# Minimum version: 1.3.0 20039b41ff1aSmrg# 20049b41ff1aSmrg# Add configure option to enable strict compilation 20059b41ff1aSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 20069b41ff1aSmrgAC_REQUIRE([AC_PROG_CC]) 20079b41ff1aSmrgAC_REQUIRE([AC_PROG_CC_C99]) 20089b41ff1aSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 20099b41ff1aSmrg 20109b41ff1aSmrgAC_ARG_ENABLE(strict-compilation, 20119b41ff1aSmrg AS_HELP_STRING([--enable-strict-compilation], 20129b41ff1aSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 20139b41ff1aSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 20149b41ff1aSmrgif test "x$STRICT_COMPILE" = "xyes"; then 20159b41ff1aSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 20169b41ff1aSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 20179b41ff1aSmrg if test "x$GCC" = xyes ; then 20189b41ff1aSmrg STRICT_CFLAGS="-pedantic -Werror" 20199b41ff1aSmrg elif test "x$SUNCC" = "xyes"; then 20209b41ff1aSmrg STRICT_CFLAGS="-errwarn" 20219b41ff1aSmrg elif test "x$INTELCC" = "xyes"; then 20229b41ff1aSmrg STRICT_CFLAGS="-Werror" 20239b41ff1aSmrg fi 20249b41ff1aSmrgfi 20259b41ff1aSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 20269b41ff1aSmrgAC_SUBST([CWARNFLAGS]) 20279b41ff1aSmrg]) # XORG_STRICT_OPTION 20289b41ff1aSmrg 20299b41ff1aSmrg# XORG_DEFAULT_OPTIONS 20309b41ff1aSmrg# -------------------- 20319b41ff1aSmrg# Minimum version: 1.3.0 20329b41ff1aSmrg# 20339b41ff1aSmrg# Defines default options for X.Org modules. 20349b41ff1aSmrg# 20359b41ff1aSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 20369b41ff1aSmrgXORG_CWARNFLAGS 20379b41ff1aSmrgXORG_STRICT_OPTION 20389b41ff1aSmrgXORG_RELEASE_VERSION 20399b41ff1aSmrgXORG_CHANGELOG 2040f5effb2eSmrgXORG_INSTALL 20419b41ff1aSmrgXORG_MANPAGE_SECTIONS 2042f5effb2eSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2043f5effb2eSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 20449b41ff1aSmrg]) # XORG_DEFAULT_OPTIONS 2045f5effb2eSmrg 2046f5effb2eSmrg# XORG_INSTALL() 2047f5effb2eSmrg# ---------------- 2048f5effb2eSmrg# Minimum version: 1.4.0 2049f5effb2eSmrg# 2050f5effb2eSmrg# Defines the variable INSTALL_CMD as the command to copy 2051f5effb2eSmrg# INSTALL from $prefix/share/util-macros. 2052f5effb2eSmrg# 2053f5effb2eSmrgAC_DEFUN([XORG_INSTALL], [ 2054f5effb2eSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2055f5effb2eSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2056f5effb2eSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2057f5effb2eSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2058f5effb2eSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2059f5effb2eSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2060f5effb2eSmrgAC_SUBST([INSTALL_CMD]) 2061f5effb2eSmrg]) # XORG_INSTALL 2062fdb3d228Smrgdnl Copyright 2005 Red Hat, Inc 2063fdb3d228Smrgdnl 2064fdb3d228Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2065fdb3d228Smrgdnl documentation for any purpose is hereby granted without fee, provided that 2066fdb3d228Smrgdnl the above copyright notice appear in all copies and that both that 2067fdb3d228Smrgdnl copyright notice and this permission notice appear in supporting 2068fdb3d228Smrgdnl documentation. 2069fdb3d228Smrgdnl 2070fdb3d228Smrgdnl The above copyright notice and this permission notice shall be included 2071fdb3d228Smrgdnl in all copies or substantial portions of the Software. 2072fdb3d228Smrgdnl 2073fdb3d228Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2074fdb3d228Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2075fdb3d228Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2076fdb3d228Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2077fdb3d228Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2078fdb3d228Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2079fdb3d228Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 2080fdb3d228Smrgdnl 2081fdb3d228Smrgdnl Except as contained in this notice, the name of the copyright holders shall 2082fdb3d228Smrgdnl not be used in advertising or otherwise to promote the sale, use or 2083fdb3d228Smrgdnl other dealings in this Software without prior written authorization 2084fdb3d228Smrgdnl from the copyright holders. 2085fdb3d228Smrgdnl 2086fdb3d228Smrg 2087fdb3d228Smrg# XORG_RELEASE_VERSION 2088fdb3d228Smrg# -------------------- 2089fdb3d228Smrg# Adds --with/without-release-string and changes the PACKAGE and 2090fdb3d228Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 20919b41ff1aSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 20929b41ff1aSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2093fdb3d228Smrg 2094fdb3d228SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2095fdb3d228Smrg AC_ARG_WITH(release-version, 20969b41ff1aSmrg AS_HELP_STRING([--with-release-version=STRING], 2097fdb3d228Smrg [Use release version string in package name]), 2098fdb3d228Smrg [RELEASE_VERSION="$withval"], 2099fdb3d228Smrg [RELEASE_VERSION=""]) 2100fdb3d228Smrg if test "x$RELEASE_VERSION" != "x"; then 2101fdb3d228Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 2102fdb3d228Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 2103fdb3d228Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 2104fdb3d228Smrg fi 21059b41ff1aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 21069b41ff1aSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 21079b41ff1aSmrg [Major version of this package]) 21089b41ff1aSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 21099b41ff1aSmrg if test "x$PVM" = "x"; then 21109b41ff1aSmrg PVM="0" 21119b41ff1aSmrg fi 21129b41ff1aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 21139b41ff1aSmrg [$PVM], 21149b41ff1aSmrg [Minor version of this package]) 21159b41ff1aSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 21169b41ff1aSmrg if test "x$PVP" = "x"; then 21179b41ff1aSmrg PVP="0" 21189b41ff1aSmrg fi 21199b41ff1aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 21209b41ff1aSmrg [$PVP], 21219b41ff1aSmrg [Patch version of this package]) 2122fdb3d228Smrg]) 2123fdb3d228Smrg 21249b41ff1aSmrg# XORG_CHANGELOG() 21259b41ff1aSmrg# ---------------- 21269b41ff1aSmrg# Minimum version: 1.2.0 21279b41ff1aSmrg# 21289b41ff1aSmrg# Defines the variable CHANGELOG_CMD as the command to generate 21299b41ff1aSmrg# ChangeLog from git. 21309b41ff1aSmrg# 21319b41ff1aSmrg# 21329b41ff1aSmrgAC_DEFUN([XORG_CHANGELOG], [ 2133f5effb2eSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2134f5effb2eSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2135f5effb2eSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 21369b41ff1aSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 21379b41ff1aSmrgAC_SUBST([CHANGELOG_CMD]) 21389b41ff1aSmrg]) # XORG_CHANGELOG 21399b41ff1aSmrg 21409b41ff1aSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 21419b41ff1aSmrg# 21429b41ff1aSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 21439b41ff1aSmrg# 21449b41ff1aSmrg# This program is free software; you can redistribute it and/or modify 21459b41ff1aSmrg# it under the terms of the GNU General Public License as published by 21469b41ff1aSmrg# the Free Software Foundation; either version 2 of the License, or 21479b41ff1aSmrg# (at your option) any later version. 21489b41ff1aSmrg# 21499b41ff1aSmrg# This program is distributed in the hope that it will be useful, but 21509b41ff1aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 21519b41ff1aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21529b41ff1aSmrg# General Public License for more details. 21539b41ff1aSmrg# 21549b41ff1aSmrg# You should have received a copy of the GNU General Public License 21559b41ff1aSmrg# along with this program; if not, write to the Free Software 21569b41ff1aSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21579b41ff1aSmrg# 21589b41ff1aSmrg# As a special exception to the GNU General Public License, if you 21599b41ff1aSmrg# distribute this file as part of a program that contains a 21609b41ff1aSmrg# configuration script generated by Autoconf, you may include it under 21619b41ff1aSmrg# the same distribution terms that you use for the rest of that program. 21629b41ff1aSmrg 21639b41ff1aSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 21649b41ff1aSmrg# ---------------------------------- 21659b41ff1aSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 21669b41ff1aSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 21679b41ff1aSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 21689b41ff1aSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 21699b41ff1aSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 21709b41ff1aSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 21719b41ff1aSmrgfi 21729b41ff1aSmrgif test -n "$PKG_CONFIG"; then 21739b41ff1aSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 21749b41ff1aSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 21759b41ff1aSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 21769b41ff1aSmrg AC_MSG_RESULT([yes]) 21779b41ff1aSmrg else 21789b41ff1aSmrg AC_MSG_RESULT([no]) 21799b41ff1aSmrg PKG_CONFIG="" 21809b41ff1aSmrg fi 21819b41ff1aSmrg 21829b41ff1aSmrgfi[]dnl 21839b41ff1aSmrg])# PKG_PROG_PKG_CONFIG 21849b41ff1aSmrg 21859b41ff1aSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 21869b41ff1aSmrg# 21879b41ff1aSmrg# Check to see whether a particular set of modules exists. Similar 21889b41ff1aSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 21899b41ff1aSmrg# 21909b41ff1aSmrg# 21919b41ff1aSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 21929b41ff1aSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 21939b41ff1aSmrg# PKG_CHECK_EXISTS manually 21949b41ff1aSmrg# -------------------------------------------------------------- 21959b41ff1aSmrgAC_DEFUN([PKG_CHECK_EXISTS], 21969b41ff1aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 21979b41ff1aSmrgif test -n "$PKG_CONFIG" && \ 21989b41ff1aSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 21999b41ff1aSmrg m4_ifval([$2], [$2], [:]) 22009b41ff1aSmrgm4_ifvaln([$3], [else 22019b41ff1aSmrg $3])dnl 22029b41ff1aSmrgfi]) 22039b41ff1aSmrg 22049b41ff1aSmrg 22059b41ff1aSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 22069b41ff1aSmrg# --------------------------------------------- 22079b41ff1aSmrgm4_define([_PKG_CONFIG], 22089b41ff1aSmrg[if test -n "$$1"; then 22099b41ff1aSmrg pkg_cv_[]$1="$$1" 22109b41ff1aSmrg elif test -n "$PKG_CONFIG"; then 22119b41ff1aSmrg PKG_CHECK_EXISTS([$3], 22129b41ff1aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 22139b41ff1aSmrg [pkg_failed=yes]) 22149b41ff1aSmrg else 22159b41ff1aSmrg pkg_failed=untried 22169b41ff1aSmrgfi[]dnl 22179b41ff1aSmrg])# _PKG_CONFIG 22189b41ff1aSmrg 22199b41ff1aSmrg# _PKG_SHORT_ERRORS_SUPPORTED 22209b41ff1aSmrg# ----------------------------- 22219b41ff1aSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 22229b41ff1aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 22239b41ff1aSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 22249b41ff1aSmrg _pkg_short_errors_supported=yes 22259b41ff1aSmrgelse 22269b41ff1aSmrg _pkg_short_errors_supported=no 22279b41ff1aSmrgfi[]dnl 22289b41ff1aSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 22299b41ff1aSmrg 22309b41ff1aSmrg 22319b41ff1aSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 22329b41ff1aSmrg# [ACTION-IF-NOT-FOUND]) 22339b41ff1aSmrg# 22349b41ff1aSmrg# 22359b41ff1aSmrg# Note that if there is a possibility the first call to 22369b41ff1aSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 22379b41ff1aSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 22389b41ff1aSmrg# 22399b41ff1aSmrg# 22409b41ff1aSmrg# -------------------------------------------------------------- 22419b41ff1aSmrgAC_DEFUN([PKG_CHECK_MODULES], 22429b41ff1aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 22439b41ff1aSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 22449b41ff1aSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 22459b41ff1aSmrg 22469b41ff1aSmrgpkg_failed=no 22479b41ff1aSmrgAC_MSG_CHECKING([for $1]) 22489b41ff1aSmrg 22499b41ff1aSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 22509b41ff1aSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 22519b41ff1aSmrg 22529b41ff1aSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 22539b41ff1aSmrgand $1[]_LIBS to avoid the need to call pkg-config. 22549b41ff1aSmrgSee the pkg-config man page for more details.]) 22559b41ff1aSmrg 22569b41ff1aSmrgif test $pkg_failed = yes; then 22579b41ff1aSmrg _PKG_SHORT_ERRORS_SUPPORTED 22589b41ff1aSmrg if test $_pkg_short_errors_supported = yes; then 22599b41ff1aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 22609b41ff1aSmrg else 22619b41ff1aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 22629b41ff1aSmrg fi 22639b41ff1aSmrg # Put the nasty error message in config.log where it belongs 22649b41ff1aSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 22659b41ff1aSmrg 22669b41ff1aSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 22679b41ff1aSmrg[Package requirements ($2) were not met: 22689b41ff1aSmrg 22699b41ff1aSmrg$$1_PKG_ERRORS 22709b41ff1aSmrg 22719b41ff1aSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 22729b41ff1aSmrginstalled software in a non-standard prefix. 22739b41ff1aSmrg 22749b41ff1aSmrg_PKG_TEXT 22759b41ff1aSmrg])], 22769b41ff1aSmrg [AC_MSG_RESULT([no]) 22779b41ff1aSmrg $4]) 22789b41ff1aSmrgelif test $pkg_failed = untried; then 22799b41ff1aSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 22809b41ff1aSmrg[The pkg-config script could not be found or is too old. Make sure it 22819b41ff1aSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 22829b41ff1aSmrgpath to pkg-config. 22839b41ff1aSmrg 22849b41ff1aSmrg_PKG_TEXT 22859b41ff1aSmrg 22869b41ff1aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 22879b41ff1aSmrg [$4]) 22889b41ff1aSmrgelse 22899b41ff1aSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 22909b41ff1aSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 22919b41ff1aSmrg AC_MSG_RESULT([yes]) 22929b41ff1aSmrg ifelse([$3], , :, [$3]) 22939b41ff1aSmrgfi[]dnl 22949b41ff1aSmrg])# PKG_CHECK_MODULES 22959b41ff1aSmrg 2296