aclocal.m4 revision 7c5f6000
17c5f6000Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2bccedf53Smrg 37c5f6000Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 47c5f6000Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5bccedf53Smrg# This file is free software; the Free Software Foundation 6bccedf53Smrg# gives unlimited permission to copy and/or distribute it, 7bccedf53Smrg# with or without modifications, as long as this notice is preserved. 8bccedf53Smrg 9bccedf53Smrg# This program is distributed in the hope that it will be useful, 10bccedf53Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11bccedf53Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12bccedf53Smrg# PARTICULAR PURPOSE. 13bccedf53Smrg 147c5f6000Smrgm4_ifndef([AC_AUTOCONF_VERSION], 157c5f6000Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 167c5f6000Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 177c5f6000Smrg[m4_warning([this file was generated for autoconf 2.63. 187c5f6000SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 197c5f6000SmrgIf you have problems, you may need to regenerate the build system entirely. 207c5f6000SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21bccedf53Smrg 227c5f6000Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 237c5f6000Smrg# 247c5f6000Smrg# This file is free software; the Free Software Foundation 257c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 267c5f6000Smrg# with or without modifications, as long as this notice is preserved. 27bccedf53Smrg 28bccedf53Smrg# AM_AUTOMAKE_VERSION(VERSION) 29bccedf53Smrg# ---------------------------- 30bccedf53Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31bccedf53Smrg# generated from the m4 files accompanying Automake X.Y. 327c5f6000Smrg# (This private macro should not be called outside this file.) 337c5f6000SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 347c5f6000Smrg[am__api_version='1.11' 357c5f6000Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 367c5f6000Smrgdnl require some minimum version. Point them to the right macro. 377c5f6000Smrgm4_if([$1], [1.11], [], 387c5f6000Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 397c5f6000Smrg]) 407c5f6000Smrg 417c5f6000Smrg# _AM_AUTOCONF_VERSION(VERSION) 427c5f6000Smrg# ----------------------------- 437c5f6000Smrg# aclocal traces this macro to find the Autoconf version. 447c5f6000Smrg# This is a private macro too. Using m4_define simplifies 457c5f6000Smrg# the logic in aclocal, which can simply ignore this definition. 467c5f6000Smrgm4_define([_AM_AUTOCONF_VERSION], []) 47bccedf53Smrg 48bccedf53Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49bccedf53Smrg# ------------------------------- 507c5f6000Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 517c5f6000Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52bccedf53SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 537c5f6000Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 547c5f6000Smrgm4_ifndef([AC_AUTOCONF_VERSION], 557c5f6000Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 567c5f6000Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57bccedf53Smrg 587c5f6000Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59bccedf53Smrg 607c5f6000Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61bccedf53Smrg# 627c5f6000Smrg# This file is free software; the Free Software Foundation 637c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 647c5f6000Smrg# with or without modifications, as long as this notice is preserved. 65bccedf53Smrg 66bccedf53Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67bccedf53Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68bccedf53Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69bccedf53Smrg# 70bccedf53Smrg# Of course, Automake must honor this variable whenever it calls a 71bccedf53Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72bccedf53Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73bccedf53Smrg# depending on how configure is run. This is pretty annoying, since 74bccedf53Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75bccedf53Smrg# source directory, any form will work fine, but in subdirectories a 76bccedf53Smrg# relative path needs to be adjusted first. 77bccedf53Smrg# 78bccedf53Smrg# $ac_aux_dir/missing 79bccedf53Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80bccedf53Smrg# $top_srcdir/$ac_aux_dir/missing 81bccedf53Smrg# fails if $ac_aux_dir is absolute, 82bccedf53Smrg# fails when called from a subdirectory in a VPATH build with 83bccedf53Smrg# a relative $ac_aux_dir 84bccedf53Smrg# 85bccedf53Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86bccedf53Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87bccedf53Smrg# harmless because $srcdir is `.', but things will broke when you 88bccedf53Smrg# start a VPATH build or use an absolute $srcdir. 89bccedf53Smrg# 90bccedf53Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91bccedf53Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92bccedf53Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93bccedf53Smrg# and then we would define $MISSING as 94bccedf53Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95bccedf53Smrg# This will work as long as MISSING is not called from configure, because 96bccedf53Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97bccedf53Smrg# However there are other variables, like CC, which are often used in 98bccedf53Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99bccedf53Smrg# 100bccedf53Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101bccedf53Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102bccedf53Smrg# configured tree to be moved without reconfiguration. 103bccedf53Smrg 1047c5f6000SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1057c5f6000Smrg[dnl Rely on autoconf to set up CDPATH properly. 1067c5f6000SmrgAC_PREREQ([2.50])dnl 107bccedf53Smrg# expand $ac_aux_dir to an absolute path 108bccedf53Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109bccedf53Smrg]) 110bccedf53Smrg 1117c5f6000Smrg# AM_CONDITIONAL -*- Autoconf -*- 112bccedf53Smrg 1137c5f6000Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1147c5f6000Smrg# Free Software Foundation, Inc. 1157c5f6000Smrg# 1167c5f6000Smrg# This file is free software; the Free Software Foundation 1177c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 1187c5f6000Smrg# with or without modifications, as long as this notice is preserved. 119bccedf53Smrg 1207c5f6000Smrg# serial 9 121bccedf53Smrg 1227c5f6000Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1237c5f6000Smrg# ------------------------------------- 1247c5f6000Smrg# Define a conditional. 1257c5f6000SmrgAC_DEFUN([AM_CONDITIONAL], 1267c5f6000Smrg[AC_PREREQ(2.52)dnl 1277c5f6000Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1287c5f6000Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1297c5f6000SmrgAC_SUBST([$1_TRUE])dnl 1307c5f6000SmrgAC_SUBST([$1_FALSE])dnl 1317c5f6000Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1327c5f6000Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1337c5f6000Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1347c5f6000Smrgif $2; then 1357c5f6000Smrg $1_TRUE= 1367c5f6000Smrg $1_FALSE='#' 137bccedf53Smrgelse 1387c5f6000Smrg $1_TRUE='#' 1397c5f6000Smrg $1_FALSE= 140bccedf53Smrgfi 1417c5f6000SmrgAC_CONFIG_COMMANDS_PRE( 1427c5f6000Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1437c5f6000Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1447c5f6000SmrgUsually this means the macro was only invoked conditionally.]]) 1457c5f6000Smrgfi])]) 146bccedf53Smrg 1477c5f6000Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1487c5f6000Smrg# Free Software Foundation, Inc. 1497c5f6000Smrg# 1507c5f6000Smrg# This file is free software; the Free Software Foundation 1517c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 1527c5f6000Smrg# with or without modifications, as long as this notice is preserved. 153bccedf53Smrg 1547c5f6000Smrg# serial 10 155bccedf53Smrg 156bccedf53Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157bccedf53Smrg# written in clear, in which case automake, when reading aclocal.m4, 158bccedf53Smrg# will think it sees a *use*, and therefore will trigger all it's 159bccedf53Smrg# C support machinery. Also note that it means that autoscan, seeing 160bccedf53Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161bccedf53Smrg 162bccedf53Smrg 163bccedf53Smrg# _AM_DEPENDENCIES(NAME) 164bccedf53Smrg# ---------------------- 165bccedf53Smrg# See how the compiler implements dependency checking. 166bccedf53Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167bccedf53Smrg# We try a few techniques and use that to set a single cache variable. 168bccedf53Smrg# 169bccedf53Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170bccedf53Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171bccedf53Smrg# dependency, and given that the user is not expected to run this macro, 172bccedf53Smrg# just rely on AC_PROG_CC. 173bccedf53SmrgAC_DEFUN([_AM_DEPENDENCIES], 174bccedf53Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175bccedf53SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176bccedf53SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177bccedf53SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178bccedf53Smrg 179bccedf53Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180bccedf53Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181bccedf53Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1827c5f6000Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183bccedf53Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184bccedf53Smrg [depcc="$$1" am_compiler_list=]) 185bccedf53Smrg 186bccedf53SmrgAC_CACHE_CHECK([dependency style of $depcc], 187bccedf53Smrg [am_cv_$1_dependencies_compiler_type], 188bccedf53Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189bccedf53Smrg # We make a subdir and do the tests there. Otherwise we can end up 190bccedf53Smrg # making bogus files that we don't know about and never remove. For 191bccedf53Smrg # instance it was reported that on HP-UX the gcc test will end up 192bccedf53Smrg # making a dummy file named `D' -- because `-MD' means `put the output 193bccedf53Smrg # in D'. 194bccedf53Smrg mkdir conftest.dir 195bccedf53Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 196bccedf53Smrg # using a relative directory. 197bccedf53Smrg cp "$am_depcomp" conftest.dir 198bccedf53Smrg cd conftest.dir 199bccedf53Smrg # We will build objects and dependencies in a subdirectory because 200bccedf53Smrg # it helps to detect inapplicable dependency modes. For instance 201bccedf53Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 202bccedf53Smrg # side effect of compilation, but ICC will put the dependencies in 203bccedf53Smrg # the current directory while Tru64 will put them in the object 204bccedf53Smrg # directory. 205bccedf53Smrg mkdir sub 206bccedf53Smrg 207bccedf53Smrg am_cv_$1_dependencies_compiler_type=none 208bccedf53Smrg if test "$am_compiler_list" = ""; then 209bccedf53Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210bccedf53Smrg fi 2117c5f6000Smrg am__universal=false 2127c5f6000Smrg m4_case([$1], [CC], 2137c5f6000Smrg [case " $depcc " in #( 2147c5f6000Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2157c5f6000Smrg esac], 2167c5f6000Smrg [CXX], 2177c5f6000Smrg [case " $depcc " in #( 2187c5f6000Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2197c5f6000Smrg esac]) 2207c5f6000Smrg 221bccedf53Smrg for depmode in $am_compiler_list; do 222bccedf53Smrg # Setup a source with many dependencies, because some compilers 223bccedf53Smrg # like to wrap large dependency lists on column 80 (with \), and 224bccedf53Smrg # we should not choose a depcomp mode which is confused by this. 225bccedf53Smrg # 226bccedf53Smrg # We need to recreate these files for each test, as the compiler may 227bccedf53Smrg # overwrite some of them when testing with obscure command lines. 228bccedf53Smrg # This happens at least with the AIX C compiler. 229bccedf53Smrg : > sub/conftest.c 230bccedf53Smrg for i in 1 2 3 4 5 6; do 231bccedf53Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2327c5f6000Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2337c5f6000Smrg # Solaris 8's {/usr,}/bin/sh. 2347c5f6000Smrg touch sub/conftst$i.h 235bccedf53Smrg done 236bccedf53Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237bccedf53Smrg 2387c5f6000Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2397c5f6000Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2407c5f6000Smrg # handle `-M -o', and we need to detect this. Also, some Intel 2417c5f6000Smrg # versions had trouble with output in subdirs 2427c5f6000Smrg am__obj=sub/conftest.${OBJEXT-o} 2437c5f6000Smrg am__minus_obj="-o $am__obj" 244bccedf53Smrg case $depmode in 2457c5f6000Smrg gcc) 2467c5f6000Smrg # This depmode causes a compiler race in universal mode. 2477c5f6000Smrg test "$am__universal" = false || continue 2487c5f6000Smrg ;; 249bccedf53Smrg nosideeffect) 250bccedf53Smrg # after this tag, mechanisms are not by side-effect, so they'll 251bccedf53Smrg # only be used when explicitly requested 252bccedf53Smrg if test "x$enable_dependency_tracking" = xyes; then 253bccedf53Smrg continue 254bccedf53Smrg else 255bccedf53Smrg break 256bccedf53Smrg fi 257bccedf53Smrg ;; 2587c5f6000Smrg msvisualcpp | msvcmsys) 2597c5f6000Smrg # This compiler won't grok `-c -o', but also, the minuso test has 2607c5f6000Smrg # not run yet. These depmodes are late enough in the game, and 2617c5f6000Smrg # so weak that their functioning should not be impacted. 2627c5f6000Smrg am__obj=conftest.${OBJEXT-o} 2637c5f6000Smrg am__minus_obj= 2647c5f6000Smrg ;; 265bccedf53Smrg none) break ;; 266bccedf53Smrg esac 267bccedf53Smrg if depmode=$depmode \ 2687c5f6000Smrg source=sub/conftest.c object=$am__obj \ 269bccedf53Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2707c5f6000Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271bccedf53Smrg >/dev/null 2>conftest.err && 2727c5f6000Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273bccedf53Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2747c5f6000Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275bccedf53Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276bccedf53Smrg # icc doesn't choke on unknown options, it will just issue warnings 2777c5f6000Smrg # or remarks (even with -Werror). So we grep stderr for any message 2787c5f6000Smrg # that says an option was ignored or not supported. 2797c5f6000Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2807c5f6000Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2817c5f6000Smrg # The diagnosis changed in icc 8.0: 2827c5f6000Smrg # icc: Command line remark: option '-MP' not supported 2837c5f6000Smrg if (grep 'ignoring option' conftest.err || 2847c5f6000Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285bccedf53Smrg am_cv_$1_dependencies_compiler_type=$depmode 286bccedf53Smrg break 287bccedf53Smrg fi 288bccedf53Smrg fi 289bccedf53Smrg done 290bccedf53Smrg 291bccedf53Smrg cd .. 292bccedf53Smrg rm -rf conftest.dir 293bccedf53Smrgelse 294bccedf53Smrg am_cv_$1_dependencies_compiler_type=none 295bccedf53Smrgfi 296bccedf53Smrg]) 297bccedf53SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298bccedf53SmrgAM_CONDITIONAL([am__fastdep$1], [ 299bccedf53Smrg test "x$enable_dependency_tracking" != xno \ 300bccedf53Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301bccedf53Smrg]) 302bccedf53Smrg 303bccedf53Smrg 304bccedf53Smrg# AM_SET_DEPDIR 305bccedf53Smrg# ------------- 306bccedf53Smrg# Choose a directory name for dependency files. 307bccedf53Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308bccedf53SmrgAC_DEFUN([AM_SET_DEPDIR], 309bccedf53Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310bccedf53SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311bccedf53Smrg]) 312bccedf53Smrg 313bccedf53Smrg 314bccedf53Smrg# AM_DEP_TRACK 315bccedf53Smrg# ------------ 316bccedf53SmrgAC_DEFUN([AM_DEP_TRACK], 317bccedf53Smrg[AC_ARG_ENABLE(dependency-tracking, 3187c5f6000Smrg[ --disable-dependency-tracking speeds up one-time build 3197c5f6000Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 320bccedf53Smrgif test "x$enable_dependency_tracking" != xno; then 321bccedf53Smrg am_depcomp="$ac_aux_dir/depcomp" 322bccedf53Smrg AMDEPBACKSLASH='\' 323bccedf53Smrgfi 324bccedf53SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3257c5f6000SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3267c5f6000Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327bccedf53Smrg]) 328bccedf53Smrg 3297c5f6000Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330bccedf53Smrg 3317c5f6000Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3327c5f6000Smrg# Free Software Foundation, Inc. 3337c5f6000Smrg# 3347c5f6000Smrg# This file is free software; the Free Software Foundation 3357c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 3367c5f6000Smrg# with or without modifications, as long as this notice is preserved. 337bccedf53Smrg 3387c5f6000Smrg#serial 5 339bccedf53Smrg 340bccedf53Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341bccedf53Smrg# ------------------------------ 342bccedf53SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3437c5f6000Smrg[{ 3447c5f6000Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3457c5f6000Smrg # are listed without --file. Let's play safe and only enable the eval 3467c5f6000Smrg # if we detect the quoting. 3477c5f6000Smrg case $CONFIG_FILES in 3487c5f6000Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3497c5f6000Smrg *) set x $CONFIG_FILES ;; 3507c5f6000Smrg esac 3517c5f6000Smrg shift 3527c5f6000Smrg for mf 3537c5f6000Smrg do 3547c5f6000Smrg # Strip MF so we end up with the name of the file. 3557c5f6000Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3567c5f6000Smrg # Check whether this is an Automake generated Makefile or not. 3577c5f6000Smrg # We used to match only the files named `Makefile.in', but 3587c5f6000Smrg # some people rename them; so instead we look at the file content. 3597c5f6000Smrg # Grep'ing the first line is not enough: some people post-process 3607c5f6000Smrg # each Makefile.in and add a new line on top of each file to say so. 3617c5f6000Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3627c5f6000Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3637c5f6000Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3647c5f6000Smrg dirpart=`AS_DIRNAME("$mf")` 3657c5f6000Smrg else 3667c5f6000Smrg continue 3677c5f6000Smrg fi 3687c5f6000Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3697c5f6000Smrg # from the Makefile without running `make'. 3707c5f6000Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3717c5f6000Smrg test -z "$DEPDIR" && continue 3727c5f6000Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3737c5f6000Smrg test -z "am__include" && continue 3747c5f6000Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3757c5f6000Smrg # When using ansi2knr, U may be empty or an underscore; expand it 3767c5f6000Smrg U=`sed -n 's/^U = //p' < "$mf"` 3777c5f6000Smrg # Find all dependency output files, they are included files with 3787c5f6000Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3797c5f6000Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3807c5f6000Smrg # expansion. 3817c5f6000Smrg for file in `sed -n " 3827c5f6000Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3837c5f6000Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3847c5f6000Smrg # Make sure the directory exists. 3857c5f6000Smrg test -f "$dirpart/$file" && continue 3867c5f6000Smrg fdir=`AS_DIRNAME(["$file"])` 3877c5f6000Smrg AS_MKDIR_P([$dirpart/$fdir]) 3887c5f6000Smrg # echo "creating $dirpart/$file" 3897c5f6000Smrg echo '# dummy' > "$dirpart/$file" 3907c5f6000Smrg done 391bccedf53Smrg done 3927c5f6000Smrg} 393bccedf53Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394bccedf53Smrg 395bccedf53Smrg 396bccedf53Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397bccedf53Smrg# ----------------------------- 398bccedf53Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399bccedf53Smrg# 400bccedf53Smrg# This code is only required when automatic dependency tracking 401bccedf53Smrg# is enabled. FIXME. This creates each `.P' file that we will 402bccedf53Smrg# need in order to bootstrap the dependency handling code. 403bccedf53SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404bccedf53Smrg[AC_CONFIG_COMMANDS([depfiles], 405bccedf53Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406bccedf53Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407bccedf53Smrg]) 408bccedf53Smrg 4097c5f6000Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4107c5f6000Smrg# Free Software Foundation, Inc. 4117c5f6000Smrg# 4127c5f6000Smrg# This file is free software; the Free Software Foundation 4137c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 4147c5f6000Smrg# with or without modifications, as long as this notice is preserved. 415bccedf53Smrg 4167c5f6000Smrg# serial 8 417bccedf53Smrg 4187c5f6000Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4197c5f6000SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420bccedf53Smrg 4217c5f6000Smrg# Do all the work for Automake. -*- Autoconf -*- 422bccedf53Smrg 4237c5f6000Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4247c5f6000Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4257c5f6000Smrg# 4267c5f6000Smrg# This file is free software; the Free Software Foundation 4277c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 4287c5f6000Smrg# with or without modifications, as long as this notice is preserved. 429bccedf53Smrg 4307c5f6000Smrg# serial 16 431bccedf53Smrg 4327c5f6000Smrg# This macro actually does too much. Some checks are only needed if 4337c5f6000Smrg# your package does certain things. But this isn't really a big deal. 4347c5f6000Smrg 4357c5f6000Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4367c5f6000Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4377c5f6000Smrg# ----------------------------------------------- 4387c5f6000Smrg# The call with PACKAGE and VERSION arguments is the old style 4397c5f6000Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4407c5f6000Smrg# and VERSION should now be passed to AC_INIT and removed from 4417c5f6000Smrg# the call to AM_INIT_AUTOMAKE. 4427c5f6000Smrg# We support both call styles for the transition. After 4437c5f6000Smrg# the next Automake release, Autoconf can make the AC_INIT 4447c5f6000Smrg# arguments mandatory, and then we can depend on a new Autoconf 4457c5f6000Smrg# release and drop the old call support. 4467c5f6000SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4477c5f6000Smrg[AC_PREREQ([2.62])dnl 4487c5f6000Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4497c5f6000Smrgdnl the ones we care about. 4507c5f6000Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4517c5f6000SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4527c5f6000SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4537c5f6000Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4547c5f6000Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4557c5f6000Smrg # is not polluted with repeated "-I." 4567c5f6000Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4577c5f6000Smrg # test to see if srcdir already configured 4587c5f6000Smrg if test -f $srcdir/config.status; then 4597c5f6000Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4607c5f6000Smrg fi 461bccedf53Smrgfi 4627c5f6000Smrg 4637c5f6000Smrg# test whether we have cygpath 4647c5f6000Smrgif test -z "$CYGPATH_W"; then 4657c5f6000Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4667c5f6000Smrg CYGPATH_W='cygpath -w' 4677c5f6000Smrg else 4687c5f6000Smrg CYGPATH_W=echo 4697c5f6000Smrg fi 470bccedf53Smrgfi 4717c5f6000SmrgAC_SUBST([CYGPATH_W]) 472bccedf53Smrg 4737c5f6000Smrg# Define the identity of the package. 4747c5f6000Smrgdnl Distinguish between old-style and new-style calls. 4757c5f6000Smrgm4_ifval([$2], 4767c5f6000Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4777c5f6000Smrg AC_SUBST([PACKAGE], [$1])dnl 4787c5f6000Smrg AC_SUBST([VERSION], [$2])], 4797c5f6000Smrg[_AM_SET_OPTIONS([$1])dnl 4807c5f6000Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4817c5f6000Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4827c5f6000Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4837c5f6000Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4847c5f6000Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485bccedf53Smrg 4867c5f6000Smrg_AM_IF_OPTION([no-define],, 4877c5f6000Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4887c5f6000Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489bccedf53Smrg 4907c5f6000Smrg# Some tools Automake needs. 4917c5f6000SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4927c5f6000SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4937c5f6000SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4947c5f6000SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4957c5f6000SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4967c5f6000SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4977c5f6000SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4987c5f6000SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4997c5f6000SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5007c5f6000SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5017c5f6000Smrg# We need awk for the "check" target. The system "awk" is bad on 5027c5f6000Smrg# some platforms. 5037c5f6000SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5047c5f6000SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5057c5f6000SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5067c5f6000Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5077c5f6000Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5087c5f6000Smrg [_AM_PROG_TAR([v7])])]) 5097c5f6000Smrg_AM_IF_OPTION([no-dependencies],, 5107c5f6000Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5117c5f6000Smrg [_AM_DEPENDENCIES(CC)], 5127c5f6000Smrg [define([AC_PROG_CC], 5137c5f6000Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5147c5f6000SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5157c5f6000Smrg [_AM_DEPENDENCIES(CXX)], 5167c5f6000Smrg [define([AC_PROG_CXX], 5177c5f6000Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5187c5f6000SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5197c5f6000Smrg [_AM_DEPENDENCIES(OBJC)], 5207c5f6000Smrg [define([AC_PROG_OBJC], 5217c5f6000Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5227c5f6000Smrg]) 5237c5f6000Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5247c5f6000Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5257c5f6000Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5267c5f6000Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5277c5f6000SmrgAC_CONFIG_COMMANDS_PRE(dnl 5287c5f6000Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5297c5f6000Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5307c5f6000Smrg]) 531bccedf53Smrg 5327c5f6000Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5337c5f6000Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5347c5f6000Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5357c5f6000Smrgm4_define([_AC_COMPILER_EXEEXT], 5367c5f6000Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537bccedf53Smrg 538bccedf53Smrg 5397c5f6000Smrg# When config.status generates a header, we must update the stamp-h file. 5407c5f6000Smrg# This file resides in the same directory as the config header 5417c5f6000Smrg# that is generated. The stamp files are numbered to have different names. 5427c5f6000Smrg 5437c5f6000Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5447c5f6000Smrg# loop where config.status creates the headers, so we can generate 5457c5f6000Smrg# our stamp files there. 5467c5f6000SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5477c5f6000Smrg[# Compute $1's index in $config_headers. 5487c5f6000Smrg_am_arg=$1 5497c5f6000Smrg_am_stamp_count=1 5507c5f6000Smrgfor _am_header in $config_headers :; do 5517c5f6000Smrg case $_am_header in 5527c5f6000Smrg $_am_arg | $_am_arg:* ) 5537c5f6000Smrg break ;; 5547c5f6000Smrg * ) 5557c5f6000Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5567c5f6000Smrg esac 5577c5f6000Smrgdone 5587c5f6000Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559bccedf53Smrg 5607c5f6000Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5617c5f6000Smrg# 5627c5f6000Smrg# This file is free software; the Free Software Foundation 5637c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 5647c5f6000Smrg# with or without modifications, as long as this notice is preserved. 565bccedf53Smrg 5667c5f6000Smrg# AM_PROG_INSTALL_SH 5677c5f6000Smrg# ------------------ 5687c5f6000Smrg# Define $install_sh. 5697c5f6000SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5707c5f6000Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5717c5f6000Smrgif test x"${install_sh}" != xset; then 5727c5f6000Smrg case $am_aux_dir in 5737c5f6000Smrg *\ * | *\ *) 5747c5f6000Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5757c5f6000Smrg *) 5767c5f6000Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5777c5f6000Smrg esac 578bccedf53Smrgfi 5797c5f6000SmrgAC_SUBST(install_sh)]) 580bccedf53Smrg 5817c5f6000Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5827c5f6000Smrg# 5837c5f6000Smrg# This file is free software; the Free Software Foundation 5847c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 5857c5f6000Smrg# with or without modifications, as long as this notice is preserved. 586bccedf53Smrg 5877c5f6000Smrg# serial 2 588bccedf53Smrg 5897c5f6000Smrg# Check whether the underlying file-system supports filenames 5907c5f6000Smrg# with a leading dot. For instance MS-DOS doesn't. 5917c5f6000SmrgAC_DEFUN([AM_SET_LEADING_DOT], 5927c5f6000Smrg[rm -rf .tst 2>/dev/null 5937c5f6000Smrgmkdir .tst 2>/dev/null 5947c5f6000Smrgif test -d .tst; then 5957c5f6000Smrg am__leading_dot=. 5967c5f6000Smrgelse 5977c5f6000Smrg am__leading_dot=_ 5987c5f6000Smrgfi 5997c5f6000Smrgrmdir .tst 2>/dev/null 6007c5f6000SmrgAC_SUBST([am__leading_dot])]) 601bccedf53Smrg 6027c5f6000Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6037c5f6000Smrg# From Jim Meyering 604bccedf53Smrg 6057c5f6000Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6067c5f6000Smrg# Free Software Foundation, Inc. 6077c5f6000Smrg# 6087c5f6000Smrg# This file is free software; the Free Software Foundation 6097c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 6107c5f6000Smrg# with or without modifications, as long as this notice is preserved. 611bccedf53Smrg 6127c5f6000Smrg# serial 5 613bccedf53Smrg 6147c5f6000Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6157c5f6000Smrg# ---------------------------------- 6167c5f6000Smrg# Control maintainer-specific portions of Makefiles. 6177c5f6000Smrg# Default is to disable them, unless `enable' is passed literally. 6187c5f6000Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 6197c5f6000Smrg# can override the default with the --enable/--disable switch. 620bccedf53SmrgAC_DEFUN([AM_MAINTAINER_MODE], 6217c5f6000Smrg[m4_case(m4_default([$1], [disable]), 6227c5f6000Smrg [enable], [m4_define([am_maintainer_other], [disable])], 6237c5f6000Smrg [disable], [m4_define([am_maintainer_other], [enable])], 6247c5f6000Smrg [m4_define([am_maintainer_other], [enable]) 6257c5f6000Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6267c5f6000SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6277c5f6000Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6287c5f6000Smrg AC_ARG_ENABLE([maintainer-mode], 6297c5f6000Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6307c5f6000Smrg (and sometimes confusing) to the casual installer], 6317c5f6000Smrg [USE_MAINTAINER_MODE=$enableval], 6327c5f6000Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633bccedf53Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6347c5f6000Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635bccedf53Smrg MAINT=$MAINTAINER_MODE_TRUE 6367c5f6000Smrg AC_SUBST([MAINT])dnl 637bccedf53Smrg] 638bccedf53Smrg) 639bccedf53Smrg 640bccedf53SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641bccedf53Smrg 6427c5f6000Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643bccedf53Smrg 6447c5f6000Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6457c5f6000Smrg# 6467c5f6000Smrg# This file is free software; the Free Software Foundation 6477c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 6487c5f6000Smrg# with or without modifications, as long as this notice is preserved. 649bccedf53Smrg 6507c5f6000Smrg# serial 4 651bccedf53Smrg 6527c5f6000Smrg# AM_MAKE_INCLUDE() 6537c5f6000Smrg# ----------------- 6547c5f6000Smrg# Check to see how make treats includes. 6557c5f6000SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6567c5f6000Smrg[am_make=${MAKE-make} 6577c5f6000Smrgcat > confinc << 'END' 6587c5f6000Smrgam__doit: 6597c5f6000Smrg @echo this is the am__doit target 6607c5f6000Smrg.PHONY: am__doit 6617c5f6000SmrgEND 6627c5f6000Smrg# If we don't find an include directive, just comment out the code. 6637c5f6000SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6647c5f6000Smrgam__include="#" 6657c5f6000Smrgam__quote= 6667c5f6000Smrg_am_result=none 6677c5f6000Smrg# First try GNU make style include. 6687c5f6000Smrgecho "include confinc" > confmf 6697c5f6000Smrg# Ignore all kinds of additional output from `make'. 6707c5f6000Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6717c5f6000Smrg*the\ am__doit\ target*) 6727c5f6000Smrg am__include=include 6737c5f6000Smrg am__quote= 6747c5f6000Smrg _am_result=GNU 6757c5f6000Smrg ;; 6767c5f6000Smrgesac 6777c5f6000Smrg# Now try BSD make style include. 6787c5f6000Smrgif test "$am__include" = "#"; then 6797c5f6000Smrg echo '.include "confinc"' > confmf 6807c5f6000Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6817c5f6000Smrg *the\ am__doit\ target*) 6827c5f6000Smrg am__include=.include 6837c5f6000Smrg am__quote="\"" 6847c5f6000Smrg _am_result=BSD 6857c5f6000Smrg ;; 6867c5f6000Smrg esac 6877c5f6000Smrgfi 6887c5f6000SmrgAC_SUBST([am__include]) 6897c5f6000SmrgAC_SUBST([am__quote]) 6907c5f6000SmrgAC_MSG_RESULT([$_am_result]) 6917c5f6000Smrgrm -f confinc confmf 6927c5f6000Smrg]) 693bccedf53Smrg 6947c5f6000Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695bccedf53Smrg 6967c5f6000Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6977c5f6000Smrg# Free Software Foundation, Inc. 6987c5f6000Smrg# 6997c5f6000Smrg# This file is free software; the Free Software Foundation 7007c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 7017c5f6000Smrg# with or without modifications, as long as this notice is preserved. 702bccedf53Smrg 703bccedf53Smrg# serial 6 704bccedf53Smrg 7057c5f6000Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7067c5f6000Smrg# ------------------------------ 7077c5f6000SmrgAC_DEFUN([AM_MISSING_PROG], 7087c5f6000Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7097c5f6000Smrg$1=${$1-"${am_missing_run}$2"} 7107c5f6000SmrgAC_SUBST($1)]) 711bccedf53Smrg 712bccedf53Smrg 7137c5f6000Smrg# AM_MISSING_HAS_RUN 7147c5f6000Smrg# ------------------ 7157c5f6000Smrg# Define MISSING if not defined so far and test if it supports --run. 7167c5f6000Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7177c5f6000SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7187c5f6000Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7197c5f6000SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7207c5f6000Smrgif test x"${MISSING+set}" != xset; then 7217c5f6000Smrg case $am_aux_dir in 7227c5f6000Smrg *\ * | *\ *) 7237c5f6000Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7247c5f6000Smrg *) 7257c5f6000Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7267c5f6000Smrg esac 727bccedf53Smrgfi 7287c5f6000Smrg# Use eval to expand $SHELL 7297c5f6000Smrgif eval "$MISSING --run true"; then 7307c5f6000Smrg am_missing_run="$MISSING --run " 7317c5f6000Smrgelse 7327c5f6000Smrg am_missing_run= 7337c5f6000Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7347c5f6000Smrgfi 7357c5f6000Smrg]) 736bccedf53Smrg 7377c5f6000Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738bccedf53Smrg# 7397c5f6000Smrg# This file is free software; the Free Software Foundation 7407c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 7417c5f6000Smrg# with or without modifications, as long as this notice is preserved. 7427c5f6000Smrg 7437c5f6000Smrg# AM_PROG_MKDIR_P 7447c5f6000Smrg# --------------- 7457c5f6000Smrg# Check for `mkdir -p'. 7467c5f6000SmrgAC_DEFUN([AM_PROG_MKDIR_P], 7477c5f6000Smrg[AC_PREREQ([2.60])dnl 7487c5f6000SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7497c5f6000Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7507c5f6000Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 7517c5f6000Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7527c5f6000Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7537c5f6000Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7547c5f6000Smrgdnl adjustment using top_builddir (which is defined more often than 7557c5f6000Smrgdnl MKDIR_P). 7567c5f6000SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7577c5f6000Smrgcase $mkdir_p in 7587c5f6000Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 7597c5f6000Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7607c5f6000Smrgesac 7617c5f6000Smrg]) 7627c5f6000Smrg 7637c5f6000Smrg# Helper functions for option handling. -*- Autoconf -*- 7647c5f6000Smrg 7657c5f6000Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766bccedf53Smrg# 7677c5f6000Smrg# This file is free software; the Free Software Foundation 7687c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 7697c5f6000Smrg# with or without modifications, as long as this notice is preserved. 770bccedf53Smrg 7717c5f6000Smrg# serial 4 772bccedf53Smrg 7737c5f6000Smrg# _AM_MANGLE_OPTION(NAME) 7747c5f6000Smrg# ----------------------- 7757c5f6000SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7767c5f6000Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777bccedf53Smrg 7787c5f6000Smrg# _AM_SET_OPTION(NAME) 7797c5f6000Smrg# ------------------------------ 7807c5f6000Smrg# Set option NAME. Presently that only means defining a flag for this option. 7817c5f6000SmrgAC_DEFUN([_AM_SET_OPTION], 7827c5f6000Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783bccedf53Smrg 7847c5f6000Smrg# _AM_SET_OPTIONS(OPTIONS) 7857c5f6000Smrg# ---------------------------------- 7867c5f6000Smrg# OPTIONS is a space-separated list of Automake options. 7877c5f6000SmrgAC_DEFUN([_AM_SET_OPTIONS], 7887c5f6000Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789bccedf53Smrg 7907c5f6000Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7917c5f6000Smrg# ------------------------------------------- 7927c5f6000Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7937c5f6000SmrgAC_DEFUN([_AM_IF_OPTION], 7947c5f6000Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7957c5f6000Smrg 7967c5f6000Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7977c5f6000Smrg 7987c5f6000Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7997c5f6000Smrg# Free Software Foundation, Inc. 800bccedf53Smrg# 8017c5f6000Smrg# This file is free software; the Free Software Foundation 8027c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 8037c5f6000Smrg# with or without modifications, as long as this notice is preserved. 8047c5f6000Smrg 8057c5f6000Smrg# serial 5 8067c5f6000Smrg 8077c5f6000Smrg# AM_SANITY_CHECK 8087c5f6000Smrg# --------------- 8097c5f6000SmrgAC_DEFUN([AM_SANITY_CHECK], 8107c5f6000Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8117c5f6000Smrg# Just in case 8127c5f6000Smrgsleep 1 8137c5f6000Smrgecho timestamp > conftest.file 8147c5f6000Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8157c5f6000Smrg# name. Accept space and tab only in the latter. 8167c5f6000Smrgam_lf=' 8177c5f6000Smrg' 8187c5f6000Smrgcase `pwd` in 8197c5f6000Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8207c5f6000Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8217c5f6000Smrgesac 8227c5f6000Smrgcase $srcdir in 8237c5f6000Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8247c5f6000Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8257c5f6000Smrgesac 8267c5f6000Smrg 8277c5f6000Smrg# Do `set' in a subshell so we don't clobber the current shell's 8287c5f6000Smrg# arguments. Must try -L first in case configure is actually a 8297c5f6000Smrg# symlink; some systems play weird games with the mod time of symlinks 8307c5f6000Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8317c5f6000Smrg# directory). 8327c5f6000Smrgif ( 8337c5f6000Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8347c5f6000Smrg if test "$[*]" = "X"; then 8357c5f6000Smrg # -L didn't work. 8367c5f6000Smrg set X `ls -t "$srcdir/configure" conftest.file` 8377c5f6000Smrg fi 8387c5f6000Smrg rm -f conftest.file 8397c5f6000Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8407c5f6000Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8417c5f6000Smrg 8427c5f6000Smrg # If neither matched, then we have a broken ls. This can happen 8437c5f6000Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8447c5f6000Smrg # broken ls alias from the environment. This has actually 8457c5f6000Smrg # happened. Such a system could not be considered "sane". 8467c5f6000Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8477c5f6000Smrgalias in your environment]) 8487c5f6000Smrg fi 8497c5f6000Smrg 8507c5f6000Smrg test "$[2]" = conftest.file 8517c5f6000Smrg ) 8527c5f6000Smrgthen 8537c5f6000Smrg # Ok. 8547c5f6000Smrg : 8557c5f6000Smrgelse 8567c5f6000Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8577c5f6000SmrgCheck your system clock]) 8587c5f6000Smrgfi 8597c5f6000SmrgAC_MSG_RESULT(yes)]) 8607c5f6000Smrg 8617c5f6000Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 862bccedf53Smrg# 8637c5f6000Smrg# This file is free software; the Free Software Foundation 8647c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 8657c5f6000Smrg# with or without modifications, as long as this notice is preserved. 8667c5f6000Smrg 8677c5f6000Smrg# serial 1 8687c5f6000Smrg 8697c5f6000Smrg# AM_SILENT_RULES([DEFAULT]) 8707c5f6000Smrg# -------------------------- 8717c5f6000Smrg# Enable less verbose build rules; with the default set to DEFAULT 8727c5f6000Smrg# (`yes' being less verbose, `no' or empty being verbose). 8737c5f6000SmrgAC_DEFUN([AM_SILENT_RULES], 8747c5f6000Smrg[AC_ARG_ENABLE([silent-rules], 8757c5f6000Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8767c5f6000Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8777c5f6000Smrgcase $enable_silent_rules in 8787c5f6000Smrgyes) AM_DEFAULT_VERBOSITY=0;; 8797c5f6000Smrgno) AM_DEFAULT_VERBOSITY=1;; 8807c5f6000Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8817c5f6000Smrgesac 8827c5f6000SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8837c5f6000SmrgAM_BACKSLASH='\' 8847c5f6000SmrgAC_SUBST([AM_BACKSLASH])dnl 8857c5f6000Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8867c5f6000Smrg]) 8877c5f6000Smrg 8887c5f6000Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889bccedf53Smrg# 8907c5f6000Smrg# This file is free software; the Free Software Foundation 8917c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 8927c5f6000Smrg# with or without modifications, as long as this notice is preserved. 893bccedf53Smrg 8947c5f6000Smrg# AM_PROG_INSTALL_STRIP 8957c5f6000Smrg# --------------------- 8967c5f6000Smrg# One issue with vendor `install' (even GNU) is that you can't 8977c5f6000Smrg# specify the program used to strip binaries. This is especially 8987c5f6000Smrg# annoying in cross-compiling environments, where the build's strip 8997c5f6000Smrg# is unlikely to handle the host's binaries. 9007c5f6000Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9017c5f6000Smrg# always use install-sh in `make install-strip', and initialize 9027c5f6000Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9037c5f6000SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9047c5f6000Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9057c5f6000Smrg# Installed binaries are usually stripped using `strip' when the user 9067c5f6000Smrg# run `make install-strip'. However `strip' might not be the right 9077c5f6000Smrg# tool to use in cross-compilation environments, therefore Automake 9087c5f6000Smrg# will honor the `STRIP' environment variable to overrule this program. 9097c5f6000Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9107c5f6000Smrgif test "$cross_compiling" != no; then 9117c5f6000Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9127c5f6000Smrgfi 9137c5f6000SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9147c5f6000SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915bccedf53Smrg 9167c5f6000Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9177c5f6000Smrg# 9187c5f6000Smrg# This file is free software; the Free Software Foundation 9197c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 9207c5f6000Smrg# with or without modifications, as long as this notice is preserved. 921bccedf53Smrg 9227c5f6000Smrg# serial 2 923bccedf53Smrg 9247c5f6000Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9257c5f6000Smrg# --------------------------- 9267c5f6000Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9277c5f6000Smrg# This macro is traced by Automake. 9287c5f6000SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929bccedf53Smrg 9307c5f6000Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9317c5f6000Smrg# --------------------------- 9327c5f6000Smrg# Public sister of _AM_SUBST_NOTMAKE. 9337c5f6000SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934bccedf53Smrg 9357c5f6000Smrg# Check how to create a tarball. -*- Autoconf -*- 936bccedf53Smrg 9377c5f6000Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9387c5f6000Smrg# 9397c5f6000Smrg# This file is free software; the Free Software Foundation 9407c5f6000Smrg# gives unlimited permission to copy and/or distribute it, 9417c5f6000Smrg# with or without modifications, as long as this notice is preserved. 942bccedf53Smrg 9437c5f6000Smrg# serial 2 944bccedf53Smrg 9457c5f6000Smrg# _AM_PROG_TAR(FORMAT) 9467c5f6000Smrg# -------------------- 9477c5f6000Smrg# Check how to create a tarball in format FORMAT. 9487c5f6000Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9497c5f6000Smrg# 9507c5f6000Smrg# Substitute a variable $(am__tar) that is a command 9517c5f6000Smrg# writing to stdout a FORMAT-tarball containing the directory 9527c5f6000Smrg# $tardir. 9537c5f6000Smrg# tardir=directory && $(am__tar) > result.tar 9547c5f6000Smrg# 9557c5f6000Smrg# Substitute a variable $(am__untar) that extract such 9567c5f6000Smrg# a tarball read from stdin. 9577c5f6000Smrg# $(am__untar) < result.tar 9587c5f6000SmrgAC_DEFUN([_AM_PROG_TAR], 9597c5f6000Smrg[# Always define AMTAR for backward compatibility. 9607c5f6000SmrgAM_MISSING_PROG([AMTAR], [tar]) 9617c5f6000Smrgm4_if([$1], [v7], 9627c5f6000Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9637c5f6000Smrg [m4_case([$1], [ustar],, [pax],, 9647c5f6000Smrg [m4_fatal([Unknown tar format])]) 9657c5f6000SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9667c5f6000Smrg# Loop over all known methods to create a tar archive until one works. 9677c5f6000Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9687c5f6000Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9697c5f6000Smrg# Do not fold the above two line into one, because Tru64 sh and 9707c5f6000Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9717c5f6000Smrgfor _am_tool in $_am_tools 9727c5f6000Smrgdo 9737c5f6000Smrg case $_am_tool in 9747c5f6000Smrg gnutar) 9757c5f6000Smrg for _am_tar in tar gnutar gtar; 9767c5f6000Smrg do 9777c5f6000Smrg AM_RUN_LOG([$_am_tar --version]) && break 9787c5f6000Smrg done 9797c5f6000Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9807c5f6000Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9817c5f6000Smrg am__untar="$_am_tar -xf -" 9827c5f6000Smrg ;; 9837c5f6000Smrg plaintar) 9847c5f6000Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9857c5f6000Smrg # ustar tarball either. 9867c5f6000Smrg (tar --version) >/dev/null 2>&1 && continue 9877c5f6000Smrg am__tar='tar chf - "$$tardir"' 9887c5f6000Smrg am__tar_='tar chf - "$tardir"' 9897c5f6000Smrg am__untar='tar xf -' 9907c5f6000Smrg ;; 9917c5f6000Smrg pax) 9927c5f6000Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9937c5f6000Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9947c5f6000Smrg am__untar='pax -r' 9957c5f6000Smrg ;; 9967c5f6000Smrg cpio) 9977c5f6000Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9987c5f6000Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9997c5f6000Smrg am__untar='cpio -i -H $1 -d' 10007c5f6000Smrg ;; 10017c5f6000Smrg none) 10027c5f6000Smrg am__tar=false 10037c5f6000Smrg am__tar_=false 10047c5f6000Smrg am__untar=false 10057c5f6000Smrg ;; 10067c5f6000Smrg esac 1007bccedf53Smrg 10087c5f6000Smrg # If the value was cached, stop now. We just wanted to have am__tar 10097c5f6000Smrg # and am__untar set. 10107c5f6000Smrg test -n "${am_cv_prog_tar_$1}" && break 10117c5f6000Smrg 10127c5f6000Smrg # tar/untar a dummy directory, and stop if the command works 10137c5f6000Smrg rm -rf conftest.dir 10147c5f6000Smrg mkdir conftest.dir 10157c5f6000Smrg echo GrepMe > conftest.dir/file 10167c5f6000Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10177c5f6000Smrg rm -rf conftest.dir 10187c5f6000Smrg if test -s conftest.tar; then 10197c5f6000Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 10207c5f6000Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10217c5f6000Smrg fi 10227c5f6000Smrgdone 10237c5f6000Smrgrm -rf conftest.dir 1024bccedf53Smrg 10257c5f6000SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10267c5f6000SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10277c5f6000SmrgAC_SUBST([am__tar]) 10287c5f6000SmrgAC_SUBST([am__untar]) 10297c5f6000Smrg]) # _AM_PROG_TAR 10307c5f6000Smrg 10317c5f6000Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032bccedf53Smrgdnl 10337c5f6000Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034bccedf53Smrgdnl 10357c5f6000Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10367c5f6000Smrgdnl copy of this software and associated documentation files (the 10377c5f6000Smrgdnl "Software"), to deal in the Software without restriction, including 10387c5f6000Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 10397c5f6000Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 10407c5f6000Smrgdnl to whom the Software is furnished to do so, provided that the above 10417c5f6000Smrgdnl copyright notice(s) and this permission notice appear in all copies of 10427c5f6000Smrgdnl the Software and that both the above copyright notice(s) and this 10437c5f6000Smrgdnl permission notice appear in supporting documentation. 10447c5f6000Smrgdnl 1045bccedf53Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1046bccedf53Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10477c5f6000Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 10487c5f6000Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 10497c5f6000Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 10507c5f6000Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 10517c5f6000Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 10527c5f6000Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 10537c5f6000Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 10547c5f6000Smrgdnl 10557c5f6000Smrgdnl Except as contained in this notice, the name of a copyright holder 10567c5f6000Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 10577c5f6000Smrgdnl or other dealings in this Software without prior written authorization 10587c5f6000Smrgdnl of the copyright holder. 10597c5f6000Smrg 10607c5f6000Smrg# XORG_MACROS_VERSION(required-version) 10617c5f6000Smrg# ------------------------------------- 10627c5f6000Smrg# Minimum version: 1.1.0 10637c5f6000Smrg# 10647c5f6000Smrg# If you're using a macro added in Version 1.1 or newer, include this in 10657c5f6000Smrg# your configure.ac with the minimum required version, such as: 10667c5f6000Smrg# XORG_MACROS_VERSION(1.1) 10677c5f6000Smrg# 10687c5f6000Smrg# To ensure that this macro is defined, also add: 10697c5f6000Smrg# m4_ifndef([XORG_MACROS_VERSION], 10707c5f6000Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10717c5f6000Smrg# 10727c5f6000Smrg# 10737c5f6000Smrg# See the "minimum version" comment for each macro you use to see what 10747c5f6000Smrg# version you require. 10757c5f6000Smrgm4_defun([XORG_MACROS_VERSION],[ 10767c5f6000Smrgm4_define([vers_have], [1.3.0]) 10777c5f6000Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 10787c5f6000Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 10797c5f6000Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 10807c5f6000Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 10817c5f6000Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 10827c5f6000Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 10837c5f6000Smrgm4_undefine([vers_have]) 10847c5f6000Smrgm4_undefine([maj_have]) 10857c5f6000Smrgm4_undefine([maj_needed]) 10867c5f6000Smrg]) # XORG_MACROS_VERSION 1087bccedf53Smrg 1088bccedf53Smrg# XORG_PROG_RAWCPP() 1089bccedf53Smrg# ------------------ 10907c5f6000Smrg# Minimum version: 1.0.0 10917c5f6000Smrg# 1092bccedf53Smrg# Find cpp program and necessary flags for use in pre-processing text files 1093bccedf53Smrg# such as man pages and config files 1094bccedf53SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1095bccedf53SmrgAC_REQUIRE([AC_PROG_CPP]) 1096bccedf53SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1097bccedf53Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1098bccedf53Smrg 1099bccedf53Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1100bccedf53Smrg# which is not the best choice for supporting other OS'es, but covers most 1101bccedf53Smrg# of the ones we need for now. 1102bccedf53SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1103bccedf53SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1104bccedf53Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1105bccedf53Smrg AC_MSG_RESULT([no]) 1106bccedf53Smrgelse 1107bccedf53Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1108bccedf53Smrg RAWCPPFLAGS=-undef 1109bccedf53Smrg AC_MSG_RESULT([yes]) 11107c5f6000Smrg # under Cygwin unix is still defined even with -undef 11117c5f6000Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11127c5f6000Smrg RAWCPPFLAGS="-undef -ansi" 11137c5f6000Smrg AC_MSG_RESULT([yes, with -ansi]) 1114bccedf53Smrg else 1115bccedf53Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1116bccedf53Smrg fi 1117bccedf53Smrgfi 1118bccedf53Smrgrm -f conftest.$ac_ext 1119bccedf53Smrg 1120bccedf53SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1121bccedf53SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1122bccedf53Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1123bccedf53Smrg AC_MSG_RESULT([no]) 1124bccedf53Smrgelse 1125bccedf53Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1126bccedf53Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1127bccedf53Smrg AC_MSG_RESULT([yes]) 1128bccedf53Smrg else 1129bccedf53Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1130bccedf53Smrg fi 1131bccedf53Smrgfi 1132bccedf53Smrgrm -f conftest.$ac_ext 1133bccedf53SmrgAC_SUBST(RAWCPPFLAGS) 1134bccedf53Smrg]) # XORG_PROG_RAWCPP 1135bccedf53Smrg 1136bccedf53Smrg# XORG_MANPAGE_SECTIONS() 1137bccedf53Smrg# ----------------------- 11387c5f6000Smrg# Minimum version: 1.0.0 11397c5f6000Smrg# 1140bccedf53Smrg# Determine which sections man pages go in for the different man page types 1141bccedf53Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1142bccedf53Smrg# Not sure if there's any better way than just hardcoding by OS name. 1143bccedf53Smrg# Override default settings by setting environment variables 1144bccedf53Smrg 1145bccedf53SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1146bccedf53SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1147bccedf53Smrg 1148bccedf53Smrgif test x$APP_MAN_SUFFIX = x ; then 11497c5f6000Smrg APP_MAN_SUFFIX=1 1150bccedf53Smrgfi 1151bccedf53Smrgif test x$APP_MAN_DIR = x ; then 11527c5f6000Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1153bccedf53Smrgfi 1154bccedf53Smrg 1155bccedf53Smrgif test x$LIB_MAN_SUFFIX = x ; then 11567c5f6000Smrg LIB_MAN_SUFFIX=3 1157bccedf53Smrgfi 1158bccedf53Smrgif test x$LIB_MAN_DIR = x ; then 11597c5f6000Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1160bccedf53Smrgfi 1161bccedf53Smrg 1162bccedf53Smrgif test x$FILE_MAN_SUFFIX = x ; then 1163bccedf53Smrg case $host_os in 1164bccedf53Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1165bccedf53Smrg *) FILE_MAN_SUFFIX=5 ;; 1166bccedf53Smrg esac 1167bccedf53Smrgfi 1168bccedf53Smrgif test x$FILE_MAN_DIR = x ; then 11697c5f6000Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1170bccedf53Smrgfi 1171bccedf53Smrg 1172bccedf53Smrgif test x$MISC_MAN_SUFFIX = x ; then 1173bccedf53Smrg case $host_os in 1174bccedf53Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1175bccedf53Smrg *) MISC_MAN_SUFFIX=7 ;; 1176bccedf53Smrg esac 1177bccedf53Smrgfi 1178bccedf53Smrgif test x$MISC_MAN_DIR = x ; then 11797c5f6000Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1180bccedf53Smrgfi 1181bccedf53Smrg 1182bccedf53Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1183bccedf53Smrg case $host_os in 1184bccedf53Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1185bccedf53Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1186bccedf53Smrg esac 1187bccedf53Smrgfi 1188bccedf53Smrgif test x$DRIVER_MAN_DIR = x ; then 11897c5f6000Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1190bccedf53Smrgfi 1191bccedf53Smrg 1192bccedf53Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1193bccedf53Smrg case $host_os in 1194bccedf53Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1195bccedf53Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1196bccedf53Smrg esac 1197bccedf53Smrgfi 1198bccedf53Smrgif test x$ADMIN_MAN_DIR = x ; then 1199bccedf53Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1200bccedf53Smrgfi 1201bccedf53Smrg 1202bccedf53Smrg 1203bccedf53SmrgAC_SUBST([APP_MAN_SUFFIX]) 1204bccedf53SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1205bccedf53SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1206bccedf53SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1207bccedf53SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1208bccedf53SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1209bccedf53SmrgAC_SUBST([APP_MAN_DIR]) 1210bccedf53SmrgAC_SUBST([LIB_MAN_DIR]) 1211bccedf53SmrgAC_SUBST([FILE_MAN_DIR]) 1212bccedf53SmrgAC_SUBST([MISC_MAN_DIR]) 1213bccedf53SmrgAC_SUBST([DRIVER_MAN_DIR]) 1214bccedf53SmrgAC_SUBST([ADMIN_MAN_DIR]) 1215bccedf53Smrg]) # XORG_MANPAGE_SECTIONS 1216bccedf53Smrg 1217bccedf53Smrg# XORG_CHECK_LINUXDOC 1218bccedf53Smrg# ------------------- 12197c5f6000Smrg# Minimum version: 1.0.0 12207c5f6000Smrg# 1221bccedf53Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1222bccedf53Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1223bccedf53Smrg# Whether or not the necessary tools and files are found can be checked 1224bccedf53Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1225bccedf53SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12267c5f6000Smrgif test x$XORG_SGML_PATH = x ; then 12277c5f6000Smrg XORG_SGML_PATH=$prefix/share/sgml 12287c5f6000Smrgfi 12297c5f6000SmrgHAVE_DEFS_ENT= 12307c5f6000Smrg 12317c5f6000Smrgif test x"$cross_compiling" = x"yes" ; then 12327c5f6000Smrg HAVE_DEFS_ENT=no 12337c5f6000Smrgelse 12347c5f6000Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12357c5f6000Smrgfi 1236bccedf53Smrg 1237bccedf53SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1238bccedf53SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1239bccedf53Smrg 1240bccedf53SmrgAC_MSG_CHECKING([Whether to build documentation]) 1241bccedf53Smrg 12427c5f6000Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1243bccedf53Smrg BUILDDOC=yes 1244bccedf53Smrgelse 1245bccedf53Smrg BUILDDOC=no 1246bccedf53Smrgfi 1247bccedf53Smrg 1248bccedf53SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1249bccedf53Smrg 1250bccedf53SmrgAC_MSG_RESULT([$BUILDDOC]) 1251bccedf53Smrg 1252bccedf53SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1253bccedf53Smrg 12547c5f6000Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1255bccedf53Smrg BUILDPDFDOC=yes 1256bccedf53Smrgelse 1257bccedf53Smrg BUILDPDFDOC=no 1258bccedf53Smrgfi 1259bccedf53Smrg 1260bccedf53SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1261bccedf53Smrg 1262bccedf53SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1263bccedf53Smrg 12647c5f6000SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12657c5f6000SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1266bccedf53SmrgMAKE_PDF="$PS2PDF" 12677c5f6000SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1268bccedf53Smrg 1269bccedf53SmrgAC_SUBST(MAKE_TEXT) 1270bccedf53SmrgAC_SUBST(MAKE_PS) 1271bccedf53SmrgAC_SUBST(MAKE_PDF) 1272bccedf53SmrgAC_SUBST(MAKE_HTML) 1273bccedf53Smrg]) # XORG_CHECK_LINUXDOC 1274bccedf53Smrg 12757c5f6000Smrg# XORG_CHECK_DOCBOOK 12767c5f6000Smrg# ------------------- 12777c5f6000Smrg# Minimum version: 1.0.0 12787c5f6000Smrg# 12797c5f6000Smrg# Checks for the ability to build output formats from SGML DocBook source. 12807c5f6000Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 12817c5f6000Smrg# indicates whether the necessary tools and files are found and, if set, 12827c5f6000Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 12837c5f6000SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 12847c5f6000Smrgif test x$XORG_SGML_PATH = x ; then 12857c5f6000Smrg XORG_SGML_PATH=$prefix/share/sgml 12867c5f6000Smrgfi 12877c5f6000SmrgHAVE_DEFS_ENT= 12887c5f6000SmrgBUILDTXTDOC=no 12897c5f6000SmrgBUILDPDFDOC=no 12907c5f6000SmrgBUILDPSDOC=no 12917c5f6000SmrgBUILDHTMLDOC=no 12927c5f6000Smrg 12937c5f6000SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12947c5f6000Smrg 12957c5f6000SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 12967c5f6000SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 12977c5f6000SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 12987c5f6000SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 12997c5f6000Smrg 13007c5f6000SmrgAC_MSG_CHECKING([Whether to build text documentation]) 13017c5f6000Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 13027c5f6000Smrg test x$BUILD_TXTDOC != xno; then 13037c5f6000Smrg BUILDTXTDOC=yes 13047c5f6000Smrgfi 13057c5f6000SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13067c5f6000SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13077c5f6000Smrg 13087c5f6000SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 13097c5f6000Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 13107c5f6000Smrg test x$BUILD_PDFDOC != xno; then 13117c5f6000Smrg BUILDPDFDOC=yes 13127c5f6000Smrgfi 13137c5f6000SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13147c5f6000SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13157c5f6000Smrg 13167c5f6000SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 13177c5f6000Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 13187c5f6000Smrg test x$BUILD_PSDOC != xno; then 13197c5f6000Smrg BUILDPSDOC=yes 13207c5f6000Smrgfi 13217c5f6000SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13227c5f6000SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13237c5f6000Smrg 13247c5f6000SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 13257c5f6000Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 13267c5f6000Smrg test x$BUILD_HTMLDOC != xno; then 13277c5f6000Smrg BUILDHTMLDOC=yes 13287c5f6000Smrgfi 13297c5f6000SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13307c5f6000SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13317c5f6000Smrg 13327c5f6000SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13337c5f6000SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13347c5f6000SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13357c5f6000SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13367c5f6000Smrg 13377c5f6000SmrgAC_SUBST(MAKE_TEXT) 13387c5f6000SmrgAC_SUBST(MAKE_PS) 13397c5f6000SmrgAC_SUBST(MAKE_PDF) 13407c5f6000SmrgAC_SUBST(MAKE_HTML) 13417c5f6000Smrg]) # XORG_CHECK_DOCBOOK 13427c5f6000Smrg 1343bccedf53Smrg# XORG_CHECK_MALLOC_ZERO 1344bccedf53Smrg# ---------------------- 13457c5f6000Smrg# Minimum version: 1.0.0 13467c5f6000Smrg# 1347bccedf53Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1348bccedf53Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1349bccedf53Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1350bccedf53SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1351bccedf53SmrgAC_ARG_ENABLE(malloc0returnsnull, 13527c5f6000Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1353bccedf53Smrg [malloc(0) returns NULL (default: auto)]), 1354bccedf53Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1355bccedf53Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1356bccedf53Smrg 1357bccedf53SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1358bccedf53Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1359bccedf53Smrg AC_RUN_IFELSE([ 1360bccedf53Smrgchar *malloc(); 1361bccedf53Smrgchar *realloc(); 1362bccedf53Smrgchar *calloc(); 1363bccedf53Smrgmain() { 1364bccedf53Smrg char *m0, *r0, *c0, *p; 1365bccedf53Smrg m0 = malloc(0); 1366bccedf53Smrg p = malloc(10); 1367bccedf53Smrg r0 = realloc(p,0); 1368bccedf53Smrg c0 = calloc(0); 1369bccedf53Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1370bccedf53Smrg}], 1371bccedf53Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1372bccedf53Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 1373bccedf53Smrgfi 1374bccedf53SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1375bccedf53Smrg 1376bccedf53Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1377bccedf53Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1378bccedf53Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1379bccedf53Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1380bccedf53Smrgelse 1381bccedf53Smrg MALLOC_ZERO_CFLAGS="" 1382bccedf53Smrg XMALLOC_ZERO_CFLAGS="" 1383bccedf53Smrg XTMALLOC_ZERO_CFLAGS="" 1384bccedf53Smrgfi 1385bccedf53Smrg 1386bccedf53SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1387bccedf53SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1388bccedf53SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1389bccedf53Smrg]) # XORG_CHECK_MALLOC_ZERO 1390bccedf53Smrg 13917c5f6000Smrg# XORG_WITH_LINT() 13927c5f6000Smrg# ---------------- 13937c5f6000Smrg# Minimum version: 1.1.0 13947c5f6000Smrg# 13957c5f6000Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 13967c5f6000Smrg# is specified. (Use --with-lint=sparse for sparse.) 13977c5f6000Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 13987c5f6000Smrg# Sets $LINT_FLAGS to flags to pass to source checker 13997c5f6000Smrg# Sets LINT automake conditional if enabled (default: disabled) 14007c5f6000Smrg# 14017c5f6000SmrgAC_DEFUN([XORG_WITH_LINT],[ 14027c5f6000Smrg 14037c5f6000Smrg# Allow checking code with lint, sparse, etc. 14047c5f6000SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 14057c5f6000Smrg [Use a lint-style source code checker (default: disabled)])], 14067c5f6000Smrg [use_lint=$withval], [use_lint=no]) 14077c5f6000Smrgif test "x$use_lint" = "xyes" ; then 14087c5f6000Smrg LINT="lint" 14097c5f6000Smrgelse 14107c5f6000Smrg LINT="$use_lint" 14117c5f6000Smrgfi 14127c5f6000Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 14137c5f6000Smrg case $LINT in 14147c5f6000Smrg lint|*/lint) 14157c5f6000Smrg case $host_os in 14167c5f6000Smrg solaris*) 14177c5f6000Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 14187c5f6000Smrg ;; 14197c5f6000Smrg esac 14207c5f6000Smrg ;; 14217c5f6000Smrg esac 14227c5f6000Smrgfi 14237c5f6000Smrg 14247c5f6000SmrgAC_SUBST(LINT) 14257c5f6000SmrgAC_SUBST(LINT_FLAGS) 14267c5f6000SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 14277c5f6000Smrg 14287c5f6000Smrg]) # XORG_WITH_LINT 14297c5f6000Smrg 14307c5f6000Smrg# XORG_LINT_LIBRARY(LIBNAME) 14317c5f6000Smrg# -------------------------- 14327c5f6000Smrg# Minimum version: 1.1.0 14337c5f6000Smrg# 14347c5f6000Smrg# Sets up flags for building lint libraries for checking programs that call 14357c5f6000Smrg# functions in the library. 14367c5f6000Smrg# Disabled by default, enable with --enable-lint-library 14377c5f6000Smrg# Sets: 14387c5f6000Smrg# @LINTLIB@ - name of lint library file to make 14397c5f6000Smrg# MAKE_LINT_LIB - automake conditional 14407c5f6000Smrg# 14417c5f6000Smrg 14427c5f6000SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 14437c5f6000SmrgAC_REQUIRE([XORG_WITH_LINT]) 14447c5f6000Smrg# Build lint "library" for more indepth checks of programs calling this library 14457c5f6000SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 14467c5f6000Smrg [Create lint library (default: disabled)])], 14477c5f6000Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 14487c5f6000Smrgif test "x$make_lint_lib" != "xno" ; then 14497c5f6000Smrg if test "x$LINT" = "xno" ; then 14507c5f6000Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 14517c5f6000Smrg fi 14527c5f6000Smrg if test "x$make_lint_lib" = "xyes" ; then 14537c5f6000Smrg LINTLIB=llib-l$1.ln 14547c5f6000Smrg else 14557c5f6000Smrg LINTLIB=$make_lint_lib 14567c5f6000Smrg fi 14577c5f6000Smrgfi 14587c5f6000SmrgAC_SUBST(LINTLIB) 14597c5f6000SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 14607c5f6000Smrg 14617c5f6000Smrg]) # XORG_LINT_LIBRARY 14627c5f6000Smrg 14637c5f6000Smrg# XORG_CWARNFLAGS 14647c5f6000Smrg# --------------- 14657c5f6000Smrg# Minimum version: 1.2.0 14667c5f6000Smrg# 14677c5f6000Smrg# Defines CWARNFLAGS to enable C compiler warnings. 14687c5f6000Smrg# 14697c5f6000SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 14707c5f6000SmrgAC_REQUIRE([AC_PROG_CC]) 14717c5f6000Smrgif test "x$GCC" = xyes ; then 14727c5f6000Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 14737c5f6000Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 14747c5f6000Smrg-Wbad-function-cast" 14757c5f6000Smrg case `$CC -dumpversion` in 14767c5f6000Smrg 3.4.* | 4.*) 14777c5f6000Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 14787c5f6000Smrg ;; 14797c5f6000Smrg esac 14807c5f6000Smrgelse 14817c5f6000Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 14827c5f6000Smrg if test "x$SUNCC" = "xyes"; then 14837c5f6000Smrg CWARNFLAGS="-v" 14847c5f6000Smrg fi 14857c5f6000Smrgfi 14867c5f6000SmrgAC_SUBST(CWARNFLAGS) 14877c5f6000Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 14887c5f6000Smrg]) # XORG_CWARNFLAGS 14897c5f6000Smrg 14907c5f6000Smrg# XORG_STRICT_OPTION 14917c5f6000Smrg# ----------------------- 14927c5f6000Smrg# Minimum version: 1.3.0 14937c5f6000Smrg# 14947c5f6000Smrg# Add configure option to enable strict compilation 14957c5f6000SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 14967c5f6000SmrgAC_REQUIRE([AC_PROG_CC]) 14977c5f6000SmrgAC_REQUIRE([AC_PROG_CC_C99]) 14987c5f6000SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 14997c5f6000Smrg 15007c5f6000SmrgAC_ARG_ENABLE(strict-compilation, 15017c5f6000Smrg AS_HELP_STRING([--enable-strict-compilation], 15027c5f6000Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 15037c5f6000Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 15047c5f6000Smrgif test "x$STRICT_COMPILE" = "xyes"; then 15057c5f6000Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 15067c5f6000Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 15077c5f6000Smrg if test "x$GCC" = xyes ; then 15087c5f6000Smrg STRICT_CFLAGS="-pedantic -Werror" 15097c5f6000Smrg elif test "x$SUNCC" = "xyes"; then 15107c5f6000Smrg STRICT_CFLAGS="-errwarn" 15117c5f6000Smrg elif test "x$INTELCC" = "xyes"; then 15127c5f6000Smrg STRICT_CFLAGS="-Werror" 15137c5f6000Smrg fi 15147c5f6000Smrgfi 15157c5f6000SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 15167c5f6000SmrgAC_SUBST([CWARNFLAGS]) 15177c5f6000Smrg]) # XORG_STRICT_OPTION 15187c5f6000Smrg 15197c5f6000Smrg# XORG_DEFAULT_OPTIONS 15207c5f6000Smrg# -------------------- 15217c5f6000Smrg# Minimum version: 1.3.0 15227c5f6000Smrg# 15237c5f6000Smrg# Defines default options for X.Org modules. 15247c5f6000Smrg# 15257c5f6000SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 15267c5f6000SmrgXORG_CWARNFLAGS 15277c5f6000SmrgXORG_STRICT_OPTION 15287c5f6000SmrgXORG_RELEASE_VERSION 15297c5f6000SmrgXORG_CHANGELOG 15307c5f6000SmrgXORG_MANPAGE_SECTIONS 15317c5f6000Smrg]) # XORG_DEFAULT_OPTIONS 1532bccedf53Smrgdnl Copyright 2005 Red Hat, Inc 1533bccedf53Smrgdnl 1534bccedf53Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1535bccedf53Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1536bccedf53Smrgdnl the above copyright notice appear in all copies and that both that 1537bccedf53Smrgdnl copyright notice and this permission notice appear in supporting 1538bccedf53Smrgdnl documentation. 1539bccedf53Smrgdnl 1540bccedf53Smrgdnl The above copyright notice and this permission notice shall be included 1541bccedf53Smrgdnl in all copies or substantial portions of the Software. 1542bccedf53Smrgdnl 1543bccedf53Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1544bccedf53Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1545bccedf53Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1546bccedf53Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1547bccedf53Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1548bccedf53Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1549bccedf53Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1550bccedf53Smrgdnl 1551bccedf53Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1552bccedf53Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1553bccedf53Smrgdnl other dealings in this Software without prior written authorization 1554bccedf53Smrgdnl from the copyright holders. 1555bccedf53Smrgdnl 1556bccedf53Smrg 1557bccedf53Smrg# XORG_RELEASE_VERSION 1558bccedf53Smrg# -------------------- 1559bccedf53Smrg# Adds --with/without-release-string and changes the PACKAGE and 1560bccedf53Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 15617c5f6000Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 15627c5f6000Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1563bccedf53Smrg 1564bccedf53SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1565bccedf53Smrg AC_ARG_WITH(release-version, 15667c5f6000Smrg AS_HELP_STRING([--with-release-version=STRING], 1567bccedf53Smrg [Use release version string in package name]), 1568bccedf53Smrg [RELEASE_VERSION="$withval"], 1569bccedf53Smrg [RELEASE_VERSION=""]) 1570bccedf53Smrg if test "x$RELEASE_VERSION" != "x"; then 1571bccedf53Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1572bccedf53Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1573bccedf53Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1574bccedf53Smrg fi 15757c5f6000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 15767c5f6000Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 15777c5f6000Smrg [Major version of this package]) 15787c5f6000Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 15797c5f6000Smrg if test "x$PVM" = "x"; then 15807c5f6000Smrg PVM="0" 15817c5f6000Smrg fi 15827c5f6000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 15837c5f6000Smrg [$PVM], 15847c5f6000Smrg [Minor version of this package]) 15857c5f6000Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 15867c5f6000Smrg if test "x$PVP" = "x"; then 15877c5f6000Smrg PVP="0" 15887c5f6000Smrg fi 15897c5f6000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 15907c5f6000Smrg [$PVP], 15917c5f6000Smrg [Patch version of this package]) 1592bccedf53Smrg]) 1593bccedf53Smrg 15947c5f6000Smrg# XORG_CHANGELOG() 15957c5f6000Smrg# ---------------- 15967c5f6000Smrg# Minimum version: 1.2.0 15977c5f6000Smrg# 15987c5f6000Smrg# Defines the variable CHANGELOG_CMD as the command to generate 15997c5f6000Smrg# ChangeLog from git. 16007c5f6000Smrg# 16017c5f6000Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 16027c5f6000Smrg# 16037c5f6000SmrgAC_DEFUN([XORG_CHANGELOG], [ 16047c5f6000SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 16057c5f6000Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 16067c5f6000Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 16077c5f6000SmrgAC_SUBST([CHANGELOG_CMD]) 16087c5f6000SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 16097c5f6000Smrg]) # XORG_CHANGELOG 16107c5f6000Smrg 16117c5f6000Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 16127c5f6000Smrg# 16137c5f6000Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 16147c5f6000Smrg# 16157c5f6000Smrg# This program is free software; you can redistribute it and/or modify 16167c5f6000Smrg# it under the terms of the GNU General Public License as published by 16177c5f6000Smrg# the Free Software Foundation; either version 2 of the License, or 16187c5f6000Smrg# (at your option) any later version. 16197c5f6000Smrg# 16207c5f6000Smrg# This program is distributed in the hope that it will be useful, but 16217c5f6000Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 16227c5f6000Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16237c5f6000Smrg# General Public License for more details. 16247c5f6000Smrg# 16257c5f6000Smrg# You should have received a copy of the GNU General Public License 16267c5f6000Smrg# along with this program; if not, write to the Free Software 16277c5f6000Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16287c5f6000Smrg# 16297c5f6000Smrg# As a special exception to the GNU General Public License, if you 16307c5f6000Smrg# distribute this file as part of a program that contains a 16317c5f6000Smrg# configuration script generated by Autoconf, you may include it under 16327c5f6000Smrg# the same distribution terms that you use for the rest of that program. 16337c5f6000Smrg 16347c5f6000Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 16357c5f6000Smrg# ---------------------------------- 16367c5f6000SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 16377c5f6000Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 16387c5f6000Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 16397c5f6000SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 16407c5f6000Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 16417c5f6000Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 16427c5f6000Smrgfi 16437c5f6000Smrgif test -n "$PKG_CONFIG"; then 16447c5f6000Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 16457c5f6000Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 16467c5f6000Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 16477c5f6000Smrg AC_MSG_RESULT([yes]) 16487c5f6000Smrg else 16497c5f6000Smrg AC_MSG_RESULT([no]) 16507c5f6000Smrg PKG_CONFIG="" 16517c5f6000Smrg fi 16527c5f6000Smrg 16537c5f6000Smrgfi[]dnl 16547c5f6000Smrg])# PKG_PROG_PKG_CONFIG 16557c5f6000Smrg 16567c5f6000Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 16577c5f6000Smrg# 16587c5f6000Smrg# Check to see whether a particular set of modules exists. Similar 16597c5f6000Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 16607c5f6000Smrg# 16617c5f6000Smrg# 16627c5f6000Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 16637c5f6000Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 16647c5f6000Smrg# PKG_CHECK_EXISTS manually 16657c5f6000Smrg# -------------------------------------------------------------- 16667c5f6000SmrgAC_DEFUN([PKG_CHECK_EXISTS], 16677c5f6000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 16687c5f6000Smrgif test -n "$PKG_CONFIG" && \ 16697c5f6000Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 16707c5f6000Smrg m4_ifval([$2], [$2], [:]) 16717c5f6000Smrgm4_ifvaln([$3], [else 16727c5f6000Smrg $3])dnl 16737c5f6000Smrgfi]) 16747c5f6000Smrg 16757c5f6000Smrg 16767c5f6000Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 16777c5f6000Smrg# --------------------------------------------- 16787c5f6000Smrgm4_define([_PKG_CONFIG], 16797c5f6000Smrg[if test -n "$$1"; then 16807c5f6000Smrg pkg_cv_[]$1="$$1" 16817c5f6000Smrg elif test -n "$PKG_CONFIG"; then 16827c5f6000Smrg PKG_CHECK_EXISTS([$3], 16837c5f6000Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 16847c5f6000Smrg [pkg_failed=yes]) 16857c5f6000Smrg else 16867c5f6000Smrg pkg_failed=untried 16877c5f6000Smrgfi[]dnl 16887c5f6000Smrg])# _PKG_CONFIG 16897c5f6000Smrg 16907c5f6000Smrg# _PKG_SHORT_ERRORS_SUPPORTED 16917c5f6000Smrg# ----------------------------- 16927c5f6000SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 16937c5f6000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 16947c5f6000Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 16957c5f6000Smrg _pkg_short_errors_supported=yes 16967c5f6000Smrgelse 16977c5f6000Smrg _pkg_short_errors_supported=no 16987c5f6000Smrgfi[]dnl 16997c5f6000Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 17007c5f6000Smrg 17017c5f6000Smrg 17027c5f6000Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 17037c5f6000Smrg# [ACTION-IF-NOT-FOUND]) 17047c5f6000Smrg# 17057c5f6000Smrg# 17067c5f6000Smrg# Note that if there is a possibility the first call to 17077c5f6000Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 17087c5f6000Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 17097c5f6000Smrg# 17107c5f6000Smrg# 17117c5f6000Smrg# -------------------------------------------------------------- 17127c5f6000SmrgAC_DEFUN([PKG_CHECK_MODULES], 17137c5f6000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 17147c5f6000SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 17157c5f6000SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 17167c5f6000Smrg 17177c5f6000Smrgpkg_failed=no 17187c5f6000SmrgAC_MSG_CHECKING([for $1]) 17197c5f6000Smrg 17207c5f6000Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 17217c5f6000Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 17227c5f6000Smrg 17237c5f6000Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 17247c5f6000Smrgand $1[]_LIBS to avoid the need to call pkg-config. 17257c5f6000SmrgSee the pkg-config man page for more details.]) 17267c5f6000Smrg 17277c5f6000Smrgif test $pkg_failed = yes; then 17287c5f6000Smrg _PKG_SHORT_ERRORS_SUPPORTED 17297c5f6000Smrg if test $_pkg_short_errors_supported = yes; then 17307c5f6000Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 17317c5f6000Smrg else 17327c5f6000Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 17337c5f6000Smrg fi 17347c5f6000Smrg # Put the nasty error message in config.log where it belongs 17357c5f6000Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 17367c5f6000Smrg 17377c5f6000Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 17387c5f6000Smrg[Package requirements ($2) were not met: 17397c5f6000Smrg 17407c5f6000Smrg$$1_PKG_ERRORS 17417c5f6000Smrg 17427c5f6000SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 17437c5f6000Smrginstalled software in a non-standard prefix. 17447c5f6000Smrg 17457c5f6000Smrg_PKG_TEXT 17467c5f6000Smrg])], 17477c5f6000Smrg [AC_MSG_RESULT([no]) 17487c5f6000Smrg $4]) 17497c5f6000Smrgelif test $pkg_failed = untried; then 17507c5f6000Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 17517c5f6000Smrg[The pkg-config script could not be found or is too old. Make sure it 17527c5f6000Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 17537c5f6000Smrgpath to pkg-config. 17547c5f6000Smrg 17557c5f6000Smrg_PKG_TEXT 17567c5f6000Smrg 17577c5f6000SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 17587c5f6000Smrg [$4]) 17597c5f6000Smrgelse 17607c5f6000Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 17617c5f6000Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 17627c5f6000Smrg AC_MSG_RESULT([yes]) 17637c5f6000Smrg ifelse([$3], , :, [$3]) 17647c5f6000Smrgfi[]dnl 17657c5f6000Smrg])# PKG_CHECK_MODULES 17667c5f6000Smrg 1767