aclocal.m4 revision 95e0246b
195e0246bSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2eaef79e5Smrg 3eaef79e5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42b32c8f7Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5eaef79e5Smrg# This file is free software; the Free Software Foundation 6eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 7eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 8eaef79e5Smrg 9eaef79e5Smrg# This program is distributed in the hope that it will be useful, 10eaef79e5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11eaef79e5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12eaef79e5Smrg# PARTICULAR PURPOSE. 13eaef79e5Smrg 142b32c8f7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 152b32c8f7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1695e0246bSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1795e0246bSmrg[m4_warning([this file was generated for autoconf 2.68. 182b32c8f7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192b32c8f7SmrgIf you have problems, you may need to regenerate the build system entirely. 202b32c8f7SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 212b32c8f7Smrg 222b32c8f7Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23eaef79e5Smrg# 24eaef79e5Smrg# This file is free software; the Free Software Foundation 25eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 26eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 27eaef79e5Smrg 28eaef79e5Smrg# AM_AUTOMAKE_VERSION(VERSION) 29eaef79e5Smrg# ---------------------------- 30eaef79e5Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31eaef79e5Smrg# generated from the m4 files accompanying Automake X.Y. 322b32c8f7Smrg# (This private macro should not be called outside this file.) 332b32c8f7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 342b32c8f7Smrg[am__api_version='1.11' 352b32c8f7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 362b32c8f7Smrgdnl require some minimum version. Point them to the right macro. 3795e0246bSmrgm4_if([$1], [1.11.1], [], 382b32c8f7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 392b32c8f7Smrg]) 402b32c8f7Smrg 412b32c8f7Smrg# _AM_AUTOCONF_VERSION(VERSION) 422b32c8f7Smrg# ----------------------------- 432b32c8f7Smrg# aclocal traces this macro to find the Autoconf version. 442b32c8f7Smrg# This is a private macro too. Using m4_define simplifies 452b32c8f7Smrg# the logic in aclocal, which can simply ignore this definition. 462b32c8f7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 47eaef79e5Smrg 48eaef79e5Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49eaef79e5Smrg# ------------------------------- 502b32c8f7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 512b32c8f7Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52eaef79e5SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5395e0246bSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 542b32c8f7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 552b32c8f7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 562b32c8f7Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57eaef79e5Smrg 58eaef79e5Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59eaef79e5Smrg 60eaef79e5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61eaef79e5Smrg# 62eaef79e5Smrg# This file is free software; the Free Software Foundation 63eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 64eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 65eaef79e5Smrg 66eaef79e5Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67eaef79e5Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68eaef79e5Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69eaef79e5Smrg# 70eaef79e5Smrg# Of course, Automake must honor this variable whenever it calls a 71eaef79e5Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72eaef79e5Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73eaef79e5Smrg# depending on how configure is run. This is pretty annoying, since 74eaef79e5Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75eaef79e5Smrg# source directory, any form will work fine, but in subdirectories a 76eaef79e5Smrg# relative path needs to be adjusted first. 77eaef79e5Smrg# 78eaef79e5Smrg# $ac_aux_dir/missing 79eaef79e5Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80eaef79e5Smrg# $top_srcdir/$ac_aux_dir/missing 81eaef79e5Smrg# fails if $ac_aux_dir is absolute, 82eaef79e5Smrg# fails when called from a subdirectory in a VPATH build with 83eaef79e5Smrg# a relative $ac_aux_dir 84eaef79e5Smrg# 85eaef79e5Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86eaef79e5Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87eaef79e5Smrg# harmless because $srcdir is `.', but things will broke when you 88eaef79e5Smrg# start a VPATH build or use an absolute $srcdir. 89eaef79e5Smrg# 90eaef79e5Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91eaef79e5Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92eaef79e5Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93eaef79e5Smrg# and then we would define $MISSING as 94eaef79e5Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95eaef79e5Smrg# This will work as long as MISSING is not called from configure, because 96eaef79e5Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97eaef79e5Smrg# However there are other variables, like CC, which are often used in 98eaef79e5Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99eaef79e5Smrg# 100eaef79e5Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101eaef79e5Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102eaef79e5Smrg# configured tree to be moved without reconfiguration. 103eaef79e5Smrg 104eaef79e5SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105eaef79e5Smrg[dnl Rely on autoconf to set up CDPATH properly. 106eaef79e5SmrgAC_PREREQ([2.50])dnl 107eaef79e5Smrg# expand $ac_aux_dir to an absolute path 108eaef79e5Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109eaef79e5Smrg]) 110eaef79e5Smrg 111eaef79e5Smrg# AM_CONDITIONAL -*- Autoconf -*- 112eaef79e5Smrg 1132b32c8f7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114eaef79e5Smrg# Free Software Foundation, Inc. 115eaef79e5Smrg# 116eaef79e5Smrg# This file is free software; the Free Software Foundation 117eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 118eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 119eaef79e5Smrg 1202b32c8f7Smrg# serial 9 121eaef79e5Smrg 122eaef79e5Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123eaef79e5Smrg# ------------------------------------- 124eaef79e5Smrg# Define a conditional. 125eaef79e5SmrgAC_DEFUN([AM_CONDITIONAL], 126eaef79e5Smrg[AC_PREREQ(2.52)dnl 127eaef79e5Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128eaef79e5Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1292b32c8f7SmrgAC_SUBST([$1_TRUE])dnl 1302b32c8f7SmrgAC_SUBST([$1_FALSE])dnl 1312b32c8f7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1322b32c8f7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1332b32c8f7Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134eaef79e5Smrgif $2; then 135eaef79e5Smrg $1_TRUE= 136eaef79e5Smrg $1_FALSE='#' 137eaef79e5Smrgelse 138eaef79e5Smrg $1_TRUE='#' 139eaef79e5Smrg $1_FALSE= 140eaef79e5Smrgfi 141eaef79e5SmrgAC_CONFIG_COMMANDS_PRE( 142eaef79e5Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143eaef79e5Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 144eaef79e5SmrgUsually this means the macro was only invoked conditionally.]]) 145eaef79e5Smrgfi])]) 146eaef79e5Smrg 1472b32c8f7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148eaef79e5Smrg# Free Software Foundation, Inc. 149eaef79e5Smrg# 150eaef79e5Smrg# This file is free software; the Free Software Foundation 151eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 152eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 153eaef79e5Smrg 1542b32c8f7Smrg# serial 10 155eaef79e5Smrg 156eaef79e5Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157eaef79e5Smrg# written in clear, in which case automake, when reading aclocal.m4, 158eaef79e5Smrg# will think it sees a *use*, and therefore will trigger all it's 159eaef79e5Smrg# C support machinery. Also note that it means that autoscan, seeing 160eaef79e5Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161eaef79e5Smrg 162eaef79e5Smrg 163eaef79e5Smrg# _AM_DEPENDENCIES(NAME) 164eaef79e5Smrg# ---------------------- 165eaef79e5Smrg# See how the compiler implements dependency checking. 166eaef79e5Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167eaef79e5Smrg# We try a few techniques and use that to set a single cache variable. 168eaef79e5Smrg# 169eaef79e5Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170eaef79e5Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171eaef79e5Smrg# dependency, and given that the user is not expected to run this macro, 172eaef79e5Smrg# just rely on AC_PROG_CC. 173eaef79e5SmrgAC_DEFUN([_AM_DEPENDENCIES], 174eaef79e5Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175eaef79e5SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176eaef79e5SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177eaef79e5SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178eaef79e5Smrg 179eaef79e5Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180eaef79e5Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181eaef79e5Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1822b32c8f7Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183eaef79e5Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184eaef79e5Smrg [depcc="$$1" am_compiler_list=]) 185eaef79e5Smrg 186eaef79e5SmrgAC_CACHE_CHECK([dependency style of $depcc], 187eaef79e5Smrg [am_cv_$1_dependencies_compiler_type], 188eaef79e5Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189eaef79e5Smrg # We make a subdir and do the tests there. Otherwise we can end up 190eaef79e5Smrg # making bogus files that we don't know about and never remove. For 191eaef79e5Smrg # instance it was reported that on HP-UX the gcc test will end up 192eaef79e5Smrg # making a dummy file named `D' -- because `-MD' means `put the output 193eaef79e5Smrg # in D'. 194eaef79e5Smrg mkdir conftest.dir 195eaef79e5Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 196eaef79e5Smrg # using a relative directory. 197eaef79e5Smrg cp "$am_depcomp" conftest.dir 198eaef79e5Smrg cd conftest.dir 199eaef79e5Smrg # We will build objects and dependencies in a subdirectory because 200eaef79e5Smrg # it helps to detect inapplicable dependency modes. For instance 201eaef79e5Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 202eaef79e5Smrg # side effect of compilation, but ICC will put the dependencies in 203eaef79e5Smrg # the current directory while Tru64 will put them in the object 204eaef79e5Smrg # directory. 205eaef79e5Smrg mkdir sub 206eaef79e5Smrg 207eaef79e5Smrg am_cv_$1_dependencies_compiler_type=none 208eaef79e5Smrg if test "$am_compiler_list" = ""; then 209eaef79e5Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210eaef79e5Smrg fi 2112b32c8f7Smrg am__universal=false 2122b32c8f7Smrg m4_case([$1], [CC], 2132b32c8f7Smrg [case " $depcc " in #( 2142b32c8f7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2152b32c8f7Smrg esac], 2162b32c8f7Smrg [CXX], 2172b32c8f7Smrg [case " $depcc " in #( 2182b32c8f7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2192b32c8f7Smrg esac]) 2202b32c8f7Smrg 221eaef79e5Smrg for depmode in $am_compiler_list; do 222eaef79e5Smrg # Setup a source with many dependencies, because some compilers 223eaef79e5Smrg # like to wrap large dependency lists on column 80 (with \), and 224eaef79e5Smrg # we should not choose a depcomp mode which is confused by this. 225eaef79e5Smrg # 226eaef79e5Smrg # We need to recreate these files for each test, as the compiler may 227eaef79e5Smrg # overwrite some of them when testing with obscure command lines. 228eaef79e5Smrg # This happens at least with the AIX C compiler. 229eaef79e5Smrg : > sub/conftest.c 230eaef79e5Smrg for i in 1 2 3 4 5 6; do 231eaef79e5Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232eaef79e5Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233eaef79e5Smrg # Solaris 8's {/usr,}/bin/sh. 234eaef79e5Smrg touch sub/conftst$i.h 235eaef79e5Smrg done 236eaef79e5Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237eaef79e5Smrg 2382b32c8f7Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2392b32c8f7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2402b32c8f7Smrg # handle `-M -o', and we need to detect this. Also, some Intel 2412b32c8f7Smrg # versions had trouble with output in subdirs 2422b32c8f7Smrg am__obj=sub/conftest.${OBJEXT-o} 2432b32c8f7Smrg am__minus_obj="-o $am__obj" 244eaef79e5Smrg case $depmode in 2452b32c8f7Smrg gcc) 2462b32c8f7Smrg # This depmode causes a compiler race in universal mode. 2472b32c8f7Smrg test "$am__universal" = false || continue 2482b32c8f7Smrg ;; 249eaef79e5Smrg nosideeffect) 250eaef79e5Smrg # after this tag, mechanisms are not by side-effect, so they'll 251eaef79e5Smrg # only be used when explicitly requested 252eaef79e5Smrg if test "x$enable_dependency_tracking" = xyes; then 253eaef79e5Smrg continue 254eaef79e5Smrg else 255eaef79e5Smrg break 256eaef79e5Smrg fi 257eaef79e5Smrg ;; 2582b32c8f7Smrg msvisualcpp | msvcmsys) 2592b32c8f7Smrg # This compiler won't grok `-c -o', but also, the minuso test has 2602b32c8f7Smrg # not run yet. These depmodes are late enough in the game, and 2612b32c8f7Smrg # so weak that their functioning should not be impacted. 2622b32c8f7Smrg am__obj=conftest.${OBJEXT-o} 2632b32c8f7Smrg am__minus_obj= 2642b32c8f7Smrg ;; 265eaef79e5Smrg none) break ;; 266eaef79e5Smrg esac 267eaef79e5Smrg if depmode=$depmode \ 2682b32c8f7Smrg source=sub/conftest.c object=$am__obj \ 269eaef79e5Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2702b32c8f7Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271eaef79e5Smrg >/dev/null 2>conftest.err && 2722b32c8f7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273eaef79e5Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2742b32c8f7Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275eaef79e5Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276eaef79e5Smrg # icc doesn't choke on unknown options, it will just issue warnings 277eaef79e5Smrg # or remarks (even with -Werror). So we grep stderr for any message 278eaef79e5Smrg # that says an option was ignored or not supported. 279eaef79e5Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280eaef79e5Smrg # icc: Command line warning: ignoring option '-M'; no argument required 281eaef79e5Smrg # The diagnosis changed in icc 8.0: 282eaef79e5Smrg # icc: Command line remark: option '-MP' not supported 283eaef79e5Smrg if (grep 'ignoring option' conftest.err || 284eaef79e5Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285eaef79e5Smrg am_cv_$1_dependencies_compiler_type=$depmode 286eaef79e5Smrg break 287eaef79e5Smrg fi 288eaef79e5Smrg fi 289eaef79e5Smrg done 290eaef79e5Smrg 291eaef79e5Smrg cd .. 292eaef79e5Smrg rm -rf conftest.dir 293eaef79e5Smrgelse 294eaef79e5Smrg am_cv_$1_dependencies_compiler_type=none 295eaef79e5Smrgfi 296eaef79e5Smrg]) 297eaef79e5SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298eaef79e5SmrgAM_CONDITIONAL([am__fastdep$1], [ 299eaef79e5Smrg test "x$enable_dependency_tracking" != xno \ 300eaef79e5Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301eaef79e5Smrg]) 302eaef79e5Smrg 303eaef79e5Smrg 304eaef79e5Smrg# AM_SET_DEPDIR 305eaef79e5Smrg# ------------- 306eaef79e5Smrg# Choose a directory name for dependency files. 307eaef79e5Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308eaef79e5SmrgAC_DEFUN([AM_SET_DEPDIR], 309eaef79e5Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310eaef79e5SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311eaef79e5Smrg]) 312eaef79e5Smrg 313eaef79e5Smrg 314eaef79e5Smrg# AM_DEP_TRACK 315eaef79e5Smrg# ------------ 316eaef79e5SmrgAC_DEFUN([AM_DEP_TRACK], 317eaef79e5Smrg[AC_ARG_ENABLE(dependency-tracking, 318eaef79e5Smrg[ --disable-dependency-tracking speeds up one-time build 319eaef79e5Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 320eaef79e5Smrgif test "x$enable_dependency_tracking" != xno; then 321eaef79e5Smrg am_depcomp="$ac_aux_dir/depcomp" 322eaef79e5Smrg AMDEPBACKSLASH='\' 323eaef79e5Smrgfi 324eaef79e5SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3252b32c8f7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3262b32c8f7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327eaef79e5Smrg]) 328eaef79e5Smrg 329eaef79e5Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330eaef79e5Smrg 3312b32c8f7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332eaef79e5Smrg# Free Software Foundation, Inc. 333eaef79e5Smrg# 334eaef79e5Smrg# This file is free software; the Free Software Foundation 335eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 336eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 337eaef79e5Smrg 3382b32c8f7Smrg#serial 5 339eaef79e5Smrg 340eaef79e5Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341eaef79e5Smrg# ------------------------------ 342eaef79e5SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3432b32c8f7Smrg[{ 3442b32c8f7Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3452b32c8f7Smrg # are listed without --file. Let's play safe and only enable the eval 3462b32c8f7Smrg # if we detect the quoting. 3472b32c8f7Smrg case $CONFIG_FILES in 3482b32c8f7Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3492b32c8f7Smrg *) set x $CONFIG_FILES ;; 3502b32c8f7Smrg esac 3512b32c8f7Smrg shift 3522b32c8f7Smrg for mf 3532b32c8f7Smrg do 3542b32c8f7Smrg # Strip MF so we end up with the name of the file. 3552b32c8f7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3562b32c8f7Smrg # Check whether this is an Automake generated Makefile or not. 3572b32c8f7Smrg # We used to match only the files named `Makefile.in', but 3582b32c8f7Smrg # some people rename them; so instead we look at the file content. 3592b32c8f7Smrg # Grep'ing the first line is not enough: some people post-process 3602b32c8f7Smrg # each Makefile.in and add a new line on top of each file to say so. 3612b32c8f7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3622b32c8f7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3632b32c8f7Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3642b32c8f7Smrg dirpart=`AS_DIRNAME("$mf")` 3652b32c8f7Smrg else 3662b32c8f7Smrg continue 3672b32c8f7Smrg fi 3682b32c8f7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3692b32c8f7Smrg # from the Makefile without running `make'. 3702b32c8f7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3712b32c8f7Smrg test -z "$DEPDIR" && continue 3722b32c8f7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3732b32c8f7Smrg test -z "am__include" && continue 3742b32c8f7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3752b32c8f7Smrg # When using ansi2knr, U may be empty or an underscore; expand it 3762b32c8f7Smrg U=`sed -n 's/^U = //p' < "$mf"` 3772b32c8f7Smrg # Find all dependency output files, they are included files with 3782b32c8f7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3792b32c8f7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3802b32c8f7Smrg # expansion. 3812b32c8f7Smrg for file in `sed -n " 3822b32c8f7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3832b32c8f7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3842b32c8f7Smrg # Make sure the directory exists. 3852b32c8f7Smrg test -f "$dirpart/$file" && continue 3862b32c8f7Smrg fdir=`AS_DIRNAME(["$file"])` 3872b32c8f7Smrg AS_MKDIR_P([$dirpart/$fdir]) 3882b32c8f7Smrg # echo "creating $dirpart/$file" 3892b32c8f7Smrg echo '# dummy' > "$dirpart/$file" 3902b32c8f7Smrg done 391eaef79e5Smrg done 3922b32c8f7Smrg} 393eaef79e5Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394eaef79e5Smrg 395eaef79e5Smrg 396eaef79e5Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397eaef79e5Smrg# ----------------------------- 398eaef79e5Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399eaef79e5Smrg# 400eaef79e5Smrg# This code is only required when automatic dependency tracking 401eaef79e5Smrg# is enabled. FIXME. This creates each `.P' file that we will 402eaef79e5Smrg# need in order to bootstrap the dependency handling code. 403eaef79e5SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404eaef79e5Smrg[AC_CONFIG_COMMANDS([depfiles], 405eaef79e5Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406eaef79e5Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407eaef79e5Smrg]) 408eaef79e5Smrg 409eaef79e5Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410eaef79e5Smrg# Free Software Foundation, Inc. 411eaef79e5Smrg# 412eaef79e5Smrg# This file is free software; the Free Software Foundation 413eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 414eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 415eaef79e5Smrg 416eaef79e5Smrg# serial 8 417eaef79e5Smrg 418eaef79e5Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419eaef79e5SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420eaef79e5Smrg 421eaef79e5Smrg# Do all the work for Automake. -*- Autoconf -*- 422eaef79e5Smrg 4232b32c8f7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4242b32c8f7Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425eaef79e5Smrg# 426eaef79e5Smrg# This file is free software; the Free Software Foundation 427eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 428eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 429eaef79e5Smrg 4302b32c8f7Smrg# serial 16 431eaef79e5Smrg 432eaef79e5Smrg# This macro actually does too much. Some checks are only needed if 433eaef79e5Smrg# your package does certain things. But this isn't really a big deal. 434eaef79e5Smrg 435eaef79e5Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436eaef79e5Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 437eaef79e5Smrg# ----------------------------------------------- 438eaef79e5Smrg# The call with PACKAGE and VERSION arguments is the old style 439eaef79e5Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440eaef79e5Smrg# and VERSION should now be passed to AC_INIT and removed from 441eaef79e5Smrg# the call to AM_INIT_AUTOMAKE. 442eaef79e5Smrg# We support both call styles for the transition. After 443eaef79e5Smrg# the next Automake release, Autoconf can make the AC_INIT 444eaef79e5Smrg# arguments mandatory, and then we can depend on a new Autoconf 445eaef79e5Smrg# release and drop the old call support. 446eaef79e5SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4472b32c8f7Smrg[AC_PREREQ([2.62])dnl 448eaef79e5Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449eaef79e5Smrgdnl the ones we care about. 450eaef79e5Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451eaef79e5SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452eaef79e5SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4532b32c8f7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4542b32c8f7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4552b32c8f7Smrg # is not polluted with repeated "-I." 4562b32c8f7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4572b32c8f7Smrg # test to see if srcdir already configured 4582b32c8f7Smrg if test -f $srcdir/config.status; then 4592b32c8f7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4602b32c8f7Smrg fi 461eaef79e5Smrgfi 462eaef79e5Smrg 463eaef79e5Smrg# test whether we have cygpath 464eaef79e5Smrgif test -z "$CYGPATH_W"; then 465eaef79e5Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 466eaef79e5Smrg CYGPATH_W='cygpath -w' 467eaef79e5Smrg else 468eaef79e5Smrg CYGPATH_W=echo 469eaef79e5Smrg fi 470eaef79e5Smrgfi 471eaef79e5SmrgAC_SUBST([CYGPATH_W]) 472eaef79e5Smrg 473eaef79e5Smrg# Define the identity of the package. 474eaef79e5Smrgdnl Distinguish between old-style and new-style calls. 475eaef79e5Smrgm4_ifval([$2], 476eaef79e5Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477eaef79e5Smrg AC_SUBST([PACKAGE], [$1])dnl 478eaef79e5Smrg AC_SUBST([VERSION], [$2])], 479eaef79e5Smrg[_AM_SET_OPTIONS([$1])dnl 4802b32c8f7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4812b32c8f7Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4822b32c8f7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483eaef79e5Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484eaef79e5Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485eaef79e5Smrg 486eaef79e5Smrg_AM_IF_OPTION([no-define],, 487eaef79e5Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488eaef79e5Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489eaef79e5Smrg 490eaef79e5Smrg# Some tools Automake needs. 491eaef79e5SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492eaef79e5SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493eaef79e5SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494eaef79e5SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495eaef79e5SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496eaef79e5SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497eaef79e5SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4982b32c8f7SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4992b32c8f7SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500eaef79e5SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501eaef79e5Smrg# We need awk for the "check" target. The system "awk" is bad on 502eaef79e5Smrg# some platforms. 503eaef79e5SmrgAC_REQUIRE([AC_PROG_AWK])dnl 504eaef79e5SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505eaef79e5SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506eaef79e5Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5072b32c8f7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5082b32c8f7Smrg [_AM_PROG_TAR([v7])])]) 509eaef79e5Smrg_AM_IF_OPTION([no-dependencies],, 510eaef79e5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5112b32c8f7Smrg [_AM_DEPENDENCIES(CC)], 5122b32c8f7Smrg [define([AC_PROG_CC], 5132b32c8f7Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514eaef79e5SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5152b32c8f7Smrg [_AM_DEPENDENCIES(CXX)], 5162b32c8f7Smrg [define([AC_PROG_CXX], 5172b32c8f7Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5182b32c8f7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5192b32c8f7Smrg [_AM_DEPENDENCIES(OBJC)], 5202b32c8f7Smrg [define([AC_PROG_OBJC], 5212b32c8f7Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522eaef79e5Smrg]) 5232b32c8f7Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5242b32c8f7Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5252b32c8f7Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5262b32c8f7Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5272b32c8f7SmrgAC_CONFIG_COMMANDS_PRE(dnl 5282b32c8f7Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5292b32c8f7Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530eaef79e5Smrg]) 531eaef79e5Smrg 5322b32c8f7Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5332b32c8f7Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5342b32c8f7Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5352b32c8f7Smrgm4_define([_AC_COMPILER_EXEEXT], 5362b32c8f7Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5372b32c8f7Smrg 538eaef79e5Smrg 539eaef79e5Smrg# When config.status generates a header, we must update the stamp-h file. 540eaef79e5Smrg# This file resides in the same directory as the config header 541eaef79e5Smrg# that is generated. The stamp files are numbered to have different names. 542eaef79e5Smrg 543eaef79e5Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544eaef79e5Smrg# loop where config.status creates the headers, so we can generate 545eaef79e5Smrg# our stamp files there. 546eaef79e5SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547eaef79e5Smrg[# Compute $1's index in $config_headers. 5482b32c8f7Smrg_am_arg=$1 549eaef79e5Smrg_am_stamp_count=1 550eaef79e5Smrgfor _am_header in $config_headers :; do 551eaef79e5Smrg case $_am_header in 5522b32c8f7Smrg $_am_arg | $_am_arg:* ) 553eaef79e5Smrg break ;; 554eaef79e5Smrg * ) 555eaef79e5Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556eaef79e5Smrg esac 557eaef79e5Smrgdone 5582b32c8f7Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559eaef79e5Smrg 5602b32c8f7Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561eaef79e5Smrg# 562eaef79e5Smrg# This file is free software; the Free Software Foundation 563eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 564eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 565eaef79e5Smrg 566eaef79e5Smrg# AM_PROG_INSTALL_SH 567eaef79e5Smrg# ------------------ 568eaef79e5Smrg# Define $install_sh. 569eaef79e5SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570eaef79e5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5712b32c8f7Smrgif test x"${install_sh}" != xset; then 5722b32c8f7Smrg case $am_aux_dir in 5732b32c8f7Smrg *\ * | *\ *) 5742b32c8f7Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5752b32c8f7Smrg *) 5762b32c8f7Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5772b32c8f7Smrg esac 5782b32c8f7Smrgfi 579eaef79e5SmrgAC_SUBST(install_sh)]) 580eaef79e5Smrg 581eaef79e5Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582eaef79e5Smrg# 583eaef79e5Smrg# This file is free software; the Free Software Foundation 584eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 585eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 586eaef79e5Smrg 587eaef79e5Smrg# serial 2 588eaef79e5Smrg 589eaef79e5Smrg# Check whether the underlying file-system supports filenames 590eaef79e5Smrg# with a leading dot. For instance MS-DOS doesn't. 591eaef79e5SmrgAC_DEFUN([AM_SET_LEADING_DOT], 592eaef79e5Smrg[rm -rf .tst 2>/dev/null 593eaef79e5Smrgmkdir .tst 2>/dev/null 594eaef79e5Smrgif test -d .tst; then 595eaef79e5Smrg am__leading_dot=. 596eaef79e5Smrgelse 597eaef79e5Smrg am__leading_dot=_ 598eaef79e5Smrgfi 599eaef79e5Smrgrmdir .tst 2>/dev/null 600eaef79e5SmrgAC_SUBST([am__leading_dot])]) 601eaef79e5Smrg 602eaef79e5Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603eaef79e5Smrg# From Jim Meyering 604eaef79e5Smrg 6052b32c8f7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606eaef79e5Smrg# Free Software Foundation, Inc. 607eaef79e5Smrg# 608eaef79e5Smrg# This file is free software; the Free Software Foundation 609eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 610eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 611eaef79e5Smrg 6122b32c8f7Smrg# serial 5 613eaef79e5Smrg 6142b32c8f7Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6152b32c8f7Smrg# ---------------------------------- 6162b32c8f7Smrg# Control maintainer-specific portions of Makefiles. 6172b32c8f7Smrg# Default is to disable them, unless `enable' is passed literally. 6182b32c8f7Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 6192b32c8f7Smrg# can override the default with the --enable/--disable switch. 620eaef79e5SmrgAC_DEFUN([AM_MAINTAINER_MODE], 6212b32c8f7Smrg[m4_case(m4_default([$1], [disable]), 6222b32c8f7Smrg [enable], [m4_define([am_maintainer_other], [disable])], 6232b32c8f7Smrg [disable], [m4_define([am_maintainer_other], [enable])], 6242b32c8f7Smrg [m4_define([am_maintainer_other], [enable]) 6252b32c8f7Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6262b32c8f7SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6272b32c8f7Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6282b32c8f7Smrg AC_ARG_ENABLE([maintainer-mode], 6292b32c8f7Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630eaef79e5Smrg (and sometimes confusing) to the casual installer], 6312b32c8f7Smrg [USE_MAINTAINER_MODE=$enableval], 6322b32c8f7Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633eaef79e5Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6342b32c8f7Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635eaef79e5Smrg MAINT=$MAINTAINER_MODE_TRUE 6362b32c8f7Smrg AC_SUBST([MAINT])dnl 637eaef79e5Smrg] 638eaef79e5Smrg) 639eaef79e5Smrg 640eaef79e5SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641eaef79e5Smrg 642eaef79e5Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643eaef79e5Smrg 6442b32c8f7Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645eaef79e5Smrg# 646eaef79e5Smrg# This file is free software; the Free Software Foundation 647eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 648eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 649eaef79e5Smrg 6502b32c8f7Smrg# serial 4 651eaef79e5Smrg 652eaef79e5Smrg# AM_MAKE_INCLUDE() 653eaef79e5Smrg# ----------------- 654eaef79e5Smrg# Check to see how make treats includes. 655eaef79e5SmrgAC_DEFUN([AM_MAKE_INCLUDE], 656eaef79e5Smrg[am_make=${MAKE-make} 657eaef79e5Smrgcat > confinc << 'END' 658eaef79e5Smrgam__doit: 6592b32c8f7Smrg @echo this is the am__doit target 660eaef79e5Smrg.PHONY: am__doit 661eaef79e5SmrgEND 662eaef79e5Smrg# If we don't find an include directive, just comment out the code. 663eaef79e5SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664eaef79e5Smrgam__include="#" 665eaef79e5Smrgam__quote= 666eaef79e5Smrg_am_result=none 667eaef79e5Smrg# First try GNU make style include. 668eaef79e5Smrgecho "include confinc" > confmf 6692b32c8f7Smrg# Ignore all kinds of additional output from `make'. 6702b32c8f7Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6712b32c8f7Smrg*the\ am__doit\ target*) 6722b32c8f7Smrg am__include=include 6732b32c8f7Smrg am__quote= 6742b32c8f7Smrg _am_result=GNU 6752b32c8f7Smrg ;; 6762b32c8f7Smrgesac 677eaef79e5Smrg# Now try BSD make style include. 678eaef79e5Smrgif test "$am__include" = "#"; then 679eaef79e5Smrg echo '.include "confinc"' > confmf 6802b32c8f7Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6812b32c8f7Smrg *the\ am__doit\ target*) 6822b32c8f7Smrg am__include=.include 6832b32c8f7Smrg am__quote="\"" 6842b32c8f7Smrg _am_result=BSD 6852b32c8f7Smrg ;; 6862b32c8f7Smrg esac 687eaef79e5Smrgfi 688eaef79e5SmrgAC_SUBST([am__include]) 689eaef79e5SmrgAC_SUBST([am__quote]) 690eaef79e5SmrgAC_MSG_RESULT([$_am_result]) 691eaef79e5Smrgrm -f confinc confmf 692eaef79e5Smrg]) 693eaef79e5Smrg 6942b32c8f7Smrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 6952b32c8f7Smrg# Free Software Foundation, Inc. 6962b32c8f7Smrg# 6972b32c8f7Smrg# This file is free software; the Free Software Foundation 6982b32c8f7Smrg# gives unlimited permission to copy and/or distribute it, 6992b32c8f7Smrg# with or without modifications, as long as this notice is preserved. 7002b32c8f7Smrg 7012b32c8f7Smrg# serial 6 7022b32c8f7Smrg 7032b32c8f7Smrg# AM_PROG_CC_C_O 7042b32c8f7Smrg# -------------- 7052b32c8f7Smrg# Like AC_PROG_CC_C_O, but changed for automake. 7062b32c8f7SmrgAC_DEFUN([AM_PROG_CC_C_O], 7072b32c8f7Smrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl 7082b32c8f7SmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7092b32c8f7SmrgAC_REQUIRE_AUX_FILE([compile])dnl 7102b32c8f7Smrg# FIXME: we rely on the cache variable name because 7112b32c8f7Smrg# there is no other way. 7122b32c8f7Smrgset dummy $CC 7132b32c8f7Smrgam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 7142b32c8f7Smrgeval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 7152b32c8f7Smrgif test "$am_t" != yes; then 7162b32c8f7Smrg # Losing compiler, so override with the script. 7172b32c8f7Smrg # FIXME: It is wrong to rewrite CC. 7182b32c8f7Smrg # But if we don't then we get into trouble of one sort or another. 7192b32c8f7Smrg # A longer-term fix would be to have automake use am__CC in this case, 7202b32c8f7Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 7212b32c8f7Smrg CC="$am_aux_dir/compile $CC" 7222b32c8f7Smrgfi 7232b32c8f7Smrgdnl Make sure AC_PROG_CC is never called again, or it will override our 7242b32c8f7Smrgdnl setting of CC. 7252b32c8f7Smrgm4_define([AC_PROG_CC], 7262b32c8f7Smrg [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 7272b32c8f7Smrg]) 7282b32c8f7Smrg 729eaef79e5Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 730eaef79e5Smrg 7312b32c8f7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 732eaef79e5Smrg# Free Software Foundation, Inc. 733eaef79e5Smrg# 734eaef79e5Smrg# This file is free software; the Free Software Foundation 735eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 736eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 737eaef79e5Smrg 7382b32c8f7Smrg# serial 6 739eaef79e5Smrg 740eaef79e5Smrg# AM_MISSING_PROG(NAME, PROGRAM) 741eaef79e5Smrg# ------------------------------ 742eaef79e5SmrgAC_DEFUN([AM_MISSING_PROG], 743eaef79e5Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 744eaef79e5Smrg$1=${$1-"${am_missing_run}$2"} 745eaef79e5SmrgAC_SUBST($1)]) 746eaef79e5Smrg 747eaef79e5Smrg 748eaef79e5Smrg# AM_MISSING_HAS_RUN 749eaef79e5Smrg# ------------------ 750eaef79e5Smrg# Define MISSING if not defined so far and test if it supports --run. 751eaef79e5Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 752eaef79e5SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 753eaef79e5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7542b32c8f7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7552b32c8f7Smrgif test x"${MISSING+set}" != xset; then 7562b32c8f7Smrg case $am_aux_dir in 7572b32c8f7Smrg *\ * | *\ *) 7582b32c8f7Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7592b32c8f7Smrg *) 7602b32c8f7Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7612b32c8f7Smrg esac 7622b32c8f7Smrgfi 763eaef79e5Smrg# Use eval to expand $SHELL 764eaef79e5Smrgif eval "$MISSING --run true"; then 765eaef79e5Smrg am_missing_run="$MISSING --run " 766eaef79e5Smrgelse 767eaef79e5Smrg am_missing_run= 768eaef79e5Smrg AC_MSG_WARN([`missing' script is too old or missing]) 769eaef79e5Smrgfi 770eaef79e5Smrg]) 771eaef79e5Smrg 7722b32c8f7Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 773eaef79e5Smrg# 774eaef79e5Smrg# This file is free software; the Free Software Foundation 775eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 776eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 777eaef79e5Smrg 778eaef79e5Smrg# AM_PROG_MKDIR_P 779eaef79e5Smrg# --------------- 7802b32c8f7Smrg# Check for `mkdir -p'. 781eaef79e5SmrgAC_DEFUN([AM_PROG_MKDIR_P], 7822b32c8f7Smrg[AC_PREREQ([2.60])dnl 7832b32c8f7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7842b32c8f7Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7852b32c8f7Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 7862b32c8f7Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7872b32c8f7Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7882b32c8f7Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7892b32c8f7Smrgdnl adjustment using top_builddir (which is defined more often than 7902b32c8f7Smrgdnl MKDIR_P). 7912b32c8f7SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7922b32c8f7Smrgcase $mkdir_p in 7932b32c8f7Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 7942b32c8f7Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7952b32c8f7Smrgesac 7962b32c8f7Smrg]) 797eaef79e5Smrg 798eaef79e5Smrg# Helper functions for option handling. -*- Autoconf -*- 799eaef79e5Smrg 8002b32c8f7Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 801eaef79e5Smrg# 802eaef79e5Smrg# This file is free software; the Free Software Foundation 803eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 804eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 805eaef79e5Smrg 8062b32c8f7Smrg# serial 4 807eaef79e5Smrg 808eaef79e5Smrg# _AM_MANGLE_OPTION(NAME) 809eaef79e5Smrg# ----------------------- 810eaef79e5SmrgAC_DEFUN([_AM_MANGLE_OPTION], 811eaef79e5Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 812eaef79e5Smrg 813eaef79e5Smrg# _AM_SET_OPTION(NAME) 814eaef79e5Smrg# ------------------------------ 815eaef79e5Smrg# Set option NAME. Presently that only means defining a flag for this option. 816eaef79e5SmrgAC_DEFUN([_AM_SET_OPTION], 817eaef79e5Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 818eaef79e5Smrg 819eaef79e5Smrg# _AM_SET_OPTIONS(OPTIONS) 820eaef79e5Smrg# ---------------------------------- 821eaef79e5Smrg# OPTIONS is a space-separated list of Automake options. 822eaef79e5SmrgAC_DEFUN([_AM_SET_OPTIONS], 8232b32c8f7Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 824eaef79e5Smrg 825eaef79e5Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 826eaef79e5Smrg# ------------------------------------------- 827eaef79e5Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 828eaef79e5SmrgAC_DEFUN([_AM_IF_OPTION], 829eaef79e5Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 830eaef79e5Smrg 831eaef79e5Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 832eaef79e5Smrg 8332b32c8f7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 834eaef79e5Smrg# Free Software Foundation, Inc. 835eaef79e5Smrg# 836eaef79e5Smrg# This file is free software; the Free Software Foundation 837eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 838eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 839eaef79e5Smrg 8402b32c8f7Smrg# serial 5 841eaef79e5Smrg 842eaef79e5Smrg# AM_SANITY_CHECK 843eaef79e5Smrg# --------------- 844eaef79e5SmrgAC_DEFUN([AM_SANITY_CHECK], 845eaef79e5Smrg[AC_MSG_CHECKING([whether build environment is sane]) 846eaef79e5Smrg# Just in case 847eaef79e5Smrgsleep 1 848eaef79e5Smrgecho timestamp > conftest.file 8492b32c8f7Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8502b32c8f7Smrg# name. Accept space and tab only in the latter. 8512b32c8f7Smrgam_lf=' 8522b32c8f7Smrg' 8532b32c8f7Smrgcase `pwd` in 8542b32c8f7Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8552b32c8f7Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8562b32c8f7Smrgesac 8572b32c8f7Smrgcase $srcdir in 8582b32c8f7Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8592b32c8f7Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8602b32c8f7Smrgesac 8612b32c8f7Smrg 862eaef79e5Smrg# Do `set' in a subshell so we don't clobber the current shell's 863eaef79e5Smrg# arguments. Must try -L first in case configure is actually a 864eaef79e5Smrg# symlink; some systems play weird games with the mod time of symlinks 865eaef79e5Smrg# (eg FreeBSD returns the mod time of the symlink's containing 866eaef79e5Smrg# directory). 867eaef79e5Smrgif ( 8682b32c8f7Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 869eaef79e5Smrg if test "$[*]" = "X"; then 870eaef79e5Smrg # -L didn't work. 8712b32c8f7Smrg set X `ls -t "$srcdir/configure" conftest.file` 872eaef79e5Smrg fi 873eaef79e5Smrg rm -f conftest.file 874eaef79e5Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 875eaef79e5Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 876eaef79e5Smrg 877eaef79e5Smrg # If neither matched, then we have a broken ls. This can happen 878eaef79e5Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 879eaef79e5Smrg # broken ls alias from the environment. This has actually 880eaef79e5Smrg # happened. Such a system could not be considered "sane". 881eaef79e5Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 882eaef79e5Smrgalias in your environment]) 883eaef79e5Smrg fi 884eaef79e5Smrg 885eaef79e5Smrg test "$[2]" = conftest.file 886eaef79e5Smrg ) 887eaef79e5Smrgthen 888eaef79e5Smrg # Ok. 889eaef79e5Smrg : 890eaef79e5Smrgelse 891eaef79e5Smrg AC_MSG_ERROR([newly created file is older than distributed files! 892eaef79e5SmrgCheck your system clock]) 893eaef79e5Smrgfi 894eaef79e5SmrgAC_MSG_RESULT(yes)]) 895eaef79e5Smrg 8962b32c8f7Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 8972b32c8f7Smrg# 8982b32c8f7Smrg# This file is free software; the Free Software Foundation 8992b32c8f7Smrg# gives unlimited permission to copy and/or distribute it, 9002b32c8f7Smrg# with or without modifications, as long as this notice is preserved. 9012b32c8f7Smrg 9022b32c8f7Smrg# serial 1 9032b32c8f7Smrg 9042b32c8f7Smrg# AM_SILENT_RULES([DEFAULT]) 9052b32c8f7Smrg# -------------------------- 9062b32c8f7Smrg# Enable less verbose build rules; with the default set to DEFAULT 9072b32c8f7Smrg# (`yes' being less verbose, `no' or empty being verbose). 9082b32c8f7SmrgAC_DEFUN([AM_SILENT_RULES], 9092b32c8f7Smrg[AC_ARG_ENABLE([silent-rules], 9102b32c8f7Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 9112b32c8f7Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 9122b32c8f7Smrgcase $enable_silent_rules in 9132b32c8f7Smrgyes) AM_DEFAULT_VERBOSITY=0;; 9142b32c8f7Smrgno) AM_DEFAULT_VERBOSITY=1;; 9152b32c8f7Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9162b32c8f7Smrgesac 9172b32c8f7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9182b32c8f7SmrgAM_BACKSLASH='\' 9192b32c8f7SmrgAC_SUBST([AM_BACKSLASH])dnl 9202b32c8f7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9212b32c8f7Smrg]) 9222b32c8f7Smrg 923eaef79e5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 924eaef79e5Smrg# 925eaef79e5Smrg# This file is free software; the Free Software Foundation 926eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 927eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 928eaef79e5Smrg 929eaef79e5Smrg# AM_PROG_INSTALL_STRIP 930eaef79e5Smrg# --------------------- 931eaef79e5Smrg# One issue with vendor `install' (even GNU) is that you can't 932eaef79e5Smrg# specify the program used to strip binaries. This is especially 933eaef79e5Smrg# annoying in cross-compiling environments, where the build's strip 934eaef79e5Smrg# is unlikely to handle the host's binaries. 935eaef79e5Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 936eaef79e5Smrg# always use install-sh in `make install-strip', and initialize 937eaef79e5Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 938eaef79e5SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 939eaef79e5Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 940eaef79e5Smrg# Installed binaries are usually stripped using `strip' when the user 941eaef79e5Smrg# run `make install-strip'. However `strip' might not be the right 942eaef79e5Smrg# tool to use in cross-compilation environments, therefore Automake 943eaef79e5Smrg# will honor the `STRIP' environment variable to overrule this program. 944eaef79e5Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 945eaef79e5Smrgif test "$cross_compiling" != no; then 946eaef79e5Smrg AC_CHECK_TOOL([STRIP], [strip], :) 947eaef79e5Smrgfi 9482b32c8f7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 949eaef79e5SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 950eaef79e5Smrg 9512b32c8f7Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9522b32c8f7Smrg# 9532b32c8f7Smrg# This file is free software; the Free Software Foundation 9542b32c8f7Smrg# gives unlimited permission to copy and/or distribute it, 9552b32c8f7Smrg# with or without modifications, as long as this notice is preserved. 9562b32c8f7Smrg 9572b32c8f7Smrg# serial 2 9582b32c8f7Smrg 9592b32c8f7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9602b32c8f7Smrg# --------------------------- 9612b32c8f7Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9622b32c8f7Smrg# This macro is traced by Automake. 9632b32c8f7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9642b32c8f7Smrg 9652b32c8f7Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9662b32c8f7Smrg# --------------------------- 9672b32c8f7Smrg# Public sister of _AM_SUBST_NOTMAKE. 9682b32c8f7SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9692b32c8f7Smrg 970eaef79e5Smrg# Check how to create a tarball. -*- Autoconf -*- 971eaef79e5Smrg 972eaef79e5Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 973eaef79e5Smrg# 974eaef79e5Smrg# This file is free software; the Free Software Foundation 975eaef79e5Smrg# gives unlimited permission to copy and/or distribute it, 976eaef79e5Smrg# with or without modifications, as long as this notice is preserved. 977eaef79e5Smrg 978eaef79e5Smrg# serial 2 979eaef79e5Smrg 980eaef79e5Smrg# _AM_PROG_TAR(FORMAT) 981eaef79e5Smrg# -------------------- 982eaef79e5Smrg# Check how to create a tarball in format FORMAT. 983eaef79e5Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 984eaef79e5Smrg# 985eaef79e5Smrg# Substitute a variable $(am__tar) that is a command 986eaef79e5Smrg# writing to stdout a FORMAT-tarball containing the directory 987eaef79e5Smrg# $tardir. 988eaef79e5Smrg# tardir=directory && $(am__tar) > result.tar 989eaef79e5Smrg# 990eaef79e5Smrg# Substitute a variable $(am__untar) that extract such 991eaef79e5Smrg# a tarball read from stdin. 992eaef79e5Smrg# $(am__untar) < result.tar 993eaef79e5SmrgAC_DEFUN([_AM_PROG_TAR], 994eaef79e5Smrg[# Always define AMTAR for backward compatibility. 995eaef79e5SmrgAM_MISSING_PROG([AMTAR], [tar]) 996eaef79e5Smrgm4_if([$1], [v7], 997eaef79e5Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 998eaef79e5Smrg [m4_case([$1], [ustar],, [pax],, 999eaef79e5Smrg [m4_fatal([Unknown tar format])]) 1000eaef79e5SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1001eaef79e5Smrg# Loop over all known methods to create a tar archive until one works. 1002eaef79e5Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1003eaef79e5Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1004eaef79e5Smrg# Do not fold the above two line into one, because Tru64 sh and 1005eaef79e5Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1006eaef79e5Smrgfor _am_tool in $_am_tools 1007eaef79e5Smrgdo 1008eaef79e5Smrg case $_am_tool in 1009eaef79e5Smrg gnutar) 1010eaef79e5Smrg for _am_tar in tar gnutar gtar; 1011eaef79e5Smrg do 1012eaef79e5Smrg AM_RUN_LOG([$_am_tar --version]) && break 1013eaef79e5Smrg done 1014eaef79e5Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1015eaef79e5Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1016eaef79e5Smrg am__untar="$_am_tar -xf -" 1017eaef79e5Smrg ;; 1018eaef79e5Smrg plaintar) 1019eaef79e5Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1020eaef79e5Smrg # ustar tarball either. 1021eaef79e5Smrg (tar --version) >/dev/null 2>&1 && continue 1022eaef79e5Smrg am__tar='tar chf - "$$tardir"' 1023eaef79e5Smrg am__tar_='tar chf - "$tardir"' 1024eaef79e5Smrg am__untar='tar xf -' 1025eaef79e5Smrg ;; 1026eaef79e5Smrg pax) 1027eaef79e5Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1028eaef79e5Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1029eaef79e5Smrg am__untar='pax -r' 1030eaef79e5Smrg ;; 1031eaef79e5Smrg cpio) 1032eaef79e5Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1033eaef79e5Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1034eaef79e5Smrg am__untar='cpio -i -H $1 -d' 1035eaef79e5Smrg ;; 1036eaef79e5Smrg none) 1037eaef79e5Smrg am__tar=false 1038eaef79e5Smrg am__tar_=false 1039eaef79e5Smrg am__untar=false 1040eaef79e5Smrg ;; 1041eaef79e5Smrg esac 1042eaef79e5Smrg 1043eaef79e5Smrg # If the value was cached, stop now. We just wanted to have am__tar 1044eaef79e5Smrg # and am__untar set. 1045eaef79e5Smrg test -n "${am_cv_prog_tar_$1}" && break 1046eaef79e5Smrg 1047eaef79e5Smrg # tar/untar a dummy directory, and stop if the command works 1048eaef79e5Smrg rm -rf conftest.dir 1049eaef79e5Smrg mkdir conftest.dir 1050eaef79e5Smrg echo GrepMe > conftest.dir/file 1051eaef79e5Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1052eaef79e5Smrg rm -rf conftest.dir 1053eaef79e5Smrg if test -s conftest.tar; then 1054eaef79e5Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1055eaef79e5Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1056eaef79e5Smrg fi 1057eaef79e5Smrgdone 1058eaef79e5Smrgrm -rf conftest.dir 1059eaef79e5Smrg 1060eaef79e5SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1061eaef79e5SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1062eaef79e5SmrgAC_SUBST([am__tar]) 1063eaef79e5SmrgAC_SUBST([am__untar]) 1064eaef79e5Smrg]) # _AM_PROG_TAR 1065eaef79e5Smrg 10662b32c8f7Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1067eaef79e5Smrgdnl 106895e0246bSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1069eaef79e5Smrgdnl 1070eaef79e5Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 107195e0246bSmrgdnl copy of this software and associated documentation files (the "Software"), 107295e0246bSmrgdnl to deal in the Software without restriction, including without limitation 107395e0246bSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 107495e0246bSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 107595e0246bSmrgdnl Software is furnished to do so, subject to the following conditions: 1076eaef79e5Smrgdnl 107795e0246bSmrgdnl The above copyright notice and this permission notice (including the next 107895e0246bSmrgdnl paragraph) shall be included in all copies or substantial portions of the 107995e0246bSmrgdnl Software. 1080eaef79e5Smrgdnl 108195e0246bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 108295e0246bSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 108395e0246bSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 108495e0246bSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 108595e0246bSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 108695e0246bSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 108795e0246bSmrgdnl DEALINGS IN THE SOFTWARE. 1088eaef79e5Smrg 1089eaef79e5Smrg# XORG_MACROS_VERSION(required-version) 1090eaef79e5Smrg# ------------------------------------- 1091eaef79e5Smrg# Minimum version: 1.1.0 1092eaef79e5Smrg# 1093eaef79e5Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1094eaef79e5Smrg# your configure.ac with the minimum required version, such as: 1095eaef79e5Smrg# XORG_MACROS_VERSION(1.1) 1096eaef79e5Smrg# 10972b32c8f7Smrg# To ensure that this macro is defined, also add: 10982b32c8f7Smrg# m4_ifndef([XORG_MACROS_VERSION], 10992b32c8f7Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1100eaef79e5Smrg# 1101eaef79e5Smrg# 1102eaef79e5Smrg# See the "minimum version" comment for each macro you use to see what 1103eaef79e5Smrg# version you require. 11042b32c8f7Smrgm4_defun([XORG_MACROS_VERSION],[ 110595e0246bSmrgm4_define([vers_have], [1.10.1]) 11062b32c8f7Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 11072b32c8f7Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 11082b32c8f7Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 11092b32c8f7Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 11102b32c8f7Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 11112b32c8f7Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 11122b32c8f7Smrgm4_undefine([vers_have]) 11132b32c8f7Smrgm4_undefine([maj_have]) 11142b32c8f7Smrgm4_undefine([maj_needed]) 1115eaef79e5Smrg]) # XORG_MACROS_VERSION 1116eaef79e5Smrg 1117eaef79e5Smrg# XORG_PROG_RAWCPP() 1118eaef79e5Smrg# ------------------ 1119eaef79e5Smrg# Minimum version: 1.0.0 1120eaef79e5Smrg# 1121eaef79e5Smrg# Find cpp program and necessary flags for use in pre-processing text files 1122eaef79e5Smrg# such as man pages and config files 1123eaef79e5SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1124eaef79e5SmrgAC_REQUIRE([AC_PROG_CPP]) 1125eaef79e5SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1126eaef79e5Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1127eaef79e5Smrg 1128eaef79e5Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1129eaef79e5Smrg# which is not the best choice for supporting other OS'es, but covers most 1130eaef79e5Smrg# of the ones we need for now. 1131eaef79e5SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1132eaef79e5SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1133eaef79e5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1134eaef79e5Smrg AC_MSG_RESULT([no]) 1135eaef79e5Smrgelse 1136eaef79e5Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1137eaef79e5Smrg RAWCPPFLAGS=-undef 1138eaef79e5Smrg AC_MSG_RESULT([yes]) 11392b32c8f7Smrg # under Cygwin unix is still defined even with -undef 11402b32c8f7Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11412b32c8f7Smrg RAWCPPFLAGS="-undef -ansi" 11422b32c8f7Smrg AC_MSG_RESULT([yes, with -ansi]) 1143eaef79e5Smrg else 1144eaef79e5Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1145eaef79e5Smrg fi 1146eaef79e5Smrgfi 1147eaef79e5Smrgrm -f conftest.$ac_ext 1148eaef79e5Smrg 1149eaef79e5SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1150eaef79e5SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1151eaef79e5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1152eaef79e5Smrg AC_MSG_RESULT([no]) 1153eaef79e5Smrgelse 1154eaef79e5Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1155eaef79e5Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1156eaef79e5Smrg AC_MSG_RESULT([yes]) 1157eaef79e5Smrg else 1158eaef79e5Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1159eaef79e5Smrg fi 1160eaef79e5Smrgfi 1161eaef79e5Smrgrm -f conftest.$ac_ext 1162eaef79e5SmrgAC_SUBST(RAWCPPFLAGS) 1163eaef79e5Smrg]) # XORG_PROG_RAWCPP 1164eaef79e5Smrg 1165eaef79e5Smrg# XORG_MANPAGE_SECTIONS() 1166eaef79e5Smrg# ----------------------- 1167eaef79e5Smrg# Minimum version: 1.0.0 1168eaef79e5Smrg# 1169eaef79e5Smrg# Determine which sections man pages go in for the different man page types 1170eaef79e5Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1171eaef79e5Smrg# Not sure if there's any better way than just hardcoding by OS name. 1172eaef79e5Smrg# Override default settings by setting environment variables 117395e0246bSmrg# Added MAN_SUBSTS in version 1.8 117495e0246bSmrg# Added AC_PROG_SED in version 1.8 1175eaef79e5Smrg 1176eaef79e5SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1177eaef79e5SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 117895e0246bSmrgAC_REQUIRE([AC_PROG_SED]) 1179eaef79e5Smrg 1180eaef79e5Smrgif test x$APP_MAN_SUFFIX = x ; then 1181eaef79e5Smrg APP_MAN_SUFFIX=1 1182eaef79e5Smrgfi 1183eaef79e5Smrgif test x$APP_MAN_DIR = x ; then 1184eaef79e5Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1185eaef79e5Smrgfi 1186eaef79e5Smrg 1187eaef79e5Smrgif test x$LIB_MAN_SUFFIX = x ; then 1188eaef79e5Smrg LIB_MAN_SUFFIX=3 1189eaef79e5Smrgfi 1190eaef79e5Smrgif test x$LIB_MAN_DIR = x ; then 1191eaef79e5Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1192eaef79e5Smrgfi 1193eaef79e5Smrg 1194eaef79e5Smrgif test x$FILE_MAN_SUFFIX = x ; then 1195eaef79e5Smrg case $host_os in 1196eaef79e5Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1197eaef79e5Smrg *) FILE_MAN_SUFFIX=5 ;; 1198eaef79e5Smrg esac 1199eaef79e5Smrgfi 1200eaef79e5Smrgif test x$FILE_MAN_DIR = x ; then 1201eaef79e5Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1202eaef79e5Smrgfi 1203eaef79e5Smrg 1204eaef79e5Smrgif test x$MISC_MAN_SUFFIX = x ; then 1205eaef79e5Smrg case $host_os in 1206eaef79e5Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1207eaef79e5Smrg *) MISC_MAN_SUFFIX=7 ;; 1208eaef79e5Smrg esac 1209eaef79e5Smrgfi 1210eaef79e5Smrgif test x$MISC_MAN_DIR = x ; then 1211eaef79e5Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1212eaef79e5Smrgfi 1213eaef79e5Smrg 1214eaef79e5Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1215eaef79e5Smrg case $host_os in 1216eaef79e5Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1217eaef79e5Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1218eaef79e5Smrg esac 1219eaef79e5Smrgfi 1220eaef79e5Smrgif test x$DRIVER_MAN_DIR = x ; then 1221eaef79e5Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1222eaef79e5Smrgfi 1223eaef79e5Smrg 1224eaef79e5Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1225eaef79e5Smrg case $host_os in 1226eaef79e5Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1227eaef79e5Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1228eaef79e5Smrg esac 1229eaef79e5Smrgfi 1230eaef79e5Smrgif test x$ADMIN_MAN_DIR = x ; then 1231eaef79e5Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1232eaef79e5Smrgfi 1233eaef79e5Smrg 1234eaef79e5Smrg 1235eaef79e5SmrgAC_SUBST([APP_MAN_SUFFIX]) 1236eaef79e5SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1237eaef79e5SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1238eaef79e5SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1239eaef79e5SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1240eaef79e5SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1241eaef79e5SmrgAC_SUBST([APP_MAN_DIR]) 1242eaef79e5SmrgAC_SUBST([LIB_MAN_DIR]) 1243eaef79e5SmrgAC_SUBST([FILE_MAN_DIR]) 1244eaef79e5SmrgAC_SUBST([MISC_MAN_DIR]) 1245eaef79e5SmrgAC_SUBST([DRIVER_MAN_DIR]) 1246eaef79e5SmrgAC_SUBST([ADMIN_MAN_DIR]) 124795e0246bSmrg 124895e0246bSmrgXORG_MAN_PAGE="X Version 11" 124995e0246bSmrgAC_SUBST([XORG_MAN_PAGE]) 125095e0246bSmrgMAN_SUBSTS="\ 125195e0246bSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 125295e0246bSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 125395e0246bSmrg -e 's|__xservername__|Xorg|g' \ 125495e0246bSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 125595e0246bSmrg -e 's|__projectroot__|\$(prefix)|g' \ 125695e0246bSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 125795e0246bSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 125895e0246bSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 125995e0246bSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 126095e0246bSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 126195e0246bSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 126295e0246bSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 126395e0246bSmrgAC_SUBST([MAN_SUBSTS]) 126495e0246bSmrg 1265eaef79e5Smrg]) # XORG_MANPAGE_SECTIONS 1266eaef79e5Smrg 126795e0246bSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 126895e0246bSmrg# ------------------------ 126995e0246bSmrg# Minimum version: 1.7.0 127095e0246bSmrg# 127195e0246bSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 127295e0246bSmrg# provided by xorg-sgml-doctools, if installed. 127395e0246bSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 127495e0246bSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 127595e0246bSmrgXORG_SGML_PATH= 127695e0246bSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 127795e0246bSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 127895e0246bSmrg [m4_ifval([$1],[:], 127995e0246bSmrg [if test x"$cross_compiling" != x"yes" ; then 128095e0246bSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 128195e0246bSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 128295e0246bSmrg fi]) 128395e0246bSmrg ]) 128495e0246bSmrg 128595e0246bSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 128695e0246bSmrg# the path and the name of the doc stylesheet 128795e0246bSmrgif test "x$XORG_SGML_PATH" != "x" ; then 128895e0246bSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 128995e0246bSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 129095e0246bSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 129195e0246bSmrgelse 129295e0246bSmrg AC_MSG_RESULT([no]) 129395e0246bSmrgfi 129495e0246bSmrg 129595e0246bSmrgAC_SUBST(XORG_SGML_PATH) 129695e0246bSmrgAC_SUBST(STYLESHEET_SRCDIR) 129795e0246bSmrgAC_SUBST(XSL_STYLESHEET) 129895e0246bSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 129995e0246bSmrg]) # XORG_CHECK_SGML_DOCTOOLS 130095e0246bSmrg 1301eaef79e5Smrg# XORG_CHECK_LINUXDOC 1302eaef79e5Smrg# ------------------- 1303eaef79e5Smrg# Minimum version: 1.0.0 1304eaef79e5Smrg# 1305eaef79e5Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1306eaef79e5Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1307eaef79e5Smrg# Whether or not the necessary tools and files are found can be checked 1308eaef79e5Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1309eaef79e5SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 131095e0246bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 131195e0246bSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1312eaef79e5Smrg 1313eaef79e5SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1314eaef79e5Smrg 131595e0246bSmrgAC_MSG_CHECKING([whether to build documentation]) 1316eaef79e5Smrg 131795e0246bSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1318eaef79e5Smrg BUILDDOC=yes 1319eaef79e5Smrgelse 1320eaef79e5Smrg BUILDDOC=no 1321eaef79e5Smrgfi 1322eaef79e5Smrg 1323eaef79e5SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1324eaef79e5Smrg 1325eaef79e5SmrgAC_MSG_RESULT([$BUILDDOC]) 1326eaef79e5Smrg 132795e0246bSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1328eaef79e5Smrg 132995e0246bSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1330eaef79e5Smrg BUILDPDFDOC=yes 1331eaef79e5Smrgelse 1332eaef79e5Smrg BUILDPDFDOC=no 1333eaef79e5Smrgfi 1334eaef79e5Smrg 1335eaef79e5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1336eaef79e5Smrg 1337eaef79e5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1338eaef79e5Smrg 133995e0246bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1340eaef79e5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1341eaef79e5SmrgMAKE_PDF="$PS2PDF" 1342eaef79e5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1343eaef79e5Smrg 1344eaef79e5SmrgAC_SUBST(MAKE_TEXT) 1345eaef79e5SmrgAC_SUBST(MAKE_PS) 1346eaef79e5SmrgAC_SUBST(MAKE_PDF) 1347eaef79e5SmrgAC_SUBST(MAKE_HTML) 1348eaef79e5Smrg]) # XORG_CHECK_LINUXDOC 1349eaef79e5Smrg 1350eaef79e5Smrg# XORG_CHECK_DOCBOOK 1351eaef79e5Smrg# ------------------- 1352eaef79e5Smrg# Minimum version: 1.0.0 1353eaef79e5Smrg# 1354eaef79e5Smrg# Checks for the ability to build output formats from SGML DocBook source. 1355eaef79e5Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1356eaef79e5Smrg# indicates whether the necessary tools and files are found and, if set, 1357eaef79e5Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1358eaef79e5SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 135995e0246bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 136095e0246bSmrg 1361eaef79e5SmrgBUILDTXTDOC=no 1362eaef79e5SmrgBUILDPDFDOC=no 1363eaef79e5SmrgBUILDPSDOC=no 1364eaef79e5SmrgBUILDHTMLDOC=no 1365eaef79e5Smrg 1366eaef79e5SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1367eaef79e5SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1368eaef79e5SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1369eaef79e5SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1370eaef79e5Smrg 137195e0246bSmrgAC_MSG_CHECKING([whether to build text documentation]) 137295e0246bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1373eaef79e5Smrg test x$BUILD_TXTDOC != xno; then 1374eaef79e5Smrg BUILDTXTDOC=yes 1375eaef79e5Smrgfi 1376eaef79e5SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1377eaef79e5SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1378eaef79e5Smrg 137995e0246bSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 138095e0246bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1381eaef79e5Smrg test x$BUILD_PDFDOC != xno; then 1382eaef79e5Smrg BUILDPDFDOC=yes 1383eaef79e5Smrgfi 1384eaef79e5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1385eaef79e5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1386eaef79e5Smrg 138795e0246bSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 138895e0246bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1389eaef79e5Smrg test x$BUILD_PSDOC != xno; then 1390eaef79e5Smrg BUILDPSDOC=yes 1391eaef79e5Smrgfi 1392eaef79e5SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1393eaef79e5SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1394eaef79e5Smrg 139595e0246bSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 139695e0246bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1397eaef79e5Smrg test x$BUILD_HTMLDOC != xno; then 1398eaef79e5Smrg BUILDHTMLDOC=yes 1399eaef79e5Smrgfi 1400eaef79e5SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1401eaef79e5SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1402eaef79e5Smrg 1403eaef79e5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1404eaef79e5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1405eaef79e5SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1406eaef79e5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1407eaef79e5Smrg 1408eaef79e5SmrgAC_SUBST(MAKE_TEXT) 1409eaef79e5SmrgAC_SUBST(MAKE_PS) 1410eaef79e5SmrgAC_SUBST(MAKE_PDF) 1411eaef79e5SmrgAC_SUBST(MAKE_HTML) 1412eaef79e5Smrg]) # XORG_CHECK_DOCBOOK 1413eaef79e5Smrg 141495e0246bSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 141595e0246bSmrg# ---------------- 141695e0246bSmrg# Minimum version: 1.5.0 141795e0246bSmrg# 141895e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 141995e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 142095e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 142195e0246bSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 142295e0246bSmrg# as whether or not to use the xmlto package. 142395e0246bSmrg# 142495e0246bSmrg# Interface to module: 142595e0246bSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 142695e0246bSmrg# XMLTO: returns the path of the xmlto program found 142795e0246bSmrg# returns the path set by the user in the environment 142895e0246bSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 142995e0246bSmrg# 'no' user instructs the module not to use xmlto 143095e0246bSmrg# 143195e0246bSmrg# Added in version 1.10.0 143295e0246bSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 143395e0246bSmrg# xmlto for text output requires either lynx, links, or w3m browsers 143495e0246bSmrg# 143595e0246bSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 143695e0246bSmrg# 143795e0246bSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 143895e0246bSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 143995e0246bSmrgAC_ARG_WITH(xmlto, 144095e0246bSmrg AS_HELP_STRING([--with-xmlto], 144195e0246bSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 144295e0246bSmrg [use_xmlto=$withval], [use_xmlto=auto]) 144395e0246bSmrg 144495e0246bSmrgif test "x$use_xmlto" = x"auto"; then 144595e0246bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 144695e0246bSmrg if test "x$XMLTO" = "x"; then 144795e0246bSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 144895e0246bSmrg have_xmlto=no 144995e0246bSmrg else 145095e0246bSmrg have_xmlto=yes 145195e0246bSmrg fi 145295e0246bSmrgelif test "x$use_xmlto" = x"yes" ; then 145395e0246bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 145495e0246bSmrg if test "x$XMLTO" = "x"; then 145595e0246bSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 145695e0246bSmrg fi 145795e0246bSmrg have_xmlto=yes 145895e0246bSmrgelif test "x$use_xmlto" = x"no" ; then 145995e0246bSmrg if test "x$XMLTO" != "x"; then 146095e0246bSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 146195e0246bSmrg fi 146295e0246bSmrg have_xmlto=no 146395e0246bSmrgelse 146495e0246bSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 146595e0246bSmrgfi 146695e0246bSmrg 146795e0246bSmrg# Test for a minimum version of xmlto, if provided. 146895e0246bSmrgm4_ifval([$1], 146995e0246bSmrg[if test "$have_xmlto" = yes; then 147095e0246bSmrg # scrape the xmlto version 147195e0246bSmrg AC_MSG_CHECKING([the xmlto version]) 147295e0246bSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 147395e0246bSmrg AC_MSG_RESULT([$xmlto_version]) 147495e0246bSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 147595e0246bSmrg [if test "x$use_xmlto" = xauto; then 147695e0246bSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 147795e0246bSmrg have_xmlto=no 147895e0246bSmrg else 147995e0246bSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 148095e0246bSmrg fi]) 148195e0246bSmrgfi]) 148295e0246bSmrg 148395e0246bSmrg# Test for the ability of xmlto to generate a text target 148495e0246bSmrghave_xmlto_text=no 148595e0246bSmrgcat > conftest.xml << "EOF" 148695e0246bSmrgEOF 148795e0246bSmrgAS_IF([test "$have_xmlto" = yes], 148895e0246bSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 148995e0246bSmrg [have_xmlto_text=yes], 149095e0246bSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 149195e0246bSmrgrm -f conftest.xml 149295e0246bSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 149395e0246bSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 149495e0246bSmrg]) # XORG_WITH_XMLTO 149595e0246bSmrg 149695e0246bSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 149795e0246bSmrg# ---------------- 149895e0246bSmrg# Minimum version: 1.5.0 149995e0246bSmrg# 150095e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 150195e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 150295e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 150395e0246bSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 150495e0246bSmrg# as whether or not to use the asciidoc package. 150595e0246bSmrg# 150695e0246bSmrg# Interface to module: 150795e0246bSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 150895e0246bSmrg# ASCIIDOC: returns the path of the asciidoc program found 150995e0246bSmrg# returns the path set by the user in the environment 151095e0246bSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 151195e0246bSmrg# 'no' user instructs the module not to use asciidoc 151295e0246bSmrg# 151395e0246bSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 151495e0246bSmrg# 151595e0246bSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 151695e0246bSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 151795e0246bSmrgAC_ARG_WITH(asciidoc, 151895e0246bSmrg AS_HELP_STRING([--with-asciidoc], 151995e0246bSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 152095e0246bSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 152195e0246bSmrg 152295e0246bSmrgif test "x$use_asciidoc" = x"auto"; then 152395e0246bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 152495e0246bSmrg if test "x$ASCIIDOC" = "x"; then 152595e0246bSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 152695e0246bSmrg have_asciidoc=no 152795e0246bSmrg else 152895e0246bSmrg have_asciidoc=yes 152995e0246bSmrg fi 153095e0246bSmrgelif test "x$use_asciidoc" = x"yes" ; then 153195e0246bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 153295e0246bSmrg if test "x$ASCIIDOC" = "x"; then 153395e0246bSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 153495e0246bSmrg fi 153595e0246bSmrg have_asciidoc=yes 153695e0246bSmrgelif test "x$use_asciidoc" = x"no" ; then 153795e0246bSmrg if test "x$ASCIIDOC" != "x"; then 153895e0246bSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 153995e0246bSmrg fi 154095e0246bSmrg have_asciidoc=no 154195e0246bSmrgelse 154295e0246bSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 154395e0246bSmrgfi 154495e0246bSmrgm4_ifval([$1], 154595e0246bSmrg[if test "$have_asciidoc" = yes; then 154695e0246bSmrg # scrape the asciidoc version 154795e0246bSmrg AC_MSG_CHECKING([the asciidoc version]) 154895e0246bSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 154995e0246bSmrg AC_MSG_RESULT([$asciidoc_version]) 155095e0246bSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 155195e0246bSmrg [if test "x$use_asciidoc" = xauto; then 155295e0246bSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 155395e0246bSmrg have_asciidoc=no 155495e0246bSmrg else 155595e0246bSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 155695e0246bSmrg fi]) 155795e0246bSmrgfi]) 155895e0246bSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 155995e0246bSmrg]) # XORG_WITH_ASCIIDOC 156095e0246bSmrg 156195e0246bSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 156295e0246bSmrg# -------------------------------- 156395e0246bSmrg# Minimum version: 1.5.0 156495e0246bSmrg# 156595e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 156695e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 156795e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 156895e0246bSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 156995e0246bSmrg# as whether or not to use the doxygen package. 157095e0246bSmrg# 157195e0246bSmrg# Interface to module: 157295e0246bSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 157395e0246bSmrg# DOXYGEN: returns the path of the doxygen program found 157495e0246bSmrg# returns the path set by the user in the environment 157595e0246bSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 157695e0246bSmrg# 'no' user instructs the module not to use doxygen 157795e0246bSmrg# 157895e0246bSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 157995e0246bSmrg# 158095e0246bSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 158195e0246bSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 158295e0246bSmrgAC_ARG_WITH(doxygen, 158395e0246bSmrg AS_HELP_STRING([--with-doxygen], 158495e0246bSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 158595e0246bSmrg [use_doxygen=$withval], [use_doxygen=auto]) 158695e0246bSmrg 158795e0246bSmrgif test "x$use_doxygen" = x"auto"; then 158895e0246bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 158995e0246bSmrg if test "x$DOXYGEN" = "x"; then 159095e0246bSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 159195e0246bSmrg have_doxygen=no 159295e0246bSmrg else 159395e0246bSmrg have_doxygen=yes 159495e0246bSmrg fi 159595e0246bSmrgelif test "x$use_doxygen" = x"yes" ; then 159695e0246bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 159795e0246bSmrg if test "x$DOXYGEN" = "x"; then 159895e0246bSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 159995e0246bSmrg fi 160095e0246bSmrg have_doxygen=yes 160195e0246bSmrgelif test "x$use_doxygen" = x"no" ; then 160295e0246bSmrg if test "x$DOXYGEN" != "x"; then 160395e0246bSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 160495e0246bSmrg fi 160595e0246bSmrg have_doxygen=no 160695e0246bSmrgelse 160795e0246bSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 160895e0246bSmrgfi 160995e0246bSmrgm4_ifval([$1], 161095e0246bSmrg[if test "$have_doxygen" = yes; then 161195e0246bSmrg # scrape the doxygen version 161295e0246bSmrg AC_MSG_CHECKING([the doxygen version]) 161395e0246bSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 161495e0246bSmrg AC_MSG_RESULT([$doxygen_version]) 161595e0246bSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 161695e0246bSmrg [if test "x$use_doxygen" = xauto; then 161795e0246bSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 161895e0246bSmrg have_doxygen=no 161995e0246bSmrg else 162095e0246bSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 162195e0246bSmrg fi]) 162295e0246bSmrgfi]) 162395e0246bSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 162495e0246bSmrg]) # XORG_WITH_DOXYGEN 162595e0246bSmrg 162695e0246bSmrg# XORG_WITH_GROFF 162795e0246bSmrg# ---------------- 162895e0246bSmrg# Minimum version: 1.6.0 162995e0246bSmrg# 163095e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 163195e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 163295e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 163395e0246bSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 163495e0246bSmrg# as whether or not to use the groff package. 163595e0246bSmrg# 163695e0246bSmrg# Interface to module: 163795e0246bSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 163895e0246bSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 163995e0246bSmrg# HAVE_GROFF_MS: the -ms macros package 164095e0246bSmrg# GROFF: returns the path of the groff program found 164195e0246bSmrg# returns the path set by the user in the environment 164295e0246bSmrg# --with-groff: 'yes' user instructs the module to use groff 164395e0246bSmrg# 'no' user instructs the module not to use groff 164495e0246bSmrg# 164595e0246bSmrg# Added in version 1.9.0: 164695e0246bSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 164795e0246bSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 164895e0246bSmrg# psselect from the psutils package. 164995e0246bSmrg# the ghostcript package. Refer to the grohtml man pages 165095e0246bSmrg# 165195e0246bSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 165295e0246bSmrg# 165395e0246bSmrg# OS and distros often splits groff in a basic and full package, the former 165495e0246bSmrg# having the groff program and the later having devices, fonts and macros 165595e0246bSmrg# Checking for the groff executable is not enough. 165695e0246bSmrg# 165795e0246bSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 165895e0246bSmrg# unset HAVE_GROFF or GROFF env variables. 165995e0246bSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 166095e0246bSmrg# 166195e0246bSmrgAC_DEFUN([XORG_WITH_GROFF],[ 166295e0246bSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 166395e0246bSmrgAC_ARG_WITH(groff, 166495e0246bSmrg AS_HELP_STRING([--with-groff], 166595e0246bSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 166695e0246bSmrg [use_groff=$withval], [use_groff=auto]) 166795e0246bSmrg 166895e0246bSmrgif test "x$use_groff" = x"auto"; then 166995e0246bSmrg AC_PATH_PROG([GROFF], [groff]) 167095e0246bSmrg if test "x$GROFF" = "x"; then 167195e0246bSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 167295e0246bSmrg have_groff=no 167395e0246bSmrg else 167495e0246bSmrg have_groff=yes 167595e0246bSmrg fi 167695e0246bSmrgelif test "x$use_groff" = x"yes" ; then 167795e0246bSmrg AC_PATH_PROG([GROFF], [groff]) 167895e0246bSmrg if test "x$GROFF" = "x"; then 167995e0246bSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 168095e0246bSmrg fi 168195e0246bSmrg have_groff=yes 168295e0246bSmrgelif test "x$use_groff" = x"no" ; then 168395e0246bSmrg if test "x$GROFF" != "x"; then 168495e0246bSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 168595e0246bSmrg fi 168695e0246bSmrg have_groff=no 168795e0246bSmrgelse 168895e0246bSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 168995e0246bSmrgfi 169095e0246bSmrg 169195e0246bSmrg# We have groff, test for the presence of the macro packages 169295e0246bSmrgif test "x$have_groff" = x"yes"; then 169395e0246bSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 169495e0246bSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 169595e0246bSmrg groff_ms_works=yes 169695e0246bSmrg else 169795e0246bSmrg groff_ms_works=no 169895e0246bSmrg fi 169995e0246bSmrg AC_MSG_RESULT([$groff_ms_works]) 170095e0246bSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 170195e0246bSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 170295e0246bSmrg groff_mm_works=yes 170395e0246bSmrg else 170495e0246bSmrg groff_mm_works=no 170595e0246bSmrg fi 170695e0246bSmrg AC_MSG_RESULT([$groff_mm_works]) 170795e0246bSmrgfi 170895e0246bSmrg 170995e0246bSmrg# We have groff, test for HTML dependencies, one command per package 171095e0246bSmrgif test "x$have_groff" = x"yes"; then 171195e0246bSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 171295e0246bSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 171395e0246bSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 171495e0246bSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 171595e0246bSmrg have_groff_html=yes 171695e0246bSmrg else 171795e0246bSmrg have_groff_html=no 171895e0246bSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 171995e0246bSmrg fi 172095e0246bSmrgfi 172195e0246bSmrg 172295e0246bSmrg# Set Automake conditionals for Makefiles 172395e0246bSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 172495e0246bSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 172595e0246bSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 172695e0246bSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 172795e0246bSmrg]) # XORG_WITH_GROFF 172895e0246bSmrg 172995e0246bSmrg# XORG_WITH_FOP 173095e0246bSmrg# ---------------- 173195e0246bSmrg# Minimum version: 1.6.0 173295e0246bSmrg# 173395e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 173495e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 173595e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 173695e0246bSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 173795e0246bSmrg# as whether or not to use the fop package. 173895e0246bSmrg# 173995e0246bSmrg# Interface to module: 174095e0246bSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 174195e0246bSmrg# FOP: returns the path of the fop program found 174295e0246bSmrg# returns the path set by the user in the environment 174395e0246bSmrg# --with-fop: 'yes' user instructs the module to use fop 174495e0246bSmrg# 'no' user instructs the module not to use fop 174595e0246bSmrg# 174695e0246bSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 174795e0246bSmrg# 174895e0246bSmrgAC_DEFUN([XORG_WITH_FOP],[ 174995e0246bSmrgAC_ARG_VAR([FOP], [Path to fop command]) 175095e0246bSmrgAC_ARG_WITH(fop, 175195e0246bSmrg AS_HELP_STRING([--with-fop], 175295e0246bSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 175395e0246bSmrg [use_fop=$withval], [use_fop=auto]) 175495e0246bSmrg 175595e0246bSmrgif test "x$use_fop" = x"auto"; then 175695e0246bSmrg AC_PATH_PROG([FOP], [fop]) 175795e0246bSmrg if test "x$FOP" = "x"; then 175895e0246bSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 175995e0246bSmrg have_fop=no 176095e0246bSmrg else 176195e0246bSmrg have_fop=yes 176295e0246bSmrg fi 176395e0246bSmrgelif test "x$use_fop" = x"yes" ; then 176495e0246bSmrg AC_PATH_PROG([FOP], [fop]) 176595e0246bSmrg if test "x$FOP" = "x"; then 176695e0246bSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 176795e0246bSmrg fi 176895e0246bSmrg have_fop=yes 176995e0246bSmrgelif test "x$use_fop" = x"no" ; then 177095e0246bSmrg if test "x$FOP" != "x"; then 177195e0246bSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 177295e0246bSmrg fi 177395e0246bSmrg have_fop=no 177495e0246bSmrgelse 177595e0246bSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 177695e0246bSmrgfi 177795e0246bSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 177895e0246bSmrg]) # XORG_WITH_FOP 177995e0246bSmrg 178095e0246bSmrg# XORG_WITH_PS2PDF 178195e0246bSmrg# ---------------- 178295e0246bSmrg# Minimum version: 1.6.0 178395e0246bSmrg# 178495e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 178595e0246bSmrg# not at the appropriate level. This macro enables a module to test for the 178695e0246bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 178795e0246bSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 178895e0246bSmrg# as whether or not to use the ps2pdf package. 178995e0246bSmrg# 179095e0246bSmrg# Interface to module: 179195e0246bSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 179295e0246bSmrg# PS2PDF: returns the path of the ps2pdf program found 179395e0246bSmrg# returns the path set by the user in the environment 179495e0246bSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 179595e0246bSmrg# 'no' user instructs the module not to use ps2pdf 179695e0246bSmrg# 179795e0246bSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 179895e0246bSmrg# 179995e0246bSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 180095e0246bSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 180195e0246bSmrgAC_ARG_WITH(ps2pdf, 180295e0246bSmrg AS_HELP_STRING([--with-ps2pdf], 180395e0246bSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 180495e0246bSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 180595e0246bSmrg 180695e0246bSmrgif test "x$use_ps2pdf" = x"auto"; then 180795e0246bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 180895e0246bSmrg if test "x$PS2PDF" = "x"; then 180995e0246bSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 181095e0246bSmrg have_ps2pdf=no 181195e0246bSmrg else 181295e0246bSmrg have_ps2pdf=yes 181395e0246bSmrg fi 181495e0246bSmrgelif test "x$use_ps2pdf" = x"yes" ; then 181595e0246bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 181695e0246bSmrg if test "x$PS2PDF" = "x"; then 181795e0246bSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 181895e0246bSmrg fi 181995e0246bSmrg have_ps2pdf=yes 182095e0246bSmrgelif test "x$use_ps2pdf" = x"no" ; then 182195e0246bSmrg if test "x$PS2PDF" != "x"; then 182295e0246bSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 182395e0246bSmrg fi 182495e0246bSmrg have_ps2pdf=no 182595e0246bSmrgelse 182695e0246bSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 182795e0246bSmrgfi 182895e0246bSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 182995e0246bSmrg]) # XORG_WITH_PS2PDF 183095e0246bSmrg 183195e0246bSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 183295e0246bSmrg# ---------------- 183395e0246bSmrg# Minimum version: 1.6.0 183495e0246bSmrg# 183595e0246bSmrg# Documentation tools are not always available on all platforms and sometimes 183695e0246bSmrg# not at the appropriate level. This macro enables a builder to skip all 183795e0246bSmrg# documentation targets except traditional man pages. 183895e0246bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 183995e0246bSmrg# maximum flexibilty in controlling documentation building. 184095e0246bSmrg# Refer to: 184195e0246bSmrg# XORG_WITH_XMLTO --with-xmlto 184295e0246bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 184395e0246bSmrg# XORG_WITH_DOXYGEN --with-doxygen 184495e0246bSmrg# XORG_WITH_FOP --with-fop 184595e0246bSmrg# XORG_WITH_GROFF --with-groff 184695e0246bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 184795e0246bSmrg# 184895e0246bSmrg# Interface to module: 184995e0246bSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 185095e0246bSmrg# --enable-docs: 'yes' user instructs the module to generate docs 185195e0246bSmrg# 'no' user instructs the module not to generate docs 185295e0246bSmrg# parm1: specify the default value, yes or no. 185395e0246bSmrg# 185495e0246bSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 185595e0246bSmrgdefault=$1 185695e0246bSmrgif test "x$default" = x ; then 185795e0246bSmrg default="yes" 185895e0246bSmrgfi 185995e0246bSmrgAC_ARG_ENABLE(docs, 186095e0246bSmrg AS_HELP_STRING([--enable-docs], 186195e0246bSmrg [Enable building the documentation (default: yes)]), 186295e0246bSmrg [build_docs=$enableval], [build_docs=$default]) 186395e0246bSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 186495e0246bSmrgAC_MSG_CHECKING([whether to build documentation]) 186595e0246bSmrgAC_MSG_RESULT([$build_docs]) 186695e0246bSmrg]) # XORG_ENABLE_DOCS 186795e0246bSmrg 186895e0246bSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 186995e0246bSmrg# ---------------- 187095e0246bSmrg# Minimum version: 1.6.0 187195e0246bSmrg# 187295e0246bSmrg# This macro enables a builder to skip all developer documentation. 187395e0246bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 187495e0246bSmrg# maximum flexibilty in controlling documentation building. 187595e0246bSmrg# Refer to: 187695e0246bSmrg# XORG_WITH_XMLTO --with-xmlto 187795e0246bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 187895e0246bSmrg# XORG_WITH_DOXYGEN --with-doxygen 187995e0246bSmrg# XORG_WITH_FOP --with-fop 188095e0246bSmrg# XORG_WITH_GROFF --with-groff 188195e0246bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 188295e0246bSmrg# 188395e0246bSmrg# Interface to module: 188495e0246bSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 188595e0246bSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 188695e0246bSmrg# 'no' user instructs the module not to generate developer docs 188795e0246bSmrg# parm1: specify the default value, yes or no. 188895e0246bSmrg# 188995e0246bSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 189095e0246bSmrgdevel_default=$1 189195e0246bSmrgif test "x$devel_default" = x ; then 189295e0246bSmrg devel_default="yes" 189395e0246bSmrgfi 189495e0246bSmrgAC_ARG_ENABLE(devel-docs, 189595e0246bSmrg AS_HELP_STRING([--enable-devel-docs], 189695e0246bSmrg [Enable building the developer documentation (default: yes)]), 189795e0246bSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 189895e0246bSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 189995e0246bSmrgAC_MSG_CHECKING([whether to build developer documentation]) 190095e0246bSmrgAC_MSG_RESULT([$build_devel_docs]) 190195e0246bSmrg]) # XORG_ENABLE_DEVEL_DOCS 190295e0246bSmrg 190395e0246bSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 190495e0246bSmrg# ---------------- 190595e0246bSmrg# Minimum version: 1.6.0 190695e0246bSmrg# 190795e0246bSmrg# This macro enables a builder to skip all functional specification targets. 190895e0246bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 190995e0246bSmrg# maximum flexibilty in controlling documentation building. 191095e0246bSmrg# Refer to: 191195e0246bSmrg# XORG_WITH_XMLTO --with-xmlto 191295e0246bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 191395e0246bSmrg# XORG_WITH_DOXYGEN --with-doxygen 191495e0246bSmrg# XORG_WITH_FOP --with-fop 191595e0246bSmrg# XORG_WITH_GROFF --with-groff 191695e0246bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 191795e0246bSmrg# 191895e0246bSmrg# Interface to module: 191995e0246bSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 192095e0246bSmrg# --enable-specs: 'yes' user instructs the module to generate specs 192195e0246bSmrg# 'no' user instructs the module not to generate specs 192295e0246bSmrg# parm1: specify the default value, yes or no. 192395e0246bSmrg# 192495e0246bSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 192595e0246bSmrgspec_default=$1 192695e0246bSmrgif test "x$spec_default" = x ; then 192795e0246bSmrg spec_default="yes" 192895e0246bSmrgfi 192995e0246bSmrgAC_ARG_ENABLE(specs, 193095e0246bSmrg AS_HELP_STRING([--enable-specs], 193195e0246bSmrg [Enable building the specs (default: yes)]), 193295e0246bSmrg [build_specs=$enableval], [build_specs=$spec_default]) 193395e0246bSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 193495e0246bSmrgAC_MSG_CHECKING([whether to build functional specifications]) 193595e0246bSmrgAC_MSG_RESULT([$build_specs]) 193695e0246bSmrg]) # XORG_ENABLE_SPECS 193795e0246bSmrg 1938eaef79e5Smrg# XORG_CHECK_MALLOC_ZERO 1939eaef79e5Smrg# ---------------------- 1940eaef79e5Smrg# Minimum version: 1.0.0 1941eaef79e5Smrg# 1942eaef79e5Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1943eaef79e5Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1944eaef79e5Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1945eaef79e5SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1946eaef79e5SmrgAC_ARG_ENABLE(malloc0returnsnull, 19472b32c8f7Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1948eaef79e5Smrg [malloc(0) returns NULL (default: auto)]), 1949eaef79e5Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1950eaef79e5Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1951eaef79e5Smrg 1952eaef79e5SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1953eaef79e5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1954eaef79e5Smrg AC_RUN_IFELSE([ 1955eaef79e5Smrgchar *malloc(); 1956eaef79e5Smrgchar *realloc(); 1957eaef79e5Smrgchar *calloc(); 1958eaef79e5Smrgmain() { 1959eaef79e5Smrg char *m0, *r0, *c0, *p; 1960eaef79e5Smrg m0 = malloc(0); 1961eaef79e5Smrg p = malloc(10); 1962eaef79e5Smrg r0 = realloc(p,0); 1963eaef79e5Smrg c0 = calloc(0); 1964eaef79e5Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1965eaef79e5Smrg}], 1966eaef79e5Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 196795e0246bSmrg [MALLOC_ZERO_RETURNS_NULL=no], 196895e0246bSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1969eaef79e5Smrgfi 1970eaef79e5SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1971eaef79e5Smrg 1972eaef79e5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1973eaef79e5Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1974eaef79e5Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1975eaef79e5Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1976eaef79e5Smrgelse 1977eaef79e5Smrg MALLOC_ZERO_CFLAGS="" 1978eaef79e5Smrg XMALLOC_ZERO_CFLAGS="" 1979eaef79e5Smrg XTMALLOC_ZERO_CFLAGS="" 1980eaef79e5Smrgfi 1981eaef79e5Smrg 1982eaef79e5SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1983eaef79e5SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1984eaef79e5SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1985eaef79e5Smrg]) # XORG_CHECK_MALLOC_ZERO 1986eaef79e5Smrg 1987eaef79e5Smrg# XORG_WITH_LINT() 1988eaef79e5Smrg# ---------------- 1989eaef79e5Smrg# Minimum version: 1.1.0 1990eaef79e5Smrg# 199195e0246bSmrg# This macro enables the use of a tool that flags some suspicious and 199295e0246bSmrg# non-portable constructs (likely to be bugs) in C language source code. 199395e0246bSmrg# It will attempt to locate the tool and use appropriate options. 199495e0246bSmrg# There are various lint type tools on different platforms. 199595e0246bSmrg# 199695e0246bSmrg# Interface to module: 199795e0246bSmrg# LINT: returns the path to the tool found on the platform 199895e0246bSmrg# or the value set to LINT on the configure cmd line 199995e0246bSmrg# also an Automake conditional 200095e0246bSmrg# LINT_FLAGS: an Automake variable with appropriate flags 200195e0246bSmrg# 200295e0246bSmrg# --with-lint: 'yes' user instructs the module to use lint 200395e0246bSmrg# 'no' user instructs the module not to use lint (default) 200495e0246bSmrg# 200595e0246bSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 200695e0246bSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2007eaef79e5Smrg# 2008eaef79e5SmrgAC_DEFUN([XORG_WITH_LINT],[ 2009eaef79e5Smrg 201095e0246bSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 201195e0246bSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 20122b32c8f7SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2013eaef79e5Smrg [Use a lint-style source code checker (default: disabled)])], 2014eaef79e5Smrg [use_lint=$withval], [use_lint=no]) 201595e0246bSmrg 201695e0246bSmrg# Obtain platform specific info like program name and options 201795e0246bSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 201895e0246bSmrgcase $host_os in 201995e0246bSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 202095e0246bSmrg lint_name=splint 202195e0246bSmrg lint_options="-badflag" 202295e0246bSmrg ;; 202395e0246bSmrg *freebsd* | *netbsd*) 202495e0246bSmrg lint_name=lint 202595e0246bSmrg lint_options="-u -b" 202695e0246bSmrg ;; 202795e0246bSmrg *solaris*) 202895e0246bSmrg lint_name=lint 202995e0246bSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 203095e0246bSmrg ;; 203195e0246bSmrgesac 203295e0246bSmrg 203395e0246bSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 203495e0246bSmrgif test "x$use_lint" = x"yes" ; then 203595e0246bSmrg AC_PATH_PROG([LINT], [$lint_name]) 203695e0246bSmrg if test "x$LINT" = "x"; then 203795e0246bSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 203895e0246bSmrg fi 203995e0246bSmrgelif test "x$use_lint" = x"no" ; then 204095e0246bSmrg if test "x$LINT" != "x"; then 204195e0246bSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 204295e0246bSmrg fi 2043eaef79e5Smrgelse 204495e0246bSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2045eaef79e5Smrgfi 204695e0246bSmrg 204795e0246bSmrg# User supplied flags override default flags 204895e0246bSmrgif test "x$LINT_FLAGS" != "x"; then 204995e0246bSmrg lint_options=$LINT_FLAGS 2050eaef79e5Smrgfi 2051eaef79e5Smrg 205295e0246bSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 205395e0246bSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2054eaef79e5Smrg 2055eaef79e5Smrg]) # XORG_WITH_LINT 2056eaef79e5Smrg 2057eaef79e5Smrg# XORG_LINT_LIBRARY(LIBNAME) 2058eaef79e5Smrg# -------------------------- 2059eaef79e5Smrg# Minimum version: 1.1.0 2060eaef79e5Smrg# 2061eaef79e5Smrg# Sets up flags for building lint libraries for checking programs that call 2062eaef79e5Smrg# functions in the library. 2063eaef79e5Smrg# 206495e0246bSmrg# Interface to module: 206595e0246bSmrg# LINTLIB - Automake variable with the name of lint library file to make 206695e0246bSmrg# MAKE_LINT_LIB - Automake conditional 206795e0246bSmrg# 206895e0246bSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 206995e0246bSmrg# - 'no' user instructs the module not to create a lint library (default) 2070eaef79e5Smrg 2071eaef79e5SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2072eaef79e5SmrgAC_REQUIRE([XORG_WITH_LINT]) 20732b32c8f7SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2074eaef79e5Smrg [Create lint library (default: disabled)])], 2075eaef79e5Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 207695e0246bSmrg 207795e0246bSmrgif test "x$make_lint_lib" = x"yes" ; then 207895e0246bSmrg LINTLIB=llib-l$1.ln 207995e0246bSmrg if test "x$LINT" = "x"; then 208095e0246bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 208195e0246bSmrg fi 208295e0246bSmrgelif test "x$make_lint_lib" != x"no" ; then 208395e0246bSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2084eaef79e5Smrgfi 208595e0246bSmrg 2086eaef79e5SmrgAC_SUBST(LINTLIB) 2087eaef79e5SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2088eaef79e5Smrg 2089eaef79e5Smrg]) # XORG_LINT_LIBRARY 2090eaef79e5Smrg 20912b32c8f7Smrg# XORG_CWARNFLAGS 20922b32c8f7Smrg# --------------- 20932b32c8f7Smrg# Minimum version: 1.2.0 20942b32c8f7Smrg# 20952b32c8f7Smrg# Defines CWARNFLAGS to enable C compiler warnings. 20962b32c8f7Smrg# 20972b32c8f7SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 209895e0246bSmrgAC_REQUIRE([AC_PROG_CC_C99]) 20992b32c8f7Smrgif test "x$GCC" = xyes ; then 21002b32c8f7Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 21012b32c8f7Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 210295e0246bSmrg-Wbad-function-cast -Wformat=2" 21032b32c8f7Smrg case `$CC -dumpversion` in 21042b32c8f7Smrg 3.4.* | 4.*) 21052b32c8f7Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 21062b32c8f7Smrg ;; 21072b32c8f7Smrg esac 21082b32c8f7Smrgelse 21092b32c8f7Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 21102b32c8f7Smrg if test "x$SUNCC" = "xyes"; then 21112b32c8f7Smrg CWARNFLAGS="-v" 21122b32c8f7Smrg fi 21132b32c8f7Smrgfi 21142b32c8f7SmrgAC_SUBST(CWARNFLAGS) 21152b32c8f7Smrg]) # XORG_CWARNFLAGS 21162b32c8f7Smrg 21172b32c8f7Smrg# XORG_STRICT_OPTION 21182b32c8f7Smrg# ----------------------- 21192b32c8f7Smrg# Minimum version: 1.3.0 21202b32c8f7Smrg# 21212b32c8f7Smrg# Add configure option to enable strict compilation 21222b32c8f7SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 212395e0246bSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 21242b32c8f7SmrgAC_REQUIRE([AC_PROG_CC_C99]) 21252b32c8f7SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 21262b32c8f7Smrg 21272b32c8f7SmrgAC_ARG_ENABLE(strict-compilation, 21282b32c8f7Smrg AS_HELP_STRING([--enable-strict-compilation], 21292b32c8f7Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 21302b32c8f7Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 21312b32c8f7Smrgif test "x$STRICT_COMPILE" = "xyes"; then 21322b32c8f7Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 21332b32c8f7Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 21342b32c8f7Smrg if test "x$GCC" = xyes ; then 21352b32c8f7Smrg STRICT_CFLAGS="-pedantic -Werror" 21362b32c8f7Smrg elif test "x$SUNCC" = "xyes"; then 21372b32c8f7Smrg STRICT_CFLAGS="-errwarn" 21382b32c8f7Smrg elif test "x$INTELCC" = "xyes"; then 21392b32c8f7Smrg STRICT_CFLAGS="-Werror" 21402b32c8f7Smrg fi 21412b32c8f7Smrgfi 21422b32c8f7SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 21432b32c8f7SmrgAC_SUBST([CWARNFLAGS]) 21442b32c8f7Smrg]) # XORG_STRICT_OPTION 21452b32c8f7Smrg 21462b32c8f7Smrg# XORG_DEFAULT_OPTIONS 21472b32c8f7Smrg# -------------------- 21482b32c8f7Smrg# Minimum version: 1.3.0 21492b32c8f7Smrg# 21502b32c8f7Smrg# Defines default options for X.Org modules. 21512b32c8f7Smrg# 21522b32c8f7SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 215395e0246bSmrgAC_REQUIRE([AC_PROG_INSTALL]) 21542b32c8f7SmrgXORG_CWARNFLAGS 21552b32c8f7SmrgXORG_STRICT_OPTION 21562b32c8f7SmrgXORG_RELEASE_VERSION 21572b32c8f7SmrgXORG_CHANGELOG 215895e0246bSmrgXORG_INSTALL 21592b32c8f7SmrgXORG_MANPAGE_SECTIONS 216095e0246bSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 216195e0246bSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 21622b32c8f7Smrg]) # XORG_DEFAULT_OPTIONS 216395e0246bSmrg 216495e0246bSmrg# XORG_INSTALL() 216595e0246bSmrg# ---------------- 216695e0246bSmrg# Minimum version: 1.4.0 216795e0246bSmrg# 216895e0246bSmrg# Defines the variable INSTALL_CMD as the command to copy 216995e0246bSmrg# INSTALL from $prefix/share/util-macros. 217095e0246bSmrg# 217195e0246bSmrgAC_DEFUN([XORG_INSTALL], [ 217295e0246bSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 217395e0246bSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 217495e0246bSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 217595e0246bSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 217695e0246bSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 217795e0246bSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 217895e0246bSmrgAC_SUBST([INSTALL_CMD]) 217995e0246bSmrg]) # XORG_INSTALL 2180eaef79e5Smrgdnl Copyright 2005 Red Hat, Inc 2181eaef79e5Smrgdnl 2182eaef79e5Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2183eaef79e5Smrgdnl documentation for any purpose is hereby granted without fee, provided that 2184eaef79e5Smrgdnl the above copyright notice appear in all copies and that both that 2185eaef79e5Smrgdnl copyright notice and this permission notice appear in supporting 2186eaef79e5Smrgdnl documentation. 2187eaef79e5Smrgdnl 2188eaef79e5Smrgdnl The above copyright notice and this permission notice shall be included 2189eaef79e5Smrgdnl in all copies or substantial portions of the Software. 2190eaef79e5Smrgdnl 2191eaef79e5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2192eaef79e5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2193eaef79e5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2194eaef79e5Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2195eaef79e5Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2196eaef79e5Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2197eaef79e5Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 2198eaef79e5Smrgdnl 2199eaef79e5Smrgdnl Except as contained in this notice, the name of the copyright holders shall 2200eaef79e5Smrgdnl not be used in advertising or otherwise to promote the sale, use or 2201eaef79e5Smrgdnl other dealings in this Software without prior written authorization 2202eaef79e5Smrgdnl from the copyright holders. 2203eaef79e5Smrgdnl 2204eaef79e5Smrg 2205eaef79e5Smrg# XORG_RELEASE_VERSION 2206eaef79e5Smrg# -------------------- 220795e0246bSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2208eaef79e5Smrg 2209eaef79e5SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2210eaef79e5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2211eaef79e5Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2212eaef79e5Smrg [Major version of this package]) 22132b32c8f7Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2214eaef79e5Smrg if test "x$PVM" = "x"; then 2215eaef79e5Smrg PVM="0" 2216eaef79e5Smrg fi 2217eaef79e5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2218eaef79e5Smrg [$PVM], 2219eaef79e5Smrg [Minor version of this package]) 22202b32c8f7Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2221eaef79e5Smrg if test "x$PVP" = "x"; then 2222eaef79e5Smrg PVP="0" 2223eaef79e5Smrg fi 2224eaef79e5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2225eaef79e5Smrg [$PVP], 2226eaef79e5Smrg [Patch version of this package]) 2227eaef79e5Smrg]) 2228eaef79e5Smrg 22292b32c8f7Smrg# XORG_CHANGELOG() 22302b32c8f7Smrg# ---------------- 22312b32c8f7Smrg# Minimum version: 1.2.0 22322b32c8f7Smrg# 22332b32c8f7Smrg# Defines the variable CHANGELOG_CMD as the command to generate 22342b32c8f7Smrg# ChangeLog from git. 22352b32c8f7Smrg# 22362b32c8f7Smrg# 22372b32c8f7SmrgAC_DEFUN([XORG_CHANGELOG], [ 223895e0246bSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 223995e0246bSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 224095e0246bSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 22412b32c8f7Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 22422b32c8f7SmrgAC_SUBST([CHANGELOG_CMD]) 22432b32c8f7Smrg]) # XORG_CHANGELOG 22442b32c8f7Smrg 2245eaef79e5Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2246eaef79e5Smrg# 2247eaef79e5Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2248eaef79e5Smrg# 2249eaef79e5Smrg# This program is free software; you can redistribute it and/or modify 2250eaef79e5Smrg# it under the terms of the GNU General Public License as published by 2251eaef79e5Smrg# the Free Software Foundation; either version 2 of the License, or 2252eaef79e5Smrg# (at your option) any later version. 2253eaef79e5Smrg# 2254eaef79e5Smrg# This program is distributed in the hope that it will be useful, but 2255eaef79e5Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2256eaef79e5Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2257eaef79e5Smrg# General Public License for more details. 2258eaef79e5Smrg# 2259eaef79e5Smrg# You should have received a copy of the GNU General Public License 2260eaef79e5Smrg# along with this program; if not, write to the Free Software 2261eaef79e5Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2262eaef79e5Smrg# 2263eaef79e5Smrg# As a special exception to the GNU General Public License, if you 2264eaef79e5Smrg# distribute this file as part of a program that contains a 2265eaef79e5Smrg# configuration script generated by Autoconf, you may include it under 2266eaef79e5Smrg# the same distribution terms that you use for the rest of that program. 2267eaef79e5Smrg 2268eaef79e5Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2269eaef79e5Smrg# ---------------------------------- 2270eaef79e5SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2271eaef79e5Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2272eaef79e5Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2273eaef79e5SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2274eaef79e5Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2275eaef79e5Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2276eaef79e5Smrgfi 2277eaef79e5Smrgif test -n "$PKG_CONFIG"; then 22782b32c8f7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2279eaef79e5Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2280eaef79e5Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2281eaef79e5Smrg AC_MSG_RESULT([yes]) 2282eaef79e5Smrg else 2283eaef79e5Smrg AC_MSG_RESULT([no]) 2284eaef79e5Smrg PKG_CONFIG="" 2285eaef79e5Smrg fi 2286eaef79e5Smrg 2287eaef79e5Smrgfi[]dnl 2288eaef79e5Smrg])# PKG_PROG_PKG_CONFIG 2289eaef79e5Smrg 2290eaef79e5Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2291eaef79e5Smrg# 2292eaef79e5Smrg# Check to see whether a particular set of modules exists. Similar 2293eaef79e5Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2294eaef79e5Smrg# 2295eaef79e5Smrg# 2296eaef79e5Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2297eaef79e5Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2298eaef79e5Smrg# PKG_CHECK_EXISTS manually 2299eaef79e5Smrg# -------------------------------------------------------------- 2300eaef79e5SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2301eaef79e5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2302eaef79e5Smrgif test -n "$PKG_CONFIG" && \ 2303eaef79e5Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2304eaef79e5Smrg m4_ifval([$2], [$2], [:]) 2305eaef79e5Smrgm4_ifvaln([$3], [else 2306eaef79e5Smrg $3])dnl 2307eaef79e5Smrgfi]) 2308eaef79e5Smrg 2309eaef79e5Smrg 2310eaef79e5Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2311eaef79e5Smrg# --------------------------------------------- 2312eaef79e5Smrgm4_define([_PKG_CONFIG], 23132b32c8f7Smrg[if test -n "$$1"; then 23142b32c8f7Smrg pkg_cv_[]$1="$$1" 23152b32c8f7Smrg elif test -n "$PKG_CONFIG"; then 23162b32c8f7Smrg PKG_CHECK_EXISTS([$3], 23172b32c8f7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 23182b32c8f7Smrg [pkg_failed=yes]) 23192b32c8f7Smrg else 23202b32c8f7Smrg pkg_failed=untried 2321eaef79e5Smrgfi[]dnl 2322eaef79e5Smrg])# _PKG_CONFIG 2323eaef79e5Smrg 23242b32c8f7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 23252b32c8f7Smrg# ----------------------------- 23262b32c8f7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 23272b32c8f7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 23282b32c8f7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 23292b32c8f7Smrg _pkg_short_errors_supported=yes 23302b32c8f7Smrgelse 23312b32c8f7Smrg _pkg_short_errors_supported=no 23322b32c8f7Smrgfi[]dnl 23332b32c8f7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 23342b32c8f7Smrg 23352b32c8f7Smrg 2336eaef79e5Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2337eaef79e5Smrg# [ACTION-IF-NOT-FOUND]) 2338eaef79e5Smrg# 2339eaef79e5Smrg# 2340eaef79e5Smrg# Note that if there is a possibility the first call to 2341eaef79e5Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2342eaef79e5Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2343eaef79e5Smrg# 2344eaef79e5Smrg# 2345eaef79e5Smrg# -------------------------------------------------------------- 2346eaef79e5SmrgAC_DEFUN([PKG_CHECK_MODULES], 2347eaef79e5Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2348eaef79e5SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2349eaef79e5SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2350eaef79e5Smrg 2351eaef79e5Smrgpkg_failed=no 2352eaef79e5SmrgAC_MSG_CHECKING([for $1]) 2353eaef79e5Smrg 2354eaef79e5Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2355eaef79e5Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2356eaef79e5Smrg 23572b32c8f7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 23582b32c8f7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 23592b32c8f7SmrgSee the pkg-config man page for more details.]) 23602b32c8f7Smrg 2361eaef79e5Smrgif test $pkg_failed = yes; then 23622b32c8f7Smrg _PKG_SHORT_ERRORS_SUPPORTED 23632b32c8f7Smrg if test $_pkg_short_errors_supported = yes; then 23642b32c8f7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 23652b32c8f7Smrg else 23662b32c8f7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 23672b32c8f7Smrg fi 2368eaef79e5Smrg # Put the nasty error message in config.log where it belongs 23692b32c8f7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2370eaef79e5Smrg 2371eaef79e5Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 23722b32c8f7Smrg[Package requirements ($2) were not met: 23732b32c8f7Smrg 23742b32c8f7Smrg$$1_PKG_ERRORS 23752b32c8f7Smrg 2376eaef79e5SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2377eaef79e5Smrginstalled software in a non-standard prefix. 2378eaef79e5Smrg 23792b32c8f7Smrg_PKG_TEXT 23802b32c8f7Smrg])], 23812b32c8f7Smrg [AC_MSG_RESULT([no]) 23822b32c8f7Smrg $4]) 2383eaef79e5Smrgelif test $pkg_failed = untried; then 2384eaef79e5Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2385eaef79e5Smrg[The pkg-config script could not be found or is too old. Make sure it 2386eaef79e5Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2387eaef79e5Smrgpath to pkg-config. 2388eaef79e5Smrg 23892b32c8f7Smrg_PKG_TEXT 2390eaef79e5Smrg 23912b32c8f7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2392eaef79e5Smrg [$4]) 2393eaef79e5Smrgelse 2394eaef79e5Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2395eaef79e5Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2396eaef79e5Smrg AC_MSG_RESULT([yes]) 2397eaef79e5Smrg ifelse([$3], , :, [$3]) 2398eaef79e5Smrgfi[]dnl 2399eaef79e5Smrg])# PKG_CHECK_MODULES 2400eaef79e5Smrg 2401