aclocal.m4 revision 0e20ee16
10e20ee16Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 20e20ee16Smrg 30e20ee16Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 40e20ee16Smrg# Free Software Foundation, Inc. 50e20ee16Smrg# This file is free software; the Free Software Foundation 60e20ee16Smrg# gives unlimited permission to copy and/or distribute it, 70e20ee16Smrg# with or without modifications, as long as this notice is preserved. 80e20ee16Smrg 90e20ee16Smrg# This program is distributed in the hope that it will be useful, 100e20ee16Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 110e20ee16Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 120e20ee16Smrg# PARTICULAR PURPOSE. 130e20ee16Smrg 140e20ee16Smrg# Do all the work for Automake. -*- Autoconf -*- 150e20ee16Smrg 160e20ee16Smrg# This macro actually does too much some checks are only needed if 170e20ee16Smrg# your package does certain things. But this isn't really a big deal. 180e20ee16Smrg 190e20ee16Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 200e20ee16Smrg# Free Software Foundation, Inc. 210e20ee16Smrg 220e20ee16Smrg# This program is free software; you can redistribute it and/or modify 230e20ee16Smrg# it under the terms of the GNU General Public License as published by 240e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 250e20ee16Smrg# any later version. 260e20ee16Smrg 270e20ee16Smrg# This program is distributed in the hope that it will be useful, 280e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 290e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 300e20ee16Smrg# GNU General Public License for more details. 310e20ee16Smrg 320e20ee16Smrg# You should have received a copy of the GNU General Public License 330e20ee16Smrg# along with this program; if not, write to the Free Software 340e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 350e20ee16Smrg# 02111-1307, USA. 360e20ee16Smrg 370e20ee16Smrg# serial 10 380e20ee16Smrg 390e20ee16SmrgAC_PREREQ([2.54]) 400e20ee16Smrg 410e20ee16Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 420e20ee16Smrg# the ones we care about. 430e20ee16Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 440e20ee16Smrg 450e20ee16Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 460e20ee16Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 470e20ee16Smrg# ----------------------------------------------- 480e20ee16Smrg# The call with PACKAGE and VERSION arguments is the old style 490e20ee16Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 500e20ee16Smrg# and VERSION should now be passed to AC_INIT and removed from 510e20ee16Smrg# the call to AM_INIT_AUTOMAKE. 520e20ee16Smrg# We support both call styles for the transition. After 530e20ee16Smrg# the next Automake release, Autoconf can make the AC_INIT 540e20ee16Smrg# arguments mandatory, and then we can depend on a new Autoconf 550e20ee16Smrg# release and drop the old call support. 560e20ee16SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 570e20ee16Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 580e20ee16Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 590e20ee16Smrg# test to see if srcdir already configured 600e20ee16Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 610e20ee16Smrg test -f $srcdir/config.status; then 620e20ee16Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 630e20ee16Smrgfi 640e20ee16Smrg 650e20ee16Smrg# test whether we have cygpath 660e20ee16Smrgif test -z "$CYGPATH_W"; then 670e20ee16Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 680e20ee16Smrg CYGPATH_W='cygpath -w' 690e20ee16Smrg else 700e20ee16Smrg CYGPATH_W=echo 710e20ee16Smrg fi 720e20ee16Smrgfi 730e20ee16SmrgAC_SUBST([CYGPATH_W]) 740e20ee16Smrg 750e20ee16Smrg# Define the identity of the package. 760e20ee16Smrgdnl Distinguish between old-style and new-style calls. 770e20ee16Smrgm4_ifval([$2], 780e20ee16Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 790e20ee16Smrg AC_SUBST([PACKAGE], [$1])dnl 800e20ee16Smrg AC_SUBST([VERSION], [$2])], 810e20ee16Smrg[_AM_SET_OPTIONS([$1])dnl 820e20ee16Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 830e20ee16Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 840e20ee16Smrg 850e20ee16Smrg_AM_IF_OPTION([no-define],, 860e20ee16Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 870e20ee16Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 880e20ee16Smrg 890e20ee16Smrg# Some tools Automake needs. 900e20ee16SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 910e20ee16SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 920e20ee16SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 930e20ee16SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 940e20ee16SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 950e20ee16SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 960e20ee16SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 970e20ee16SmrgAM_MISSING_PROG(AMTAR, tar) 980e20ee16SmrgAM_PROG_INSTALL_SH 990e20ee16SmrgAM_PROG_INSTALL_STRIP 1000e20ee16Smrg# We need awk for the "check" target. The system "awk" is bad on 1010e20ee16Smrg# some platforms. 1020e20ee16SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1030e20ee16SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1040e20ee16SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1050e20ee16Smrg 1060e20ee16Smrg_AM_IF_OPTION([no-dependencies],, 1070e20ee16Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1080e20ee16Smrg [_AM_DEPENDENCIES(CC)], 1090e20ee16Smrg [define([AC_PROG_CC], 1100e20ee16Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1110e20ee16SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1120e20ee16Smrg [_AM_DEPENDENCIES(CXX)], 1130e20ee16Smrg [define([AC_PROG_CXX], 1140e20ee16Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1150e20ee16Smrg]) 1160e20ee16Smrg]) 1170e20ee16Smrg 1180e20ee16Smrg 1190e20ee16Smrg# When config.status generates a header, we must update the stamp-h file. 1200e20ee16Smrg# This file resides in the same directory as the config header 1210e20ee16Smrg# that is generated. The stamp files are numbered to have different names. 1220e20ee16Smrg 1230e20ee16Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1240e20ee16Smrg# loop where config.status creates the headers, so we can generate 1250e20ee16Smrg# our stamp files there. 1260e20ee16SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1270e20ee16Smrg[# Compute $1's index in $config_headers. 1280e20ee16Smrg_am_stamp_count=1 1290e20ee16Smrgfor _am_header in $config_headers :; do 1300e20ee16Smrg case $_am_header in 1310e20ee16Smrg $1 | $1:* ) 1320e20ee16Smrg break ;; 1330e20ee16Smrg * ) 1340e20ee16Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1350e20ee16Smrg esac 1360e20ee16Smrgdone 1370e20ee16Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1380e20ee16Smrg 1390e20ee16Smrg# Copyright 2002 Free Software Foundation, Inc. 1400e20ee16Smrg 1410e20ee16Smrg# This program is free software; you can redistribute it and/or modify 1420e20ee16Smrg# it under the terms of the GNU General Public License as published by 1430e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 1440e20ee16Smrg# any later version. 1450e20ee16Smrg 1460e20ee16Smrg# This program is distributed in the hope that it will be useful, 1470e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1480e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1490e20ee16Smrg# GNU General Public License for more details. 1500e20ee16Smrg 1510e20ee16Smrg# You should have received a copy of the GNU General Public License 1520e20ee16Smrg# along with this program; if not, write to the Free Software 1530e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1540e20ee16Smrg 1550e20ee16Smrg# AM_AUTOMAKE_VERSION(VERSION) 1560e20ee16Smrg# ---------------------------- 1570e20ee16Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1580e20ee16Smrg# generated from the m4 files accompanying Automake X.Y. 1590e20ee16SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 1600e20ee16Smrg 1610e20ee16Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1620e20ee16Smrg# ------------------------------- 1630e20ee16Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 1640e20ee16Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 1650e20ee16SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1660e20ee16Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 1670e20ee16Smrg 1680e20ee16Smrg# Helper functions for option handling. -*- Autoconf -*- 1690e20ee16Smrg 1700e20ee16Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 1710e20ee16Smrg 1720e20ee16Smrg# This program is free software; you can redistribute it and/or modify 1730e20ee16Smrg# it under the terms of the GNU General Public License as published by 1740e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 1750e20ee16Smrg# any later version. 1760e20ee16Smrg 1770e20ee16Smrg# This program is distributed in the hope that it will be useful, 1780e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1790e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1800e20ee16Smrg# GNU General Public License for more details. 1810e20ee16Smrg 1820e20ee16Smrg# You should have received a copy of the GNU General Public License 1830e20ee16Smrg# along with this program; if not, write to the Free Software 1840e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1850e20ee16Smrg# 02111-1307, USA. 1860e20ee16Smrg 1870e20ee16Smrg# serial 2 1880e20ee16Smrg 1890e20ee16Smrg# _AM_MANGLE_OPTION(NAME) 1900e20ee16Smrg# ----------------------- 1910e20ee16SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1920e20ee16Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1930e20ee16Smrg 1940e20ee16Smrg# _AM_SET_OPTION(NAME) 1950e20ee16Smrg# ------------------------------ 1960e20ee16Smrg# Set option NAME. Presently that only means defining a flag for this option. 1970e20ee16SmrgAC_DEFUN([_AM_SET_OPTION], 1980e20ee16Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1990e20ee16Smrg 2000e20ee16Smrg# _AM_SET_OPTIONS(OPTIONS) 2010e20ee16Smrg# ---------------------------------- 2020e20ee16Smrg# OPTIONS is a space-separated list of Automake options. 2030e20ee16SmrgAC_DEFUN([_AM_SET_OPTIONS], 2040e20ee16Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2050e20ee16Smrg 2060e20ee16Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2070e20ee16Smrg# ------------------------------------------- 2080e20ee16Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2090e20ee16SmrgAC_DEFUN([_AM_IF_OPTION], 2100e20ee16Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2110e20ee16Smrg 2120e20ee16Smrg# 2130e20ee16Smrg# Check to make sure that the build environment is sane. 2140e20ee16Smrg# 2150e20ee16Smrg 2160e20ee16Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 2170e20ee16Smrg 2180e20ee16Smrg# This program is free software; you can redistribute it and/or modify 2190e20ee16Smrg# it under the terms of the GNU General Public License as published by 2200e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 2210e20ee16Smrg# any later version. 2220e20ee16Smrg 2230e20ee16Smrg# This program is distributed in the hope that it will be useful, 2240e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2250e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2260e20ee16Smrg# GNU General Public License for more details. 2270e20ee16Smrg 2280e20ee16Smrg# You should have received a copy of the GNU General Public License 2290e20ee16Smrg# along with this program; if not, write to the Free Software 2300e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2310e20ee16Smrg# 02111-1307, USA. 2320e20ee16Smrg 2330e20ee16Smrg# serial 3 2340e20ee16Smrg 2350e20ee16Smrg# AM_SANITY_CHECK 2360e20ee16Smrg# --------------- 2370e20ee16SmrgAC_DEFUN([AM_SANITY_CHECK], 2380e20ee16Smrg[AC_MSG_CHECKING([whether build environment is sane]) 2390e20ee16Smrg# Just in case 2400e20ee16Smrgsleep 1 2410e20ee16Smrgecho timestamp > conftest.file 2420e20ee16Smrg# Do `set' in a subshell so we don't clobber the current shell's 2430e20ee16Smrg# arguments. Must try -L first in case configure is actually a 2440e20ee16Smrg# symlink; some systems play weird games with the mod time of symlinks 2450e20ee16Smrg# (eg FreeBSD returns the mod time of the symlink's containing 2460e20ee16Smrg# directory). 2470e20ee16Smrgif ( 2480e20ee16Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 2490e20ee16Smrg if test "$[*]" = "X"; then 2500e20ee16Smrg # -L didn't work. 2510e20ee16Smrg set X `ls -t $srcdir/configure conftest.file` 2520e20ee16Smrg fi 2530e20ee16Smrg rm -f conftest.file 2540e20ee16Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 2550e20ee16Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 2560e20ee16Smrg 2570e20ee16Smrg # If neither matched, then we have a broken ls. This can happen 2580e20ee16Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 2590e20ee16Smrg # broken ls alias from the environment. This has actually 2600e20ee16Smrg # happened. Such a system could not be considered "sane". 2610e20ee16Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2620e20ee16Smrgalias in your environment]) 2630e20ee16Smrg fi 2640e20ee16Smrg 2650e20ee16Smrg test "$[2]" = conftest.file 2660e20ee16Smrg ) 2670e20ee16Smrgthen 2680e20ee16Smrg # Ok. 2690e20ee16Smrg : 2700e20ee16Smrgelse 2710e20ee16Smrg AC_MSG_ERROR([newly created file is older than distributed files! 2720e20ee16SmrgCheck your system clock]) 2730e20ee16Smrgfi 2740e20ee16SmrgAC_MSG_RESULT(yes)]) 2750e20ee16Smrg 2760e20ee16Smrg# -*- Autoconf -*- 2770e20ee16Smrg 2780e20ee16Smrg 2790e20ee16Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 2800e20ee16Smrg 2810e20ee16Smrg# This program is free software; you can redistribute it and/or modify 2820e20ee16Smrg# it under the terms of the GNU General Public License as published by 2830e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 2840e20ee16Smrg# any later version. 2850e20ee16Smrg 2860e20ee16Smrg# This program is distributed in the hope that it will be useful, 2870e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2880e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2890e20ee16Smrg# GNU General Public License for more details. 2900e20ee16Smrg 2910e20ee16Smrg# You should have received a copy of the GNU General Public License 2920e20ee16Smrg# along with this program; if not, write to the Free Software 2930e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2940e20ee16Smrg# 02111-1307, USA. 2950e20ee16Smrg 2960e20ee16Smrg# serial 3 2970e20ee16Smrg 2980e20ee16Smrg# AM_MISSING_PROG(NAME, PROGRAM) 2990e20ee16Smrg# ------------------------------ 3000e20ee16SmrgAC_DEFUN([AM_MISSING_PROG], 3010e20ee16Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3020e20ee16Smrg$1=${$1-"${am_missing_run}$2"} 3030e20ee16SmrgAC_SUBST($1)]) 3040e20ee16Smrg 3050e20ee16Smrg 3060e20ee16Smrg# AM_MISSING_HAS_RUN 3070e20ee16Smrg# ------------------ 3080e20ee16Smrg# Define MISSING if not defined so far and test if it supports --run. 3090e20ee16Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 3100e20ee16SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 3110e20ee16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3120e20ee16Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 3130e20ee16Smrg# Use eval to expand $SHELL 3140e20ee16Smrgif eval "$MISSING --run true"; then 3150e20ee16Smrg am_missing_run="$MISSING --run " 3160e20ee16Smrgelse 3170e20ee16Smrg am_missing_run= 3180e20ee16Smrg AC_MSG_WARN([`missing' script is too old or missing]) 3190e20ee16Smrgfi 3200e20ee16Smrg]) 3210e20ee16Smrg 3220e20ee16Smrg# AM_AUX_DIR_EXPAND 3230e20ee16Smrg 3240e20ee16Smrg# Copyright 2001 Free Software Foundation, Inc. 3250e20ee16Smrg 3260e20ee16Smrg# This program is free software; you can redistribute it and/or modify 3270e20ee16Smrg# it under the terms of the GNU General Public License as published by 3280e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 3290e20ee16Smrg# any later version. 3300e20ee16Smrg 3310e20ee16Smrg# This program is distributed in the hope that it will be useful, 3320e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 3330e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3340e20ee16Smrg# GNU General Public License for more details. 3350e20ee16Smrg 3360e20ee16Smrg# You should have received a copy of the GNU General Public License 3370e20ee16Smrg# along with this program; if not, write to the Free Software 3380e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 3390e20ee16Smrg# 02111-1307, USA. 3400e20ee16Smrg 3410e20ee16Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 3420e20ee16Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 3430e20ee16Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 3440e20ee16Smrg# 3450e20ee16Smrg# Of course, Automake must honor this variable whenever it calls a 3460e20ee16Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 3470e20ee16Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 3480e20ee16Smrg# depending on how configure is run. This is pretty annoying, since 3490e20ee16Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 3500e20ee16Smrg# source directory, any form will work fine, but in subdirectories a 3510e20ee16Smrg# relative path needs to be adjusted first. 3520e20ee16Smrg# 3530e20ee16Smrg# $ac_aux_dir/missing 3540e20ee16Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 3550e20ee16Smrg# $top_srcdir/$ac_aux_dir/missing 3560e20ee16Smrg# fails if $ac_aux_dir is absolute, 3570e20ee16Smrg# fails when called from a subdirectory in a VPATH build with 3580e20ee16Smrg# a relative $ac_aux_dir 3590e20ee16Smrg# 3600e20ee16Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 3610e20ee16Smrg# are both prefixed by $srcdir. In an in-source build this is usually 3620e20ee16Smrg# harmless because $srcdir is `.', but things will broke when you 3630e20ee16Smrg# start a VPATH build or use an absolute $srcdir. 3640e20ee16Smrg# 3650e20ee16Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 3660e20ee16Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 3670e20ee16Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 3680e20ee16Smrg# and then we would define $MISSING as 3690e20ee16Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 3700e20ee16Smrg# This will work as long as MISSING is not called from configure, because 3710e20ee16Smrg# unfortunately $(top_srcdir) has no meaning in configure. 3720e20ee16Smrg# However there are other variables, like CC, which are often used in 3730e20ee16Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3740e20ee16Smrg# 3750e20ee16Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3760e20ee16Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3770e20ee16Smrg# configured tree to be moved without reconfiguration. 3780e20ee16Smrg 3790e20ee16Smrg# Rely on autoconf to set up CDPATH properly. 3800e20ee16SmrgAC_PREREQ([2.50]) 3810e20ee16Smrg 3820e20ee16SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 3830e20ee16Smrg# expand $ac_aux_dir to an absolute path 3840e20ee16Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 3850e20ee16Smrg]) 3860e20ee16Smrg 3870e20ee16Smrg# AM_PROG_INSTALL_SH 3880e20ee16Smrg# ------------------ 3890e20ee16Smrg# Define $install_sh. 3900e20ee16Smrg 3910e20ee16Smrg# Copyright 2001 Free Software Foundation, Inc. 3920e20ee16Smrg 3930e20ee16Smrg# This program is free software; you can redistribute it and/or modify 3940e20ee16Smrg# it under the terms of the GNU General Public License as published by 3950e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 3960e20ee16Smrg# any later version. 3970e20ee16Smrg 3980e20ee16Smrg# This program is distributed in the hope that it will be useful, 3990e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4000e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4010e20ee16Smrg# GNU General Public License for more details. 4020e20ee16Smrg 4030e20ee16Smrg# You should have received a copy of the GNU General Public License 4040e20ee16Smrg# along with this program; if not, write to the Free Software 4050e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4060e20ee16Smrg# 02111-1307, USA. 4070e20ee16Smrg 4080e20ee16SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 4090e20ee16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 4100e20ee16Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 4110e20ee16SmrgAC_SUBST(install_sh)]) 4120e20ee16Smrg 4130e20ee16Smrg# AM_PROG_INSTALL_STRIP 4140e20ee16Smrg 4150e20ee16Smrg# Copyright 2001 Free Software Foundation, Inc. 4160e20ee16Smrg 4170e20ee16Smrg# This program is free software; you can redistribute it and/or modify 4180e20ee16Smrg# it under the terms of the GNU General Public License as published by 4190e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 4200e20ee16Smrg# any later version. 4210e20ee16Smrg 4220e20ee16Smrg# This program is distributed in the hope that it will be useful, 4230e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4240e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4250e20ee16Smrg# GNU General Public License for more details. 4260e20ee16Smrg 4270e20ee16Smrg# You should have received a copy of the GNU General Public License 4280e20ee16Smrg# along with this program; if not, write to the Free Software 4290e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4300e20ee16Smrg# 02111-1307, USA. 4310e20ee16Smrg 4320e20ee16Smrg# One issue with vendor `install' (even GNU) is that you can't 4330e20ee16Smrg# specify the program used to strip binaries. This is especially 4340e20ee16Smrg# annoying in cross-compiling environments, where the build's strip 4350e20ee16Smrg# is unlikely to handle the host's binaries. 4360e20ee16Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 4370e20ee16Smrg# always use install-sh in `make install-strip', and initialize 4380e20ee16Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 4390e20ee16SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 4400e20ee16Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4410e20ee16Smrg# Installed binaries are usually stripped using `strip' when the user 4420e20ee16Smrg# run `make install-strip'. However `strip' might not be the right 4430e20ee16Smrg# tool to use in cross-compilation environments, therefore Automake 4440e20ee16Smrg# will honor the `STRIP' environment variable to overrule this program. 4450e20ee16Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 4460e20ee16Smrgif test "$cross_compiling" != no; then 4470e20ee16Smrg AC_CHECK_TOOL([STRIP], [strip], :) 4480e20ee16Smrgfi 4490e20ee16SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 4500e20ee16SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 4510e20ee16Smrg 4520e20ee16Smrg# -*- Autoconf -*- 4530e20ee16Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 4540e20ee16Smrg 4550e20ee16Smrg# This program is free software; you can redistribute it and/or modify 4560e20ee16Smrg# it under the terms of the GNU General Public License as published by 4570e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 4580e20ee16Smrg# any later version. 4590e20ee16Smrg 4600e20ee16Smrg# This program is distributed in the hope that it will be useful, 4610e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4620e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4630e20ee16Smrg# GNU General Public License for more details. 4640e20ee16Smrg 4650e20ee16Smrg# You should have received a copy of the GNU General Public License 4660e20ee16Smrg# along with this program; if not, write to the Free Software 4670e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4680e20ee16Smrg# 02111-1307, USA. 4690e20ee16Smrg 4700e20ee16Smrg# serial 1 4710e20ee16Smrg 4720e20ee16Smrg# Check whether the underlying file-system supports filenames 4730e20ee16Smrg# with a leading dot. For instance MS-DOS doesn't. 4740e20ee16SmrgAC_DEFUN([AM_SET_LEADING_DOT], 4750e20ee16Smrg[rm -rf .tst 2>/dev/null 4760e20ee16Smrgmkdir .tst 2>/dev/null 4770e20ee16Smrgif test -d .tst; then 4780e20ee16Smrg am__leading_dot=. 4790e20ee16Smrgelse 4800e20ee16Smrg am__leading_dot=_ 4810e20ee16Smrgfi 4820e20ee16Smrgrmdir .tst 2>/dev/null 4830e20ee16SmrgAC_SUBST([am__leading_dot])]) 4840e20ee16Smrg 4850e20ee16Smrg# serial 5 -*- Autoconf -*- 4860e20ee16Smrg 4870e20ee16Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4880e20ee16Smrg 4890e20ee16Smrg# This program is free software; you can redistribute it and/or modify 4900e20ee16Smrg# it under the terms of the GNU General Public License as published by 4910e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 4920e20ee16Smrg# any later version. 4930e20ee16Smrg 4940e20ee16Smrg# This program is distributed in the hope that it will be useful, 4950e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4960e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4970e20ee16Smrg# GNU General Public License for more details. 4980e20ee16Smrg 4990e20ee16Smrg# You should have received a copy of the GNU General Public License 5000e20ee16Smrg# along with this program; if not, write to the Free Software 5010e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 5020e20ee16Smrg# 02111-1307, USA. 5030e20ee16Smrg 5040e20ee16Smrg 5050e20ee16Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 5060e20ee16Smrg# written in clear, in which case automake, when reading aclocal.m4, 5070e20ee16Smrg# will think it sees a *use*, and therefore will trigger all it's 5080e20ee16Smrg# C support machinery. Also note that it means that autoscan, seeing 5090e20ee16Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 5100e20ee16Smrg 5110e20ee16Smrg 5120e20ee16Smrg 5130e20ee16Smrg# _AM_DEPENDENCIES(NAME) 5140e20ee16Smrg# ---------------------- 5150e20ee16Smrg# See how the compiler implements dependency checking. 5160e20ee16Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 5170e20ee16Smrg# We try a few techniques and use that to set a single cache variable. 5180e20ee16Smrg# 5190e20ee16Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 5200e20ee16Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 5210e20ee16Smrg# dependency, and given that the user is not expected to run this macro, 5220e20ee16Smrg# just rely on AC_PROG_CC. 5230e20ee16SmrgAC_DEFUN([_AM_DEPENDENCIES], 5240e20ee16Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 5250e20ee16SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 5260e20ee16SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 5270e20ee16SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 5280e20ee16Smrg 5290e20ee16Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 5300e20ee16Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 5310e20ee16Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 5320e20ee16Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 5330e20ee16Smrg [depcc="$$1" am_compiler_list=]) 5340e20ee16Smrg 5350e20ee16SmrgAC_CACHE_CHECK([dependency style of $depcc], 5360e20ee16Smrg [am_cv_$1_dependencies_compiler_type], 5370e20ee16Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5380e20ee16Smrg # We make a subdir and do the tests there. Otherwise we can end up 5390e20ee16Smrg # making bogus files that we don't know about and never remove. For 5400e20ee16Smrg # instance it was reported that on HP-UX the gcc test will end up 5410e20ee16Smrg # making a dummy file named `D' -- because `-MD' means `put the output 5420e20ee16Smrg # in D'. 5430e20ee16Smrg mkdir conftest.dir 5440e20ee16Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 5450e20ee16Smrg # using a relative directory. 5460e20ee16Smrg cp "$am_depcomp" conftest.dir 5470e20ee16Smrg cd conftest.dir 5480e20ee16Smrg # We will build objects and dependencies in a subdirectory because 5490e20ee16Smrg # it helps to detect inapplicable dependency modes. For instance 5500e20ee16Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 5510e20ee16Smrg # side effect of compilation, but ICC will put the dependencies in 5520e20ee16Smrg # the current directory while Tru64 will put them in the object 5530e20ee16Smrg # directory. 5540e20ee16Smrg mkdir sub 5550e20ee16Smrg 5560e20ee16Smrg am_cv_$1_dependencies_compiler_type=none 5570e20ee16Smrg if test "$am_compiler_list" = ""; then 5580e20ee16Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 5590e20ee16Smrg fi 5600e20ee16Smrg for depmode in $am_compiler_list; do 5610e20ee16Smrg # Setup a source with many dependencies, because some compilers 5620e20ee16Smrg # like to wrap large dependency lists on column 80 (with \), and 5630e20ee16Smrg # we should not choose a depcomp mode which is confused by this. 5640e20ee16Smrg # 5650e20ee16Smrg # We need to recreate these files for each test, as the compiler may 5660e20ee16Smrg # overwrite some of them when testing with obscure command lines. 5670e20ee16Smrg # This happens at least with the AIX C compiler. 5680e20ee16Smrg : > sub/conftest.c 5690e20ee16Smrg for i in 1 2 3 4 5 6; do 5700e20ee16Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 5710e20ee16Smrg : > sub/conftst$i.h 5720e20ee16Smrg done 5730e20ee16Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5740e20ee16Smrg 5750e20ee16Smrg case $depmode in 5760e20ee16Smrg nosideeffect) 5770e20ee16Smrg # after this tag, mechanisms are not by side-effect, so they'll 5780e20ee16Smrg # only be used when explicitly requested 5790e20ee16Smrg if test "x$enable_dependency_tracking" = xyes; then 5800e20ee16Smrg continue 5810e20ee16Smrg else 5820e20ee16Smrg break 5830e20ee16Smrg fi 5840e20ee16Smrg ;; 5850e20ee16Smrg none) break ;; 5860e20ee16Smrg esac 5870e20ee16Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 5880e20ee16Smrg # mode. It turns out that the SunPro C++ compiler does not properly 5890e20ee16Smrg # handle `-M -o', and we need to detect this. 5900e20ee16Smrg if depmode=$depmode \ 5910e20ee16Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 5920e20ee16Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 5930e20ee16Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 5940e20ee16Smrg >/dev/null 2>conftest.err && 5950e20ee16Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 5960e20ee16Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 5970e20ee16Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 5980e20ee16Smrg # icc doesn't choke on unknown options, it will just issue warnings 5990e20ee16Smrg # (even with -Werror). So we grep stderr for any message 6000e20ee16Smrg # that says an option was ignored. 6010e20ee16Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 6020e20ee16Smrg am_cv_$1_dependencies_compiler_type=$depmode 6030e20ee16Smrg break 6040e20ee16Smrg fi 6050e20ee16Smrg fi 6060e20ee16Smrg done 6070e20ee16Smrg 6080e20ee16Smrg cd .. 6090e20ee16Smrg rm -rf conftest.dir 6100e20ee16Smrgelse 6110e20ee16Smrg am_cv_$1_dependencies_compiler_type=none 6120e20ee16Smrgfi 6130e20ee16Smrg]) 6140e20ee16SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6150e20ee16SmrgAM_CONDITIONAL([am__fastdep$1], [ 6160e20ee16Smrg test "x$enable_dependency_tracking" != xno \ 6170e20ee16Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6180e20ee16Smrg]) 6190e20ee16Smrg 6200e20ee16Smrg 6210e20ee16Smrg# AM_SET_DEPDIR 6220e20ee16Smrg# ------------- 6230e20ee16Smrg# Choose a directory name for dependency files. 6240e20ee16Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6250e20ee16SmrgAC_DEFUN([AM_SET_DEPDIR], 6260e20ee16Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6270e20ee16SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6280e20ee16Smrg]) 6290e20ee16Smrg 6300e20ee16Smrg 6310e20ee16Smrg# AM_DEP_TRACK 6320e20ee16Smrg# ------------ 6330e20ee16SmrgAC_DEFUN([AM_DEP_TRACK], 6340e20ee16Smrg[AC_ARG_ENABLE(dependency-tracking, 6350e20ee16Smrg[ --disable-dependency-tracking Speeds up one-time builds 6360e20ee16Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 6370e20ee16Smrgif test "x$enable_dependency_tracking" != xno; then 6380e20ee16Smrg am_depcomp="$ac_aux_dir/depcomp" 6390e20ee16Smrg AMDEPBACKSLASH='\' 6400e20ee16Smrgfi 6410e20ee16SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6420e20ee16SmrgAC_SUBST([AMDEPBACKSLASH]) 6430e20ee16Smrg]) 6440e20ee16Smrg 6450e20ee16Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 6460e20ee16Smrg 6470e20ee16Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 6480e20ee16Smrg 6490e20ee16Smrg# This program is free software; you can redistribute it and/or modify 6500e20ee16Smrg# it under the terms of the GNU General Public License as published by 6510e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 6520e20ee16Smrg# any later version. 6530e20ee16Smrg 6540e20ee16Smrg# This program is distributed in the hope that it will be useful, 6550e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 6560e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6570e20ee16Smrg# GNU General Public License for more details. 6580e20ee16Smrg 6590e20ee16Smrg# You should have received a copy of the GNU General Public License 6600e20ee16Smrg# along with this program; if not, write to the Free Software 6610e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6620e20ee16Smrg# 02111-1307, USA. 6630e20ee16Smrg 6640e20ee16Smrg#serial 2 6650e20ee16Smrg 6660e20ee16Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 6670e20ee16Smrg# ------------------------------ 6680e20ee16SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6690e20ee16Smrg[for mf in $CONFIG_FILES; do 6700e20ee16Smrg # Strip MF so we end up with the name of the file. 6710e20ee16Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 6720e20ee16Smrg # Check whether this is an Automake generated Makefile or not. 6730e20ee16Smrg # We used to match only the files named `Makefile.in', but 6740e20ee16Smrg # some people rename them; so instead we look at the file content. 6750e20ee16Smrg # Grep'ing the first line is not enough: some people post-process 6760e20ee16Smrg # each Makefile.in and add a new line on top of each file to say so. 6770e20ee16Smrg # So let's grep whole file. 6780e20ee16Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6790e20ee16Smrg dirpart=`AS_DIRNAME("$mf")` 6800e20ee16Smrg else 6810e20ee16Smrg continue 6820e20ee16Smrg fi 6830e20ee16Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 6840e20ee16Smrg # Extract the definition of DEP_FILES from the Makefile without 6850e20ee16Smrg # running `make'. 6860e20ee16Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 6870e20ee16Smrg test -z "$DEPDIR" && continue 6880e20ee16Smrg # When using ansi2knr, U may be empty or an underscore; expand it 6890e20ee16Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 6900e20ee16Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 6910e20ee16Smrg # We invoke sed twice because it is the simplest approach to 6920e20ee16Smrg # changing $(DEPDIR) to its actual value in the expansion. 6930e20ee16Smrg for file in `sed -n -e ' 6940e20ee16Smrg /^DEP_FILES = .*\\\\$/ { 6950e20ee16Smrg s/^DEP_FILES = // 6960e20ee16Smrg :loop 6970e20ee16Smrg s/\\\\$// 6980e20ee16Smrg p 6990e20ee16Smrg n 7000e20ee16Smrg /\\\\$/ b loop 7010e20ee16Smrg p 7020e20ee16Smrg } 7030e20ee16Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 7040e20ee16Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7050e20ee16Smrg # Make sure the directory exists. 7060e20ee16Smrg test -f "$dirpart/$file" && continue 7070e20ee16Smrg fdir=`AS_DIRNAME(["$file"])` 7080e20ee16Smrg AS_MKDIR_P([$dirpart/$fdir]) 7090e20ee16Smrg # echo "creating $dirpart/$file" 7100e20ee16Smrg echo '# dummy' > "$dirpart/$file" 7110e20ee16Smrg done 7120e20ee16Smrgdone 7130e20ee16Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7140e20ee16Smrg 7150e20ee16Smrg 7160e20ee16Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7170e20ee16Smrg# ----------------------------- 7180e20ee16Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7190e20ee16Smrg# 7200e20ee16Smrg# This code is only required when automatic dependency tracking 7210e20ee16Smrg# is enabled. FIXME. This creates each `.P' file that we will 7220e20ee16Smrg# need in order to bootstrap the dependency handling code. 7230e20ee16SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7240e20ee16Smrg[AC_CONFIG_COMMANDS([depfiles], 7250e20ee16Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7260e20ee16Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7270e20ee16Smrg]) 7280e20ee16Smrg 7290e20ee16Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7300e20ee16Smrg 7310e20ee16Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 7320e20ee16Smrg 7330e20ee16Smrg# This program is free software; you can redistribute it and/or modify 7340e20ee16Smrg# it under the terms of the GNU General Public License as published by 7350e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 7360e20ee16Smrg# any later version. 7370e20ee16Smrg 7380e20ee16Smrg# This program is distributed in the hope that it will be useful, 7390e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 7400e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7410e20ee16Smrg# GNU General Public License for more details. 7420e20ee16Smrg 7430e20ee16Smrg# You should have received a copy of the GNU General Public License 7440e20ee16Smrg# along with this program; if not, write to the Free Software 7450e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7460e20ee16Smrg# 02111-1307, USA. 7470e20ee16Smrg 7480e20ee16Smrg# serial 2 7490e20ee16Smrg 7500e20ee16Smrg# AM_MAKE_INCLUDE() 7510e20ee16Smrg# ----------------- 7520e20ee16Smrg# Check to see how make treats includes. 7530e20ee16SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7540e20ee16Smrg[am_make=${MAKE-make} 7550e20ee16Smrgcat > confinc << 'END' 7560e20ee16Smrgam__doit: 7570e20ee16Smrg @echo done 7580e20ee16Smrg.PHONY: am__doit 7590e20ee16SmrgEND 7600e20ee16Smrg# If we don't find an include directive, just comment out the code. 7610e20ee16SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7620e20ee16Smrgam__include="#" 7630e20ee16Smrgam__quote= 7640e20ee16Smrg_am_result=none 7650e20ee16Smrg# First try GNU make style include. 7660e20ee16Smrgecho "include confinc" > confmf 7670e20ee16Smrg# We grep out `Entering directory' and `Leaving directory' 7680e20ee16Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 7690e20ee16Smrg# In particular we don't look at `^make:' because GNU make might 7700e20ee16Smrg# be invoked under some other name (usually "gmake"), in which 7710e20ee16Smrg# case it prints its new name instead of `make'. 7720e20ee16Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7730e20ee16Smrg am__include=include 7740e20ee16Smrg am__quote= 7750e20ee16Smrg _am_result=GNU 7760e20ee16Smrgfi 7770e20ee16Smrg# Now try BSD make style include. 7780e20ee16Smrgif test "$am__include" = "#"; then 7790e20ee16Smrg echo '.include "confinc"' > confmf 7800e20ee16Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7810e20ee16Smrg am__include=.include 7820e20ee16Smrg am__quote="\"" 7830e20ee16Smrg _am_result=BSD 7840e20ee16Smrg fi 7850e20ee16Smrgfi 7860e20ee16SmrgAC_SUBST([am__include]) 7870e20ee16SmrgAC_SUBST([am__quote]) 7880e20ee16SmrgAC_MSG_RESULT([$_am_result]) 7890e20ee16Smrgrm -f confinc confmf 7900e20ee16Smrg]) 7910e20ee16Smrg 7920e20ee16Smrg# AM_CONDITIONAL -*- Autoconf -*- 7930e20ee16Smrg 7940e20ee16Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 7950e20ee16Smrg 7960e20ee16Smrg# This program is free software; you can redistribute it and/or modify 7970e20ee16Smrg# it under the terms of the GNU General Public License as published by 7980e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 7990e20ee16Smrg# any later version. 8000e20ee16Smrg 8010e20ee16Smrg# This program is distributed in the hope that it will be useful, 8020e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8030e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8040e20ee16Smrg# GNU General Public License for more details. 8050e20ee16Smrg 8060e20ee16Smrg# You should have received a copy of the GNU General Public License 8070e20ee16Smrg# along with this program; if not, write to the Free Software 8080e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8090e20ee16Smrg# 02111-1307, USA. 8100e20ee16Smrg 8110e20ee16Smrg# serial 5 8120e20ee16Smrg 8130e20ee16SmrgAC_PREREQ(2.52) 8140e20ee16Smrg 8150e20ee16Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8160e20ee16Smrg# ------------------------------------- 8170e20ee16Smrg# Define a conditional. 8180e20ee16SmrgAC_DEFUN([AM_CONDITIONAL], 8190e20ee16Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8200e20ee16Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8210e20ee16SmrgAC_SUBST([$1_TRUE]) 8220e20ee16SmrgAC_SUBST([$1_FALSE]) 8230e20ee16Smrgif $2; then 8240e20ee16Smrg $1_TRUE= 8250e20ee16Smrg $1_FALSE='#' 8260e20ee16Smrgelse 8270e20ee16Smrg $1_TRUE='#' 8280e20ee16Smrg $1_FALSE= 8290e20ee16Smrgfi 8300e20ee16SmrgAC_CONFIG_COMMANDS_PRE( 8310e20ee16Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8320e20ee16Smrg AC_MSG_ERROR([conditional "$1" was never defined. 8330e20ee16SmrgUsually this means the macro was only invoked conditionally.]) 8340e20ee16Smrgfi])]) 8350e20ee16Smrg 8360e20ee16Smrg# Add --enable-maintainer-mode option to configure. 8370e20ee16Smrg# From Jim Meyering 8380e20ee16Smrg 8390e20ee16Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 8400e20ee16Smrg 8410e20ee16Smrg# This program is free software; you can redistribute it and/or modify 8420e20ee16Smrg# it under the terms of the GNU General Public License as published by 8430e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 8440e20ee16Smrg# any later version. 8450e20ee16Smrg 8460e20ee16Smrg# This program is distributed in the hope that it will be useful, 8470e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8480e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8490e20ee16Smrg# GNU General Public License for more details. 8500e20ee16Smrg 8510e20ee16Smrg# You should have received a copy of the GNU General Public License 8520e20ee16Smrg# along with this program; if not, write to the Free Software 8530e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8540e20ee16Smrg# 02111-1307, USA. 8550e20ee16Smrg 8560e20ee16Smrg# serial 2 8570e20ee16Smrg 8580e20ee16SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8590e20ee16Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 8600e20ee16Smrg dnl maintainer-mode is disabled by default 8610e20ee16Smrg AC_ARG_ENABLE(maintainer-mode, 8620e20ee16Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 8630e20ee16Smrg (and sometimes confusing) to the casual installer], 8640e20ee16Smrg USE_MAINTAINER_MODE=$enableval, 8650e20ee16Smrg USE_MAINTAINER_MODE=no) 8660e20ee16Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8670e20ee16Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 8680e20ee16Smrg MAINT=$MAINTAINER_MODE_TRUE 8690e20ee16Smrg AC_SUBST(MAINT)dnl 8700e20ee16Smrg] 8710e20ee16Smrg) 8720e20ee16Smrg 8730e20ee16SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8740e20ee16Smrg 8750e20ee16Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 8760e20ee16Smrg 8770e20ee16Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 8780e20ee16Smrg 8790e20ee16Smrg# This program is free software; you can redistribute it and/or modify 8800e20ee16Smrg# it under the terms of the GNU General Public License as published by 8810e20ee16Smrg# the Free Software Foundation; either version 2, or (at your option) 8820e20ee16Smrg# any later version. 8830e20ee16Smrg 8840e20ee16Smrg# This program is distributed in the hope that it will be useful, 8850e20ee16Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8860e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8870e20ee16Smrg# GNU General Public License for more details. 8880e20ee16Smrg 8890e20ee16Smrg# You should have received a copy of the GNU General Public License 8900e20ee16Smrg# along with this program; if not, write to the Free Software 8910e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8920e20ee16Smrg# 02111-1307, USA. 8930e20ee16Smrg 8940e20ee16SmrgAC_PREREQ([2.52]) 8950e20ee16Smrg 8960e20ee16Smrg# serial 6 8970e20ee16Smrg 8980e20ee16Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8990e20ee16SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9000e20ee16Smrg 9010e20ee16Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9020e20ee16Smrg# 9030e20ee16Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9040e20ee16Smrg# 9050e20ee16Smrg# This program is free software; you can redistribute it and/or modify 9060e20ee16Smrg# it under the terms of the GNU General Public License as published by 9070e20ee16Smrg# the Free Software Foundation; either version 2 of the License, or 9080e20ee16Smrg# (at your option) any later version. 9090e20ee16Smrg# 9100e20ee16Smrg# This program is distributed in the hope that it will be useful, but 9110e20ee16Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9120e20ee16Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9130e20ee16Smrg# General Public License for more details. 9140e20ee16Smrg# 9150e20ee16Smrg# You should have received a copy of the GNU General Public License 9160e20ee16Smrg# along with this program; if not, write to the Free Software 9170e20ee16Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9180e20ee16Smrg# 9190e20ee16Smrg# As a special exception to the GNU General Public License, if you 9200e20ee16Smrg# distribute this file as part of a program that contains a 9210e20ee16Smrg# configuration script generated by Autoconf, you may include it under 9220e20ee16Smrg# the same distribution terms that you use for the rest of that program. 9230e20ee16Smrg 9240e20ee16Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9250e20ee16Smrg# ---------------------------------- 9260e20ee16SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9270e20ee16Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9280e20ee16Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9290e20ee16SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9300e20ee16Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9310e20ee16Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9320e20ee16Smrgfi 9330e20ee16Smrgif test -n "$PKG_CONFIG"; then 9340e20ee16Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9350e20ee16Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9360e20ee16Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9370e20ee16Smrg AC_MSG_RESULT([yes]) 9380e20ee16Smrg else 9390e20ee16Smrg AC_MSG_RESULT([no]) 9400e20ee16Smrg PKG_CONFIG="" 9410e20ee16Smrg fi 9420e20ee16Smrg 9430e20ee16Smrgfi[]dnl 9440e20ee16Smrg])# PKG_PROG_PKG_CONFIG 9450e20ee16Smrg 9460e20ee16Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9470e20ee16Smrg# 9480e20ee16Smrg# Check to see whether a particular set of modules exists. Similar 9490e20ee16Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9500e20ee16Smrg# 9510e20ee16Smrg# 9520e20ee16Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9530e20ee16Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9540e20ee16Smrg# PKG_CHECK_EXISTS manually 9550e20ee16Smrg# -------------------------------------------------------------- 9560e20ee16SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9570e20ee16Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9580e20ee16Smrgif test -n "$PKG_CONFIG" && \ 9590e20ee16Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9600e20ee16Smrg m4_ifval([$2], [$2], [:]) 9610e20ee16Smrgm4_ifvaln([$3], [else 9620e20ee16Smrg $3])dnl 9630e20ee16Smrgfi]) 9640e20ee16Smrg 9650e20ee16Smrg 9660e20ee16Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9670e20ee16Smrg# --------------------------------------------- 9680e20ee16Smrgm4_define([_PKG_CONFIG], 9690e20ee16Smrg[if test -n "$PKG_CONFIG"; then 9700e20ee16Smrg if test -n "$$1"; then 9710e20ee16Smrg pkg_cv_[]$1="$$1" 9720e20ee16Smrg else 9730e20ee16Smrg PKG_CHECK_EXISTS([$3], 9740e20ee16Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9750e20ee16Smrg [pkg_failed=yes]) 9760e20ee16Smrg fi 9770e20ee16Smrgelse 9780e20ee16Smrg pkg_failed=untried 9790e20ee16Smrgfi[]dnl 9800e20ee16Smrg])# _PKG_CONFIG 9810e20ee16Smrg 9820e20ee16Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9830e20ee16Smrg# ----------------------------- 9840e20ee16SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9850e20ee16Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9860e20ee16Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9870e20ee16Smrg _pkg_short_errors_supported=yes 9880e20ee16Smrgelse 9890e20ee16Smrg _pkg_short_errors_supported=no 9900e20ee16Smrgfi[]dnl 9910e20ee16Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9920e20ee16Smrg 9930e20ee16Smrg 9940e20ee16Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9950e20ee16Smrg# [ACTION-IF-NOT-FOUND]) 9960e20ee16Smrg# 9970e20ee16Smrg# 9980e20ee16Smrg# Note that if there is a possibility the first call to 9990e20ee16Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 10000e20ee16Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 10010e20ee16Smrg# 10020e20ee16Smrg# 10030e20ee16Smrg# -------------------------------------------------------------- 10040e20ee16SmrgAC_DEFUN([PKG_CHECK_MODULES], 10050e20ee16Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10060e20ee16SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 10070e20ee16SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 10080e20ee16Smrg 10090e20ee16Smrgpkg_failed=no 10100e20ee16SmrgAC_MSG_CHECKING([for $1]) 10110e20ee16Smrg 10120e20ee16Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 10130e20ee16Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 10140e20ee16Smrg 10150e20ee16Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 10160e20ee16Smrgand $1[]_LIBS to avoid the need to call pkg-config. 10170e20ee16SmrgSee the pkg-config man page for more details.]) 10180e20ee16Smrg 10190e20ee16Smrgif test $pkg_failed = yes; then 10200e20ee16Smrg _PKG_SHORT_ERRORS_SUPPORTED 10210e20ee16Smrg if test $_pkg_short_errors_supported = yes; then 10220e20ee16Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 10230e20ee16Smrg else 10240e20ee16Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 10250e20ee16Smrg fi 10260e20ee16Smrg # Put the nasty error message in config.log where it belongs 10270e20ee16Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 10280e20ee16Smrg 10290e20ee16Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 10300e20ee16Smrg[Package requirements ($2) were not met: 10310e20ee16Smrg 10320e20ee16Smrg$$1_PKG_ERRORS 10330e20ee16Smrg 10340e20ee16SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 10350e20ee16Smrginstalled software in a non-standard prefix. 10360e20ee16Smrg 10370e20ee16Smrg_PKG_TEXT 10380e20ee16Smrg])], 10390e20ee16Smrg [$4]) 10400e20ee16Smrgelif test $pkg_failed = untried; then 10410e20ee16Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 10420e20ee16Smrg[The pkg-config script could not be found or is too old. Make sure it 10430e20ee16Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 10440e20ee16Smrgpath to pkg-config. 10450e20ee16Smrg 10460e20ee16Smrg_PKG_TEXT 10470e20ee16Smrg 10480e20ee16SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 10490e20ee16Smrg [$4]) 10500e20ee16Smrgelse 10510e20ee16Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 10520e20ee16Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 10530e20ee16Smrg AC_MSG_RESULT([yes]) 10540e20ee16Smrg ifelse([$3], , :, [$3]) 10550e20ee16Smrgfi[]dnl 10560e20ee16Smrg])# PKG_CHECK_MODULES 10570e20ee16Smrg 10580e20ee16Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:22:36 mrg Exp $ 10590e20ee16Smrgdnl 10600e20ee16Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 10610e20ee16Smrgdnl 10620e20ee16Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10630e20ee16Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10640e20ee16Smrgdnl the above copyright notice appear in all copies and that both that 10650e20ee16Smrgdnl copyright notice and this permission notice appear in supporting 10660e20ee16Smrgdnl documentation. 10670e20ee16Smrgdnl 10680e20ee16Smrgdnl The above copyright notice and this permission notice shall be included 10690e20ee16Smrgdnl in all copies or substantial portions of the Software. 10700e20ee16Smrgdnl 10710e20ee16Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10720e20ee16Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10730e20ee16Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10740e20ee16Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10750e20ee16Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10760e20ee16Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10770e20ee16Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10780e20ee16Smrgdnl 10790e20ee16Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10800e20ee16Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10810e20ee16Smrgdnl other dealings in this Software without prior written authorization 10820e20ee16Smrgdnl from the copyright holders. 10830e20ee16Smrgdnl 10840e20ee16Smrg 10850e20ee16Smrg# XORG_PROG_RAWCPP() 10860e20ee16Smrg# ------------------ 10870e20ee16Smrg# Find cpp program and necessary flags for use in pre-processing text files 10880e20ee16Smrg# such as man pages and config files 10890e20ee16SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10900e20ee16SmrgAC_REQUIRE([AC_PROG_CPP]) 10910e20ee16SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10920e20ee16Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10930e20ee16Smrg 10940e20ee16Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10950e20ee16Smrg# which is not the best choice for supporting other OS'es, but covers most 10960e20ee16Smrg# of the ones we need for now. 10970e20ee16SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10980e20ee16SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10990e20ee16Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11000e20ee16Smrg AC_MSG_RESULT([no]) 11010e20ee16Smrgelse 11020e20ee16Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11030e20ee16Smrg RAWCPPFLAGS=-undef 11040e20ee16Smrg AC_MSG_RESULT([yes]) 11050e20ee16Smrg else 11060e20ee16Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11070e20ee16Smrg fi 11080e20ee16Smrgfi 11090e20ee16Smrgrm -f conftest.$ac_ext 11100e20ee16Smrg 11110e20ee16SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11120e20ee16SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11130e20ee16Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11140e20ee16Smrg AC_MSG_RESULT([no]) 11150e20ee16Smrgelse 11160e20ee16Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11170e20ee16Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11180e20ee16Smrg AC_MSG_RESULT([yes]) 11190e20ee16Smrg else 11200e20ee16Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11210e20ee16Smrg fi 11220e20ee16Smrgfi 11230e20ee16Smrgrm -f conftest.$ac_ext 11240e20ee16SmrgAC_SUBST(RAWCPPFLAGS) 11250e20ee16Smrg]) # XORG_PROG_RAWCPP 11260e20ee16Smrg 11270e20ee16Smrg# XORG_MANPAGE_SECTIONS() 11280e20ee16Smrg# ----------------------- 11290e20ee16Smrg# Determine which sections man pages go in for the different man page types 11300e20ee16Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11310e20ee16Smrg# Not sure if there's any better way than just hardcoding by OS name. 11320e20ee16Smrg# Override default settings by setting environment variables 11330e20ee16Smrg 11340e20ee16SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11350e20ee16SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11360e20ee16Smrg 11370e20ee16Smrgif test x$APP_MAN_SUFFIX = x ; then 11380e20ee16Smrg case $host_os in 11390e20ee16Smrg linux*) APP_MAN_SUFFIX=1x ;; 11400e20ee16Smrg *) APP_MAN_SUFFIX=1 ;; 11410e20ee16Smrg esac 11420e20ee16Smrgfi 11430e20ee16Smrgif test x$APP_MAN_DIR = x ; then 11440e20ee16Smrg case $host_os in 11450e20ee16Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 11460e20ee16Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 11470e20ee16Smrg esac 11480e20ee16Smrgfi 11490e20ee16Smrg 11500e20ee16Smrgif test x$LIB_MAN_SUFFIX = x ; then 11510e20ee16Smrg case $host_os in 11520e20ee16Smrg linux*) LIB_MAN_SUFFIX=3x ;; 11530e20ee16Smrg *) LIB_MAN_SUFFIX=3 ;; 11540e20ee16Smrg esac 11550e20ee16Smrgfi 11560e20ee16Smrgif test x$LIB_MAN_DIR = x ; then 11570e20ee16Smrg case $host_os in 11580e20ee16Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 11590e20ee16Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 11600e20ee16Smrg esac 11610e20ee16Smrgfi 11620e20ee16Smrg 11630e20ee16Smrgif test x$FILE_MAN_SUFFIX = x ; then 11640e20ee16Smrg case $host_os in 11650e20ee16Smrg linux*) FILE_MAN_SUFFIX=5x ;; 11660e20ee16Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 11670e20ee16Smrg *) FILE_MAN_SUFFIX=5 ;; 11680e20ee16Smrg esac 11690e20ee16Smrgfi 11700e20ee16Smrgif test x$FILE_MAN_DIR = x ; then 11710e20ee16Smrg case $host_os in 11720e20ee16Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 11730e20ee16Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 11740e20ee16Smrg esac 11750e20ee16Smrgfi 11760e20ee16Smrg 11770e20ee16Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 11780e20ee16Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11790e20ee16Smrgif test x$MISC_MAN_SUFFIX = x ; then 11800e20ee16Smrg case $host_os in 11810e20ee16Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 11820e20ee16Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 11830e20ee16Smrg *) MISC_MAN_SUFFIX=7 ;; 11840e20ee16Smrg esac 11850e20ee16Smrgfi 11860e20ee16Smrgif test x$MISC_MAN_DIR = x ; then 11870e20ee16Smrg case $host_os in 11880e20ee16Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 11890e20ee16Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 11900e20ee16Smrg esac 11910e20ee16Smrgfi 11920e20ee16Smrg 11930e20ee16Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 11940e20ee16Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11950e20ee16Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 11960e20ee16Smrg case $host_os in 11970e20ee16Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 11980e20ee16Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11990e20ee16Smrg *) DRIVER_MAN_SUFFIX=4 ;; 12000e20ee16Smrg esac 12010e20ee16Smrgfi 12020e20ee16Smrgif test x$DRIVER_MAN_DIR = x ; then 12030e20ee16Smrg case $host_os in 12040e20ee16Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 12050e20ee16Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 12060e20ee16Smrg esac 12070e20ee16Smrgfi 12080e20ee16Smrg 12090e20ee16Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 12100e20ee16Smrg case $host_os in 12110e20ee16Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 12120e20ee16Smrg *) ADMIN_MAN_SUFFIX=8 ;; 12130e20ee16Smrg esac 12140e20ee16Smrgfi 12150e20ee16Smrgif test x$ADMIN_MAN_DIR = x ; then 12160e20ee16Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12170e20ee16Smrgfi 12180e20ee16Smrg 12190e20ee16Smrg 12200e20ee16SmrgAC_SUBST([APP_MAN_SUFFIX]) 12210e20ee16SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12220e20ee16SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12230e20ee16SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12240e20ee16SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12250e20ee16SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12260e20ee16SmrgAC_SUBST([APP_MAN_DIR]) 12270e20ee16SmrgAC_SUBST([LIB_MAN_DIR]) 12280e20ee16SmrgAC_SUBST([FILE_MAN_DIR]) 12290e20ee16SmrgAC_SUBST([MISC_MAN_DIR]) 12300e20ee16SmrgAC_SUBST([DRIVER_MAN_DIR]) 12310e20ee16SmrgAC_SUBST([ADMIN_MAN_DIR]) 12320e20ee16Smrg]) # XORG_MANPAGE_SECTIONS 12330e20ee16Smrg 12340e20ee16Smrg# XORG_CHECK_LINUXDOC 12350e20ee16Smrg# ------------------- 12360e20ee16Smrg# Defines the variable MAKE_TEXT if the necessary tools and 12370e20ee16Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12380e20ee16Smrg# Whether or not the necessary tools and files are found can be checked 12390e20ee16Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12400e20ee16SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12410e20ee16SmrgAC_CHECK_FILE( 12420e20ee16Smrg [$prefix/share/X11/sgml/defs.ent], 12430e20ee16Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 12440e20ee16Smrg [DEFS_ENT_PATH=] 12450e20ee16Smrg) 12460e20ee16Smrg 12470e20ee16SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12480e20ee16SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 12490e20ee16Smrg 12500e20ee16SmrgAC_MSG_CHECKING([Whether to build documentation]) 12510e20ee16Smrg 12520e20ee16Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 12530e20ee16Smrg BUILDDOC=yes 12540e20ee16Smrgelse 12550e20ee16Smrg BUILDDOC=no 12560e20ee16Smrgfi 12570e20ee16Smrg 12580e20ee16SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12590e20ee16Smrg 12600e20ee16SmrgAC_MSG_RESULT([$BUILDDOC]) 12610e20ee16Smrg 12620e20ee16SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 12630e20ee16Smrg 12640e20ee16Smrgif test x$PS2PDF != x ; then 12650e20ee16Smrg BUILDPDFDOC=yes 12660e20ee16Smrgelse 12670e20ee16Smrg BUILDPDFDOC=no 12680e20ee16Smrgfi 12690e20ee16Smrg 12700e20ee16SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12710e20ee16Smrg 12720e20ee16SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12730e20ee16Smrg 12740e20ee16SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12750e20ee16SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 12760e20ee16SmrgMAKE_PDF="$PS2PDF" 12770e20ee16SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 12780e20ee16Smrg 12790e20ee16SmrgAC_SUBST(MAKE_TEXT) 12800e20ee16SmrgAC_SUBST(MAKE_PS) 12810e20ee16SmrgAC_SUBST(MAKE_PDF) 12820e20ee16SmrgAC_SUBST(MAKE_HTML) 12830e20ee16Smrg]) # XORG_CHECK_LINUXDOC 12840e20ee16Smrg 12850e20ee16Smrg# XORG_CHECK_MALLOC_ZERO 12860e20ee16Smrg# ---------------------- 12870e20ee16Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 12880e20ee16Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 12890e20ee16Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 12900e20ee16SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 12910e20ee16SmrgAC_ARG_ENABLE(malloc0returnsnull, 12920e20ee16Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 12930e20ee16Smrg [malloc(0) returns NULL (default: auto)]), 12940e20ee16Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 12950e20ee16Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 12960e20ee16Smrg 12970e20ee16SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 12980e20ee16Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 12990e20ee16Smrg AC_RUN_IFELSE([ 13000e20ee16Smrgchar *malloc(); 13010e20ee16Smrgchar *realloc(); 13020e20ee16Smrgchar *calloc(); 13030e20ee16Smrgmain() { 13040e20ee16Smrg char *m0, *r0, *c0, *p; 13050e20ee16Smrg m0 = malloc(0); 13060e20ee16Smrg p = malloc(10); 13070e20ee16Smrg r0 = realloc(p,0); 13080e20ee16Smrg c0 = calloc(0); 13090e20ee16Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 13100e20ee16Smrg}], 13110e20ee16Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 13120e20ee16Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 13130e20ee16Smrgfi 13140e20ee16SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13150e20ee16Smrg 13160e20ee16Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 13170e20ee16Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 13180e20ee16Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 13190e20ee16Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 13200e20ee16Smrgelse 13210e20ee16Smrg MALLOC_ZERO_CFLAGS="" 13220e20ee16Smrg XMALLOC_ZERO_CFLAGS="" 13230e20ee16Smrg XTMALLOC_ZERO_CFLAGS="" 13240e20ee16Smrgfi 13250e20ee16Smrg 13260e20ee16SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 13270e20ee16SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 13280e20ee16SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 13290e20ee16Smrg]) # XORG_CHECK_MALLOC_ZERO 13300e20ee16Smrg 13310e20ee16Smrgdnl Copyright 2005 Red Hat, Inc 13320e20ee16Smrgdnl 13330e20ee16Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 13340e20ee16Smrgdnl documentation for any purpose is hereby granted without fee, provided that 13350e20ee16Smrgdnl the above copyright notice appear in all copies and that both that 13360e20ee16Smrgdnl copyright notice and this permission notice appear in supporting 13370e20ee16Smrgdnl documentation. 13380e20ee16Smrgdnl 13390e20ee16Smrgdnl The above copyright notice and this permission notice shall be included 13400e20ee16Smrgdnl in all copies or substantial portions of the Software. 13410e20ee16Smrgdnl 13420e20ee16Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13430e20ee16Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13440e20ee16Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13450e20ee16Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 13460e20ee16Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 13470e20ee16Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 13480e20ee16Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 13490e20ee16Smrgdnl 13500e20ee16Smrgdnl Except as contained in this notice, the name of the copyright holders shall 13510e20ee16Smrgdnl not be used in advertising or otherwise to promote the sale, use or 13520e20ee16Smrgdnl other dealings in this Software without prior written authorization 13530e20ee16Smrgdnl from the copyright holders. 13540e20ee16Smrgdnl 13550e20ee16Smrg 13560e20ee16Smrg# XORG_RELEASE_VERSION 13570e20ee16Smrg# -------------------- 13580e20ee16Smrg# Adds --with/without-release-string and changes the PACKAGE and 13590e20ee16Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 13600e20ee16Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 13610e20ee16Smrg 13620e20ee16SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 13630e20ee16Smrg AC_ARG_WITH(release-version, 13640e20ee16Smrg AC_HELP_STRING([--with-release-version=STRING], 13650e20ee16Smrg [Use release version string in package name]), 13660e20ee16Smrg [RELEASE_VERSION="$withval"], 13670e20ee16Smrg [RELEASE_VERSION=""]) 13680e20ee16Smrg if test "x$RELEASE_VERSION" != "x"; then 13690e20ee16Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 13700e20ee16Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 13710e20ee16Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 13720e20ee16Smrg fi 13730e20ee16Smrg]) 13740e20ee16Smrg 1375