aclocal.m4 revision 69a1fe56
17dff02feSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2a850946eSmrg 370f7c90cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 470f7c90cSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a850946eSmrg# This file is free software; the Free Software Foundation 6a850946eSmrg# gives unlimited permission to copy and/or distribute it, 7a850946eSmrg# with or without modifications, as long as this notice is preserved. 8a850946eSmrg 9a850946eSmrg# This program is distributed in the hope that it will be useful, 10a850946eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a850946eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a850946eSmrg# PARTICULAR PURPOSE. 13a850946eSmrg 1470f7c90cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1570f7c90cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1669a1fe56Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1769a1fe56Smrg[m4_warning([this file was generated for autoconf 2.68. 1870f7c90cSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1970f7c90cSmrgIf you have problems, you may need to regenerate the build system entirely. 2070f7c90cSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a850946eSmrg 2270f7c90cSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2370f7c90cSmrg# 2470f7c90cSmrg# This file is free software; the Free Software Foundation 2570f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 2670f7c90cSmrg# with or without modifications, as long as this notice is preserved. 27a850946eSmrg 28a850946eSmrg# AM_AUTOMAKE_VERSION(VERSION) 29a850946eSmrg# ---------------------------- 30a850946eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31a850946eSmrg# generated from the m4 files accompanying Automake X.Y. 3270f7c90cSmrg# (This private macro should not be called outside this file.) 3370f7c90cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3470f7c90cSmrg[am__api_version='1.11' 3570f7c90cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3670f7c90cSmrgdnl require some minimum version. Point them to the right macro. 377dff02feSmrgm4_if([$1], [1.11.1], [], 3870f7c90cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3970f7c90cSmrg]) 4070f7c90cSmrg 4170f7c90cSmrg# _AM_AUTOCONF_VERSION(VERSION) 4270f7c90cSmrg# ----------------------------- 4370f7c90cSmrg# aclocal traces this macro to find the Autoconf version. 4470f7c90cSmrg# This is a private macro too. Using m4_define simplifies 4570f7c90cSmrg# the logic in aclocal, which can simply ignore this definition. 4670f7c90cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47a850946eSmrg 48a850946eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49a850946eSmrg# ------------------------------- 5070f7c90cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5170f7c90cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52a850946eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 537dff02feSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5470f7c90cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 5570f7c90cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5670f7c90cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57a850946eSmrg 5870f7c90cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59a850946eSmrg 6070f7c90cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61a850946eSmrg# 6270f7c90cSmrg# This file is free software; the Free Software Foundation 6370f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 6470f7c90cSmrg# with or without modifications, as long as this notice is preserved. 65a850946eSmrg 66a850946eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67a850946eSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68a850946eSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69a850946eSmrg# 70a850946eSmrg# Of course, Automake must honor this variable whenever it calls a 71a850946eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72a850946eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73a850946eSmrg# depending on how configure is run. This is pretty annoying, since 74a850946eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75a850946eSmrg# source directory, any form will work fine, but in subdirectories a 76a850946eSmrg# relative path needs to be adjusted first. 77a850946eSmrg# 78a850946eSmrg# $ac_aux_dir/missing 79a850946eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80a850946eSmrg# $top_srcdir/$ac_aux_dir/missing 81a850946eSmrg# fails if $ac_aux_dir is absolute, 82a850946eSmrg# fails when called from a subdirectory in a VPATH build with 83a850946eSmrg# a relative $ac_aux_dir 84a850946eSmrg# 85a850946eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86a850946eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87a850946eSmrg# harmless because $srcdir is `.', but things will broke when you 88a850946eSmrg# start a VPATH build or use an absolute $srcdir. 89a850946eSmrg# 90a850946eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91a850946eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92a850946eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93a850946eSmrg# and then we would define $MISSING as 94a850946eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95a850946eSmrg# This will work as long as MISSING is not called from configure, because 96a850946eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97a850946eSmrg# However there are other variables, like CC, which are often used in 98a850946eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99a850946eSmrg# 100a850946eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101a850946eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102a850946eSmrg# configured tree to be moved without reconfiguration. 103a850946eSmrg 10470f7c90cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10570f7c90cSmrg[dnl Rely on autoconf to set up CDPATH properly. 10670f7c90cSmrgAC_PREREQ([2.50])dnl 107a850946eSmrg# expand $ac_aux_dir to an absolute path 108a850946eSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109a850946eSmrg]) 110a850946eSmrg 11170f7c90cSmrg# AM_CONDITIONAL -*- Autoconf -*- 112a850946eSmrg 11370f7c90cSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11470f7c90cSmrg# Free Software Foundation, Inc. 11570f7c90cSmrg# 11670f7c90cSmrg# This file is free software; the Free Software Foundation 11770f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 11870f7c90cSmrg# with or without modifications, as long as this notice is preserved. 119a850946eSmrg 12070f7c90cSmrg# serial 9 121a850946eSmrg 12270f7c90cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12370f7c90cSmrg# ------------------------------------- 12470f7c90cSmrg# Define a conditional. 12570f7c90cSmrgAC_DEFUN([AM_CONDITIONAL], 12670f7c90cSmrg[AC_PREREQ(2.52)dnl 12770f7c90cSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12870f7c90cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12970f7c90cSmrgAC_SUBST([$1_TRUE])dnl 13070f7c90cSmrgAC_SUBST([$1_FALSE])dnl 13170f7c90cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13270f7c90cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13370f7c90cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13470f7c90cSmrgif $2; then 13570f7c90cSmrg $1_TRUE= 13670f7c90cSmrg $1_FALSE='#' 137a850946eSmrgelse 13870f7c90cSmrg $1_TRUE='#' 13970f7c90cSmrg $1_FALSE= 140a850946eSmrgfi 14170f7c90cSmrgAC_CONFIG_COMMANDS_PRE( 14270f7c90cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14370f7c90cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 14470f7c90cSmrgUsually this means the macro was only invoked conditionally.]]) 14570f7c90cSmrgfi])]) 146a850946eSmrg 14770f7c90cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14870f7c90cSmrg# Free Software Foundation, Inc. 14970f7c90cSmrg# 15070f7c90cSmrg# This file is free software; the Free Software Foundation 15170f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 15270f7c90cSmrg# with or without modifications, as long as this notice is preserved. 153a850946eSmrg 15470f7c90cSmrg# serial 10 155a850946eSmrg 156a850946eSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157a850946eSmrg# written in clear, in which case automake, when reading aclocal.m4, 158a850946eSmrg# will think it sees a *use*, and therefore will trigger all it's 159a850946eSmrg# C support machinery. Also note that it means that autoscan, seeing 160a850946eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161a850946eSmrg 162a850946eSmrg 163a850946eSmrg# _AM_DEPENDENCIES(NAME) 164a850946eSmrg# ---------------------- 165a850946eSmrg# See how the compiler implements dependency checking. 166a850946eSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167a850946eSmrg# We try a few techniques and use that to set a single cache variable. 168a850946eSmrg# 169a850946eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170a850946eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171a850946eSmrg# dependency, and given that the user is not expected to run this macro, 172a850946eSmrg# just rely on AC_PROG_CC. 173a850946eSmrgAC_DEFUN([_AM_DEPENDENCIES], 174a850946eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175a850946eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176a850946eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177a850946eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178a850946eSmrg 179a850946eSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180a850946eSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181a850946eSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18270f7c90cSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183a850946eSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184a850946eSmrg [depcc="$$1" am_compiler_list=]) 185a850946eSmrg 186a850946eSmrgAC_CACHE_CHECK([dependency style of $depcc], 187a850946eSmrg [am_cv_$1_dependencies_compiler_type], 188a850946eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189a850946eSmrg # We make a subdir and do the tests there. Otherwise we can end up 190a850946eSmrg # making bogus files that we don't know about and never remove. For 191a850946eSmrg # instance it was reported that on HP-UX the gcc test will end up 192a850946eSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193a850946eSmrg # in D'. 194a850946eSmrg mkdir conftest.dir 195a850946eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196a850946eSmrg # using a relative directory. 197a850946eSmrg cp "$am_depcomp" conftest.dir 198a850946eSmrg cd conftest.dir 199a850946eSmrg # We will build objects and dependencies in a subdirectory because 200a850946eSmrg # it helps to detect inapplicable dependency modes. For instance 201a850946eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202a850946eSmrg # side effect of compilation, but ICC will put the dependencies in 203a850946eSmrg # the current directory while Tru64 will put them in the object 204a850946eSmrg # directory. 205a850946eSmrg mkdir sub 206a850946eSmrg 207a850946eSmrg am_cv_$1_dependencies_compiler_type=none 208a850946eSmrg if test "$am_compiler_list" = ""; then 209a850946eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210a850946eSmrg fi 21170f7c90cSmrg am__universal=false 21270f7c90cSmrg m4_case([$1], [CC], 21370f7c90cSmrg [case " $depcc " in #( 21470f7c90cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21570f7c90cSmrg esac], 21670f7c90cSmrg [CXX], 21770f7c90cSmrg [case " $depcc " in #( 21870f7c90cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21970f7c90cSmrg esac]) 22070f7c90cSmrg 221a850946eSmrg for depmode in $am_compiler_list; do 222a850946eSmrg # Setup a source with many dependencies, because some compilers 223a850946eSmrg # like to wrap large dependency lists on column 80 (with \), and 224a850946eSmrg # we should not choose a depcomp mode which is confused by this. 225a850946eSmrg # 226a850946eSmrg # We need to recreate these files for each test, as the compiler may 227a850946eSmrg # overwrite some of them when testing with obscure command lines. 228a850946eSmrg # This happens at least with the AIX C compiler. 229a850946eSmrg : > sub/conftest.c 230a850946eSmrg for i in 1 2 3 4 5 6; do 231a850946eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23270f7c90cSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23370f7c90cSmrg # Solaris 8's {/usr,}/bin/sh. 23470f7c90cSmrg touch sub/conftst$i.h 235a850946eSmrg done 236a850946eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237a850946eSmrg 23870f7c90cSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23970f7c90cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 24070f7c90cSmrg # handle `-M -o', and we need to detect this. Also, some Intel 24170f7c90cSmrg # versions had trouble with output in subdirs 24270f7c90cSmrg am__obj=sub/conftest.${OBJEXT-o} 24370f7c90cSmrg am__minus_obj="-o $am__obj" 244a850946eSmrg case $depmode in 24570f7c90cSmrg gcc) 24670f7c90cSmrg # This depmode causes a compiler race in universal mode. 24770f7c90cSmrg test "$am__universal" = false || continue 24870f7c90cSmrg ;; 249a850946eSmrg nosideeffect) 250a850946eSmrg # after this tag, mechanisms are not by side-effect, so they'll 251a850946eSmrg # only be used when explicitly requested 252a850946eSmrg if test "x$enable_dependency_tracking" = xyes; then 253a850946eSmrg continue 254a850946eSmrg else 255a850946eSmrg break 256a850946eSmrg fi 257a850946eSmrg ;; 25870f7c90cSmrg msvisualcpp | msvcmsys) 25970f7c90cSmrg # This compiler won't grok `-c -o', but also, the minuso test has 26070f7c90cSmrg # not run yet. These depmodes are late enough in the game, and 26170f7c90cSmrg # so weak that their functioning should not be impacted. 26270f7c90cSmrg am__obj=conftest.${OBJEXT-o} 26370f7c90cSmrg am__minus_obj= 26470f7c90cSmrg ;; 265a850946eSmrg none) break ;; 266a850946eSmrg esac 267a850946eSmrg if depmode=$depmode \ 26870f7c90cSmrg source=sub/conftest.c object=$am__obj \ 269a850946eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27070f7c90cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271a850946eSmrg >/dev/null 2>conftest.err && 27270f7c90cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273a850946eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27470f7c90cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275a850946eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276a850946eSmrg # icc doesn't choke on unknown options, it will just issue warnings 27770f7c90cSmrg # or remarks (even with -Werror). So we grep stderr for any message 27870f7c90cSmrg # that says an option was ignored or not supported. 27970f7c90cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28070f7c90cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 28170f7c90cSmrg # The diagnosis changed in icc 8.0: 28270f7c90cSmrg # icc: Command line remark: option '-MP' not supported 28370f7c90cSmrg if (grep 'ignoring option' conftest.err || 28470f7c90cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285a850946eSmrg am_cv_$1_dependencies_compiler_type=$depmode 286a850946eSmrg break 287a850946eSmrg fi 288a850946eSmrg fi 289a850946eSmrg done 290a850946eSmrg 291a850946eSmrg cd .. 292a850946eSmrg rm -rf conftest.dir 293a850946eSmrgelse 294a850946eSmrg am_cv_$1_dependencies_compiler_type=none 295a850946eSmrgfi 296a850946eSmrg]) 297a850946eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298a850946eSmrgAM_CONDITIONAL([am__fastdep$1], [ 299a850946eSmrg test "x$enable_dependency_tracking" != xno \ 300a850946eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301a850946eSmrg]) 302a850946eSmrg 303a850946eSmrg 304a850946eSmrg# AM_SET_DEPDIR 305a850946eSmrg# ------------- 306a850946eSmrg# Choose a directory name for dependency files. 307a850946eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308a850946eSmrgAC_DEFUN([AM_SET_DEPDIR], 309a850946eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310a850946eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311a850946eSmrg]) 312a850946eSmrg 313a850946eSmrg 314a850946eSmrg# AM_DEP_TRACK 315a850946eSmrg# ------------ 316a850946eSmrgAC_DEFUN([AM_DEP_TRACK], 317a850946eSmrg[AC_ARG_ENABLE(dependency-tracking, 31870f7c90cSmrg[ --disable-dependency-tracking speeds up one-time build 31970f7c90cSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320a850946eSmrgif test "x$enable_dependency_tracking" != xno; then 321a850946eSmrg am_depcomp="$ac_aux_dir/depcomp" 322a850946eSmrg AMDEPBACKSLASH='\' 323a850946eSmrgfi 324a850946eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32570f7c90cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 32670f7c90cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327a850946eSmrg]) 328a850946eSmrg 32970f7c90cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330a850946eSmrg 33170f7c90cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33270f7c90cSmrg# Free Software Foundation, Inc. 33370f7c90cSmrg# 33470f7c90cSmrg# This file is free software; the Free Software Foundation 33570f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 33670f7c90cSmrg# with or without modifications, as long as this notice is preserved. 337a850946eSmrg 33870f7c90cSmrg#serial 5 339a850946eSmrg 340a850946eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341a850946eSmrg# ------------------------------ 342a850946eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34370f7c90cSmrg[{ 34470f7c90cSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34570f7c90cSmrg # are listed without --file. Let's play safe and only enable the eval 34670f7c90cSmrg # if we detect the quoting. 34770f7c90cSmrg case $CONFIG_FILES in 34870f7c90cSmrg *\'*) eval set x "$CONFIG_FILES" ;; 34970f7c90cSmrg *) set x $CONFIG_FILES ;; 35070f7c90cSmrg esac 35170f7c90cSmrg shift 35270f7c90cSmrg for mf 35370f7c90cSmrg do 35470f7c90cSmrg # Strip MF so we end up with the name of the file. 35570f7c90cSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35670f7c90cSmrg # Check whether this is an Automake generated Makefile or not. 35770f7c90cSmrg # We used to match only the files named `Makefile.in', but 35870f7c90cSmrg # some people rename them; so instead we look at the file content. 35970f7c90cSmrg # Grep'ing the first line is not enough: some people post-process 36070f7c90cSmrg # each Makefile.in and add a new line on top of each file to say so. 36170f7c90cSmrg # Grep'ing the whole file is not good either: AIX grep has a line 36270f7c90cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 36370f7c90cSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36470f7c90cSmrg dirpart=`AS_DIRNAME("$mf")` 36570f7c90cSmrg else 36670f7c90cSmrg continue 36770f7c90cSmrg fi 36870f7c90cSmrg # Extract the definition of DEPDIR, am__include, and am__quote 36970f7c90cSmrg # from the Makefile without running `make'. 37070f7c90cSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37170f7c90cSmrg test -z "$DEPDIR" && continue 37270f7c90cSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37370f7c90cSmrg test -z "am__include" && continue 37470f7c90cSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37570f7c90cSmrg # When using ansi2knr, U may be empty or an underscore; expand it 37670f7c90cSmrg U=`sed -n 's/^U = //p' < "$mf"` 37770f7c90cSmrg # Find all dependency output files, they are included files with 37870f7c90cSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37970f7c90cSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 38070f7c90cSmrg # expansion. 38170f7c90cSmrg for file in `sed -n " 38270f7c90cSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38370f7c90cSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38470f7c90cSmrg # Make sure the directory exists. 38570f7c90cSmrg test -f "$dirpart/$file" && continue 38670f7c90cSmrg fdir=`AS_DIRNAME(["$file"])` 38770f7c90cSmrg AS_MKDIR_P([$dirpart/$fdir]) 38870f7c90cSmrg # echo "creating $dirpart/$file" 38970f7c90cSmrg echo '# dummy' > "$dirpart/$file" 39070f7c90cSmrg done 391a850946eSmrg done 39270f7c90cSmrg} 393a850946eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394a850946eSmrg 395a850946eSmrg 396a850946eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397a850946eSmrg# ----------------------------- 398a850946eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399a850946eSmrg# 400a850946eSmrg# This code is only required when automatic dependency tracking 401a850946eSmrg# is enabled. FIXME. This creates each `.P' file that we will 402a850946eSmrg# need in order to bootstrap the dependency handling code. 403a850946eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404a850946eSmrg[AC_CONFIG_COMMANDS([depfiles], 405a850946eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406a850946eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407a850946eSmrg]) 408a850946eSmrg 40970f7c90cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41070f7c90cSmrg# Free Software Foundation, Inc. 41170f7c90cSmrg# 41270f7c90cSmrg# This file is free software; the Free Software Foundation 41370f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 41470f7c90cSmrg# with or without modifications, as long as this notice is preserved. 415a850946eSmrg 41670f7c90cSmrg# serial 8 417a850946eSmrg 41870f7c90cSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41970f7c90cSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420a850946eSmrg 42170f7c90cSmrg# Do all the work for Automake. -*- Autoconf -*- 422a850946eSmrg 42370f7c90cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42470f7c90cSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42570f7c90cSmrg# 42670f7c90cSmrg# This file is free software; the Free Software Foundation 42770f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 42870f7c90cSmrg# with or without modifications, as long as this notice is preserved. 429a850946eSmrg 43070f7c90cSmrg# serial 16 431a850946eSmrg 43270f7c90cSmrg# This macro actually does too much. Some checks are only needed if 43370f7c90cSmrg# your package does certain things. But this isn't really a big deal. 43470f7c90cSmrg 43570f7c90cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43670f7c90cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 43770f7c90cSmrg# ----------------------------------------------- 43870f7c90cSmrg# The call with PACKAGE and VERSION arguments is the old style 43970f7c90cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44070f7c90cSmrg# and VERSION should now be passed to AC_INIT and removed from 44170f7c90cSmrg# the call to AM_INIT_AUTOMAKE. 44270f7c90cSmrg# We support both call styles for the transition. After 44370f7c90cSmrg# the next Automake release, Autoconf can make the AC_INIT 44470f7c90cSmrg# arguments mandatory, and then we can depend on a new Autoconf 44570f7c90cSmrg# release and drop the old call support. 44670f7c90cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44770f7c90cSmrg[AC_PREREQ([2.62])dnl 44870f7c90cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44970f7c90cSmrgdnl the ones we care about. 45070f7c90cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45170f7c90cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45270f7c90cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45370f7c90cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45470f7c90cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45570f7c90cSmrg # is not polluted with repeated "-I." 45670f7c90cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45770f7c90cSmrg # test to see if srcdir already configured 45870f7c90cSmrg if test -f $srcdir/config.status; then 45970f7c90cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46070f7c90cSmrg fi 461a850946eSmrgfi 46270f7c90cSmrg 46370f7c90cSmrg# test whether we have cygpath 46470f7c90cSmrgif test -z "$CYGPATH_W"; then 46570f7c90cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 46670f7c90cSmrg CYGPATH_W='cygpath -w' 46770f7c90cSmrg else 46870f7c90cSmrg CYGPATH_W=echo 46970f7c90cSmrg fi 470a850946eSmrgfi 47170f7c90cSmrgAC_SUBST([CYGPATH_W]) 472a850946eSmrg 47370f7c90cSmrg# Define the identity of the package. 47470f7c90cSmrgdnl Distinguish between old-style and new-style calls. 47570f7c90cSmrgm4_ifval([$2], 47670f7c90cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47770f7c90cSmrg AC_SUBST([PACKAGE], [$1])dnl 47870f7c90cSmrg AC_SUBST([VERSION], [$2])], 47970f7c90cSmrg[_AM_SET_OPTIONS([$1])dnl 48070f7c90cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48170f7c90cSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48270f7c90cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48370f7c90cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48470f7c90cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485a850946eSmrg 48670f7c90cSmrg_AM_IF_OPTION([no-define],, 48770f7c90cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48870f7c90cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489a850946eSmrg 49070f7c90cSmrg# Some tools Automake needs. 49170f7c90cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49270f7c90cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49370f7c90cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49470f7c90cSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49570f7c90cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49670f7c90cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49770f7c90cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49870f7c90cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49970f7c90cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50070f7c90cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50170f7c90cSmrg# We need awk for the "check" target. The system "awk" is bad on 50270f7c90cSmrg# some platforms. 50370f7c90cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 50470f7c90cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50570f7c90cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50670f7c90cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50770f7c90cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50870f7c90cSmrg [_AM_PROG_TAR([v7])])]) 50970f7c90cSmrg_AM_IF_OPTION([no-dependencies],, 51070f7c90cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51170f7c90cSmrg [_AM_DEPENDENCIES(CC)], 51270f7c90cSmrg [define([AC_PROG_CC], 51370f7c90cSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51470f7c90cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51570f7c90cSmrg [_AM_DEPENDENCIES(CXX)], 51670f7c90cSmrg [define([AC_PROG_CXX], 51770f7c90cSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51870f7c90cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51970f7c90cSmrg [_AM_DEPENDENCIES(OBJC)], 52070f7c90cSmrg [define([AC_PROG_OBJC], 52170f7c90cSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52270f7c90cSmrg]) 52370f7c90cSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52470f7c90cSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52570f7c90cSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52670f7c90cSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52770f7c90cSmrgAC_CONFIG_COMMANDS_PRE(dnl 52870f7c90cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52970f7c90cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53070f7c90cSmrg]) 531a850946eSmrg 53270f7c90cSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53370f7c90cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53470f7c90cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 53570f7c90cSmrgm4_define([_AC_COMPILER_EXEEXT], 53670f7c90cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537a850946eSmrg 538a850946eSmrg 53970f7c90cSmrg# When config.status generates a header, we must update the stamp-h file. 54070f7c90cSmrg# This file resides in the same directory as the config header 54170f7c90cSmrg# that is generated. The stamp files are numbered to have different names. 54270f7c90cSmrg 54370f7c90cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54470f7c90cSmrg# loop where config.status creates the headers, so we can generate 54570f7c90cSmrg# our stamp files there. 54670f7c90cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54770f7c90cSmrg[# Compute $1's index in $config_headers. 54870f7c90cSmrg_am_arg=$1 54970f7c90cSmrg_am_stamp_count=1 55070f7c90cSmrgfor _am_header in $config_headers :; do 55170f7c90cSmrg case $_am_header in 55270f7c90cSmrg $_am_arg | $_am_arg:* ) 55370f7c90cSmrg break ;; 55470f7c90cSmrg * ) 55570f7c90cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55670f7c90cSmrg esac 55770f7c90cSmrgdone 55870f7c90cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559a850946eSmrg 56070f7c90cSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56170f7c90cSmrg# 56270f7c90cSmrg# This file is free software; the Free Software Foundation 56370f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 56470f7c90cSmrg# with or without modifications, as long as this notice is preserved. 565a850946eSmrg 56670f7c90cSmrg# AM_PROG_INSTALL_SH 56770f7c90cSmrg# ------------------ 56870f7c90cSmrg# Define $install_sh. 56970f7c90cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57070f7c90cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57170f7c90cSmrgif test x"${install_sh}" != xset; then 57270f7c90cSmrg case $am_aux_dir in 57370f7c90cSmrg *\ * | *\ *) 57470f7c90cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57570f7c90cSmrg *) 57670f7c90cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57770f7c90cSmrg esac 578a850946eSmrgfi 57970f7c90cSmrgAC_SUBST(install_sh)]) 580a850946eSmrg 58170f7c90cSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58270f7c90cSmrg# 58370f7c90cSmrg# This file is free software; the Free Software Foundation 58470f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 58570f7c90cSmrg# with or without modifications, as long as this notice is preserved. 586a850946eSmrg 58770f7c90cSmrg# serial 2 588a850946eSmrg 58970f7c90cSmrg# Check whether the underlying file-system supports filenames 59070f7c90cSmrg# with a leading dot. For instance MS-DOS doesn't. 59170f7c90cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 59270f7c90cSmrg[rm -rf .tst 2>/dev/null 59370f7c90cSmrgmkdir .tst 2>/dev/null 59470f7c90cSmrgif test -d .tst; then 59570f7c90cSmrg am__leading_dot=. 59670f7c90cSmrgelse 59770f7c90cSmrg am__leading_dot=_ 59870f7c90cSmrgfi 59970f7c90cSmrgrmdir .tst 2>/dev/null 60070f7c90cSmrgAC_SUBST([am__leading_dot])]) 601a850946eSmrg 60270f7c90cSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60370f7c90cSmrg# From Jim Meyering 604a850946eSmrg 60570f7c90cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60670f7c90cSmrg# Free Software Foundation, Inc. 60770f7c90cSmrg# 60870f7c90cSmrg# This file is free software; the Free Software Foundation 60970f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 61070f7c90cSmrg# with or without modifications, as long as this notice is preserved. 611a850946eSmrg 61270f7c90cSmrg# serial 5 613a850946eSmrg 61470f7c90cSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61570f7c90cSmrg# ---------------------------------- 61670f7c90cSmrg# Control maintainer-specific portions of Makefiles. 61770f7c90cSmrg# Default is to disable them, unless `enable' is passed literally. 61870f7c90cSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 61970f7c90cSmrg# can override the default with the --enable/--disable switch. 620a850946eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 62170f7c90cSmrg[m4_case(m4_default([$1], [disable]), 62270f7c90cSmrg [enable], [m4_define([am_maintainer_other], [disable])], 62370f7c90cSmrg [disable], [m4_define([am_maintainer_other], [enable])], 62470f7c90cSmrg [m4_define([am_maintainer_other], [enable]) 62570f7c90cSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62670f7c90cSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62770f7c90cSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62870f7c90cSmrg AC_ARG_ENABLE([maintainer-mode], 62970f7c90cSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63070f7c90cSmrg (and sometimes confusing) to the casual installer], 63170f7c90cSmrg [USE_MAINTAINER_MODE=$enableval], 63270f7c90cSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633a850946eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63470f7c90cSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635a850946eSmrg MAINT=$MAINTAINER_MODE_TRUE 63670f7c90cSmrg AC_SUBST([MAINT])dnl 637a850946eSmrg] 638a850946eSmrg) 639a850946eSmrg 640a850946eSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641a850946eSmrg 64270f7c90cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643a850946eSmrg 64470f7c90cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 64570f7c90cSmrg# 64670f7c90cSmrg# This file is free software; the Free Software Foundation 64770f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 64870f7c90cSmrg# with or without modifications, as long as this notice is preserved. 649a850946eSmrg 65070f7c90cSmrg# serial 4 651a850946eSmrg 65270f7c90cSmrg# AM_MAKE_INCLUDE() 65370f7c90cSmrg# ----------------- 65470f7c90cSmrg# Check to see how make treats includes. 65570f7c90cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 65670f7c90cSmrg[am_make=${MAKE-make} 65770f7c90cSmrgcat > confinc << 'END' 65870f7c90cSmrgam__doit: 65970f7c90cSmrg @echo this is the am__doit target 66070f7c90cSmrg.PHONY: am__doit 66170f7c90cSmrgEND 66270f7c90cSmrg# If we don't find an include directive, just comment out the code. 66370f7c90cSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66470f7c90cSmrgam__include="#" 66570f7c90cSmrgam__quote= 66670f7c90cSmrg_am_result=none 66770f7c90cSmrg# First try GNU make style include. 66870f7c90cSmrgecho "include confinc" > confmf 66970f7c90cSmrg# Ignore all kinds of additional output from `make'. 67070f7c90cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67170f7c90cSmrg*the\ am__doit\ target*) 67270f7c90cSmrg am__include=include 67370f7c90cSmrg am__quote= 67470f7c90cSmrg _am_result=GNU 67570f7c90cSmrg ;; 67670f7c90cSmrgesac 67770f7c90cSmrg# Now try BSD make style include. 67870f7c90cSmrgif test "$am__include" = "#"; then 67970f7c90cSmrg echo '.include "confinc"' > confmf 68070f7c90cSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 68170f7c90cSmrg *the\ am__doit\ target*) 68270f7c90cSmrg am__include=.include 68370f7c90cSmrg am__quote="\"" 68470f7c90cSmrg _am_result=BSD 68570f7c90cSmrg ;; 68670f7c90cSmrg esac 68770f7c90cSmrgfi 68870f7c90cSmrgAC_SUBST([am__include]) 68970f7c90cSmrgAC_SUBST([am__quote]) 69070f7c90cSmrgAC_MSG_RESULT([$_am_result]) 69170f7c90cSmrgrm -f confinc confmf 69270f7c90cSmrg]) 693a850946eSmrg 69470f7c90cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695a850946eSmrg 69670f7c90cSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69770f7c90cSmrg# Free Software Foundation, Inc. 69870f7c90cSmrg# 69970f7c90cSmrg# This file is free software; the Free Software Foundation 70070f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 70170f7c90cSmrg# with or without modifications, as long as this notice is preserved. 702a850946eSmrg 703a850946eSmrg# serial 6 704a850946eSmrg 70570f7c90cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 70670f7c90cSmrg# ------------------------------ 70770f7c90cSmrgAC_DEFUN([AM_MISSING_PROG], 70870f7c90cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70970f7c90cSmrg$1=${$1-"${am_missing_run}$2"} 71070f7c90cSmrgAC_SUBST($1)]) 711a850946eSmrg 712a850946eSmrg 71370f7c90cSmrg# AM_MISSING_HAS_RUN 71470f7c90cSmrg# ------------------ 71570f7c90cSmrg# Define MISSING if not defined so far and test if it supports --run. 71670f7c90cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71770f7c90cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71870f7c90cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71970f7c90cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 72070f7c90cSmrgif test x"${MISSING+set}" != xset; then 72170f7c90cSmrg case $am_aux_dir in 72270f7c90cSmrg *\ * | *\ *) 72370f7c90cSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72470f7c90cSmrg *) 72570f7c90cSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72670f7c90cSmrg esac 727a850946eSmrgfi 72870f7c90cSmrg# Use eval to expand $SHELL 72970f7c90cSmrgif eval "$MISSING --run true"; then 73070f7c90cSmrg am_missing_run="$MISSING --run " 73170f7c90cSmrgelse 73270f7c90cSmrg am_missing_run= 73370f7c90cSmrg AC_MSG_WARN([`missing' script is too old or missing]) 73470f7c90cSmrgfi 73570f7c90cSmrg]) 736a850946eSmrg 73770f7c90cSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738a850946eSmrg# 73970f7c90cSmrg# This file is free software; the Free Software Foundation 74070f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 74170f7c90cSmrg# with or without modifications, as long as this notice is preserved. 74270f7c90cSmrg 74370f7c90cSmrg# AM_PROG_MKDIR_P 74470f7c90cSmrg# --------------- 74570f7c90cSmrg# Check for `mkdir -p'. 74670f7c90cSmrgAC_DEFUN([AM_PROG_MKDIR_P], 74770f7c90cSmrg[AC_PREREQ([2.60])dnl 74870f7c90cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74970f7c90cSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75070f7c90cSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 75170f7c90cSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75270f7c90cSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75370f7c90cSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75470f7c90cSmrgdnl adjustment using top_builddir (which is defined more often than 75570f7c90cSmrgdnl MKDIR_P). 75670f7c90cSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75770f7c90cSmrgcase $mkdir_p in 75870f7c90cSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 75970f7c90cSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 76070f7c90cSmrgesac 76170f7c90cSmrg]) 76270f7c90cSmrg 76370f7c90cSmrg# Helper functions for option handling. -*- Autoconf -*- 76470f7c90cSmrg 76570f7c90cSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766a850946eSmrg# 76770f7c90cSmrg# This file is free software; the Free Software Foundation 76870f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 76970f7c90cSmrg# with or without modifications, as long as this notice is preserved. 770a850946eSmrg 77170f7c90cSmrg# serial 4 772a850946eSmrg 77370f7c90cSmrg# _AM_MANGLE_OPTION(NAME) 77470f7c90cSmrg# ----------------------- 77570f7c90cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 77670f7c90cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777a850946eSmrg 77870f7c90cSmrg# _AM_SET_OPTION(NAME) 77970f7c90cSmrg# ------------------------------ 78070f7c90cSmrg# Set option NAME. Presently that only means defining a flag for this option. 78170f7c90cSmrgAC_DEFUN([_AM_SET_OPTION], 78270f7c90cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783a850946eSmrg 78470f7c90cSmrg# _AM_SET_OPTIONS(OPTIONS) 78570f7c90cSmrg# ---------------------------------- 78670f7c90cSmrg# OPTIONS is a space-separated list of Automake options. 78770f7c90cSmrgAC_DEFUN([_AM_SET_OPTIONS], 78870f7c90cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789a850946eSmrg 79070f7c90cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79170f7c90cSmrg# ------------------------------------------- 79270f7c90cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79370f7c90cSmrgAC_DEFUN([_AM_IF_OPTION], 79470f7c90cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 79570f7c90cSmrg 79670f7c90cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 79770f7c90cSmrg 79870f7c90cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79970f7c90cSmrg# Free Software Foundation, Inc. 800a850946eSmrg# 80170f7c90cSmrg# This file is free software; the Free Software Foundation 80270f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 80370f7c90cSmrg# with or without modifications, as long as this notice is preserved. 80470f7c90cSmrg 80570f7c90cSmrg# serial 5 80670f7c90cSmrg 80770f7c90cSmrg# AM_SANITY_CHECK 80870f7c90cSmrg# --------------- 80970f7c90cSmrgAC_DEFUN([AM_SANITY_CHECK], 81070f7c90cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 81170f7c90cSmrg# Just in case 81270f7c90cSmrgsleep 1 81370f7c90cSmrgecho timestamp > conftest.file 81470f7c90cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 81570f7c90cSmrg# name. Accept space and tab only in the latter. 81670f7c90cSmrgam_lf=' 81770f7c90cSmrg' 81870f7c90cSmrgcase `pwd` in 81970f7c90cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82070f7c90cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82170f7c90cSmrgesac 82270f7c90cSmrgcase $srcdir in 82370f7c90cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82470f7c90cSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82570f7c90cSmrgesac 82670f7c90cSmrg 82770f7c90cSmrg# Do `set' in a subshell so we don't clobber the current shell's 82870f7c90cSmrg# arguments. Must try -L first in case configure is actually a 82970f7c90cSmrg# symlink; some systems play weird games with the mod time of symlinks 83070f7c90cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 83170f7c90cSmrg# directory). 83270f7c90cSmrgif ( 83370f7c90cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83470f7c90cSmrg if test "$[*]" = "X"; then 83570f7c90cSmrg # -L didn't work. 83670f7c90cSmrg set X `ls -t "$srcdir/configure" conftest.file` 83770f7c90cSmrg fi 83870f7c90cSmrg rm -f conftest.file 83970f7c90cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84070f7c90cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 84170f7c90cSmrg 84270f7c90cSmrg # If neither matched, then we have a broken ls. This can happen 84370f7c90cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84470f7c90cSmrg # broken ls alias from the environment. This has actually 84570f7c90cSmrg # happened. Such a system could not be considered "sane". 84670f7c90cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84770f7c90cSmrgalias in your environment]) 84870f7c90cSmrg fi 84970f7c90cSmrg 85070f7c90cSmrg test "$[2]" = conftest.file 85170f7c90cSmrg ) 85270f7c90cSmrgthen 85370f7c90cSmrg # Ok. 85470f7c90cSmrg : 85570f7c90cSmrgelse 85670f7c90cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 85770f7c90cSmrgCheck your system clock]) 85870f7c90cSmrgfi 85970f7c90cSmrgAC_MSG_RESULT(yes)]) 86070f7c90cSmrg 86170f7c90cSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862a850946eSmrg# 86370f7c90cSmrg# This file is free software; the Free Software Foundation 86470f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 86570f7c90cSmrg# with or without modifications, as long as this notice is preserved. 86670f7c90cSmrg 86770f7c90cSmrg# serial 1 86870f7c90cSmrg 86970f7c90cSmrg# AM_SILENT_RULES([DEFAULT]) 87070f7c90cSmrg# -------------------------- 87170f7c90cSmrg# Enable less verbose build rules; with the default set to DEFAULT 87270f7c90cSmrg# (`yes' being less verbose, `no' or empty being verbose). 87370f7c90cSmrgAC_DEFUN([AM_SILENT_RULES], 87470f7c90cSmrg[AC_ARG_ENABLE([silent-rules], 87570f7c90cSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87670f7c90cSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87770f7c90cSmrgcase $enable_silent_rules in 87870f7c90cSmrgyes) AM_DEFAULT_VERBOSITY=0;; 87970f7c90cSmrgno) AM_DEFAULT_VERBOSITY=1;; 88070f7c90cSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88170f7c90cSmrgesac 88270f7c90cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88370f7c90cSmrgAM_BACKSLASH='\' 88470f7c90cSmrgAC_SUBST([AM_BACKSLASH])dnl 88570f7c90cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88670f7c90cSmrg]) 88770f7c90cSmrg 88870f7c90cSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889a850946eSmrg# 89070f7c90cSmrg# This file is free software; the Free Software Foundation 89170f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 89270f7c90cSmrg# with or without modifications, as long as this notice is preserved. 893a850946eSmrg 89470f7c90cSmrg# AM_PROG_INSTALL_STRIP 89570f7c90cSmrg# --------------------- 89670f7c90cSmrg# One issue with vendor `install' (even GNU) is that you can't 89770f7c90cSmrg# specify the program used to strip binaries. This is especially 89870f7c90cSmrg# annoying in cross-compiling environments, where the build's strip 89970f7c90cSmrg# is unlikely to handle the host's binaries. 90070f7c90cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90170f7c90cSmrg# always use install-sh in `make install-strip', and initialize 90270f7c90cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 90370f7c90cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90470f7c90cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90570f7c90cSmrg# Installed binaries are usually stripped using `strip' when the user 90670f7c90cSmrg# run `make install-strip'. However `strip' might not be the right 90770f7c90cSmrg# tool to use in cross-compilation environments, therefore Automake 90870f7c90cSmrg# will honor the `STRIP' environment variable to overrule this program. 90970f7c90cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91070f7c90cSmrgif test "$cross_compiling" != no; then 91170f7c90cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 91270f7c90cSmrgfi 91370f7c90cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91470f7c90cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915a850946eSmrg 91670f7c90cSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91770f7c90cSmrg# 91870f7c90cSmrg# This file is free software; the Free Software Foundation 91970f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 92070f7c90cSmrg# with or without modifications, as long as this notice is preserved. 921a850946eSmrg 92270f7c90cSmrg# serial 2 923a850946eSmrg 92470f7c90cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 92570f7c90cSmrg# --------------------------- 92670f7c90cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92770f7c90cSmrg# This macro is traced by Automake. 92870f7c90cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929a850946eSmrg 93070f7c90cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 93170f7c90cSmrg# --------------------------- 93270f7c90cSmrg# Public sister of _AM_SUBST_NOTMAKE. 93370f7c90cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934a850946eSmrg 93570f7c90cSmrg# Check how to create a tarball. -*- Autoconf -*- 936a850946eSmrg 93770f7c90cSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93870f7c90cSmrg# 93970f7c90cSmrg# This file is free software; the Free Software Foundation 94070f7c90cSmrg# gives unlimited permission to copy and/or distribute it, 94170f7c90cSmrg# with or without modifications, as long as this notice is preserved. 942a850946eSmrg 94370f7c90cSmrg# serial 2 944a850946eSmrg 94570f7c90cSmrg# _AM_PROG_TAR(FORMAT) 94670f7c90cSmrg# -------------------- 94770f7c90cSmrg# Check how to create a tarball in format FORMAT. 94870f7c90cSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 94970f7c90cSmrg# 95070f7c90cSmrg# Substitute a variable $(am__tar) that is a command 95170f7c90cSmrg# writing to stdout a FORMAT-tarball containing the directory 95270f7c90cSmrg# $tardir. 95370f7c90cSmrg# tardir=directory && $(am__tar) > result.tar 95470f7c90cSmrg# 95570f7c90cSmrg# Substitute a variable $(am__untar) that extract such 95670f7c90cSmrg# a tarball read from stdin. 95770f7c90cSmrg# $(am__untar) < result.tar 95870f7c90cSmrgAC_DEFUN([_AM_PROG_TAR], 95970f7c90cSmrg[# Always define AMTAR for backward compatibility. 96070f7c90cSmrgAM_MISSING_PROG([AMTAR], [tar]) 96170f7c90cSmrgm4_if([$1], [v7], 96270f7c90cSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96370f7c90cSmrg [m4_case([$1], [ustar],, [pax],, 96470f7c90cSmrg [m4_fatal([Unknown tar format])]) 96570f7c90cSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96670f7c90cSmrg# Loop over all known methods to create a tar archive until one works. 96770f7c90cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96870f7c90cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96970f7c90cSmrg# Do not fold the above two line into one, because Tru64 sh and 97070f7c90cSmrg# Solaris sh will not grok spaces in the rhs of `-'. 97170f7c90cSmrgfor _am_tool in $_am_tools 97270f7c90cSmrgdo 97370f7c90cSmrg case $_am_tool in 97470f7c90cSmrg gnutar) 97570f7c90cSmrg for _am_tar in tar gnutar gtar; 97670f7c90cSmrg do 97770f7c90cSmrg AM_RUN_LOG([$_am_tar --version]) && break 97870f7c90cSmrg done 97970f7c90cSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98070f7c90cSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98170f7c90cSmrg am__untar="$_am_tar -xf -" 98270f7c90cSmrg ;; 98370f7c90cSmrg plaintar) 98470f7c90cSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 98570f7c90cSmrg # ustar tarball either. 98670f7c90cSmrg (tar --version) >/dev/null 2>&1 && continue 98770f7c90cSmrg am__tar='tar chf - "$$tardir"' 98870f7c90cSmrg am__tar_='tar chf - "$tardir"' 98970f7c90cSmrg am__untar='tar xf -' 99070f7c90cSmrg ;; 99170f7c90cSmrg pax) 99270f7c90cSmrg am__tar='pax -L -x $1 -w "$$tardir"' 99370f7c90cSmrg am__tar_='pax -L -x $1 -w "$tardir"' 99470f7c90cSmrg am__untar='pax -r' 99570f7c90cSmrg ;; 99670f7c90cSmrg cpio) 99770f7c90cSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99870f7c90cSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99970f7c90cSmrg am__untar='cpio -i -H $1 -d' 100070f7c90cSmrg ;; 100170f7c90cSmrg none) 100270f7c90cSmrg am__tar=false 100370f7c90cSmrg am__tar_=false 100470f7c90cSmrg am__untar=false 100570f7c90cSmrg ;; 100670f7c90cSmrg esac 1007a850946eSmrg 100870f7c90cSmrg # If the value was cached, stop now. We just wanted to have am__tar 100970f7c90cSmrg # and am__untar set. 101070f7c90cSmrg test -n "${am_cv_prog_tar_$1}" && break 101170f7c90cSmrg 101270f7c90cSmrg # tar/untar a dummy directory, and stop if the command works 101370f7c90cSmrg rm -rf conftest.dir 101470f7c90cSmrg mkdir conftest.dir 101570f7c90cSmrg echo GrepMe > conftest.dir/file 101670f7c90cSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101770f7c90cSmrg rm -rf conftest.dir 101870f7c90cSmrg if test -s conftest.tar; then 101970f7c90cSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 102070f7c90cSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102170f7c90cSmrg fi 102270f7c90cSmrgdone 102370f7c90cSmrgrm -rf conftest.dir 1024a850946eSmrg 102570f7c90cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102670f7c90cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102770f7c90cSmrgAC_SUBST([am__tar]) 102870f7c90cSmrgAC_SUBST([am__untar]) 102970f7c90cSmrg]) # _AM_PROG_TAR 103070f7c90cSmrg 103170f7c90cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032a850946eSmrgdnl 103369a1fe56Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1034a850946eSmrgdnl 103570f7c90cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10367dff02feSmrgdnl copy of this software and associated documentation files (the "Software"), 10377dff02feSmrgdnl to deal in the Software without restriction, including without limitation 10387dff02feSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 10397dff02feSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 10407dff02feSmrgdnl Software is furnished to do so, subject to the following conditions: 104170f7c90cSmrgdnl 10427dff02feSmrgdnl The above copyright notice and this permission notice (including the next 10437dff02feSmrgdnl paragraph) shall be included in all copies or substantial portions of the 10447dff02feSmrgdnl Software. 104570f7c90cSmrgdnl 10467dff02feSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10477dff02feSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 10487dff02feSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 10497dff02feSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 10507dff02feSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 10517dff02feSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 10527dff02feSmrgdnl DEALINGS IN THE SOFTWARE. 105370f7c90cSmrg 105470f7c90cSmrg# XORG_MACROS_VERSION(required-version) 105570f7c90cSmrg# ------------------------------------- 105670f7c90cSmrg# Minimum version: 1.1.0 105770f7c90cSmrg# 105870f7c90cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 105970f7c90cSmrg# your configure.ac with the minimum required version, such as: 106070f7c90cSmrg# XORG_MACROS_VERSION(1.1) 106170f7c90cSmrg# 106270f7c90cSmrg# To ensure that this macro is defined, also add: 106370f7c90cSmrg# m4_ifndef([XORG_MACROS_VERSION], 106470f7c90cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 106570f7c90cSmrg# 106670f7c90cSmrg# 106770f7c90cSmrg# See the "minimum version" comment for each macro you use to see what 106870f7c90cSmrg# version you require. 106970f7c90cSmrgm4_defun([XORG_MACROS_VERSION],[ 107069a1fe56Smrgm4_define([vers_have], [1.10.1]) 107170f7c90cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107270f7c90cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107370f7c90cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107470f7c90cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107570f7c90cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107670f7c90cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107770f7c90cSmrgm4_undefine([vers_have]) 107870f7c90cSmrgm4_undefine([maj_have]) 107970f7c90cSmrgm4_undefine([maj_needed]) 108070f7c90cSmrg]) # XORG_MACROS_VERSION 1081a850946eSmrg 1082a850946eSmrg# XORG_PROG_RAWCPP() 1083a850946eSmrg# ------------------ 108470f7c90cSmrg# Minimum version: 1.0.0 108570f7c90cSmrg# 1086a850946eSmrg# Find cpp program and necessary flags for use in pre-processing text files 1087a850946eSmrg# such as man pages and config files 1088a850946eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1089a850946eSmrgAC_REQUIRE([AC_PROG_CPP]) 1090a850946eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091a850946eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092a850946eSmrg 1093a850946eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094a850946eSmrg# which is not the best choice for supporting other OS'es, but covers most 1095a850946eSmrg# of the ones we need for now. 1096a850946eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097a850946eSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098a850946eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099a850946eSmrg AC_MSG_RESULT([no]) 1100a850946eSmrgelse 1101a850946eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102a850946eSmrg RAWCPPFLAGS=-undef 1103a850946eSmrg AC_MSG_RESULT([yes]) 110470f7c90cSmrg # under Cygwin unix is still defined even with -undef 110570f7c90cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110670f7c90cSmrg RAWCPPFLAGS="-undef -ansi" 110770f7c90cSmrg AC_MSG_RESULT([yes, with -ansi]) 1108a850946eSmrg else 1109a850946eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110a850946eSmrg fi 1111a850946eSmrgfi 1112a850946eSmrgrm -f conftest.$ac_ext 1113a850946eSmrg 1114a850946eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115a850946eSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116a850946eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117a850946eSmrg AC_MSG_RESULT([no]) 1118a850946eSmrgelse 1119a850946eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120a850946eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121a850946eSmrg AC_MSG_RESULT([yes]) 1122a850946eSmrg else 1123a850946eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124a850946eSmrg fi 1125a850946eSmrgfi 1126a850946eSmrgrm -f conftest.$ac_ext 1127a850946eSmrgAC_SUBST(RAWCPPFLAGS) 1128a850946eSmrg]) # XORG_PROG_RAWCPP 1129a850946eSmrg 1130a850946eSmrg# XORG_MANPAGE_SECTIONS() 1131a850946eSmrg# ----------------------- 113270f7c90cSmrg# Minimum version: 1.0.0 113370f7c90cSmrg# 1134a850946eSmrg# Determine which sections man pages go in for the different man page types 1135a850946eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136a850946eSmrg# Not sure if there's any better way than just hardcoding by OS name. 1137a850946eSmrg# Override default settings by setting environment variables 11387dff02feSmrg# Added MAN_SUBSTS in version 1.8 113969a1fe56Smrg# Added AC_PROG_SED in version 1.8 1140a850946eSmrg 1141a850946eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1142a850946eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 114369a1fe56SmrgAC_REQUIRE([AC_PROG_SED]) 1144a850946eSmrg 1145a850946eSmrgif test x$APP_MAN_SUFFIX = x ; then 114670f7c90cSmrg APP_MAN_SUFFIX=1 1147a850946eSmrgfi 1148a850946eSmrgif test x$APP_MAN_DIR = x ; then 114970f7c90cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1150a850946eSmrgfi 1151a850946eSmrg 1152a850946eSmrgif test x$LIB_MAN_SUFFIX = x ; then 115370f7c90cSmrg LIB_MAN_SUFFIX=3 1154a850946eSmrgfi 1155a850946eSmrgif test x$LIB_MAN_DIR = x ; then 115670f7c90cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1157a850946eSmrgfi 1158a850946eSmrg 1159a850946eSmrgif test x$FILE_MAN_SUFFIX = x ; then 1160a850946eSmrg case $host_os in 1161a850946eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1162a850946eSmrg *) FILE_MAN_SUFFIX=5 ;; 1163a850946eSmrg esac 1164a850946eSmrgfi 1165a850946eSmrgif test x$FILE_MAN_DIR = x ; then 116670f7c90cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1167a850946eSmrgfi 1168a850946eSmrg 1169a850946eSmrgif test x$MISC_MAN_SUFFIX = x ; then 1170a850946eSmrg case $host_os in 1171a850946eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1172a850946eSmrg *) MISC_MAN_SUFFIX=7 ;; 1173a850946eSmrg esac 1174a850946eSmrgfi 1175a850946eSmrgif test x$MISC_MAN_DIR = x ; then 117670f7c90cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1177a850946eSmrgfi 1178a850946eSmrg 1179a850946eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1180a850946eSmrg case $host_os in 1181a850946eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1182a850946eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1183a850946eSmrg esac 1184a850946eSmrgfi 1185a850946eSmrgif test x$DRIVER_MAN_DIR = x ; then 118670f7c90cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1187a850946eSmrgfi 1188a850946eSmrg 1189a850946eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1190a850946eSmrg case $host_os in 1191a850946eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1192a850946eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1193a850946eSmrg esac 1194a850946eSmrgfi 1195a850946eSmrgif test x$ADMIN_MAN_DIR = x ; then 1196a850946eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1197a850946eSmrgfi 1198a850946eSmrg 1199a850946eSmrg 1200a850946eSmrgAC_SUBST([APP_MAN_SUFFIX]) 1201a850946eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1202a850946eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1203a850946eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1204a850946eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1205a850946eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1206a850946eSmrgAC_SUBST([APP_MAN_DIR]) 1207a850946eSmrgAC_SUBST([LIB_MAN_DIR]) 1208a850946eSmrgAC_SUBST([FILE_MAN_DIR]) 1209a850946eSmrgAC_SUBST([MISC_MAN_DIR]) 1210a850946eSmrgAC_SUBST([DRIVER_MAN_DIR]) 1211a850946eSmrgAC_SUBST([ADMIN_MAN_DIR]) 12127dff02feSmrg 12137dff02feSmrgXORG_MAN_PAGE="X Version 11" 12147dff02feSmrgAC_SUBST([XORG_MAN_PAGE]) 12157dff02feSmrgMAN_SUBSTS="\ 12167dff02feSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 12177dff02feSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 12187dff02feSmrg -e 's|__xservername__|Xorg|g' \ 12197dff02feSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 12207dff02feSmrg -e 's|__projectroot__|\$(prefix)|g' \ 122169a1fe56Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 12227dff02feSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 12237dff02feSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 12247dff02feSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 12257dff02feSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 12267dff02feSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 12277dff02feSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 12287dff02feSmrgAC_SUBST([MAN_SUBSTS]) 12297dff02feSmrg 1230a850946eSmrg]) # XORG_MANPAGE_SECTIONS 1231a850946eSmrg 12327dff02feSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 12337dff02feSmrg# ------------------------ 12347dff02feSmrg# Minimum version: 1.7.0 12357dff02feSmrg# 12367dff02feSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 12377dff02feSmrg# provided by xorg-sgml-doctools, if installed. 12387dff02feSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 12397dff02feSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 12407dff02feSmrgXORG_SGML_PATH= 12417dff02feSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 12427dff02feSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 12437dff02feSmrg [m4_ifval([$1],[:], 12447dff02feSmrg [if test x"$cross_compiling" != x"yes" ; then 12457dff02feSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 12467dff02feSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 12477dff02feSmrg fi]) 12487dff02feSmrg ]) 12497dff02feSmrg 125069a1fe56Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 125169a1fe56Smrg# the path and the name of the doc stylesheet 12527dff02feSmrgif test "x$XORG_SGML_PATH" != "x" ; then 12537dff02feSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 125469a1fe56Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 125569a1fe56Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 12567dff02feSmrgelse 12577dff02feSmrg AC_MSG_RESULT([no]) 12587dff02feSmrgfi 12597dff02feSmrg 12607dff02feSmrgAC_SUBST(XORG_SGML_PATH) 126169a1fe56SmrgAC_SUBST(STYLESHEET_SRCDIR) 126269a1fe56SmrgAC_SUBST(XSL_STYLESHEET) 126369a1fe56SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 12647dff02feSmrg]) # XORG_CHECK_SGML_DOCTOOLS 12657dff02feSmrg 1266a850946eSmrg# XORG_CHECK_LINUXDOC 1267a850946eSmrg# ------------------- 126870f7c90cSmrg# Minimum version: 1.0.0 126970f7c90cSmrg# 1270a850946eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1271a850946eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1272a850946eSmrg# Whether or not the necessary tools and files are found can be checked 1273a850946eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1274a850946eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12757dff02feSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 12767dff02feSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1277a850946eSmrg 1278a850946eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1279a850946eSmrg 12807dff02feSmrgAC_MSG_CHECKING([whether to build documentation]) 1281a850946eSmrg 12827dff02feSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1283a850946eSmrg BUILDDOC=yes 1284a850946eSmrgelse 1285a850946eSmrg BUILDDOC=no 1286a850946eSmrgfi 1287a850946eSmrg 1288a850946eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1289a850946eSmrg 1290a850946eSmrgAC_MSG_RESULT([$BUILDDOC]) 1291a850946eSmrg 12927dff02feSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1293a850946eSmrg 12947dff02feSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1295a850946eSmrg BUILDPDFDOC=yes 1296a850946eSmrgelse 1297a850946eSmrg BUILDPDFDOC=no 1298a850946eSmrgfi 1299a850946eSmrg 1300a850946eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1301a850946eSmrg 1302a850946eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1303a850946eSmrg 13047dff02feSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 130570f7c90cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1306a850946eSmrgMAKE_PDF="$PS2PDF" 130770f7c90cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1308a850946eSmrg 1309a850946eSmrgAC_SUBST(MAKE_TEXT) 1310a850946eSmrgAC_SUBST(MAKE_PS) 1311a850946eSmrgAC_SUBST(MAKE_PDF) 1312a850946eSmrgAC_SUBST(MAKE_HTML) 1313a850946eSmrg]) # XORG_CHECK_LINUXDOC 1314a850946eSmrg 131570f7c90cSmrg# XORG_CHECK_DOCBOOK 131670f7c90cSmrg# ------------------- 131770f7c90cSmrg# Minimum version: 1.0.0 131870f7c90cSmrg# 131970f7c90cSmrg# Checks for the ability to build output formats from SGML DocBook source. 132070f7c90cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 132170f7c90cSmrg# indicates whether the necessary tools and files are found and, if set, 132270f7c90cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 132370f7c90cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 13247dff02feSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 13257dff02feSmrg 132670f7c90cSmrgBUILDTXTDOC=no 132770f7c90cSmrgBUILDPDFDOC=no 132870f7c90cSmrgBUILDPSDOC=no 132970f7c90cSmrgBUILDHTMLDOC=no 133070f7c90cSmrg 133170f7c90cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 133270f7c90cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 133370f7c90cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 133470f7c90cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 133570f7c90cSmrg 13367dff02feSmrgAC_MSG_CHECKING([whether to build text documentation]) 13377dff02feSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 133870f7c90cSmrg test x$BUILD_TXTDOC != xno; then 133970f7c90cSmrg BUILDTXTDOC=yes 134070f7c90cSmrgfi 134170f7c90cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 134270f7c90cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 134370f7c90cSmrg 13447dff02feSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 13457dff02feSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 134670f7c90cSmrg test x$BUILD_PDFDOC != xno; then 134770f7c90cSmrg BUILDPDFDOC=yes 134870f7c90cSmrgfi 134970f7c90cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 135070f7c90cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 135170f7c90cSmrg 13527dff02feSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 13537dff02feSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 135470f7c90cSmrg test x$BUILD_PSDOC != xno; then 135570f7c90cSmrg BUILDPSDOC=yes 135670f7c90cSmrgfi 135770f7c90cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 135870f7c90cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 135970f7c90cSmrg 13607dff02feSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 13617dff02feSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 136270f7c90cSmrg test x$BUILD_HTMLDOC != xno; then 136370f7c90cSmrg BUILDHTMLDOC=yes 136470f7c90cSmrgfi 136570f7c90cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 136670f7c90cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 136770f7c90cSmrg 136870f7c90cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 136970f7c90cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 137070f7c90cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 137170f7c90cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 137270f7c90cSmrg 137370f7c90cSmrgAC_SUBST(MAKE_TEXT) 137470f7c90cSmrgAC_SUBST(MAKE_PS) 137570f7c90cSmrgAC_SUBST(MAKE_PDF) 137670f7c90cSmrgAC_SUBST(MAKE_HTML) 137770f7c90cSmrg]) # XORG_CHECK_DOCBOOK 137870f7c90cSmrg 13797dff02feSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 13807dff02feSmrg# ---------------- 13817dff02feSmrg# Minimum version: 1.5.0 13827dff02feSmrg# 13837dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 13847dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 13857dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 13867dff02feSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 13877dff02feSmrg# as whether or not to use the xmlto package. 13887dff02feSmrg# 13897dff02feSmrg# Interface to module: 13907dff02feSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 13917dff02feSmrg# XMLTO: returns the path of the xmlto program found 13927dff02feSmrg# returns the path set by the user in the environment 13937dff02feSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 13947dff02feSmrg# 'no' user instructs the module not to use xmlto 13957dff02feSmrg# 139669a1fe56Smrg# Added in version 1.10.0 139769a1fe56Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 139869a1fe56Smrg# xmlto for text output requires either lynx, links, or w3m browsers 139969a1fe56Smrg# 14007dff02feSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 14017dff02feSmrg# 14027dff02feSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 14037dff02feSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 14047dff02feSmrgAC_ARG_WITH(xmlto, 14057dff02feSmrg AS_HELP_STRING([--with-xmlto], 14067dff02feSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 14077dff02feSmrg [use_xmlto=$withval], [use_xmlto=auto]) 14087dff02feSmrg 14097dff02feSmrgif test "x$use_xmlto" = x"auto"; then 14107dff02feSmrg AC_PATH_PROG([XMLTO], [xmlto]) 14117dff02feSmrg if test "x$XMLTO" = "x"; then 14127dff02feSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 14137dff02feSmrg have_xmlto=no 14147dff02feSmrg else 14157dff02feSmrg have_xmlto=yes 14167dff02feSmrg fi 14177dff02feSmrgelif test "x$use_xmlto" = x"yes" ; then 14187dff02feSmrg AC_PATH_PROG([XMLTO], [xmlto]) 14197dff02feSmrg if test "x$XMLTO" = "x"; then 14207dff02feSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 14217dff02feSmrg fi 14227dff02feSmrg have_xmlto=yes 14237dff02feSmrgelif test "x$use_xmlto" = x"no" ; then 14247dff02feSmrg if test "x$XMLTO" != "x"; then 14257dff02feSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 14267dff02feSmrg fi 14277dff02feSmrg have_xmlto=no 14287dff02feSmrgelse 14297dff02feSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 14307dff02feSmrgfi 143169a1fe56Smrg 143269a1fe56Smrg# Test for a minimum version of xmlto, if provided. 14337dff02feSmrgm4_ifval([$1], 14347dff02feSmrg[if test "$have_xmlto" = yes; then 14357dff02feSmrg # scrape the xmlto version 14367dff02feSmrg AC_MSG_CHECKING([the xmlto version]) 14377dff02feSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 14387dff02feSmrg AC_MSG_RESULT([$xmlto_version]) 14397dff02feSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 14407dff02feSmrg [if test "x$use_xmlto" = xauto; then 14417dff02feSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 14427dff02feSmrg have_xmlto=no 14437dff02feSmrg else 14447dff02feSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 14457dff02feSmrg fi]) 14467dff02feSmrgfi]) 144769a1fe56Smrg 144869a1fe56Smrg# Test for the ability of xmlto to generate a text target 144969a1fe56Smrghave_xmlto_text=no 145069a1fe56Smrgcat > conftest.xml << "EOF" 145169a1fe56SmrgEOF 145269a1fe56SmrgAS_IF([test "$have_xmlto" = yes], 145369a1fe56Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 145469a1fe56Smrg [have_xmlto_text=yes], 145569a1fe56Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 145669a1fe56Smrgrm -f conftest.xml 145769a1fe56SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 14587dff02feSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 14597dff02feSmrg]) # XORG_WITH_XMLTO 14607dff02feSmrg 14617dff02feSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 14627dff02feSmrg# ---------------- 14637dff02feSmrg# Minimum version: 1.5.0 14647dff02feSmrg# 14657dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 14667dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 14677dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 14687dff02feSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 14697dff02feSmrg# as whether or not to use the asciidoc package. 14707dff02feSmrg# 14717dff02feSmrg# Interface to module: 14727dff02feSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 14737dff02feSmrg# ASCIIDOC: returns the path of the asciidoc program found 14747dff02feSmrg# returns the path set by the user in the environment 14757dff02feSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 14767dff02feSmrg# 'no' user instructs the module not to use asciidoc 14777dff02feSmrg# 14787dff02feSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 14797dff02feSmrg# 14807dff02feSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 14817dff02feSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 14827dff02feSmrgAC_ARG_WITH(asciidoc, 14837dff02feSmrg AS_HELP_STRING([--with-asciidoc], 14847dff02feSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 14857dff02feSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 14867dff02feSmrg 14877dff02feSmrgif test "x$use_asciidoc" = x"auto"; then 14887dff02feSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 14897dff02feSmrg if test "x$ASCIIDOC" = "x"; then 14907dff02feSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 14917dff02feSmrg have_asciidoc=no 14927dff02feSmrg else 14937dff02feSmrg have_asciidoc=yes 14947dff02feSmrg fi 14957dff02feSmrgelif test "x$use_asciidoc" = x"yes" ; then 14967dff02feSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 14977dff02feSmrg if test "x$ASCIIDOC" = "x"; then 14987dff02feSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 14997dff02feSmrg fi 15007dff02feSmrg have_asciidoc=yes 15017dff02feSmrgelif test "x$use_asciidoc" = x"no" ; then 15027dff02feSmrg if test "x$ASCIIDOC" != "x"; then 15037dff02feSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 15047dff02feSmrg fi 15057dff02feSmrg have_asciidoc=no 15067dff02feSmrgelse 15077dff02feSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 15087dff02feSmrgfi 15097dff02feSmrgm4_ifval([$1], 15107dff02feSmrg[if test "$have_asciidoc" = yes; then 15117dff02feSmrg # scrape the asciidoc version 15127dff02feSmrg AC_MSG_CHECKING([the asciidoc version]) 15137dff02feSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 15147dff02feSmrg AC_MSG_RESULT([$asciidoc_version]) 15157dff02feSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 15167dff02feSmrg [if test "x$use_asciidoc" = xauto; then 15177dff02feSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 15187dff02feSmrg have_asciidoc=no 15197dff02feSmrg else 15207dff02feSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 15217dff02feSmrg fi]) 15227dff02feSmrgfi]) 15237dff02feSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 15247dff02feSmrg]) # XORG_WITH_ASCIIDOC 15257dff02feSmrg 15267dff02feSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 15277dff02feSmrg# -------------------------------- 15287dff02feSmrg# Minimum version: 1.5.0 15297dff02feSmrg# 15307dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 15317dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 15327dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 15337dff02feSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 15347dff02feSmrg# as whether or not to use the doxygen package. 15357dff02feSmrg# 15367dff02feSmrg# Interface to module: 15377dff02feSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 15387dff02feSmrg# DOXYGEN: returns the path of the doxygen program found 15397dff02feSmrg# returns the path set by the user in the environment 15407dff02feSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 15417dff02feSmrg# 'no' user instructs the module not to use doxygen 15427dff02feSmrg# 15437dff02feSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 15447dff02feSmrg# 15457dff02feSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 15467dff02feSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 15477dff02feSmrgAC_ARG_WITH(doxygen, 15487dff02feSmrg AS_HELP_STRING([--with-doxygen], 15497dff02feSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 15507dff02feSmrg [use_doxygen=$withval], [use_doxygen=auto]) 15517dff02feSmrg 15527dff02feSmrgif test "x$use_doxygen" = x"auto"; then 15537dff02feSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 15547dff02feSmrg if test "x$DOXYGEN" = "x"; then 15557dff02feSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 15567dff02feSmrg have_doxygen=no 15577dff02feSmrg else 15587dff02feSmrg have_doxygen=yes 15597dff02feSmrg fi 15607dff02feSmrgelif test "x$use_doxygen" = x"yes" ; then 15617dff02feSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 15627dff02feSmrg if test "x$DOXYGEN" = "x"; then 15637dff02feSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 15647dff02feSmrg fi 15657dff02feSmrg have_doxygen=yes 15667dff02feSmrgelif test "x$use_doxygen" = x"no" ; then 15677dff02feSmrg if test "x$DOXYGEN" != "x"; then 15687dff02feSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 15697dff02feSmrg fi 15707dff02feSmrg have_doxygen=no 15717dff02feSmrgelse 15727dff02feSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 15737dff02feSmrgfi 15747dff02feSmrgm4_ifval([$1], 15757dff02feSmrg[if test "$have_doxygen" = yes; then 15767dff02feSmrg # scrape the doxygen version 15777dff02feSmrg AC_MSG_CHECKING([the doxygen version]) 15787dff02feSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 15797dff02feSmrg AC_MSG_RESULT([$doxygen_version]) 15807dff02feSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 15817dff02feSmrg [if test "x$use_doxygen" = xauto; then 15827dff02feSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 15837dff02feSmrg have_doxygen=no 15847dff02feSmrg else 15857dff02feSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 15867dff02feSmrg fi]) 15877dff02feSmrgfi]) 15887dff02feSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 15897dff02feSmrg]) # XORG_WITH_DOXYGEN 15907dff02feSmrg 15917dff02feSmrg# XORG_WITH_GROFF 15927dff02feSmrg# ---------------- 15937dff02feSmrg# Minimum version: 1.6.0 15947dff02feSmrg# 15957dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 15967dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 15977dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 15987dff02feSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 15997dff02feSmrg# as whether or not to use the groff package. 16007dff02feSmrg# 16017dff02feSmrg# Interface to module: 16027dff02feSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 16037dff02feSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 16047dff02feSmrg# HAVE_GROFF_MS: the -ms macros package 16057dff02feSmrg# GROFF: returns the path of the groff program found 16067dff02feSmrg# returns the path set by the user in the environment 16077dff02feSmrg# --with-groff: 'yes' user instructs the module to use groff 16087dff02feSmrg# 'no' user instructs the module not to use groff 16097dff02feSmrg# 161069a1fe56Smrg# Added in version 1.9.0: 161169a1fe56Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 161269a1fe56Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 161369a1fe56Smrg# psselect from the psutils package. 161469a1fe56Smrg# the ghostcript package. Refer to the grohtml man pages 161569a1fe56Smrg# 16167dff02feSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 16177dff02feSmrg# 16187dff02feSmrg# OS and distros often splits groff in a basic and full package, the former 16197dff02feSmrg# having the groff program and the later having devices, fonts and macros 16207dff02feSmrg# Checking for the groff executable is not enough. 16217dff02feSmrg# 16227dff02feSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 16237dff02feSmrg# unset HAVE_GROFF or GROFF env variables. 16247dff02feSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 16257dff02feSmrg# 16267dff02feSmrgAC_DEFUN([XORG_WITH_GROFF],[ 16277dff02feSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 16287dff02feSmrgAC_ARG_WITH(groff, 16297dff02feSmrg AS_HELP_STRING([--with-groff], 16307dff02feSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 16317dff02feSmrg [use_groff=$withval], [use_groff=auto]) 16327dff02feSmrg 16337dff02feSmrgif test "x$use_groff" = x"auto"; then 16347dff02feSmrg AC_PATH_PROG([GROFF], [groff]) 16357dff02feSmrg if test "x$GROFF" = "x"; then 16367dff02feSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 16377dff02feSmrg have_groff=no 16387dff02feSmrg else 16397dff02feSmrg have_groff=yes 16407dff02feSmrg fi 16417dff02feSmrgelif test "x$use_groff" = x"yes" ; then 16427dff02feSmrg AC_PATH_PROG([GROFF], [groff]) 16437dff02feSmrg if test "x$GROFF" = "x"; then 16447dff02feSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 16457dff02feSmrg fi 16467dff02feSmrg have_groff=yes 16477dff02feSmrgelif test "x$use_groff" = x"no" ; then 16487dff02feSmrg if test "x$GROFF" != "x"; then 16497dff02feSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 16507dff02feSmrg fi 16517dff02feSmrg have_groff=no 16527dff02feSmrgelse 16537dff02feSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 16547dff02feSmrgfi 165569a1fe56Smrg 16567dff02feSmrg# We have groff, test for the presence of the macro packages 16577dff02feSmrgif test "x$have_groff" = x"yes"; then 16587dff02feSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 16597dff02feSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 16607dff02feSmrg groff_ms_works=yes 16617dff02feSmrg else 16627dff02feSmrg groff_ms_works=no 16637dff02feSmrg fi 16647dff02feSmrg AC_MSG_RESULT([$groff_ms_works]) 16657dff02feSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 16667dff02feSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 16677dff02feSmrg groff_mm_works=yes 16687dff02feSmrg else 16697dff02feSmrg groff_mm_works=no 16707dff02feSmrg fi 16717dff02feSmrg AC_MSG_RESULT([$groff_mm_works]) 16727dff02feSmrgfi 167369a1fe56Smrg 167469a1fe56Smrg# We have groff, test for HTML dependencies, one command per package 167569a1fe56Smrgif test "x$have_groff" = x"yes"; then 167669a1fe56Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 167769a1fe56Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 167869a1fe56Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 167969a1fe56Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 168069a1fe56Smrg have_groff_html=yes 168169a1fe56Smrg else 168269a1fe56Smrg have_groff_html=no 168369a1fe56Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 168469a1fe56Smrg fi 168569a1fe56Smrgfi 168669a1fe56Smrg 168769a1fe56Smrg# Set Automake conditionals for Makefiles 16887dff02feSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 16897dff02feSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 16907dff02feSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 169169a1fe56SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 16927dff02feSmrg]) # XORG_WITH_GROFF 16937dff02feSmrg 16947dff02feSmrg# XORG_WITH_FOP 16957dff02feSmrg# ---------------- 16967dff02feSmrg# Minimum version: 1.6.0 16977dff02feSmrg# 16987dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 16997dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 17007dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17017dff02feSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 17027dff02feSmrg# as whether or not to use the fop package. 17037dff02feSmrg# 17047dff02feSmrg# Interface to module: 17057dff02feSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 17067dff02feSmrg# FOP: returns the path of the fop program found 17077dff02feSmrg# returns the path set by the user in the environment 17087dff02feSmrg# --with-fop: 'yes' user instructs the module to use fop 17097dff02feSmrg# 'no' user instructs the module not to use fop 17107dff02feSmrg# 17117dff02feSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 17127dff02feSmrg# 17137dff02feSmrgAC_DEFUN([XORG_WITH_FOP],[ 17147dff02feSmrgAC_ARG_VAR([FOP], [Path to fop command]) 17157dff02feSmrgAC_ARG_WITH(fop, 17167dff02feSmrg AS_HELP_STRING([--with-fop], 17177dff02feSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 17187dff02feSmrg [use_fop=$withval], [use_fop=auto]) 17197dff02feSmrg 17207dff02feSmrgif test "x$use_fop" = x"auto"; then 17217dff02feSmrg AC_PATH_PROG([FOP], [fop]) 17227dff02feSmrg if test "x$FOP" = "x"; then 17237dff02feSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 17247dff02feSmrg have_fop=no 17257dff02feSmrg else 17267dff02feSmrg have_fop=yes 17277dff02feSmrg fi 17287dff02feSmrgelif test "x$use_fop" = x"yes" ; then 17297dff02feSmrg AC_PATH_PROG([FOP], [fop]) 17307dff02feSmrg if test "x$FOP" = "x"; then 17317dff02feSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 17327dff02feSmrg fi 17337dff02feSmrg have_fop=yes 17347dff02feSmrgelif test "x$use_fop" = x"no" ; then 17357dff02feSmrg if test "x$FOP" != "x"; then 17367dff02feSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 17377dff02feSmrg fi 17387dff02feSmrg have_fop=no 17397dff02feSmrgelse 17407dff02feSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 17417dff02feSmrgfi 17427dff02feSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 17437dff02feSmrg]) # XORG_WITH_FOP 17447dff02feSmrg 17457dff02feSmrg# XORG_WITH_PS2PDF 17467dff02feSmrg# ---------------- 17477dff02feSmrg# Minimum version: 1.6.0 17487dff02feSmrg# 17497dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 17507dff02feSmrg# not at the appropriate level. This macro enables a module to test for the 17517dff02feSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17527dff02feSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 17537dff02feSmrg# as whether or not to use the ps2pdf package. 17547dff02feSmrg# 17557dff02feSmrg# Interface to module: 17567dff02feSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 17577dff02feSmrg# PS2PDF: returns the path of the ps2pdf program found 17587dff02feSmrg# returns the path set by the user in the environment 17597dff02feSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 17607dff02feSmrg# 'no' user instructs the module not to use ps2pdf 17617dff02feSmrg# 17627dff02feSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 17637dff02feSmrg# 17647dff02feSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 17657dff02feSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 17667dff02feSmrgAC_ARG_WITH(ps2pdf, 17677dff02feSmrg AS_HELP_STRING([--with-ps2pdf], 17687dff02feSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 17697dff02feSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 17707dff02feSmrg 17717dff02feSmrgif test "x$use_ps2pdf" = x"auto"; then 17727dff02feSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 17737dff02feSmrg if test "x$PS2PDF" = "x"; then 17747dff02feSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 17757dff02feSmrg have_ps2pdf=no 17767dff02feSmrg else 17777dff02feSmrg have_ps2pdf=yes 17787dff02feSmrg fi 17797dff02feSmrgelif test "x$use_ps2pdf" = x"yes" ; then 17807dff02feSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 17817dff02feSmrg if test "x$PS2PDF" = "x"; then 17827dff02feSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 17837dff02feSmrg fi 17847dff02feSmrg have_ps2pdf=yes 17857dff02feSmrgelif test "x$use_ps2pdf" = x"no" ; then 17867dff02feSmrg if test "x$PS2PDF" != "x"; then 17877dff02feSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 17887dff02feSmrg fi 17897dff02feSmrg have_ps2pdf=no 17907dff02feSmrgelse 17917dff02feSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 17927dff02feSmrgfi 17937dff02feSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 17947dff02feSmrg]) # XORG_WITH_PS2PDF 17957dff02feSmrg 17967dff02feSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 17977dff02feSmrg# ---------------- 17987dff02feSmrg# Minimum version: 1.6.0 17997dff02feSmrg# 18007dff02feSmrg# Documentation tools are not always available on all platforms and sometimes 18017dff02feSmrg# not at the appropriate level. This macro enables a builder to skip all 18027dff02feSmrg# documentation targets except traditional man pages. 18037dff02feSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18047dff02feSmrg# maximum flexibilty in controlling documentation building. 18057dff02feSmrg# Refer to: 18067dff02feSmrg# XORG_WITH_XMLTO --with-xmlto 18077dff02feSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18087dff02feSmrg# XORG_WITH_DOXYGEN --with-doxygen 18097dff02feSmrg# XORG_WITH_FOP --with-fop 18107dff02feSmrg# XORG_WITH_GROFF --with-groff 18117dff02feSmrg# XORG_WITH_PS2PDF --with-ps2pdf 18127dff02feSmrg# 18137dff02feSmrg# Interface to module: 18147dff02feSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 18157dff02feSmrg# --enable-docs: 'yes' user instructs the module to generate docs 18167dff02feSmrg# 'no' user instructs the module not to generate docs 18177dff02feSmrg# parm1: specify the default value, yes or no. 18187dff02feSmrg# 18197dff02feSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 18207dff02feSmrgdefault=$1 18217dff02feSmrgif test "x$default" = x ; then 18227dff02feSmrg default="yes" 18237dff02feSmrgfi 18247dff02feSmrgAC_ARG_ENABLE(docs, 18257dff02feSmrg AS_HELP_STRING([--enable-docs], 18267dff02feSmrg [Enable building the documentation (default: yes)]), 18277dff02feSmrg [build_docs=$enableval], [build_docs=$default]) 18287dff02feSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 18297dff02feSmrgAC_MSG_CHECKING([whether to build documentation]) 18307dff02feSmrgAC_MSG_RESULT([$build_docs]) 18317dff02feSmrg]) # XORG_ENABLE_DOCS 18327dff02feSmrg 18337dff02feSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 18347dff02feSmrg# ---------------- 18357dff02feSmrg# Minimum version: 1.6.0 18367dff02feSmrg# 18377dff02feSmrg# This macro enables a builder to skip all developer documentation. 18387dff02feSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18397dff02feSmrg# maximum flexibilty in controlling documentation building. 18407dff02feSmrg# Refer to: 18417dff02feSmrg# XORG_WITH_XMLTO --with-xmlto 18427dff02feSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18437dff02feSmrg# XORG_WITH_DOXYGEN --with-doxygen 18447dff02feSmrg# XORG_WITH_FOP --with-fop 18457dff02feSmrg# XORG_WITH_GROFF --with-groff 18467dff02feSmrg# XORG_WITH_PS2PDF --with-ps2pdf 18477dff02feSmrg# 18487dff02feSmrg# Interface to module: 18497dff02feSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 18507dff02feSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 18517dff02feSmrg# 'no' user instructs the module not to generate developer docs 18527dff02feSmrg# parm1: specify the default value, yes or no. 18537dff02feSmrg# 18547dff02feSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 18557dff02feSmrgdevel_default=$1 18567dff02feSmrgif test "x$devel_default" = x ; then 18577dff02feSmrg devel_default="yes" 18587dff02feSmrgfi 18597dff02feSmrgAC_ARG_ENABLE(devel-docs, 18607dff02feSmrg AS_HELP_STRING([--enable-devel-docs], 18617dff02feSmrg [Enable building the developer documentation (default: yes)]), 18627dff02feSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 18637dff02feSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 18647dff02feSmrgAC_MSG_CHECKING([whether to build developer documentation]) 18657dff02feSmrgAC_MSG_RESULT([$build_devel_docs]) 18667dff02feSmrg]) # XORG_ENABLE_DEVEL_DOCS 18677dff02feSmrg 18687dff02feSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 18697dff02feSmrg# ---------------- 18707dff02feSmrg# Minimum version: 1.6.0 18717dff02feSmrg# 18727dff02feSmrg# This macro enables a builder to skip all functional specification targets. 18737dff02feSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18747dff02feSmrg# maximum flexibilty in controlling documentation building. 18757dff02feSmrg# Refer to: 18767dff02feSmrg# XORG_WITH_XMLTO --with-xmlto 18777dff02feSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18787dff02feSmrg# XORG_WITH_DOXYGEN --with-doxygen 18797dff02feSmrg# XORG_WITH_FOP --with-fop 18807dff02feSmrg# XORG_WITH_GROFF --with-groff 18817dff02feSmrg# XORG_WITH_PS2PDF --with-ps2pdf 18827dff02feSmrg# 18837dff02feSmrg# Interface to module: 18847dff02feSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 18857dff02feSmrg# --enable-specs: 'yes' user instructs the module to generate specs 18867dff02feSmrg# 'no' user instructs the module not to generate specs 18877dff02feSmrg# parm1: specify the default value, yes or no. 18887dff02feSmrg# 18897dff02feSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 18907dff02feSmrgspec_default=$1 18917dff02feSmrgif test "x$spec_default" = x ; then 18927dff02feSmrg spec_default="yes" 18937dff02feSmrgfi 18947dff02feSmrgAC_ARG_ENABLE(specs, 18957dff02feSmrg AS_HELP_STRING([--enable-specs], 18967dff02feSmrg [Enable building the specs (default: yes)]), 18977dff02feSmrg [build_specs=$enableval], [build_specs=$spec_default]) 18987dff02feSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 18997dff02feSmrgAC_MSG_CHECKING([whether to build functional specifications]) 19007dff02feSmrgAC_MSG_RESULT([$build_specs]) 19017dff02feSmrg]) # XORG_ENABLE_SPECS 19027dff02feSmrg 1903a850946eSmrg# XORG_CHECK_MALLOC_ZERO 1904a850946eSmrg# ---------------------- 190570f7c90cSmrg# Minimum version: 1.0.0 190670f7c90cSmrg# 1907a850946eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1908a850946eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1909a850946eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1910a850946eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1911a850946eSmrgAC_ARG_ENABLE(malloc0returnsnull, 191270f7c90cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1913a850946eSmrg [malloc(0) returns NULL (default: auto)]), 1914a850946eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1915a850946eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1916a850946eSmrg 1917a850946eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1918a850946eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1919a850946eSmrg AC_RUN_IFELSE([ 1920a850946eSmrgchar *malloc(); 1921a850946eSmrgchar *realloc(); 1922a850946eSmrgchar *calloc(); 1923a850946eSmrgmain() { 1924a850946eSmrg char *m0, *r0, *c0, *p; 1925a850946eSmrg m0 = malloc(0); 1926a850946eSmrg p = malloc(10); 1927a850946eSmrg r0 = realloc(p,0); 1928a850946eSmrg c0 = calloc(0); 1929a850946eSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1930a850946eSmrg}], 1931a850946eSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 19327dff02feSmrg [MALLOC_ZERO_RETURNS_NULL=no], 19337dff02feSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1934a850946eSmrgfi 1935a850946eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1936a850946eSmrg 1937a850946eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1938a850946eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1939a850946eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1940a850946eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1941a850946eSmrgelse 1942a850946eSmrg MALLOC_ZERO_CFLAGS="" 1943a850946eSmrg XMALLOC_ZERO_CFLAGS="" 1944a850946eSmrg XTMALLOC_ZERO_CFLAGS="" 1945a850946eSmrgfi 1946a850946eSmrg 1947a850946eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1948a850946eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1949a850946eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1950a850946eSmrg]) # XORG_CHECK_MALLOC_ZERO 1951a850946eSmrg 195270f7c90cSmrg# XORG_WITH_LINT() 195370f7c90cSmrg# ---------------- 195470f7c90cSmrg# Minimum version: 1.1.0 195570f7c90cSmrg# 195669a1fe56Smrg# This macro enables the use of a tool that flags some suspicious and 195769a1fe56Smrg# non-portable constructs (likely to be bugs) in C language source code. 195869a1fe56Smrg# It will attempt to locate the tool and use appropriate options. 195969a1fe56Smrg# There are various lint type tools on different platforms. 196069a1fe56Smrg# 196169a1fe56Smrg# Interface to module: 196269a1fe56Smrg# LINT: returns the path to the tool found on the platform 196369a1fe56Smrg# or the value set to LINT on the configure cmd line 196469a1fe56Smrg# also an Automake conditional 196569a1fe56Smrg# LINT_FLAGS: an Automake variable with appropriate flags 196669a1fe56Smrg# 196769a1fe56Smrg# --with-lint: 'yes' user instructs the module to use lint 196869a1fe56Smrg# 'no' user instructs the module not to use lint (default) 196969a1fe56Smrg# 197069a1fe56Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 197169a1fe56Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 197270f7c90cSmrg# 197370f7c90cSmrgAC_DEFUN([XORG_WITH_LINT],[ 197470f7c90cSmrg 197569a1fe56SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 197669a1fe56SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 197770f7c90cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 197870f7c90cSmrg [Use a lint-style source code checker (default: disabled)])], 197970f7c90cSmrg [use_lint=$withval], [use_lint=no]) 198069a1fe56Smrg 198169a1fe56Smrg# Obtain platform specific info like program name and options 198269a1fe56Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 198369a1fe56Smrgcase $host_os in 198469a1fe56Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 198569a1fe56Smrg lint_name=splint 198669a1fe56Smrg lint_options="-badflag" 198769a1fe56Smrg ;; 198869a1fe56Smrg *freebsd* | *netbsd*) 198969a1fe56Smrg lint_name=lint 199069a1fe56Smrg lint_options="-u -b" 199169a1fe56Smrg ;; 199269a1fe56Smrg *solaris*) 199369a1fe56Smrg lint_name=lint 199469a1fe56Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 199569a1fe56Smrg ;; 199669a1fe56Smrgesac 199769a1fe56Smrg 199869a1fe56Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 199969a1fe56Smrgif test "x$use_lint" = x"yes" ; then 200069a1fe56Smrg AC_PATH_PROG([LINT], [$lint_name]) 200169a1fe56Smrg if test "x$LINT" = "x"; then 200269a1fe56Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 200369a1fe56Smrg fi 200469a1fe56Smrgelif test "x$use_lint" = x"no" ; then 200569a1fe56Smrg if test "x$LINT" != "x"; then 200669a1fe56Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 200769a1fe56Smrg fi 200870f7c90cSmrgelse 200969a1fe56Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 201070f7c90cSmrgfi 201169a1fe56Smrg 201269a1fe56Smrg# User supplied flags override default flags 201369a1fe56Smrgif test "x$LINT_FLAGS" != "x"; then 201469a1fe56Smrg lint_options=$LINT_FLAGS 201570f7c90cSmrgfi 201670f7c90cSmrg 201769a1fe56SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 201869a1fe56SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 201970f7c90cSmrg 202070f7c90cSmrg]) # XORG_WITH_LINT 202170f7c90cSmrg 202270f7c90cSmrg# XORG_LINT_LIBRARY(LIBNAME) 202370f7c90cSmrg# -------------------------- 202470f7c90cSmrg# Minimum version: 1.1.0 202570f7c90cSmrg# 202670f7c90cSmrg# Sets up flags for building lint libraries for checking programs that call 202770f7c90cSmrg# functions in the library. 202870f7c90cSmrg# 202969a1fe56Smrg# Interface to module: 203069a1fe56Smrg# LINTLIB - Automake variable with the name of lint library file to make 203169a1fe56Smrg# MAKE_LINT_LIB - Automake conditional 203269a1fe56Smrg# 203369a1fe56Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 203469a1fe56Smrg# - 'no' user instructs the module not to create a lint library (default) 203570f7c90cSmrg 203670f7c90cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 203770f7c90cSmrgAC_REQUIRE([XORG_WITH_LINT]) 203870f7c90cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 203970f7c90cSmrg [Create lint library (default: disabled)])], 204070f7c90cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 204169a1fe56Smrg 204269a1fe56Smrgif test "x$make_lint_lib" = x"yes" ; then 204369a1fe56Smrg LINTLIB=llib-l$1.ln 204469a1fe56Smrg if test "x$LINT" = "x"; then 204569a1fe56Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 204669a1fe56Smrg fi 204769a1fe56Smrgelif test "x$make_lint_lib" != x"no" ; then 204869a1fe56Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 204970f7c90cSmrgfi 205069a1fe56Smrg 205170f7c90cSmrgAC_SUBST(LINTLIB) 205270f7c90cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 205370f7c90cSmrg 205470f7c90cSmrg]) # XORG_LINT_LIBRARY 205570f7c90cSmrg 205670f7c90cSmrg# XORG_CWARNFLAGS 205770f7c90cSmrg# --------------- 205870f7c90cSmrg# Minimum version: 1.2.0 205970f7c90cSmrg# 206070f7c90cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 206170f7c90cSmrg# 206270f7c90cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 206369a1fe56SmrgAC_REQUIRE([AC_PROG_CC_C99]) 206470f7c90cSmrgif test "x$GCC" = xyes ; then 206570f7c90cSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 206670f7c90cSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 20677dff02feSmrg-Wbad-function-cast -Wformat=2" 206870f7c90cSmrg case `$CC -dumpversion` in 206970f7c90cSmrg 3.4.* | 4.*) 207070f7c90cSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 207170f7c90cSmrg ;; 207270f7c90cSmrg esac 207370f7c90cSmrgelse 207470f7c90cSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 207570f7c90cSmrg if test "x$SUNCC" = "xyes"; then 207670f7c90cSmrg CWARNFLAGS="-v" 207770f7c90cSmrg fi 207870f7c90cSmrgfi 207970f7c90cSmrgAC_SUBST(CWARNFLAGS) 208070f7c90cSmrg]) # XORG_CWARNFLAGS 208170f7c90cSmrg 208270f7c90cSmrg# XORG_STRICT_OPTION 208370f7c90cSmrg# ----------------------- 208470f7c90cSmrg# Minimum version: 1.3.0 208570f7c90cSmrg# 208670f7c90cSmrg# Add configure option to enable strict compilation 208770f7c90cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 208869a1fe56Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 208970f7c90cSmrgAC_REQUIRE([AC_PROG_CC_C99]) 209070f7c90cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 209170f7c90cSmrg 209270f7c90cSmrgAC_ARG_ENABLE(strict-compilation, 209370f7c90cSmrg AS_HELP_STRING([--enable-strict-compilation], 209470f7c90cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 209570f7c90cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 209670f7c90cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 209770f7c90cSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 209870f7c90cSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 209970f7c90cSmrg if test "x$GCC" = xyes ; then 210070f7c90cSmrg STRICT_CFLAGS="-pedantic -Werror" 210170f7c90cSmrg elif test "x$SUNCC" = "xyes"; then 210270f7c90cSmrg STRICT_CFLAGS="-errwarn" 210370f7c90cSmrg elif test "x$INTELCC" = "xyes"; then 210470f7c90cSmrg STRICT_CFLAGS="-Werror" 210570f7c90cSmrg fi 210670f7c90cSmrgfi 210770f7c90cSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 210870f7c90cSmrgAC_SUBST([CWARNFLAGS]) 210970f7c90cSmrg]) # XORG_STRICT_OPTION 211070f7c90cSmrg 211170f7c90cSmrg# XORG_DEFAULT_OPTIONS 211270f7c90cSmrg# -------------------- 211370f7c90cSmrg# Minimum version: 1.3.0 211470f7c90cSmrg# 211570f7c90cSmrg# Defines default options for X.Org modules. 211670f7c90cSmrg# 211770f7c90cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 211869a1fe56SmrgAC_REQUIRE([AC_PROG_INSTALL]) 211970f7c90cSmrgXORG_CWARNFLAGS 212070f7c90cSmrgXORG_STRICT_OPTION 212170f7c90cSmrgXORG_RELEASE_VERSION 212270f7c90cSmrgXORG_CHANGELOG 21237dff02feSmrgXORG_INSTALL 212470f7c90cSmrgXORG_MANPAGE_SECTIONS 21257dff02feSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 21267dff02feSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 212770f7c90cSmrg]) # XORG_DEFAULT_OPTIONS 21287dff02feSmrg 21297dff02feSmrg# XORG_INSTALL() 21307dff02feSmrg# ---------------- 21317dff02feSmrg# Minimum version: 1.4.0 21327dff02feSmrg# 21337dff02feSmrg# Defines the variable INSTALL_CMD as the command to copy 21347dff02feSmrg# INSTALL from $prefix/share/util-macros. 21357dff02feSmrg# 21367dff02feSmrgAC_DEFUN([XORG_INSTALL], [ 21377dff02feSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 21387dff02feSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 21397dff02feSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 21407dff02feSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 21417dff02feSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 21427dff02feSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 21437dff02feSmrgAC_SUBST([INSTALL_CMD]) 21447dff02feSmrg]) # XORG_INSTALL 2145a850946eSmrgdnl Copyright 2005 Red Hat, Inc 2146a850946eSmrgdnl 2147a850946eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2148a850946eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2149a850946eSmrgdnl the above copyright notice appear in all copies and that both that 2150a850946eSmrgdnl copyright notice and this permission notice appear in supporting 2151a850946eSmrgdnl documentation. 2152a850946eSmrgdnl 2153a850946eSmrgdnl The above copyright notice and this permission notice shall be included 2154a850946eSmrgdnl in all copies or substantial portions of the Software. 2155a850946eSmrgdnl 2156a850946eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2157a850946eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2158a850946eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2159a850946eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2160a850946eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2161a850946eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2162a850946eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2163a850946eSmrgdnl 2164a850946eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2165a850946eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2166a850946eSmrgdnl other dealings in this Software without prior written authorization 2167a850946eSmrgdnl from the copyright holders. 2168a850946eSmrgdnl 2169a850946eSmrg 2170a850946eSmrg# XORG_RELEASE_VERSION 2171a850946eSmrg# -------------------- 217269a1fe56Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2173a850946eSmrg 2174a850946eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 217570f7c90cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 217670f7c90cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 217770f7c90cSmrg [Major version of this package]) 217870f7c90cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 217970f7c90cSmrg if test "x$PVM" = "x"; then 218070f7c90cSmrg PVM="0" 218170f7c90cSmrg fi 218270f7c90cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 218370f7c90cSmrg [$PVM], 218470f7c90cSmrg [Minor version of this package]) 218570f7c90cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 218670f7c90cSmrg if test "x$PVP" = "x"; then 218770f7c90cSmrg PVP="0" 218870f7c90cSmrg fi 218970f7c90cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 219070f7c90cSmrg [$PVP], 219170f7c90cSmrg [Patch version of this package]) 2192a850946eSmrg]) 2193a850946eSmrg 219470f7c90cSmrg# XORG_CHANGELOG() 219570f7c90cSmrg# ---------------- 219670f7c90cSmrg# Minimum version: 1.2.0 219770f7c90cSmrg# 219870f7c90cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 219970f7c90cSmrg# ChangeLog from git. 220070f7c90cSmrg# 220170f7c90cSmrg# 220270f7c90cSmrgAC_DEFUN([XORG_CHANGELOG], [ 22037dff02feSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 22047dff02feSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 22057dff02feSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 220670f7c90cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 220770f7c90cSmrgAC_SUBST([CHANGELOG_CMD]) 220870f7c90cSmrg]) # XORG_CHANGELOG 220970f7c90cSmrg 221070f7c90cSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 221170f7c90cSmrg# 221270f7c90cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 221370f7c90cSmrg# 221470f7c90cSmrg# This program is free software; you can redistribute it and/or modify 221570f7c90cSmrg# it under the terms of the GNU General Public License as published by 221670f7c90cSmrg# the Free Software Foundation; either version 2 of the License, or 221770f7c90cSmrg# (at your option) any later version. 221870f7c90cSmrg# 221970f7c90cSmrg# This program is distributed in the hope that it will be useful, but 222070f7c90cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 222170f7c90cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 222270f7c90cSmrg# General Public License for more details. 222370f7c90cSmrg# 222470f7c90cSmrg# You should have received a copy of the GNU General Public License 222570f7c90cSmrg# along with this program; if not, write to the Free Software 222670f7c90cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 222770f7c90cSmrg# 222870f7c90cSmrg# As a special exception to the GNU General Public License, if you 222970f7c90cSmrg# distribute this file as part of a program that contains a 223070f7c90cSmrg# configuration script generated by Autoconf, you may include it under 223170f7c90cSmrg# the same distribution terms that you use for the rest of that program. 223270f7c90cSmrg 223370f7c90cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 223470f7c90cSmrg# ---------------------------------- 223570f7c90cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 223670f7c90cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 223770f7c90cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 223870f7c90cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 223970f7c90cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 224070f7c90cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 224170f7c90cSmrgfi 224270f7c90cSmrgif test -n "$PKG_CONFIG"; then 224370f7c90cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 224470f7c90cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 224570f7c90cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 224670f7c90cSmrg AC_MSG_RESULT([yes]) 224770f7c90cSmrg else 224870f7c90cSmrg AC_MSG_RESULT([no]) 224970f7c90cSmrg PKG_CONFIG="" 225070f7c90cSmrg fi 225170f7c90cSmrg 225270f7c90cSmrgfi[]dnl 225370f7c90cSmrg])# PKG_PROG_PKG_CONFIG 225470f7c90cSmrg 225570f7c90cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 225670f7c90cSmrg# 225770f7c90cSmrg# Check to see whether a particular set of modules exists. Similar 225870f7c90cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 225970f7c90cSmrg# 226070f7c90cSmrg# 226170f7c90cSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 226270f7c90cSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 226370f7c90cSmrg# PKG_CHECK_EXISTS manually 226470f7c90cSmrg# -------------------------------------------------------------- 226570f7c90cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 226670f7c90cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 226770f7c90cSmrgif test -n "$PKG_CONFIG" && \ 226870f7c90cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 226970f7c90cSmrg m4_ifval([$2], [$2], [:]) 227070f7c90cSmrgm4_ifvaln([$3], [else 227170f7c90cSmrg $3])dnl 227270f7c90cSmrgfi]) 227370f7c90cSmrg 227470f7c90cSmrg 227570f7c90cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 227670f7c90cSmrg# --------------------------------------------- 227770f7c90cSmrgm4_define([_PKG_CONFIG], 227870f7c90cSmrg[if test -n "$$1"; then 227970f7c90cSmrg pkg_cv_[]$1="$$1" 228070f7c90cSmrg elif test -n "$PKG_CONFIG"; then 228170f7c90cSmrg PKG_CHECK_EXISTS([$3], 228270f7c90cSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 228370f7c90cSmrg [pkg_failed=yes]) 228470f7c90cSmrg else 228570f7c90cSmrg pkg_failed=untried 228670f7c90cSmrgfi[]dnl 228770f7c90cSmrg])# _PKG_CONFIG 228870f7c90cSmrg 228970f7c90cSmrg# _PKG_SHORT_ERRORS_SUPPORTED 229070f7c90cSmrg# ----------------------------- 229170f7c90cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 229270f7c90cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 229370f7c90cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 229470f7c90cSmrg _pkg_short_errors_supported=yes 229570f7c90cSmrgelse 229670f7c90cSmrg _pkg_short_errors_supported=no 229770f7c90cSmrgfi[]dnl 229870f7c90cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 229970f7c90cSmrg 230070f7c90cSmrg 230170f7c90cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 230270f7c90cSmrg# [ACTION-IF-NOT-FOUND]) 230370f7c90cSmrg# 230470f7c90cSmrg# 230570f7c90cSmrg# Note that if there is a possibility the first call to 230670f7c90cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 230770f7c90cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 230870f7c90cSmrg# 230970f7c90cSmrg# 231070f7c90cSmrg# -------------------------------------------------------------- 231170f7c90cSmrgAC_DEFUN([PKG_CHECK_MODULES], 231270f7c90cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 231370f7c90cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 231470f7c90cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 231570f7c90cSmrg 231670f7c90cSmrgpkg_failed=no 231770f7c90cSmrgAC_MSG_CHECKING([for $1]) 231870f7c90cSmrg 231970f7c90cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 232070f7c90cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 232170f7c90cSmrg 232270f7c90cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 232370f7c90cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 232470f7c90cSmrgSee the pkg-config man page for more details.]) 232570f7c90cSmrg 232670f7c90cSmrgif test $pkg_failed = yes; then 232770f7c90cSmrg _PKG_SHORT_ERRORS_SUPPORTED 232870f7c90cSmrg if test $_pkg_short_errors_supported = yes; then 232970f7c90cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 233070f7c90cSmrg else 233170f7c90cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 233270f7c90cSmrg fi 233370f7c90cSmrg # Put the nasty error message in config.log where it belongs 233470f7c90cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 233570f7c90cSmrg 233670f7c90cSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 233770f7c90cSmrg[Package requirements ($2) were not met: 233870f7c90cSmrg 233970f7c90cSmrg$$1_PKG_ERRORS 234070f7c90cSmrg 234170f7c90cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 234270f7c90cSmrginstalled software in a non-standard prefix. 234370f7c90cSmrg 234470f7c90cSmrg_PKG_TEXT 234570f7c90cSmrg])], 234670f7c90cSmrg [AC_MSG_RESULT([no]) 234770f7c90cSmrg $4]) 234870f7c90cSmrgelif test $pkg_failed = untried; then 234970f7c90cSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 235070f7c90cSmrg[The pkg-config script could not be found or is too old. Make sure it 235170f7c90cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 235270f7c90cSmrgpath to pkg-config. 235370f7c90cSmrg 235470f7c90cSmrg_PKG_TEXT 235570f7c90cSmrg 235670f7c90cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 235770f7c90cSmrg [$4]) 235870f7c90cSmrgelse 235970f7c90cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 236070f7c90cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 236170f7c90cSmrg AC_MSG_RESULT([yes]) 236270f7c90cSmrg ifelse([$3], , :, [$3]) 236370f7c90cSmrgfi[]dnl 236470f7c90cSmrg])# PKG_CHECK_MODULES 236570f7c90cSmrg 2366