aclocal.m4 revision 32034fa5
132034fa5Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 24ecf19b2Smrg 332034fa5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 432034fa5Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 54ecf19b2Smrg# This file is free software; the Free Software Foundation 64ecf19b2Smrg# gives unlimited permission to copy and/or distribute it, 74ecf19b2Smrg# with or without modifications, as long as this notice is preserved. 84ecf19b2Smrg 94ecf19b2Smrg# This program is distributed in the hope that it will be useful, 104ecf19b2Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114ecf19b2Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124ecf19b2Smrg# PARTICULAR PURPOSE. 134ecf19b2Smrg 1432034fa5Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1532034fa5Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1632034fa5Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1732034fa5Smrg[m4_warning([this file was generated for autoconf 2.63. 1832034fa5SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1932034fa5SmrgIf you have problems, you may need to regenerate the build system entirely. 2032034fa5SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214ecf19b2Smrg 2232034fa5Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2332034fa5Smrg# 2432034fa5Smrg# This file is free software; the Free Software Foundation 2532034fa5Smrg# gives unlimited permission to copy and/or distribute it, 2632034fa5Smrg# with or without modifications, as long as this notice is preserved. 274ecf19b2Smrg 284ecf19b2Smrg# AM_AUTOMAKE_VERSION(VERSION) 294ecf19b2Smrg# ---------------------------- 304ecf19b2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 314ecf19b2Smrg# generated from the m4 files accompanying Automake X.Y. 3232034fa5Smrg# (This private macro should not be called outside this file.) 3332034fa5SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3432034fa5Smrg[am__api_version='1.11' 3532034fa5Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3632034fa5Smrgdnl require some minimum version. Point them to the right macro. 3732034fa5Smrgm4_if([$1], [1.11], [], 3832034fa5Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3932034fa5Smrg]) 4032034fa5Smrg 4132034fa5Smrg# _AM_AUTOCONF_VERSION(VERSION) 4232034fa5Smrg# ----------------------------- 4332034fa5Smrg# aclocal traces this macro to find the Autoconf version. 4432034fa5Smrg# This is a private macro too. Using m4_define simplifies 4532034fa5Smrg# the logic in aclocal, which can simply ignore this definition. 4632034fa5Smrgm4_define([_AM_AUTOCONF_VERSION], []) 474ecf19b2Smrg 484ecf19b2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 494ecf19b2Smrg# ------------------------------- 5032034fa5Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5132034fa5Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 524ecf19b2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5332034fa5Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 5432034fa5Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5532034fa5Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5632034fa5Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 574ecf19b2Smrg 5832034fa5Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 594ecf19b2Smrg 6032034fa5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 614ecf19b2Smrg# 6232034fa5Smrg# This file is free software; the Free Software Foundation 6332034fa5Smrg# gives unlimited permission to copy and/or distribute it, 6432034fa5Smrg# with or without modifications, as long as this notice is preserved. 654ecf19b2Smrg 664ecf19b2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 674ecf19b2Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 684ecf19b2Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 694ecf19b2Smrg# 704ecf19b2Smrg# Of course, Automake must honor this variable whenever it calls a 714ecf19b2Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 724ecf19b2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 734ecf19b2Smrg# depending on how configure is run. This is pretty annoying, since 744ecf19b2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 754ecf19b2Smrg# source directory, any form will work fine, but in subdirectories a 764ecf19b2Smrg# relative path needs to be adjusted first. 774ecf19b2Smrg# 784ecf19b2Smrg# $ac_aux_dir/missing 794ecf19b2Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 804ecf19b2Smrg# $top_srcdir/$ac_aux_dir/missing 814ecf19b2Smrg# fails if $ac_aux_dir is absolute, 824ecf19b2Smrg# fails when called from a subdirectory in a VPATH build with 834ecf19b2Smrg# a relative $ac_aux_dir 844ecf19b2Smrg# 854ecf19b2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 864ecf19b2Smrg# are both prefixed by $srcdir. In an in-source build this is usually 874ecf19b2Smrg# harmless because $srcdir is `.', but things will broke when you 884ecf19b2Smrg# start a VPATH build or use an absolute $srcdir. 894ecf19b2Smrg# 904ecf19b2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 914ecf19b2Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 924ecf19b2Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 934ecf19b2Smrg# and then we would define $MISSING as 944ecf19b2Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 954ecf19b2Smrg# This will work as long as MISSING is not called from configure, because 964ecf19b2Smrg# unfortunately $(top_srcdir) has no meaning in configure. 974ecf19b2Smrg# However there are other variables, like CC, which are often used in 984ecf19b2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 994ecf19b2Smrg# 1004ecf19b2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1014ecf19b2Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1024ecf19b2Smrg# configured tree to be moved without reconfiguration. 1034ecf19b2Smrg 10432034fa5SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10532034fa5Smrg[dnl Rely on autoconf to set up CDPATH properly. 10632034fa5SmrgAC_PREREQ([2.50])dnl 1074ecf19b2Smrg# expand $ac_aux_dir to an absolute path 1084ecf19b2Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1094ecf19b2Smrg]) 1104ecf19b2Smrg 11132034fa5Smrg# AM_CONDITIONAL -*- Autoconf -*- 1124ecf19b2Smrg 11332034fa5Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11432034fa5Smrg# Free Software Foundation, Inc. 11532034fa5Smrg# 11632034fa5Smrg# This file is free software; the Free Software Foundation 11732034fa5Smrg# gives unlimited permission to copy and/or distribute it, 11832034fa5Smrg# with or without modifications, as long as this notice is preserved. 1194ecf19b2Smrg 12032034fa5Smrg# serial 9 1214ecf19b2Smrg 12232034fa5Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12332034fa5Smrg# ------------------------------------- 12432034fa5Smrg# Define a conditional. 12532034fa5SmrgAC_DEFUN([AM_CONDITIONAL], 12632034fa5Smrg[AC_PREREQ(2.52)dnl 12732034fa5Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12832034fa5Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12932034fa5SmrgAC_SUBST([$1_TRUE])dnl 13032034fa5SmrgAC_SUBST([$1_FALSE])dnl 13132034fa5Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13232034fa5Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13332034fa5Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13432034fa5Smrgif $2; then 13532034fa5Smrg $1_TRUE= 13632034fa5Smrg $1_FALSE='#' 1374ecf19b2Smrgelse 13832034fa5Smrg $1_TRUE='#' 13932034fa5Smrg $1_FALSE= 1404ecf19b2Smrgfi 14132034fa5SmrgAC_CONFIG_COMMANDS_PRE( 14232034fa5Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14332034fa5Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14432034fa5SmrgUsually this means the macro was only invoked conditionally.]]) 14532034fa5Smrgfi])]) 1464ecf19b2Smrg 14732034fa5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14832034fa5Smrg# Free Software Foundation, Inc. 14932034fa5Smrg# 15032034fa5Smrg# This file is free software; the Free Software Foundation 15132034fa5Smrg# gives unlimited permission to copy and/or distribute it, 15232034fa5Smrg# with or without modifications, as long as this notice is preserved. 1534ecf19b2Smrg 15432034fa5Smrg# serial 10 1554ecf19b2Smrg 1564ecf19b2Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1574ecf19b2Smrg# written in clear, in which case automake, when reading aclocal.m4, 1584ecf19b2Smrg# will think it sees a *use*, and therefore will trigger all it's 1594ecf19b2Smrg# C support machinery. Also note that it means that autoscan, seeing 1604ecf19b2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1614ecf19b2Smrg 1624ecf19b2Smrg 1634ecf19b2Smrg# _AM_DEPENDENCIES(NAME) 1644ecf19b2Smrg# ---------------------- 1654ecf19b2Smrg# See how the compiler implements dependency checking. 1664ecf19b2Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1674ecf19b2Smrg# We try a few techniques and use that to set a single cache variable. 1684ecf19b2Smrg# 1694ecf19b2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1704ecf19b2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1714ecf19b2Smrg# dependency, and given that the user is not expected to run this macro, 1724ecf19b2Smrg# just rely on AC_PROG_CC. 1734ecf19b2SmrgAC_DEFUN([_AM_DEPENDENCIES], 1744ecf19b2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1754ecf19b2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1764ecf19b2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1774ecf19b2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1784ecf19b2Smrg 1794ecf19b2Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1804ecf19b2Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1814ecf19b2Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18232034fa5Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1834ecf19b2Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1844ecf19b2Smrg [depcc="$$1" am_compiler_list=]) 1854ecf19b2Smrg 1864ecf19b2SmrgAC_CACHE_CHECK([dependency style of $depcc], 1874ecf19b2Smrg [am_cv_$1_dependencies_compiler_type], 1884ecf19b2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1894ecf19b2Smrg # We make a subdir and do the tests there. Otherwise we can end up 1904ecf19b2Smrg # making bogus files that we don't know about and never remove. For 1914ecf19b2Smrg # instance it was reported that on HP-UX the gcc test will end up 1924ecf19b2Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1934ecf19b2Smrg # in D'. 1944ecf19b2Smrg mkdir conftest.dir 1954ecf19b2Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1964ecf19b2Smrg # using a relative directory. 1974ecf19b2Smrg cp "$am_depcomp" conftest.dir 1984ecf19b2Smrg cd conftest.dir 1994ecf19b2Smrg # We will build objects and dependencies in a subdirectory because 2004ecf19b2Smrg # it helps to detect inapplicable dependency modes. For instance 2014ecf19b2Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 2024ecf19b2Smrg # side effect of compilation, but ICC will put the dependencies in 2034ecf19b2Smrg # the current directory while Tru64 will put them in the object 2044ecf19b2Smrg # directory. 2054ecf19b2Smrg mkdir sub 2064ecf19b2Smrg 2074ecf19b2Smrg am_cv_$1_dependencies_compiler_type=none 2084ecf19b2Smrg if test "$am_compiler_list" = ""; then 2094ecf19b2Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2104ecf19b2Smrg fi 21132034fa5Smrg am__universal=false 21232034fa5Smrg m4_case([$1], [CC], 21332034fa5Smrg [case " $depcc " in #( 21432034fa5Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21532034fa5Smrg esac], 21632034fa5Smrg [CXX], 21732034fa5Smrg [case " $depcc " in #( 21832034fa5Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21932034fa5Smrg esac]) 22032034fa5Smrg 2214ecf19b2Smrg for depmode in $am_compiler_list; do 2224ecf19b2Smrg # Setup a source with many dependencies, because some compilers 2234ecf19b2Smrg # like to wrap large dependency lists on column 80 (with \), and 2244ecf19b2Smrg # we should not choose a depcomp mode which is confused by this. 2254ecf19b2Smrg # 2264ecf19b2Smrg # We need to recreate these files for each test, as the compiler may 2274ecf19b2Smrg # overwrite some of them when testing with obscure command lines. 2284ecf19b2Smrg # This happens at least with the AIX C compiler. 2294ecf19b2Smrg : > sub/conftest.c 2304ecf19b2Smrg for i in 1 2 3 4 5 6; do 2314ecf19b2Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23232034fa5Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23332034fa5Smrg # Solaris 8's {/usr,}/bin/sh. 23432034fa5Smrg touch sub/conftst$i.h 2354ecf19b2Smrg done 2364ecf19b2Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2374ecf19b2Smrg 23832034fa5Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23932034fa5Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24032034fa5Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24132034fa5Smrg # versions had trouble with output in subdirs 24232034fa5Smrg am__obj=sub/conftest.${OBJEXT-o} 24332034fa5Smrg am__minus_obj="-o $am__obj" 2444ecf19b2Smrg case $depmode in 24532034fa5Smrg gcc) 24632034fa5Smrg # This depmode causes a compiler race in universal mode. 24732034fa5Smrg test "$am__universal" = false || continue 24832034fa5Smrg ;; 2494ecf19b2Smrg nosideeffect) 2504ecf19b2Smrg # after this tag, mechanisms are not by side-effect, so they'll 2514ecf19b2Smrg # only be used when explicitly requested 2524ecf19b2Smrg if test "x$enable_dependency_tracking" = xyes; then 2534ecf19b2Smrg continue 2544ecf19b2Smrg else 2554ecf19b2Smrg break 2564ecf19b2Smrg fi 2574ecf19b2Smrg ;; 25832034fa5Smrg msvisualcpp | msvcmsys) 25932034fa5Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26032034fa5Smrg # not run yet. These depmodes are late enough in the game, and 26132034fa5Smrg # so weak that their functioning should not be impacted. 26232034fa5Smrg am__obj=conftest.${OBJEXT-o} 26332034fa5Smrg am__minus_obj= 26432034fa5Smrg ;; 2654ecf19b2Smrg none) break ;; 2664ecf19b2Smrg esac 2674ecf19b2Smrg if depmode=$depmode \ 26832034fa5Smrg source=sub/conftest.c object=$am__obj \ 2694ecf19b2Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27032034fa5Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2714ecf19b2Smrg >/dev/null 2>conftest.err && 27232034fa5Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2734ecf19b2Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27432034fa5Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2754ecf19b2Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2764ecf19b2Smrg # icc doesn't choke on unknown options, it will just issue warnings 27732034fa5Smrg # or remarks (even with -Werror). So we grep stderr for any message 27832034fa5Smrg # that says an option was ignored or not supported. 27932034fa5Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28032034fa5Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28132034fa5Smrg # The diagnosis changed in icc 8.0: 28232034fa5Smrg # icc: Command line remark: option '-MP' not supported 28332034fa5Smrg if (grep 'ignoring option' conftest.err || 28432034fa5Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2854ecf19b2Smrg am_cv_$1_dependencies_compiler_type=$depmode 2864ecf19b2Smrg break 2874ecf19b2Smrg fi 2884ecf19b2Smrg fi 2894ecf19b2Smrg done 2904ecf19b2Smrg 2914ecf19b2Smrg cd .. 2924ecf19b2Smrg rm -rf conftest.dir 2934ecf19b2Smrgelse 2944ecf19b2Smrg am_cv_$1_dependencies_compiler_type=none 2954ecf19b2Smrgfi 2964ecf19b2Smrg]) 2974ecf19b2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2984ecf19b2SmrgAM_CONDITIONAL([am__fastdep$1], [ 2994ecf19b2Smrg test "x$enable_dependency_tracking" != xno \ 3004ecf19b2Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3014ecf19b2Smrg]) 3024ecf19b2Smrg 3034ecf19b2Smrg 3044ecf19b2Smrg# AM_SET_DEPDIR 3054ecf19b2Smrg# ------------- 3064ecf19b2Smrg# Choose a directory name for dependency files. 3074ecf19b2Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 3084ecf19b2SmrgAC_DEFUN([AM_SET_DEPDIR], 3094ecf19b2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3104ecf19b2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3114ecf19b2Smrg]) 3124ecf19b2Smrg 3134ecf19b2Smrg 3144ecf19b2Smrg# AM_DEP_TRACK 3154ecf19b2Smrg# ------------ 3164ecf19b2SmrgAC_DEFUN([AM_DEP_TRACK], 3174ecf19b2Smrg[AC_ARG_ENABLE(dependency-tracking, 31832034fa5Smrg[ --disable-dependency-tracking speeds up one-time build 31932034fa5Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 3204ecf19b2Smrgif test "x$enable_dependency_tracking" != xno; then 3214ecf19b2Smrg am_depcomp="$ac_aux_dir/depcomp" 3224ecf19b2Smrg AMDEPBACKSLASH='\' 3234ecf19b2Smrgfi 3244ecf19b2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32532034fa5SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32632034fa5Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3274ecf19b2Smrg]) 3284ecf19b2Smrg 32932034fa5Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3304ecf19b2Smrg 33132034fa5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33232034fa5Smrg# Free Software Foundation, Inc. 33332034fa5Smrg# 33432034fa5Smrg# This file is free software; the Free Software Foundation 33532034fa5Smrg# gives unlimited permission to copy and/or distribute it, 33632034fa5Smrg# with or without modifications, as long as this notice is preserved. 3374ecf19b2Smrg 33832034fa5Smrg#serial 5 3394ecf19b2Smrg 3404ecf19b2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3414ecf19b2Smrg# ------------------------------ 3424ecf19b2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34332034fa5Smrg[{ 34432034fa5Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34532034fa5Smrg # are listed without --file. Let's play safe and only enable the eval 34632034fa5Smrg # if we detect the quoting. 34732034fa5Smrg case $CONFIG_FILES in 34832034fa5Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34932034fa5Smrg *) set x $CONFIG_FILES ;; 35032034fa5Smrg esac 35132034fa5Smrg shift 35232034fa5Smrg for mf 35332034fa5Smrg do 35432034fa5Smrg # Strip MF so we end up with the name of the file. 35532034fa5Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35632034fa5Smrg # Check whether this is an Automake generated Makefile or not. 35732034fa5Smrg # We used to match only the files named `Makefile.in', but 35832034fa5Smrg # some people rename them; so instead we look at the file content. 35932034fa5Smrg # Grep'ing the first line is not enough: some people post-process 36032034fa5Smrg # each Makefile.in and add a new line on top of each file to say so. 36132034fa5Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36232034fa5Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36332034fa5Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36432034fa5Smrg dirpart=`AS_DIRNAME("$mf")` 36532034fa5Smrg else 36632034fa5Smrg continue 36732034fa5Smrg fi 36832034fa5Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36932034fa5Smrg # from the Makefile without running `make'. 37032034fa5Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37132034fa5Smrg test -z "$DEPDIR" && continue 37232034fa5Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37332034fa5Smrg test -z "am__include" && continue 37432034fa5Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37532034fa5Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37632034fa5Smrg U=`sed -n 's/^U = //p' < "$mf"` 37732034fa5Smrg # Find all dependency output files, they are included files with 37832034fa5Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37932034fa5Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38032034fa5Smrg # expansion. 38132034fa5Smrg for file in `sed -n " 38232034fa5Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38332034fa5Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38432034fa5Smrg # Make sure the directory exists. 38532034fa5Smrg test -f "$dirpart/$file" && continue 38632034fa5Smrg fdir=`AS_DIRNAME(["$file"])` 38732034fa5Smrg AS_MKDIR_P([$dirpart/$fdir]) 38832034fa5Smrg # echo "creating $dirpart/$file" 38932034fa5Smrg echo '# dummy' > "$dirpart/$file" 39032034fa5Smrg done 3914ecf19b2Smrg done 39232034fa5Smrg} 3934ecf19b2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3944ecf19b2Smrg 3954ecf19b2Smrg 3964ecf19b2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3974ecf19b2Smrg# ----------------------------- 3984ecf19b2Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3994ecf19b2Smrg# 4004ecf19b2Smrg# This code is only required when automatic dependency tracking 4014ecf19b2Smrg# is enabled. FIXME. This creates each `.P' file that we will 4024ecf19b2Smrg# need in order to bootstrap the dependency handling code. 4034ecf19b2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4044ecf19b2Smrg[AC_CONFIG_COMMANDS([depfiles], 4054ecf19b2Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4064ecf19b2Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4074ecf19b2Smrg]) 4084ecf19b2Smrg 40932034fa5Smrg# Do all the work for Automake. -*- Autoconf -*- 41032034fa5Smrg 41132034fa5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 41232034fa5Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 41332034fa5Smrg# 41432034fa5Smrg# This file is free software; the Free Software Foundation 41532034fa5Smrg# gives unlimited permission to copy and/or distribute it, 41632034fa5Smrg# with or without modifications, as long as this notice is preserved. 41732034fa5Smrg 41832034fa5Smrg# serial 16 41932034fa5Smrg 42032034fa5Smrg# This macro actually does too much. Some checks are only needed if 42132034fa5Smrg# your package does certain things. But this isn't really a big deal. 42232034fa5Smrg 42332034fa5Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42432034fa5Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42532034fa5Smrg# ----------------------------------------------- 42632034fa5Smrg# The call with PACKAGE and VERSION arguments is the old style 42732034fa5Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42832034fa5Smrg# and VERSION should now be passed to AC_INIT and removed from 42932034fa5Smrg# the call to AM_INIT_AUTOMAKE. 43032034fa5Smrg# We support both call styles for the transition. After 43132034fa5Smrg# the next Automake release, Autoconf can make the AC_INIT 43232034fa5Smrg# arguments mandatory, and then we can depend on a new Autoconf 43332034fa5Smrg# release and drop the old call support. 43432034fa5SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43532034fa5Smrg[AC_PREREQ([2.62])dnl 43632034fa5Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43732034fa5Smrgdnl the ones we care about. 43832034fa5Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43932034fa5SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44032034fa5SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44132034fa5Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44232034fa5Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44332034fa5Smrg # is not polluted with repeated "-I." 44432034fa5Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44532034fa5Smrg # test to see if srcdir already configured 44632034fa5Smrg if test -f $srcdir/config.status; then 44732034fa5Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44832034fa5Smrg fi 44932034fa5Smrgfi 45032034fa5Smrg 45132034fa5Smrg# test whether we have cygpath 45232034fa5Smrgif test -z "$CYGPATH_W"; then 45332034fa5Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45432034fa5Smrg CYGPATH_W='cygpath -w' 45532034fa5Smrg else 45632034fa5Smrg CYGPATH_W=echo 45732034fa5Smrg fi 45832034fa5Smrgfi 45932034fa5SmrgAC_SUBST([CYGPATH_W]) 46032034fa5Smrg 46132034fa5Smrg# Define the identity of the package. 46232034fa5Smrgdnl Distinguish between old-style and new-style calls. 46332034fa5Smrgm4_ifval([$2], 46432034fa5Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46532034fa5Smrg AC_SUBST([PACKAGE], [$1])dnl 46632034fa5Smrg AC_SUBST([VERSION], [$2])], 46732034fa5Smrg[_AM_SET_OPTIONS([$1])dnl 46832034fa5Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46932034fa5Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 47032034fa5Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47132034fa5Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47232034fa5Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 47332034fa5Smrg 47432034fa5Smrg_AM_IF_OPTION([no-define],, 47532034fa5Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 47632034fa5Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 47732034fa5Smrg 47832034fa5Smrg# Some tools Automake needs. 47932034fa5SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48032034fa5SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48132034fa5SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 48232034fa5SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 48332034fa5SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 48432034fa5SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 48532034fa5SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 48632034fa5SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48732034fa5SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 48832034fa5SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 48932034fa5Smrg# We need awk for the "check" target. The system "awk" is bad on 49032034fa5Smrg# some platforms. 49132034fa5SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49232034fa5SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 49332034fa5SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 49432034fa5Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 49532034fa5Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 49632034fa5Smrg [_AM_PROG_TAR([v7])])]) 49732034fa5Smrg_AM_IF_OPTION([no-dependencies],, 49832034fa5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 49932034fa5Smrg [_AM_DEPENDENCIES(CC)], 50032034fa5Smrg [define([AC_PROG_CC], 50132034fa5Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 50232034fa5SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 50332034fa5Smrg [_AM_DEPENDENCIES(CXX)], 50432034fa5Smrg [define([AC_PROG_CXX], 50532034fa5Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 50632034fa5SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 50732034fa5Smrg [_AM_DEPENDENCIES(OBJC)], 50832034fa5Smrg [define([AC_PROG_OBJC], 50932034fa5Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 51032034fa5Smrg]) 51132034fa5Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 51232034fa5Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 51332034fa5Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 51432034fa5Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 51532034fa5SmrgAC_CONFIG_COMMANDS_PRE(dnl 51632034fa5Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 51732034fa5Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 51832034fa5Smrg]) 51932034fa5Smrg 52032034fa5Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 52132034fa5Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 52232034fa5Smrgdnl mangled by Autoconf and run in a shell conditional statement. 52332034fa5Smrgm4_define([_AC_COMPILER_EXEEXT], 52432034fa5Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 52532034fa5Smrg 52632034fa5Smrg 52732034fa5Smrg# When config.status generates a header, we must update the stamp-h file. 52832034fa5Smrg# This file resides in the same directory as the config header 52932034fa5Smrg# that is generated. The stamp files are numbered to have different names. 53032034fa5Smrg 53132034fa5Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 53232034fa5Smrg# loop where config.status creates the headers, so we can generate 53332034fa5Smrg# our stamp files there. 53432034fa5SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 53532034fa5Smrg[# Compute $1's index in $config_headers. 53632034fa5Smrg_am_arg=$1 53732034fa5Smrg_am_stamp_count=1 53832034fa5Smrgfor _am_header in $config_headers :; do 53932034fa5Smrg case $_am_header in 54032034fa5Smrg $_am_arg | $_am_arg:* ) 54132034fa5Smrg break ;; 54232034fa5Smrg * ) 54332034fa5Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 54432034fa5Smrg esac 54532034fa5Smrgdone 54632034fa5Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 54732034fa5Smrg 54832034fa5Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 54932034fa5Smrg# 55032034fa5Smrg# This file is free software; the Free Software Foundation 55132034fa5Smrg# gives unlimited permission to copy and/or distribute it, 55232034fa5Smrg# with or without modifications, as long as this notice is preserved. 55332034fa5Smrg 55432034fa5Smrg# AM_PROG_INSTALL_SH 55532034fa5Smrg# ------------------ 55632034fa5Smrg# Define $install_sh. 55732034fa5SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 55832034fa5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 55932034fa5Smrgif test x"${install_sh}" != xset; then 56032034fa5Smrg case $am_aux_dir in 56132034fa5Smrg *\ * | *\ *) 56232034fa5Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 56332034fa5Smrg *) 56432034fa5Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 56532034fa5Smrg esac 56632034fa5Smrgfi 56732034fa5SmrgAC_SUBST(install_sh)]) 56832034fa5Smrg 56932034fa5Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 57032034fa5Smrg# 57132034fa5Smrg# This file is free software; the Free Software Foundation 57232034fa5Smrg# gives unlimited permission to copy and/or distribute it, 57332034fa5Smrg# with or without modifications, as long as this notice is preserved. 57432034fa5Smrg 57532034fa5Smrg# serial 2 57632034fa5Smrg 57732034fa5Smrg# Check whether the underlying file-system supports filenames 57832034fa5Smrg# with a leading dot. For instance MS-DOS doesn't. 57932034fa5SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58032034fa5Smrg[rm -rf .tst 2>/dev/null 58132034fa5Smrgmkdir .tst 2>/dev/null 58232034fa5Smrgif test -d .tst; then 58332034fa5Smrg am__leading_dot=. 58432034fa5Smrgelse 58532034fa5Smrg am__leading_dot=_ 58632034fa5Smrgfi 58732034fa5Smrgrmdir .tst 2>/dev/null 58832034fa5SmrgAC_SUBST([am__leading_dot])]) 58932034fa5Smrg 59032034fa5Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 59132034fa5Smrg# From Jim Meyering 59232034fa5Smrg 59332034fa5Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 59432034fa5Smrg# Free Software Foundation, Inc. 59532034fa5Smrg# 59632034fa5Smrg# This file is free software; the Free Software Foundation 59732034fa5Smrg# gives unlimited permission to copy and/or distribute it, 59832034fa5Smrg# with or without modifications, as long as this notice is preserved. 59932034fa5Smrg 60032034fa5Smrg# serial 5 60132034fa5Smrg 60232034fa5Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 60332034fa5Smrg# ---------------------------------- 60432034fa5Smrg# Control maintainer-specific portions of Makefiles. 60532034fa5Smrg# Default is to disable them, unless `enable' is passed literally. 60632034fa5Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 60732034fa5Smrg# can override the default with the --enable/--disable switch. 60832034fa5SmrgAC_DEFUN([AM_MAINTAINER_MODE], 60932034fa5Smrg[m4_case(m4_default([$1], [disable]), 61032034fa5Smrg [enable], [m4_define([am_maintainer_other], [disable])], 61132034fa5Smrg [disable], [m4_define([am_maintainer_other], [enable])], 61232034fa5Smrg [m4_define([am_maintainer_other], [enable]) 61332034fa5Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 61432034fa5SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 61532034fa5Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 61632034fa5Smrg AC_ARG_ENABLE([maintainer-mode], 61732034fa5Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 61832034fa5Smrg (and sometimes confusing) to the casual installer], 61932034fa5Smrg [USE_MAINTAINER_MODE=$enableval], 62032034fa5Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 62132034fa5Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 62232034fa5Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 62332034fa5Smrg MAINT=$MAINTAINER_MODE_TRUE 62432034fa5Smrg AC_SUBST([MAINT])dnl 62532034fa5Smrg] 62632034fa5Smrg) 62732034fa5Smrg 62832034fa5SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 62932034fa5Smrg 63032034fa5Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6314ecf19b2Smrg 63232034fa5Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 63332034fa5Smrg# 63432034fa5Smrg# This file is free software; the Free Software Foundation 63532034fa5Smrg# gives unlimited permission to copy and/or distribute it, 63632034fa5Smrg# with or without modifications, as long as this notice is preserved. 63732034fa5Smrg 63832034fa5Smrg# serial 4 63932034fa5Smrg 64032034fa5Smrg# AM_MAKE_INCLUDE() 64132034fa5Smrg# ----------------- 64232034fa5Smrg# Check to see how make treats includes. 64332034fa5SmrgAC_DEFUN([AM_MAKE_INCLUDE], 64432034fa5Smrg[am_make=${MAKE-make} 64532034fa5Smrgcat > confinc << 'END' 64632034fa5Smrgam__doit: 64732034fa5Smrg @echo this is the am__doit target 64832034fa5Smrg.PHONY: am__doit 64932034fa5SmrgEND 65032034fa5Smrg# If we don't find an include directive, just comment out the code. 65132034fa5SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 65232034fa5Smrgam__include="#" 65332034fa5Smrgam__quote= 65432034fa5Smrg_am_result=none 65532034fa5Smrg# First try GNU make style include. 65632034fa5Smrgecho "include confinc" > confmf 65732034fa5Smrg# Ignore all kinds of additional output from `make'. 65832034fa5Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 65932034fa5Smrg*the\ am__doit\ target*) 66032034fa5Smrg am__include=include 66132034fa5Smrg am__quote= 66232034fa5Smrg _am_result=GNU 66332034fa5Smrg ;; 66432034fa5Smrgesac 66532034fa5Smrg# Now try BSD make style include. 66632034fa5Smrgif test "$am__include" = "#"; then 66732034fa5Smrg echo '.include "confinc"' > confmf 66832034fa5Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 66932034fa5Smrg *the\ am__doit\ target*) 67032034fa5Smrg am__include=.include 67132034fa5Smrg am__quote="\"" 67232034fa5Smrg _am_result=BSD 67332034fa5Smrg ;; 67432034fa5Smrg esac 67532034fa5Smrgfi 67632034fa5SmrgAC_SUBST([am__include]) 67732034fa5SmrgAC_SUBST([am__quote]) 67832034fa5SmrgAC_MSG_RESULT([$_am_result]) 67932034fa5Smrgrm -f confinc confmf 68032034fa5Smrg]) 68132034fa5Smrg 68232034fa5Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 68332034fa5Smrg 68432034fa5Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 68532034fa5Smrg# Free Software Foundation, Inc. 68632034fa5Smrg# 68732034fa5Smrg# This file is free software; the Free Software Foundation 68832034fa5Smrg# gives unlimited permission to copy and/or distribute it, 68932034fa5Smrg# with or without modifications, as long as this notice is preserved. 69032034fa5Smrg 69132034fa5Smrg# serial 6 69232034fa5Smrg 69332034fa5Smrg# AM_MISSING_PROG(NAME, PROGRAM) 69432034fa5Smrg# ------------------------------ 69532034fa5SmrgAC_DEFUN([AM_MISSING_PROG], 69632034fa5Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 69732034fa5Smrg$1=${$1-"${am_missing_run}$2"} 69832034fa5SmrgAC_SUBST($1)]) 69932034fa5Smrg 70032034fa5Smrg 70132034fa5Smrg# AM_MISSING_HAS_RUN 70232034fa5Smrg# ------------------ 70332034fa5Smrg# Define MISSING if not defined so far and test if it supports --run. 70432034fa5Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 70532034fa5SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 70632034fa5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 70732034fa5SmrgAC_REQUIRE_AUX_FILE([missing])dnl 70832034fa5Smrgif test x"${MISSING+set}" != xset; then 70932034fa5Smrg case $am_aux_dir in 71032034fa5Smrg *\ * | *\ *) 71132034fa5Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 71232034fa5Smrg *) 71332034fa5Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 71432034fa5Smrg esac 71532034fa5Smrgfi 71632034fa5Smrg# Use eval to expand $SHELL 71732034fa5Smrgif eval "$MISSING --run true"; then 71832034fa5Smrg am_missing_run="$MISSING --run " 71932034fa5Smrgelse 72032034fa5Smrg am_missing_run= 72132034fa5Smrg AC_MSG_WARN([`missing' script is too old or missing]) 72232034fa5Smrgfi 72332034fa5Smrg]) 72432034fa5Smrg 72532034fa5Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 72632034fa5Smrg# 72732034fa5Smrg# This file is free software; the Free Software Foundation 72832034fa5Smrg# gives unlimited permission to copy and/or distribute it, 72932034fa5Smrg# with or without modifications, as long as this notice is preserved. 73032034fa5Smrg 73132034fa5Smrg# AM_PROG_MKDIR_P 73232034fa5Smrg# --------------- 73332034fa5Smrg# Check for `mkdir -p'. 73432034fa5SmrgAC_DEFUN([AM_PROG_MKDIR_P], 73532034fa5Smrg[AC_PREREQ([2.60])dnl 73632034fa5SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 73732034fa5Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 73832034fa5Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 73932034fa5Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 74032034fa5Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 74132034fa5Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 74232034fa5Smrgdnl adjustment using top_builddir (which is defined more often than 74332034fa5Smrgdnl MKDIR_P). 74432034fa5SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 74532034fa5Smrgcase $mkdir_p in 74632034fa5Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 74732034fa5Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 74832034fa5Smrgesac 74932034fa5Smrg]) 75032034fa5Smrg 75132034fa5Smrg# Helper functions for option handling. -*- Autoconf -*- 75232034fa5Smrg 75332034fa5Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 75432034fa5Smrg# 75532034fa5Smrg# This file is free software; the Free Software Foundation 75632034fa5Smrg# gives unlimited permission to copy and/or distribute it, 75732034fa5Smrg# with or without modifications, as long as this notice is preserved. 75832034fa5Smrg 75932034fa5Smrg# serial 4 76032034fa5Smrg 76132034fa5Smrg# _AM_MANGLE_OPTION(NAME) 76232034fa5Smrg# ----------------------- 76332034fa5SmrgAC_DEFUN([_AM_MANGLE_OPTION], 76432034fa5Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 76532034fa5Smrg 76632034fa5Smrg# _AM_SET_OPTION(NAME) 76732034fa5Smrg# ------------------------------ 76832034fa5Smrg# Set option NAME. Presently that only means defining a flag for this option. 76932034fa5SmrgAC_DEFUN([_AM_SET_OPTION], 77032034fa5Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 77132034fa5Smrg 77232034fa5Smrg# _AM_SET_OPTIONS(OPTIONS) 77332034fa5Smrg# ---------------------------------- 77432034fa5Smrg# OPTIONS is a space-separated list of Automake options. 77532034fa5SmrgAC_DEFUN([_AM_SET_OPTIONS], 77632034fa5Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 77732034fa5Smrg 77832034fa5Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 77932034fa5Smrg# ------------------------------------------- 78032034fa5Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 78132034fa5SmrgAC_DEFUN([_AM_IF_OPTION], 78232034fa5Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 78332034fa5Smrg 78432034fa5Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 78532034fa5Smrg 78632034fa5Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 78732034fa5Smrg# Free Software Foundation, Inc. 78832034fa5Smrg# 78932034fa5Smrg# This file is free software; the Free Software Foundation 79032034fa5Smrg# gives unlimited permission to copy and/or distribute it, 79132034fa5Smrg# with or without modifications, as long as this notice is preserved. 79232034fa5Smrg 79332034fa5Smrg# serial 5 79432034fa5Smrg 79532034fa5Smrg# AM_SANITY_CHECK 79632034fa5Smrg# --------------- 79732034fa5SmrgAC_DEFUN([AM_SANITY_CHECK], 79832034fa5Smrg[AC_MSG_CHECKING([whether build environment is sane]) 79932034fa5Smrg# Just in case 80032034fa5Smrgsleep 1 80132034fa5Smrgecho timestamp > conftest.file 80232034fa5Smrg# Reject unsafe characters in $srcdir or the absolute working directory 80332034fa5Smrg# name. Accept space and tab only in the latter. 80432034fa5Smrgam_lf=' 80532034fa5Smrg' 80632034fa5Smrgcase `pwd` in 80732034fa5Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 80832034fa5Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 80932034fa5Smrgesac 81032034fa5Smrgcase $srcdir in 81132034fa5Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 81232034fa5Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 81332034fa5Smrgesac 81432034fa5Smrg 81532034fa5Smrg# Do `set' in a subshell so we don't clobber the current shell's 81632034fa5Smrg# arguments. Must try -L first in case configure is actually a 81732034fa5Smrg# symlink; some systems play weird games with the mod time of symlinks 81832034fa5Smrg# (eg FreeBSD returns the mod time of the symlink's containing 81932034fa5Smrg# directory). 82032034fa5Smrgif ( 82132034fa5Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 82232034fa5Smrg if test "$[*]" = "X"; then 82332034fa5Smrg # -L didn't work. 82432034fa5Smrg set X `ls -t "$srcdir/configure" conftest.file` 82532034fa5Smrg fi 82632034fa5Smrg rm -f conftest.file 82732034fa5Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 82832034fa5Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 82932034fa5Smrg 83032034fa5Smrg # If neither matched, then we have a broken ls. This can happen 83132034fa5Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 83232034fa5Smrg # broken ls alias from the environment. This has actually 83332034fa5Smrg # happened. Such a system could not be considered "sane". 83432034fa5Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 83532034fa5Smrgalias in your environment]) 83632034fa5Smrg fi 83732034fa5Smrg 83832034fa5Smrg test "$[2]" = conftest.file 83932034fa5Smrg ) 84032034fa5Smrgthen 84132034fa5Smrg # Ok. 84232034fa5Smrg : 84332034fa5Smrgelse 84432034fa5Smrg AC_MSG_ERROR([newly created file is older than distributed files! 84532034fa5SmrgCheck your system clock]) 84632034fa5Smrgfi 84732034fa5SmrgAC_MSG_RESULT(yes)]) 84832034fa5Smrg 84932034fa5Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 85032034fa5Smrg# 85132034fa5Smrg# This file is free software; the Free Software Foundation 85232034fa5Smrg# gives unlimited permission to copy and/or distribute it, 85332034fa5Smrg# with or without modifications, as long as this notice is preserved. 85432034fa5Smrg 85532034fa5Smrg# serial 1 85632034fa5Smrg 85732034fa5Smrg# AM_SILENT_RULES([DEFAULT]) 85832034fa5Smrg# -------------------------- 85932034fa5Smrg# Enable less verbose build rules; with the default set to DEFAULT 86032034fa5Smrg# (`yes' being less verbose, `no' or empty being verbose). 86132034fa5SmrgAC_DEFUN([AM_SILENT_RULES], 86232034fa5Smrg[AC_ARG_ENABLE([silent-rules], 86332034fa5Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 86432034fa5Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 86532034fa5Smrgcase $enable_silent_rules in 86632034fa5Smrgyes) AM_DEFAULT_VERBOSITY=0;; 86732034fa5Smrgno) AM_DEFAULT_VERBOSITY=1;; 86832034fa5Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 86932034fa5Smrgesac 87032034fa5SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 87132034fa5SmrgAM_BACKSLASH='\' 87232034fa5SmrgAC_SUBST([AM_BACKSLASH])dnl 87332034fa5Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 87432034fa5Smrg]) 87532034fa5Smrg 87632034fa5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 87732034fa5Smrg# 87832034fa5Smrg# This file is free software; the Free Software Foundation 87932034fa5Smrg# gives unlimited permission to copy and/or distribute it, 88032034fa5Smrg# with or without modifications, as long as this notice is preserved. 88132034fa5Smrg 88232034fa5Smrg# AM_PROG_INSTALL_STRIP 88332034fa5Smrg# --------------------- 88432034fa5Smrg# One issue with vendor `install' (even GNU) is that you can't 88532034fa5Smrg# specify the program used to strip binaries. This is especially 88632034fa5Smrg# annoying in cross-compiling environments, where the build's strip 88732034fa5Smrg# is unlikely to handle the host's binaries. 88832034fa5Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 88932034fa5Smrg# always use install-sh in `make install-strip', and initialize 89032034fa5Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 89132034fa5SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 89232034fa5Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 89332034fa5Smrg# Installed binaries are usually stripped using `strip' when the user 89432034fa5Smrg# run `make install-strip'. However `strip' might not be the right 89532034fa5Smrg# tool to use in cross-compilation environments, therefore Automake 89632034fa5Smrg# will honor the `STRIP' environment variable to overrule this program. 89732034fa5Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 89832034fa5Smrgif test "$cross_compiling" != no; then 89932034fa5Smrg AC_CHECK_TOOL([STRIP], [strip], :) 90032034fa5Smrgfi 90132034fa5SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 90232034fa5SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 90332034fa5Smrg 90432034fa5Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 90532034fa5Smrg# 90632034fa5Smrg# This file is free software; the Free Software Foundation 90732034fa5Smrg# gives unlimited permission to copy and/or distribute it, 90832034fa5Smrg# with or without modifications, as long as this notice is preserved. 90932034fa5Smrg 91032034fa5Smrg# serial 2 91132034fa5Smrg 91232034fa5Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 91332034fa5Smrg# --------------------------- 91432034fa5Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 91532034fa5Smrg# This macro is traced by Automake. 91632034fa5SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 91732034fa5Smrg 91832034fa5Smrg# AM_SUBST_NOTMAKE(VARIABLE) 91932034fa5Smrg# --------------------------- 92032034fa5Smrg# Public sister of _AM_SUBST_NOTMAKE. 92132034fa5SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 92232034fa5Smrg 92332034fa5Smrg# Check how to create a tarball. -*- Autoconf -*- 92432034fa5Smrg 92532034fa5Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 92632034fa5Smrg# 92732034fa5Smrg# This file is free software; the Free Software Foundation 92832034fa5Smrg# gives unlimited permission to copy and/or distribute it, 92932034fa5Smrg# with or without modifications, as long as this notice is preserved. 93032034fa5Smrg 93132034fa5Smrg# serial 2 93232034fa5Smrg 93332034fa5Smrg# _AM_PROG_TAR(FORMAT) 93432034fa5Smrg# -------------------- 93532034fa5Smrg# Check how to create a tarball in format FORMAT. 93632034fa5Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 93732034fa5Smrg# 93832034fa5Smrg# Substitute a variable $(am__tar) that is a command 93932034fa5Smrg# writing to stdout a FORMAT-tarball containing the directory 94032034fa5Smrg# $tardir. 94132034fa5Smrg# tardir=directory && $(am__tar) > result.tar 94232034fa5Smrg# 94332034fa5Smrg# Substitute a variable $(am__untar) that extract such 94432034fa5Smrg# a tarball read from stdin. 94532034fa5Smrg# $(am__untar) < result.tar 94632034fa5SmrgAC_DEFUN([_AM_PROG_TAR], 94732034fa5Smrg[# Always define AMTAR for backward compatibility. 94832034fa5SmrgAM_MISSING_PROG([AMTAR], [tar]) 94932034fa5Smrgm4_if([$1], [v7], 95032034fa5Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95132034fa5Smrg [m4_case([$1], [ustar],, [pax],, 95232034fa5Smrg [m4_fatal([Unknown tar format])]) 95332034fa5SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 95432034fa5Smrg# Loop over all known methods to create a tar archive until one works. 95532034fa5Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95632034fa5Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95732034fa5Smrg# Do not fold the above two line into one, because Tru64 sh and 95832034fa5Smrg# Solaris sh will not grok spaces in the rhs of `-'. 95932034fa5Smrgfor _am_tool in $_am_tools 96032034fa5Smrgdo 96132034fa5Smrg case $_am_tool in 96232034fa5Smrg gnutar) 96332034fa5Smrg for _am_tar in tar gnutar gtar; 96432034fa5Smrg do 96532034fa5Smrg AM_RUN_LOG([$_am_tar --version]) && break 96632034fa5Smrg done 96732034fa5Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 96832034fa5Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 96932034fa5Smrg am__untar="$_am_tar -xf -" 97032034fa5Smrg ;; 97132034fa5Smrg plaintar) 97232034fa5Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 97332034fa5Smrg # ustar tarball either. 97432034fa5Smrg (tar --version) >/dev/null 2>&1 && continue 97532034fa5Smrg am__tar='tar chf - "$$tardir"' 97632034fa5Smrg am__tar_='tar chf - "$tardir"' 97732034fa5Smrg am__untar='tar xf -' 97832034fa5Smrg ;; 97932034fa5Smrg pax) 98032034fa5Smrg am__tar='pax -L -x $1 -w "$$tardir"' 98132034fa5Smrg am__tar_='pax -L -x $1 -w "$tardir"' 98232034fa5Smrg am__untar='pax -r' 98332034fa5Smrg ;; 98432034fa5Smrg cpio) 98532034fa5Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 98632034fa5Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 98732034fa5Smrg am__untar='cpio -i -H $1 -d' 98832034fa5Smrg ;; 98932034fa5Smrg none) 99032034fa5Smrg am__tar=false 99132034fa5Smrg am__tar_=false 99232034fa5Smrg am__untar=false 99332034fa5Smrg ;; 99432034fa5Smrg esac 99532034fa5Smrg 99632034fa5Smrg # If the value was cached, stop now. We just wanted to have am__tar 99732034fa5Smrg # and am__untar set. 99832034fa5Smrg test -n "${am_cv_prog_tar_$1}" && break 99932034fa5Smrg 100032034fa5Smrg # tar/untar a dummy directory, and stop if the command works 100132034fa5Smrg rm -rf conftest.dir 100232034fa5Smrg mkdir conftest.dir 100332034fa5Smrg echo GrepMe > conftest.dir/file 100432034fa5Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 100532034fa5Smrg rm -rf conftest.dir 100632034fa5Smrg if test -s conftest.tar; then 100732034fa5Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 100832034fa5Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 100932034fa5Smrg fi 101032034fa5Smrgdone 101132034fa5Smrgrm -rf conftest.dir 101232034fa5Smrg 101332034fa5SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 101432034fa5SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 101532034fa5SmrgAC_SUBST([am__tar]) 101632034fa5SmrgAC_SUBST([am__untar]) 101732034fa5Smrg]) # _AM_PROG_TAR 101832034fa5Smrg 101932034fa5Smrgdnl fontutil.m4. Generated from fontutil.m4.in by configure. 102032034fa5Smrgdnl 102132034fa5Smrgdnl This file comes from X.Org's font-util 1.1.0 102232034fa5Smrgdnl 102332034fa5Smrgdnl Copyright 2005 Red Hat, Inc 102432034fa5Smrgdnl 102532034fa5Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 102632034fa5Smrgdnl documentation for any purpose is hereby granted without fee, provided that 102732034fa5Smrgdnl the above copyright notice appear in all copies and that both that 102832034fa5Smrgdnl copyright notice and this permission notice appear in supporting 102932034fa5Smrgdnl documentation. 103032034fa5Smrgdnl 103132034fa5Smrgdnl The above copyright notice and this permission notice shall be included 103232034fa5Smrgdnl in all copies or substantial portions of the Software. 103332034fa5Smrgdnl 103432034fa5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 103532034fa5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 103632034fa5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 103732034fa5Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 103832034fa5Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 103932034fa5Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 104032034fa5Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 104132034fa5Smrgdnl 104232034fa5Smrgdnl Except as contained in this notice, the name of the copyright holders shall 104332034fa5Smrgdnl not be used in advertising or otherwise to promote the sale, use or 104432034fa5Smrgdnl other dealings in this Software without prior written authorization 104532034fa5Smrgdnl from the copyright holders. 104632034fa5Smrgdnl 104732034fa5Smrgdnl -------------------------------------------------------------------- 104832034fa5Smrgdnl 104932034fa5Smrgdnl Copyright 2009 Sun Microsystems, Inc. All rights reserved. 105032034fa5Smrgdnl 105132034fa5Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 105232034fa5Smrgdnl copy of this software and associated documentation files (the 105332034fa5Smrgdnl "Software"), to deal in the Software without restriction, including 105432034fa5Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 105532034fa5Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 105632034fa5Smrgdnl to whom the Software is furnished to do so, provided that the above 105732034fa5Smrgdnl copyright notice(s) and this permission notice appear in all copies of 105832034fa5Smrgdnl the Software and that both the above copyright notice(s) and this 105932034fa5Smrgdnl permission notice appear in supporting documentation. 106032034fa5Smrgdnl 106132034fa5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106232034fa5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106332034fa5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 106432034fa5Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 106532034fa5Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 106632034fa5Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 106732034fa5Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 106832034fa5Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 106932034fa5Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 107032034fa5Smrgdnl 107132034fa5Smrgdnl Except as contained in this notice, the name of a copyright holder 107232034fa5Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 107332034fa5Smrgdnl or other dealings in this Software without prior written authorization 107432034fa5Smrgdnl of the copyright holder. 107532034fa5Smrg 107632034fa5Smrg# XORG_FONT_MACROS_VERSION(required-version) 107732034fa5Smrg# ------------------------------------------ 107832034fa5Smrg# Minimum version: 1.1.0 107932034fa5Smrg# 108032034fa5Smrg# If you're using a macro added in Version 1.1 or newer, include this in 108132034fa5Smrg# your configure.ac with the minimum required version, such as: 108232034fa5Smrg# XORG_FONT_MACROS_VERSION(1.1) 108332034fa5Smrg# 108432034fa5Smrg# To ensure that this macro is defined, also add: 108532034fa5Smrg# m4_ifndef([XORG_FONT_MACROS_VERSION], 108632034fa5Smrg# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) 108732034fa5Smrg# 108832034fa5Smrg# 108932034fa5Smrg# See the "minimum version" comment for each macro you use to see what 109032034fa5Smrg# version you require. 109132034fa5Smrgm4_defun([XORG_FONT_MACROS_VERSION],[ 109232034fa5Smrgm4_define([vers_have], [1.1.0]) 109332034fa5Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 109432034fa5Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 109532034fa5Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 109632034fa5Smrg [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) 109732034fa5Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 109832034fa5Smrg [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) 109932034fa5Smrgm4_undefine([vers_have]) 110032034fa5Smrgm4_undefine([maj_have]) 110132034fa5Smrgm4_undefine([maj_needed]) 110232034fa5Smrg]) # XORG_FONT_MACROS_VERSION 110332034fa5Smrg 110432034fa5Smrg# XORG_FONT_CHECK_{maps}() 110532034fa5Smrg# ------------------------ 110632034fa5Smrg# Minimum version: 1.0.0 110732034fa5Smrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*, 110832034fa5Smrg# JISX0201 or KOI8_R. By default, they are all enabled. 110932034fa5Smrg 111032034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) 111132034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) 111232034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) 111332034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) 111432034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) 111532034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) 111632034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) 111732034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) 111832034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) 111932034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) 112032034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) 112132034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) 112232034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) 112332034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) 112432034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) 112532034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) 112632034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) 112732034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) 112832034fa5Smrg 112932034fa5Smrg# XORG_FONT_CHECK_ENCODING(encoding) 113032034fa5Smrg# ---------------------------------- 113132034fa5Smrg# Minimum version: 1.1.0 113232034fa5Smrg# This macro adds --enable/disable-<encoding>, enabled by default. 113332034fa5Smrg# It replaced individual copies of this code in the above macros in 1.1. 113432034fa5Smrg# Currently assumes encoding names will be all upper-case - add m4_toupper 113532034fa5Smrg# calls if this is not true in the future. 113632034fa5Smrg 113732034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING],[ 113832034fa5Smrg AC_ARG_ENABLE(m4_tolower($1), 113932034fa5Smrg AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), 114032034fa5Smrg [Build $1 fonts (default: yes)]), 114132034fa5Smrg [AS_TR_SH($1)=$enableval], [AS_TR_SH($1)=yes]) 114232034fa5Smrg AC_MSG_CHECKING([whether to build $1 fonts]) 114332034fa5Smrg AC_MSG_RESULT($[AS_TR_SH($1)]) 114432034fa5Smrg AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) 114532034fa5Smrg]) # XORG_FONT_CHECK_ENCODING 114632034fa5Smrg 114732034fa5Smrg# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) 114832034fa5Smrg# ----------------------------------------------------- 114932034fa5Smrg# Minimum version: 1.1.0 115032034fa5Smrg# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once 115132034fa5Smrg 115232034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ 115332034fa5Smrg m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) 115432034fa5Smrg]) # XORG_FONT_CHECK_ENCODING_LIST 115532034fa5Smrg 115632034fa5Smrg# XORG_FONT_REQUIRED_PROG(VARNAME, progname) 115732034fa5Smrg# ------------------------------------------ 115832034fa5Smrg# Minimum version: 1.1.0 115932034fa5Smrg# 116032034fa5Smrg# Simple wrapper around AC_PATH_PROG that errors if not found 116132034fa5Smrg# 116232034fa5Smrg 116332034fa5SmrgAC_DEFUN([XORG_FONT_REQUIRED_PROG],[ 116432034fa5Smrg AC_PATH_PROG($1, $2) 116532034fa5Smrg if test x"$1" = x; then 116632034fa5Smrg AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) 116732034fa5Smrg fi 116832034fa5Smrg]) 116932034fa5Smrg 117032034fa5Smrg 117132034fa5Smrg# XORG_FONT_FCCACHE() 117232034fa5Smrg# ------------------- 117332034fa5Smrg# Minimum version: 1.1.0 117432034fa5Smrg# 117532034fa5Smrg# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found 117632034fa5Smrg# Set RUN_FCCACHE to a rule suitable for substituting into a makefile 117732034fa5Smrg# to run fc-cache if found and not installing to $DESTDIR 117832034fa5Smrg# 117932034fa5Smrg# fc-cache is optional, not required, and should be skipped when making 118032034fa5Smrg# packages (installing to $DESTDIR). 118132034fa5Smrg# 118232034fa5SmrgAC_DEFUN([XORG_FONT_FCCACHE],[ 118332034fa5Smrg AC_PATH_PROG(FCCACHE, fc-cache) 118432034fa5Smrg FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' 118532034fa5Smrg if test x"$FCCACHE" = x ; then 118632034fa5Smrg RUN_FCCACHE="${FCCACHE_WARN}" 118732034fa5Smrg else 118832034fa5Smrg RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' 118932034fa5Smrg RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" 119032034fa5Smrg fi 119132034fa5Smrg AC_SUBST([RUN_FCCACHE]) 119232034fa5Smrg]) 119332034fa5Smrg 119432034fa5Smrg 119532034fa5Smrg# XORG_FONT_COMMON_UTILS() 119632034fa5Smrg# ------------------------ 119732034fa5Smrg# Minimum version: 1.1.0 119832034fa5Smrg# 119932034fa5Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types 120032034fa5Smrg 120132034fa5SmrgAC_DEFUN([XORG_FONT_COMMON_UTILS],[ 120232034fa5Smrg XORG_FONT_FCCACHE 120332034fa5Smrg XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) 120432034fa5Smrg]) 120532034fa5Smrg 120632034fa5Smrg# XORG_FONT_SCALED_UTILS() 120732034fa5Smrg# ------------------------ 120832034fa5Smrg# Minimum version: 1.1.0 120932034fa5Smrg# 121032034fa5Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts 121132034fa5Smrg# (TrueType, OpenType, Type1) 121232034fa5Smrg 121332034fa5SmrgAC_DEFUN([XORG_FONT_SCALED_UTILS],[ 121432034fa5Smrg XORG_FONT_COMMON_UTILS 121532034fa5Smrg XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) 121632034fa5Smrg]) 121732034fa5Smrg 121832034fa5Smrg# XORG_FONT_BDF_UTILS() 121932034fa5Smrg# --------------------- 122032034fa5Smrg# Minimum version: 1.1.0 122132034fa5Smrg# 122232034fa5Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts 122332034fa5Smrg# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the 122432034fa5Smrg# PCF output files created by bdftopcf 122532034fa5Smrg 122632034fa5SmrgAC_DEFUN([XORG_FONT_BDF_UTILS],[ 122732034fa5Smrg XORG_FONT_COMMON_UTILS 122832034fa5Smrg XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) 122932034fa5Smrg XORG_FONT_CHECK_COMPRESSION 123032034fa5Smrg]) 123132034fa5Smrg 123232034fa5Smrg# XORG_FONT_CHECK_COMPRESSION() 123332034fa5Smrg# ----------------------------- 123432034fa5Smrg# Minimum version: 1.1.0 123532034fa5Smrg# 123632034fa5Smrg# Offer a --with-compression flag to control what compression method is 123732034fa5Smrg# used for pcf font files. Offers all the methods currently supported 123832034fa5Smrg# by libXfont, including no compression. 123932034fa5Smrg 124032034fa5SmrgAC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ 124132034fa5Smrg AC_MSG_CHECKING([font compression method]) 124232034fa5Smrg AC_ARG_WITH(compression, 124332034fa5Smrg [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>], 124432034fa5Smrg [compression method to use on pcf fonts])], 124532034fa5Smrg [compression="$withval"], [compression="yes"]) 124632034fa5Smrg if test x"$compression" = "xyes" ; then 124732034fa5Smrg compression="gzip" 124832034fa5Smrg fi 124932034fa5Smrg AC_MSG_RESULT([${compression}]) 125032034fa5Smrg case ${compression} in 125132034fa5Smrg *compress) COMPRESS_SUFFIX=".Z" ;; 125232034fa5Smrg *gzip) COMPRESS_SUFFIX=".gz" ;; 125332034fa5Smrg *bzip2) COMPRESS_SUFFIX=".bz2" ;; 125432034fa5Smrg no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; 125532034fa5Smrg *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; 125632034fa5Smrg esac 125732034fa5Smrg if test x"$COMPRESS_SUFFIX" != "x" ; then 125832034fa5Smrg XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) 125932034fa5Smrg fi 126032034fa5Smrg AC_SUBST([COMPRESS_SUFFIX]) 126132034fa5Smrg]) 126232034fa5Smrg 126332034fa5Smrg# XORG_FONT_UCS2ANY() 126432034fa5Smrg# ------------------- 126532034fa5Smrg# Minimum version: 1.1.0 126632034fa5Smrg# 126732034fa5Smrg# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting 126832034fa5Smrg# Unicode-encoded BDF format bitmap fonts into subsets for older encodings. 126932034fa5Smrg# Also call pkg-config to find the directory with the encoding files needed 127032034fa5Smrg# by ucs2any, and export it as MAPFILES_PATH to the Makefiles 127132034fa5Smrg 127232034fa5SmrgAC_DEFUN([XORG_FONT_UCS2ANY],[ 127332034fa5Smrg XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) 127432034fa5Smrg PKG_CHECK_MODULES(MAPS, [fontutil]) 127532034fa5Smrg AC_MSG_CHECKING([for ucs2any encoding data files]) 127632034fa5Smrg MAPFILES_PATH=`pkg-config --variable=mapdir fontutil` 127732034fa5Smrg AC_SUBST(MAPFILES_PATH) 127832034fa5Smrg AC_MSG_RESULT([${MAPFILES_PATH}]) 127932034fa5Smrg]) 128032034fa5Smrg 128132034fa5Smrg 128232034fa5Smrg 128332034fa5Smrg# XORG_FONTROOTDIR() 128432034fa5Smrg# -------------------- 128532034fa5Smrg# Minimum version: 1.1.0 128632034fa5Smrg# 128732034fa5Smrg# Sets FONTROOTDIR to the root directory for font files. Uses the first 128832034fa5Smrg# found from: 128932034fa5Smrg# --with-fontrootdir 129032034fa5Smrg# pkg-config --variable=fontrootdir fontutil 129132034fa5Smrg# ${datadir}/fonts/X11 129232034fa5Smrg 129332034fa5SmrgAC_DEFUN([XORG_FONTROOTDIR],[ 129432034fa5Smrg dnl Ensure $PKG_CONFIG is set first 129532034fa5Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 129632034fa5Smrg 129732034fa5Smrg AC_MSG_CHECKING([for root directory for font files]) 129832034fa5Smrg AC_ARG_WITH(fontrootdir, 129932034fa5Smrg AS_HELP_STRING([--with-fontrootdir=DIR], 130032034fa5Smrg [Path to root directory for font files]), 130132034fa5Smrg [FONTROOTDIR="$withval"]) 130232034fa5Smrg # if --with-fontrootdir not specified... 130332034fa5Smrg if test "x${FONTROOTDIR}" = "x"; then 130432034fa5Smrg FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` 130532034fa5Smrg fi 130632034fa5Smrg # ...and if pkg-config didn't find fontdir in fontutil.pc... 130732034fa5Smrg if test "x${FONTROOTDIR}" = "x"; then 130832034fa5Smrg FONTROOTDIR="${datadir}/fonts/X11" 130932034fa5Smrg fi 131032034fa5Smrg AC_SUBST(FONTROOTDIR) 131132034fa5Smrg AC_MSG_RESULT([${FONTROOTDIR}]) 131232034fa5Smrg]) 131332034fa5Smrg 131432034fa5Smrg# XORG_FONTSUBDIR(variable, flag, subdir) 131532034fa5Smrg# --------------------------------------- 131632034fa5Smrg# Minimum version: 1.1.0 131732034fa5Smrg# 131832034fa5Smrg# Offer a --with-<flag> flag to control directory for font installation 131932034fa5Smrg# Default is the specified <subdir> of the font root directory. 132032034fa5Smrg# Sets <variable> to the selected directory 132132034fa5Smrg 132232034fa5SmrgAC_DEFUN([XORG_FONTSUBDIR],[ 132332034fa5Smrg AC_REQUIRE([XORG_FONTROOTDIR]) 132432034fa5Smrg 132532034fa5Smrg AC_MSG_CHECKING([for directory for $3 files]) 132632034fa5Smrg AC_ARG_WITH($2, 132732034fa5Smrg [AS_HELP_STRING([--with-$2=DIR], 132832034fa5Smrg [Path to $3 files [FONTROOTDIR/$3]])], 132932034fa5Smrg [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) 133032034fa5Smrg AC_SUBST($1) 133132034fa5Smrg AC_MSG_RESULT([${$1}]) 133232034fa5Smrg]) # XORG_FONTSUBDIR 133332034fa5Smrg 133432034fa5Smrg# XORG_FONTDIR(subdir) 133532034fa5Smrg# -------------------- 133632034fa5Smrg# Minimum version: 1.1.0 133732034fa5Smrg# 133832034fa5Smrg# Offer a --with-fontdir flag to control directory for font installation 133932034fa5Smrg# Default is the specified subdir of the font root directory. 134032034fa5Smrg# Sets FONTDIR to the selected directory 134132034fa5Smrg 134232034fa5SmrgAC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) 134332034fa5Smrg 134432034fa5Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 134532034fa5Smrgdnl 134632034fa5Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 134732034fa5Smrgdnl 134832034fa5Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 134932034fa5Smrgdnl copy of this software and associated documentation files (the 135032034fa5Smrgdnl "Software"), to deal in the Software without restriction, including 135132034fa5Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 135232034fa5Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 135332034fa5Smrgdnl to whom the Software is furnished to do so, provided that the above 135432034fa5Smrgdnl copyright notice(s) and this permission notice appear in all copies of 135532034fa5Smrgdnl the Software and that both the above copyright notice(s) and this 135632034fa5Smrgdnl permission notice appear in supporting documentation. 135732034fa5Smrgdnl 135832034fa5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 135932034fa5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 136032034fa5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 136132034fa5Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 136232034fa5Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 136332034fa5Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 136432034fa5Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 136532034fa5Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 136632034fa5Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 136732034fa5Smrgdnl 136832034fa5Smrgdnl Except as contained in this notice, the name of a copyright holder 136932034fa5Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 137032034fa5Smrgdnl or other dealings in this Software without prior written authorization 137132034fa5Smrgdnl of the copyright holder. 137232034fa5Smrg 137332034fa5Smrg# XORG_MACROS_VERSION(required-version) 137432034fa5Smrg# ------------------------------------- 137532034fa5Smrg# Minimum version: 1.1.0 137632034fa5Smrg# 137732034fa5Smrg# If you're using a macro added in Version 1.1 or newer, include this in 137832034fa5Smrg# your configure.ac with the minimum required version, such as: 137932034fa5Smrg# XORG_MACROS_VERSION(1.1) 138032034fa5Smrg# 138132034fa5Smrg# To ensure that this macro is defined, also add: 138232034fa5Smrg# m4_ifndef([XORG_MACROS_VERSION], 138332034fa5Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 138432034fa5Smrg# 138532034fa5Smrg# 138632034fa5Smrg# See the "minimum version" comment for each macro you use to see what 138732034fa5Smrg# version you require. 138832034fa5Smrgm4_defun([XORG_MACROS_VERSION],[ 138932034fa5Smrgm4_define([vers_have], [1.3.0]) 139032034fa5Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 139132034fa5Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 139232034fa5Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 139332034fa5Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 139432034fa5Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 139532034fa5Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 139632034fa5Smrgm4_undefine([vers_have]) 139732034fa5Smrgm4_undefine([maj_have]) 139832034fa5Smrgm4_undefine([maj_needed]) 139932034fa5Smrg]) # XORG_MACROS_VERSION 140032034fa5Smrg 140132034fa5Smrg# XORG_PROG_RAWCPP() 140232034fa5Smrg# ------------------ 140332034fa5Smrg# Minimum version: 1.0.0 140432034fa5Smrg# 140532034fa5Smrg# Find cpp program and necessary flags for use in pre-processing text files 140632034fa5Smrg# such as man pages and config files 140732034fa5SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 140832034fa5SmrgAC_REQUIRE([AC_PROG_CPP]) 140932034fa5SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 141032034fa5Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 141132034fa5Smrg 141232034fa5Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 141332034fa5Smrg# which is not the best choice for supporting other OS'es, but covers most 141432034fa5Smrg# of the ones we need for now. 141532034fa5SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 141632034fa5SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 141732034fa5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 141832034fa5Smrg AC_MSG_RESULT([no]) 141932034fa5Smrgelse 142032034fa5Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 142132034fa5Smrg RAWCPPFLAGS=-undef 142232034fa5Smrg AC_MSG_RESULT([yes]) 142332034fa5Smrg # under Cygwin unix is still defined even with -undef 142432034fa5Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 142532034fa5Smrg RAWCPPFLAGS="-undef -ansi" 142632034fa5Smrg AC_MSG_RESULT([yes, with -ansi]) 142732034fa5Smrg else 142832034fa5Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 142932034fa5Smrg fi 143032034fa5Smrgfi 143132034fa5Smrgrm -f conftest.$ac_ext 143232034fa5Smrg 143332034fa5SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 143432034fa5SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 143532034fa5Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 143632034fa5Smrg AC_MSG_RESULT([no]) 143732034fa5Smrgelse 143832034fa5Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 143932034fa5Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 144032034fa5Smrg AC_MSG_RESULT([yes]) 144132034fa5Smrg else 144232034fa5Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 144332034fa5Smrg fi 144432034fa5Smrgfi 144532034fa5Smrgrm -f conftest.$ac_ext 144632034fa5SmrgAC_SUBST(RAWCPPFLAGS) 144732034fa5Smrg]) # XORG_PROG_RAWCPP 144832034fa5Smrg 144932034fa5Smrg# XORG_MANPAGE_SECTIONS() 145032034fa5Smrg# ----------------------- 145132034fa5Smrg# Minimum version: 1.0.0 145232034fa5Smrg# 145332034fa5Smrg# Determine which sections man pages go in for the different man page types 145432034fa5Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 145532034fa5Smrg# Not sure if there's any better way than just hardcoding by OS name. 145632034fa5Smrg# Override default settings by setting environment variables 145732034fa5Smrg 145832034fa5SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 145932034fa5SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 146032034fa5Smrg 146132034fa5Smrgif test x$APP_MAN_SUFFIX = x ; then 146232034fa5Smrg APP_MAN_SUFFIX=1 146332034fa5Smrgfi 146432034fa5Smrgif test x$APP_MAN_DIR = x ; then 146532034fa5Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 146632034fa5Smrgfi 146732034fa5Smrg 146832034fa5Smrgif test x$LIB_MAN_SUFFIX = x ; then 146932034fa5Smrg LIB_MAN_SUFFIX=3 147032034fa5Smrgfi 147132034fa5Smrgif test x$LIB_MAN_DIR = x ; then 147232034fa5Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 147332034fa5Smrgfi 147432034fa5Smrg 147532034fa5Smrgif test x$FILE_MAN_SUFFIX = x ; then 147632034fa5Smrg case $host_os in 147732034fa5Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 147832034fa5Smrg *) FILE_MAN_SUFFIX=5 ;; 147932034fa5Smrg esac 148032034fa5Smrgfi 148132034fa5Smrgif test x$FILE_MAN_DIR = x ; then 148232034fa5Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 148332034fa5Smrgfi 148432034fa5Smrg 148532034fa5Smrgif test x$MISC_MAN_SUFFIX = x ; then 148632034fa5Smrg case $host_os in 148732034fa5Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 148832034fa5Smrg *) MISC_MAN_SUFFIX=7 ;; 148932034fa5Smrg esac 149032034fa5Smrgfi 149132034fa5Smrgif test x$MISC_MAN_DIR = x ; then 149232034fa5Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 149332034fa5Smrgfi 149432034fa5Smrg 149532034fa5Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 149632034fa5Smrg case $host_os in 149732034fa5Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 149832034fa5Smrg *) DRIVER_MAN_SUFFIX=4 ;; 149932034fa5Smrg esac 150032034fa5Smrgfi 150132034fa5Smrgif test x$DRIVER_MAN_DIR = x ; then 150232034fa5Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 150332034fa5Smrgfi 150432034fa5Smrg 150532034fa5Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 150632034fa5Smrg case $host_os in 150732034fa5Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 150832034fa5Smrg *) ADMIN_MAN_SUFFIX=8 ;; 150932034fa5Smrg esac 151032034fa5Smrgfi 151132034fa5Smrgif test x$ADMIN_MAN_DIR = x ; then 151232034fa5Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 151332034fa5Smrgfi 151432034fa5Smrg 151532034fa5Smrg 151632034fa5SmrgAC_SUBST([APP_MAN_SUFFIX]) 151732034fa5SmrgAC_SUBST([LIB_MAN_SUFFIX]) 151832034fa5SmrgAC_SUBST([FILE_MAN_SUFFIX]) 151932034fa5SmrgAC_SUBST([MISC_MAN_SUFFIX]) 152032034fa5SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 152132034fa5SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 152232034fa5SmrgAC_SUBST([APP_MAN_DIR]) 152332034fa5SmrgAC_SUBST([LIB_MAN_DIR]) 152432034fa5SmrgAC_SUBST([FILE_MAN_DIR]) 152532034fa5SmrgAC_SUBST([MISC_MAN_DIR]) 152632034fa5SmrgAC_SUBST([DRIVER_MAN_DIR]) 152732034fa5SmrgAC_SUBST([ADMIN_MAN_DIR]) 152832034fa5Smrg]) # XORG_MANPAGE_SECTIONS 152932034fa5Smrg 153032034fa5Smrg# XORG_CHECK_LINUXDOC 153132034fa5Smrg# ------------------- 153232034fa5Smrg# Minimum version: 1.0.0 153332034fa5Smrg# 153432034fa5Smrg# Defines the variable MAKE_TEXT if the necessary tools and 153532034fa5Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 153632034fa5Smrg# Whether or not the necessary tools and files are found can be checked 153732034fa5Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 153832034fa5SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 153932034fa5Smrgif test x$XORG_SGML_PATH = x ; then 154032034fa5Smrg XORG_SGML_PATH=$prefix/share/sgml 154132034fa5Smrgfi 154232034fa5SmrgHAVE_DEFS_ENT= 154332034fa5Smrg 154432034fa5Smrgif test x"$cross_compiling" = x"yes" ; then 154532034fa5Smrg HAVE_DEFS_ENT=no 154632034fa5Smrgelse 154732034fa5Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 154832034fa5Smrgfi 154932034fa5Smrg 155032034fa5SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 155132034fa5SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 155232034fa5Smrg 155332034fa5SmrgAC_MSG_CHECKING([Whether to build documentation]) 155432034fa5Smrg 155532034fa5Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 155632034fa5Smrg BUILDDOC=yes 155732034fa5Smrgelse 155832034fa5Smrg BUILDDOC=no 155932034fa5Smrgfi 156032034fa5Smrg 156132034fa5SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 156232034fa5Smrg 156332034fa5SmrgAC_MSG_RESULT([$BUILDDOC]) 156432034fa5Smrg 156532034fa5SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 156632034fa5Smrg 156732034fa5Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 156832034fa5Smrg BUILDPDFDOC=yes 156932034fa5Smrgelse 157032034fa5Smrg BUILDPDFDOC=no 157132034fa5Smrgfi 15724ecf19b2Smrg 157332034fa5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 15744ecf19b2Smrg 157532034fa5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 15764ecf19b2Smrg 157732034fa5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 157832034fa5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 157932034fa5SmrgMAKE_PDF="$PS2PDF" 158032034fa5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 15814ecf19b2Smrg 158232034fa5SmrgAC_SUBST(MAKE_TEXT) 158332034fa5SmrgAC_SUBST(MAKE_PS) 158432034fa5SmrgAC_SUBST(MAKE_PDF) 158532034fa5SmrgAC_SUBST(MAKE_HTML) 158632034fa5Smrg]) # XORG_CHECK_LINUXDOC 15874ecf19b2Smrg 158832034fa5Smrg# XORG_CHECK_DOCBOOK 158932034fa5Smrg# ------------------- 159032034fa5Smrg# Minimum version: 1.0.0 159132034fa5Smrg# 159232034fa5Smrg# Checks for the ability to build output formats from SGML DocBook source. 159332034fa5Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 159432034fa5Smrg# indicates whether the necessary tools and files are found and, if set, 159532034fa5Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 159632034fa5SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 159732034fa5Smrgif test x$XORG_SGML_PATH = x ; then 159832034fa5Smrg XORG_SGML_PATH=$prefix/share/sgml 15994ecf19b2Smrgfi 160032034fa5SmrgHAVE_DEFS_ENT= 160132034fa5SmrgBUILDTXTDOC=no 160232034fa5SmrgBUILDPDFDOC=no 160332034fa5SmrgBUILDPSDOC=no 160432034fa5SmrgBUILDHTMLDOC=no 160532034fa5Smrg 160632034fa5SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 160732034fa5Smrg 160832034fa5SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 160932034fa5SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 161032034fa5SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 161132034fa5SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 161232034fa5Smrg 161332034fa5SmrgAC_MSG_CHECKING([Whether to build text documentation]) 161432034fa5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 161532034fa5Smrg test x$BUILD_TXTDOC != xno; then 161632034fa5Smrg BUILDTXTDOC=yes 16174ecf19b2Smrgfi 161832034fa5SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 161932034fa5SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 16204ecf19b2Smrg 162132034fa5SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 162232034fa5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 162332034fa5Smrg test x$BUILD_PDFDOC != xno; then 162432034fa5Smrg BUILDPDFDOC=yes 162532034fa5Smrgfi 162632034fa5SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 162732034fa5SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 16284ecf19b2Smrg 162932034fa5SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 163032034fa5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 163132034fa5Smrg test x$BUILD_PSDOC != xno; then 163232034fa5Smrg BUILDPSDOC=yes 163332034fa5Smrgfi 163432034fa5SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 163532034fa5SmrgAC_MSG_RESULT([$BUILDPSDOC]) 16364ecf19b2Smrg 163732034fa5SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 163832034fa5Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 163932034fa5Smrg test x$BUILD_HTMLDOC != xno; then 164032034fa5Smrg BUILDHTMLDOC=yes 164132034fa5Smrgfi 164232034fa5SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 164332034fa5SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 16444ecf19b2Smrg 164532034fa5SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 164632034fa5SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 164732034fa5SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 164832034fa5SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 16494ecf19b2Smrg 165032034fa5SmrgAC_SUBST(MAKE_TEXT) 165132034fa5SmrgAC_SUBST(MAKE_PS) 165232034fa5SmrgAC_SUBST(MAKE_PDF) 165332034fa5SmrgAC_SUBST(MAKE_HTML) 165432034fa5Smrg]) # XORG_CHECK_DOCBOOK 16554ecf19b2Smrg 165632034fa5Smrg# XORG_CHECK_MALLOC_ZERO 165732034fa5Smrg# ---------------------- 165832034fa5Smrg# Minimum version: 1.0.0 165932034fa5Smrg# 166032034fa5Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 166132034fa5Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 166232034fa5Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 166332034fa5SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 166432034fa5SmrgAC_ARG_ENABLE(malloc0returnsnull, 166532034fa5Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 166632034fa5Smrg [malloc(0) returns NULL (default: auto)]), 166732034fa5Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 166832034fa5Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 166932034fa5Smrg 167032034fa5SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 167132034fa5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 167232034fa5Smrg AC_RUN_IFELSE([ 167332034fa5Smrgchar *malloc(); 167432034fa5Smrgchar *realloc(); 167532034fa5Smrgchar *calloc(); 167632034fa5Smrgmain() { 167732034fa5Smrg char *m0, *r0, *c0, *p; 167832034fa5Smrg m0 = malloc(0); 167932034fa5Smrg p = malloc(10); 168032034fa5Smrg r0 = realloc(p,0); 168132034fa5Smrg c0 = calloc(0); 168232034fa5Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 168332034fa5Smrg}], 168432034fa5Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 168532034fa5Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 168632034fa5Smrgfi 168732034fa5SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 16884ecf19b2Smrg 168932034fa5Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 169032034fa5Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 169132034fa5Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 169232034fa5Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 169332034fa5Smrgelse 169432034fa5Smrg MALLOC_ZERO_CFLAGS="" 169532034fa5Smrg XMALLOC_ZERO_CFLAGS="" 169632034fa5Smrg XTMALLOC_ZERO_CFLAGS="" 169732034fa5Smrgfi 16984ecf19b2Smrg 169932034fa5SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 170032034fa5SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 170132034fa5SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 170232034fa5Smrg]) # XORG_CHECK_MALLOC_ZERO 170332034fa5Smrg 170432034fa5Smrg# XORG_WITH_LINT() 170532034fa5Smrg# ---------------- 170632034fa5Smrg# Minimum version: 1.1.0 170732034fa5Smrg# 170832034fa5Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 170932034fa5Smrg# is specified. (Use --with-lint=sparse for sparse.) 171032034fa5Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 171132034fa5Smrg# Sets $LINT_FLAGS to flags to pass to source checker 171232034fa5Smrg# Sets LINT automake conditional if enabled (default: disabled) 171332034fa5Smrg# 171432034fa5SmrgAC_DEFUN([XORG_WITH_LINT],[ 171532034fa5Smrg 171632034fa5Smrg# Allow checking code with lint, sparse, etc. 171732034fa5SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 171832034fa5Smrg [Use a lint-style source code checker (default: disabled)])], 171932034fa5Smrg [use_lint=$withval], [use_lint=no]) 172032034fa5Smrgif test "x$use_lint" = "xyes" ; then 172132034fa5Smrg LINT="lint" 17224ecf19b2Smrgelse 172332034fa5Smrg LINT="$use_lint" 172432034fa5Smrgfi 172532034fa5Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 172632034fa5Smrg case $LINT in 172732034fa5Smrg lint|*/lint) 172832034fa5Smrg case $host_os in 172932034fa5Smrg solaris*) 173032034fa5Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 173132034fa5Smrg ;; 173232034fa5Smrg esac 173332034fa5Smrg ;; 173432034fa5Smrg esac 17354ecf19b2Smrgfi 17364ecf19b2Smrg 173732034fa5SmrgAC_SUBST(LINT) 173832034fa5SmrgAC_SUBST(LINT_FLAGS) 173932034fa5SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 17404ecf19b2Smrg 174132034fa5Smrg]) # XORG_WITH_LINT 17424ecf19b2Smrg 174332034fa5Smrg# XORG_LINT_LIBRARY(LIBNAME) 174432034fa5Smrg# -------------------------- 174532034fa5Smrg# Minimum version: 1.1.0 174632034fa5Smrg# 174732034fa5Smrg# Sets up flags for building lint libraries for checking programs that call 174832034fa5Smrg# functions in the library. 174932034fa5Smrg# Disabled by default, enable with --enable-lint-library 175032034fa5Smrg# Sets: 175132034fa5Smrg# @LINTLIB@ - name of lint library file to make 175232034fa5Smrg# MAKE_LINT_LIB - automake conditional 175332034fa5Smrg# 17544ecf19b2Smrg 175532034fa5SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 175632034fa5SmrgAC_REQUIRE([XORG_WITH_LINT]) 175732034fa5Smrg# Build lint "library" for more indepth checks of programs calling this library 175832034fa5SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 175932034fa5Smrg [Create lint library (default: disabled)])], 176032034fa5Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 176132034fa5Smrgif test "x$make_lint_lib" != "xno" ; then 176232034fa5Smrg if test "x$LINT" = "xno" ; then 176332034fa5Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 176432034fa5Smrg fi 176532034fa5Smrg if test "x$make_lint_lib" = "xyes" ; then 176632034fa5Smrg LINTLIB=llib-l$1.ln 176732034fa5Smrg else 176832034fa5Smrg LINTLIB=$make_lint_lib 176932034fa5Smrg fi 177032034fa5Smrgfi 177132034fa5SmrgAC_SUBST(LINTLIB) 177232034fa5SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 17734ecf19b2Smrg 177432034fa5Smrg]) # XORG_LINT_LIBRARY 17754ecf19b2Smrg 177632034fa5Smrg# XORG_CWARNFLAGS 177732034fa5Smrg# --------------- 177832034fa5Smrg# Minimum version: 1.2.0 177932034fa5Smrg# 178032034fa5Smrg# Defines CWARNFLAGS to enable C compiler warnings. 178132034fa5Smrg# 178232034fa5SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 178332034fa5SmrgAC_REQUIRE([AC_PROG_CC]) 178432034fa5Smrgif test "x$GCC" = xyes ; then 178532034fa5Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 178632034fa5Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 178732034fa5Smrg-Wbad-function-cast" 178832034fa5Smrg case `$CC -dumpversion` in 178932034fa5Smrg 3.4.* | 4.*) 179032034fa5Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 179132034fa5Smrg ;; 179232034fa5Smrg esac 179332034fa5Smrgelse 179432034fa5Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 179532034fa5Smrg if test "x$SUNCC" = "xyes"; then 179632034fa5Smrg CWARNFLAGS="-v" 179732034fa5Smrg fi 179832034fa5Smrgfi 179932034fa5SmrgAC_SUBST(CWARNFLAGS) 180032034fa5Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 180132034fa5Smrg]) # XORG_CWARNFLAGS 18024ecf19b2Smrg 180332034fa5Smrg# XORG_STRICT_OPTION 180432034fa5Smrg# ----------------------- 180532034fa5Smrg# Minimum version: 1.3.0 180632034fa5Smrg# 180732034fa5Smrg# Add configure option to enable strict compilation 180832034fa5SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 180932034fa5SmrgAC_REQUIRE([AC_PROG_CC]) 181032034fa5SmrgAC_REQUIRE([AC_PROG_CC_C99]) 181132034fa5SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 181232034fa5Smrg 181332034fa5SmrgAC_ARG_ENABLE(strict-compilation, 181432034fa5Smrg AS_HELP_STRING([--enable-strict-compilation], 181532034fa5Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 181632034fa5Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 181732034fa5Smrgif test "x$STRICT_COMPILE" = "xyes"; then 181832034fa5Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 181932034fa5Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 182032034fa5Smrg if test "x$GCC" = xyes ; then 182132034fa5Smrg STRICT_CFLAGS="-pedantic -Werror" 182232034fa5Smrg elif test "x$SUNCC" = "xyes"; then 182332034fa5Smrg STRICT_CFLAGS="-errwarn" 182432034fa5Smrg elif test "x$INTELCC" = "xyes"; then 182532034fa5Smrg STRICT_CFLAGS="-Werror" 182632034fa5Smrg fi 182732034fa5Smrgfi 182832034fa5SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 182932034fa5SmrgAC_SUBST([CWARNFLAGS]) 183032034fa5Smrg]) # XORG_STRICT_OPTION 18314ecf19b2Smrg 183232034fa5Smrg# XORG_DEFAULT_OPTIONS 183332034fa5Smrg# -------------------- 183432034fa5Smrg# Minimum version: 1.3.0 183532034fa5Smrg# 183632034fa5Smrg# Defines default options for X.Org modules. 183732034fa5Smrg# 183832034fa5SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 183932034fa5SmrgXORG_CWARNFLAGS 184032034fa5SmrgXORG_STRICT_OPTION 184132034fa5SmrgXORG_RELEASE_VERSION 184232034fa5SmrgXORG_CHANGELOG 184332034fa5SmrgXORG_MANPAGE_SECTIONS 184432034fa5Smrg]) # XORG_DEFAULT_OPTIONS 184532034fa5Smrgdnl Copyright 2005 Red Hat, Inc 184632034fa5Smrgdnl 184732034fa5Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 184832034fa5Smrgdnl documentation for any purpose is hereby granted without fee, provided that 184932034fa5Smrgdnl the above copyright notice appear in all copies and that both that 185032034fa5Smrgdnl copyright notice and this permission notice appear in supporting 185132034fa5Smrgdnl documentation. 185232034fa5Smrgdnl 185332034fa5Smrgdnl The above copyright notice and this permission notice shall be included 185432034fa5Smrgdnl in all copies or substantial portions of the Software. 185532034fa5Smrgdnl 185632034fa5Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 185732034fa5Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 185832034fa5Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 185932034fa5Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 186032034fa5Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 186132034fa5Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 186232034fa5Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 186332034fa5Smrgdnl 186432034fa5Smrgdnl Except as contained in this notice, the name of the copyright holders shall 186532034fa5Smrgdnl not be used in advertising or otherwise to promote the sale, use or 186632034fa5Smrgdnl other dealings in this Software without prior written authorization 186732034fa5Smrgdnl from the copyright holders. 186832034fa5Smrgdnl 186932034fa5Smrg 187032034fa5Smrg# XORG_RELEASE_VERSION 187132034fa5Smrg# -------------------- 187232034fa5Smrg# Adds --with/without-release-string and changes the PACKAGE and 187332034fa5Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 187432034fa5Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 187532034fa5Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 187632034fa5Smrg 187732034fa5SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 187832034fa5Smrg AC_ARG_WITH(release-version, 187932034fa5Smrg AS_HELP_STRING([--with-release-version=STRING], 188032034fa5Smrg [Use release version string in package name]), 188132034fa5Smrg [RELEASE_VERSION="$withval"], 188232034fa5Smrg [RELEASE_VERSION=""]) 188332034fa5Smrg if test "x$RELEASE_VERSION" != "x"; then 188432034fa5Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 188532034fa5Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 188632034fa5Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 188732034fa5Smrg fi 188832034fa5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 188932034fa5Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 189032034fa5Smrg [Major version of this package]) 189132034fa5Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 189232034fa5Smrg if test "x$PVM" = "x"; then 189332034fa5Smrg PVM="0" 189432034fa5Smrg fi 189532034fa5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 189632034fa5Smrg [$PVM], 189732034fa5Smrg [Minor version of this package]) 189832034fa5Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 189932034fa5Smrg if test "x$PVP" = "x"; then 190032034fa5Smrg PVP="0" 190132034fa5Smrg fi 190232034fa5Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 190332034fa5Smrg [$PVP], 190432034fa5Smrg [Patch version of this package]) 190532034fa5Smrg]) 190632034fa5Smrg 190732034fa5Smrg# XORG_CHANGELOG() 190832034fa5Smrg# ---------------- 190932034fa5Smrg# Minimum version: 1.2.0 191032034fa5Smrg# 191132034fa5Smrg# Defines the variable CHANGELOG_CMD as the command to generate 191232034fa5Smrg# ChangeLog from git. 191332034fa5Smrg# 191432034fa5Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 191532034fa5Smrg# 191632034fa5SmrgAC_DEFUN([XORG_CHANGELOG], [ 191732034fa5SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 191832034fa5Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 191932034fa5Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 192032034fa5SmrgAC_SUBST([CHANGELOG_CMD]) 192132034fa5SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 192232034fa5Smrg]) # XORG_CHANGELOG 19234ecf19b2Smrg 19244ecf19b2Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 19254ecf19b2Smrg# 19264ecf19b2Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 19274ecf19b2Smrg# 19284ecf19b2Smrg# This program is free software; you can redistribute it and/or modify 19294ecf19b2Smrg# it under the terms of the GNU General Public License as published by 19304ecf19b2Smrg# the Free Software Foundation; either version 2 of the License, or 19314ecf19b2Smrg# (at your option) any later version. 19324ecf19b2Smrg# 19334ecf19b2Smrg# This program is distributed in the hope that it will be useful, but 19344ecf19b2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 19354ecf19b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19364ecf19b2Smrg# General Public License for more details. 19374ecf19b2Smrg# 19384ecf19b2Smrg# You should have received a copy of the GNU General Public License 19394ecf19b2Smrg# along with this program; if not, write to the Free Software 19404ecf19b2Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19414ecf19b2Smrg# 19424ecf19b2Smrg# As a special exception to the GNU General Public License, if you 19434ecf19b2Smrg# distribute this file as part of a program that contains a 19444ecf19b2Smrg# configuration script generated by Autoconf, you may include it under 19454ecf19b2Smrg# the same distribution terms that you use for the rest of that program. 19464ecf19b2Smrg 19474ecf19b2Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 19484ecf19b2Smrg# ---------------------------------- 19494ecf19b2SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 19504ecf19b2Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 19514ecf19b2Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 19524ecf19b2SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 19534ecf19b2Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 19544ecf19b2Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 19554ecf19b2Smrgfi 19564ecf19b2Smrgif test -n "$PKG_CONFIG"; then 19574ecf19b2Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 19584ecf19b2Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 19594ecf19b2Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 19604ecf19b2Smrg AC_MSG_RESULT([yes]) 19614ecf19b2Smrg else 19624ecf19b2Smrg AC_MSG_RESULT([no]) 19634ecf19b2Smrg PKG_CONFIG="" 19644ecf19b2Smrg fi 19654ecf19b2Smrg 19664ecf19b2Smrgfi[]dnl 19674ecf19b2Smrg])# PKG_PROG_PKG_CONFIG 19684ecf19b2Smrg 19694ecf19b2Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 19704ecf19b2Smrg# 19714ecf19b2Smrg# Check to see whether a particular set of modules exists. Similar 19724ecf19b2Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 19734ecf19b2Smrg# 19744ecf19b2Smrg# 19754ecf19b2Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 19764ecf19b2Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 19774ecf19b2Smrg# PKG_CHECK_EXISTS manually 19784ecf19b2Smrg# -------------------------------------------------------------- 19794ecf19b2SmrgAC_DEFUN([PKG_CHECK_EXISTS], 19804ecf19b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 19814ecf19b2Smrgif test -n "$PKG_CONFIG" && \ 19824ecf19b2Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 19834ecf19b2Smrg m4_ifval([$2], [$2], [:]) 19844ecf19b2Smrgm4_ifvaln([$3], [else 19854ecf19b2Smrg $3])dnl 19864ecf19b2Smrgfi]) 19874ecf19b2Smrg 19884ecf19b2Smrg 19894ecf19b2Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 19904ecf19b2Smrg# --------------------------------------------- 19914ecf19b2Smrgm4_define([_PKG_CONFIG], 199232034fa5Smrg[if test -n "$$1"; then 199332034fa5Smrg pkg_cv_[]$1="$$1" 199432034fa5Smrg elif test -n "$PKG_CONFIG"; then 199532034fa5Smrg PKG_CHECK_EXISTS([$3], 199632034fa5Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 199732034fa5Smrg [pkg_failed=yes]) 199832034fa5Smrg else 199932034fa5Smrg pkg_failed=untried 20004ecf19b2Smrgfi[]dnl 20014ecf19b2Smrg])# _PKG_CONFIG 20024ecf19b2Smrg 20034ecf19b2Smrg# _PKG_SHORT_ERRORS_SUPPORTED 20044ecf19b2Smrg# ----------------------------- 20054ecf19b2SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 20064ecf19b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 20074ecf19b2Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 20084ecf19b2Smrg _pkg_short_errors_supported=yes 20094ecf19b2Smrgelse 20104ecf19b2Smrg _pkg_short_errors_supported=no 20114ecf19b2Smrgfi[]dnl 20124ecf19b2Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 20134ecf19b2Smrg 20144ecf19b2Smrg 20154ecf19b2Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 20164ecf19b2Smrg# [ACTION-IF-NOT-FOUND]) 20174ecf19b2Smrg# 20184ecf19b2Smrg# 20194ecf19b2Smrg# Note that if there is a possibility the first call to 20204ecf19b2Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 20214ecf19b2Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 20224ecf19b2Smrg# 20234ecf19b2Smrg# 20244ecf19b2Smrg# -------------------------------------------------------------- 20254ecf19b2SmrgAC_DEFUN([PKG_CHECK_MODULES], 20264ecf19b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 20274ecf19b2SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 20284ecf19b2SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 20294ecf19b2Smrg 20304ecf19b2Smrgpkg_failed=no 20314ecf19b2SmrgAC_MSG_CHECKING([for $1]) 20324ecf19b2Smrg 20334ecf19b2Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 20344ecf19b2Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 20354ecf19b2Smrg 20364ecf19b2Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 20374ecf19b2Smrgand $1[]_LIBS to avoid the need to call pkg-config. 20384ecf19b2SmrgSee the pkg-config man page for more details.]) 20394ecf19b2Smrg 20404ecf19b2Smrgif test $pkg_failed = yes; then 20414ecf19b2Smrg _PKG_SHORT_ERRORS_SUPPORTED 20424ecf19b2Smrg if test $_pkg_short_errors_supported = yes; then 204332034fa5Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 20444ecf19b2Smrg else 204532034fa5Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 20464ecf19b2Smrg fi 20474ecf19b2Smrg # Put the nasty error message in config.log where it belongs 20484ecf19b2Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 20494ecf19b2Smrg 20504ecf19b2Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 20514ecf19b2Smrg[Package requirements ($2) were not met: 20524ecf19b2Smrg 20534ecf19b2Smrg$$1_PKG_ERRORS 20544ecf19b2Smrg 20554ecf19b2SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 20564ecf19b2Smrginstalled software in a non-standard prefix. 20574ecf19b2Smrg 20584ecf19b2Smrg_PKG_TEXT 20594ecf19b2Smrg])], 206032034fa5Smrg [AC_MSG_RESULT([no]) 206132034fa5Smrg $4]) 20624ecf19b2Smrgelif test $pkg_failed = untried; then 20634ecf19b2Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 20644ecf19b2Smrg[The pkg-config script could not be found or is too old. Make sure it 20654ecf19b2Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 20664ecf19b2Smrgpath to pkg-config. 20674ecf19b2Smrg 20684ecf19b2Smrg_PKG_TEXT 20694ecf19b2Smrg 207032034fa5SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 20714ecf19b2Smrg [$4]) 20724ecf19b2Smrgelse 20734ecf19b2Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 20744ecf19b2Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 20754ecf19b2Smrg AC_MSG_RESULT([yes]) 20764ecf19b2Smrg ifelse([$3], , :, [$3]) 20774ecf19b2Smrgfi[]dnl 20784ecf19b2Smrg])# PKG_CHECK_MODULES 20794ecf19b2Smrg 2080