aclocal.m4 revision 4fb28925
14fb28925Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 24fb28925Smrg 34fb28925Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 44fb28925Smrg# Free Software Foundation, Inc. 54fb28925Smrg# This file is free software; the Free Software Foundation 64fb28925Smrg# gives unlimited permission to copy and/or distribute it, 74fb28925Smrg# with or without modifications, as long as this notice is preserved. 84fb28925Smrg 94fb28925Smrg# This program is distributed in the hope that it will be useful, 104fb28925Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114fb28925Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124fb28925Smrg# PARTICULAR PURPOSE. 134fb28925Smrg 144fb28925Smrg# Do all the work for Automake. -*- Autoconf -*- 154fb28925Smrg 164fb28925Smrg# This macro actually does too much some checks are only needed if 174fb28925Smrg# your package does certain things. But this isn't really a big deal. 184fb28925Smrg 194fb28925Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 204fb28925Smrg# Free Software Foundation, Inc. 214fb28925Smrg 224fb28925Smrg# This program is free software; you can redistribute it and/or modify 234fb28925Smrg# it under the terms of the GNU General Public License as published by 244fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 254fb28925Smrg# any later version. 264fb28925Smrg 274fb28925Smrg# This program is distributed in the hope that it will be useful, 284fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 294fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304fb28925Smrg# GNU General Public License for more details. 314fb28925Smrg 324fb28925Smrg# You should have received a copy of the GNU General Public License 334fb28925Smrg# along with this program; if not, write to the Free Software 344fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 354fb28925Smrg# 02111-1307, USA. 364fb28925Smrg 374fb28925Smrg# serial 10 384fb28925Smrg 394fb28925SmrgAC_PREREQ([2.54]) 404fb28925Smrg 414fb28925Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 424fb28925Smrg# the ones we care about. 434fb28925Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 444fb28925Smrg 454fb28925Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 464fb28925Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 474fb28925Smrg# ----------------------------------------------- 484fb28925Smrg# The call with PACKAGE and VERSION arguments is the old style 494fb28925Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 504fb28925Smrg# and VERSION should now be passed to AC_INIT and removed from 514fb28925Smrg# the call to AM_INIT_AUTOMAKE. 524fb28925Smrg# We support both call styles for the transition. After 534fb28925Smrg# the next Automake release, Autoconf can make the AC_INIT 544fb28925Smrg# arguments mandatory, and then we can depend on a new Autoconf 554fb28925Smrg# release and drop the old call support. 564fb28925SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 574fb28925Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 584fb28925Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 594fb28925Smrg# test to see if srcdir already configured 604fb28925Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 614fb28925Smrg test -f $srcdir/config.status; then 624fb28925Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 634fb28925Smrgfi 644fb28925Smrg 654fb28925Smrg# test whether we have cygpath 664fb28925Smrgif test -z "$CYGPATH_W"; then 674fb28925Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 684fb28925Smrg CYGPATH_W='cygpath -w' 694fb28925Smrg else 704fb28925Smrg CYGPATH_W=echo 714fb28925Smrg fi 724fb28925Smrgfi 734fb28925SmrgAC_SUBST([CYGPATH_W]) 744fb28925Smrg 754fb28925Smrg# Define the identity of the package. 764fb28925Smrgdnl Distinguish between old-style and new-style calls. 774fb28925Smrgm4_ifval([$2], 784fb28925Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 794fb28925Smrg AC_SUBST([PACKAGE], [$1])dnl 804fb28925Smrg AC_SUBST([VERSION], [$2])], 814fb28925Smrg[_AM_SET_OPTIONS([$1])dnl 824fb28925Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 834fb28925Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 844fb28925Smrg 854fb28925Smrg_AM_IF_OPTION([no-define],, 864fb28925Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 874fb28925Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 884fb28925Smrg 894fb28925Smrg# Some tools Automake needs. 904fb28925SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 914fb28925SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 924fb28925SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 934fb28925SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 944fb28925SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 954fb28925SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 964fb28925SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 974fb28925SmrgAM_MISSING_PROG(AMTAR, tar) 984fb28925SmrgAM_PROG_INSTALL_SH 994fb28925SmrgAM_PROG_INSTALL_STRIP 1004fb28925Smrg# We need awk for the "check" target. The system "awk" is bad on 1014fb28925Smrg# some platforms. 1024fb28925SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1034fb28925SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1044fb28925SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1054fb28925Smrg 1064fb28925Smrg_AM_IF_OPTION([no-dependencies],, 1074fb28925Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1084fb28925Smrg [_AM_DEPENDENCIES(CC)], 1094fb28925Smrg [define([AC_PROG_CC], 1104fb28925Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1114fb28925SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1124fb28925Smrg [_AM_DEPENDENCIES(CXX)], 1134fb28925Smrg [define([AC_PROG_CXX], 1144fb28925Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1154fb28925Smrg]) 1164fb28925Smrg]) 1174fb28925Smrg 1184fb28925Smrg 1194fb28925Smrg# When config.status generates a header, we must update the stamp-h file. 1204fb28925Smrg# This file resides in the same directory as the config header 1214fb28925Smrg# that is generated. The stamp files are numbered to have different names. 1224fb28925Smrg 1234fb28925Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1244fb28925Smrg# loop where config.status creates the headers, so we can generate 1254fb28925Smrg# our stamp files there. 1264fb28925SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1274fb28925Smrg[# Compute $1's index in $config_headers. 1284fb28925Smrg_am_stamp_count=1 1294fb28925Smrgfor _am_header in $config_headers :; do 1304fb28925Smrg case $_am_header in 1314fb28925Smrg $1 | $1:* ) 1324fb28925Smrg break ;; 1334fb28925Smrg * ) 1344fb28925Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1354fb28925Smrg esac 1364fb28925Smrgdone 1374fb28925Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1384fb28925Smrg 1394fb28925Smrg# Copyright 2002 Free Software Foundation, Inc. 1404fb28925Smrg 1414fb28925Smrg# This program is free software; you can redistribute it and/or modify 1424fb28925Smrg# it under the terms of the GNU General Public License as published by 1434fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 1444fb28925Smrg# any later version. 1454fb28925Smrg 1464fb28925Smrg# This program is distributed in the hope that it will be useful, 1474fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1484fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1494fb28925Smrg# GNU General Public License for more details. 1504fb28925Smrg 1514fb28925Smrg# You should have received a copy of the GNU General Public License 1524fb28925Smrg# along with this program; if not, write to the Free Software 1534fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1544fb28925Smrg 1554fb28925Smrg# AM_AUTOMAKE_VERSION(VERSION) 1564fb28925Smrg# ---------------------------- 1574fb28925Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1584fb28925Smrg# generated from the m4 files accompanying Automake X.Y. 1594fb28925SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 1604fb28925Smrg 1614fb28925Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1624fb28925Smrg# ------------------------------- 1634fb28925Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 1644fb28925Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 1654fb28925SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1664fb28925Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 1674fb28925Smrg 1684fb28925Smrg# Helper functions for option handling. -*- Autoconf -*- 1694fb28925Smrg 1704fb28925Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 1714fb28925Smrg 1724fb28925Smrg# This program is free software; you can redistribute it and/or modify 1734fb28925Smrg# it under the terms of the GNU General Public License as published by 1744fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 1754fb28925Smrg# any later version. 1764fb28925Smrg 1774fb28925Smrg# This program is distributed in the hope that it will be useful, 1784fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1794fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1804fb28925Smrg# GNU General Public License for more details. 1814fb28925Smrg 1824fb28925Smrg# You should have received a copy of the GNU General Public License 1834fb28925Smrg# along with this program; if not, write to the Free Software 1844fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1854fb28925Smrg# 02111-1307, USA. 1864fb28925Smrg 1874fb28925Smrg# serial 2 1884fb28925Smrg 1894fb28925Smrg# _AM_MANGLE_OPTION(NAME) 1904fb28925Smrg# ----------------------- 1914fb28925SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1924fb28925Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1934fb28925Smrg 1944fb28925Smrg# _AM_SET_OPTION(NAME) 1954fb28925Smrg# ------------------------------ 1964fb28925Smrg# Set option NAME. Presently that only means defining a flag for this option. 1974fb28925SmrgAC_DEFUN([_AM_SET_OPTION], 1984fb28925Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1994fb28925Smrg 2004fb28925Smrg# _AM_SET_OPTIONS(OPTIONS) 2014fb28925Smrg# ---------------------------------- 2024fb28925Smrg# OPTIONS is a space-separated list of Automake options. 2034fb28925SmrgAC_DEFUN([_AM_SET_OPTIONS], 2044fb28925Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2054fb28925Smrg 2064fb28925Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2074fb28925Smrg# ------------------------------------------- 2084fb28925Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2094fb28925SmrgAC_DEFUN([_AM_IF_OPTION], 2104fb28925Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2114fb28925Smrg 2124fb28925Smrg# 2134fb28925Smrg# Check to make sure that the build environment is sane. 2144fb28925Smrg# 2154fb28925Smrg 2164fb28925Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 2174fb28925Smrg 2184fb28925Smrg# This program is free software; you can redistribute it and/or modify 2194fb28925Smrg# it under the terms of the GNU General Public License as published by 2204fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 2214fb28925Smrg# any later version. 2224fb28925Smrg 2234fb28925Smrg# This program is distributed in the hope that it will be useful, 2244fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2254fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2264fb28925Smrg# GNU General Public License for more details. 2274fb28925Smrg 2284fb28925Smrg# You should have received a copy of the GNU General Public License 2294fb28925Smrg# along with this program; if not, write to the Free Software 2304fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2314fb28925Smrg# 02111-1307, USA. 2324fb28925Smrg 2334fb28925Smrg# serial 3 2344fb28925Smrg 2354fb28925Smrg# AM_SANITY_CHECK 2364fb28925Smrg# --------------- 2374fb28925SmrgAC_DEFUN([AM_SANITY_CHECK], 2384fb28925Smrg[AC_MSG_CHECKING([whether build environment is sane]) 2394fb28925Smrg# Just in case 2404fb28925Smrgsleep 1 2414fb28925Smrgecho timestamp > conftest.file 2424fb28925Smrg# Do `set' in a subshell so we don't clobber the current shell's 2434fb28925Smrg# arguments. Must try -L first in case configure is actually a 2444fb28925Smrg# symlink; some systems play weird games with the mod time of symlinks 2454fb28925Smrg# (eg FreeBSD returns the mod time of the symlink's containing 2464fb28925Smrg# directory). 2474fb28925Smrgif ( 2484fb28925Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 2494fb28925Smrg if test "$[*]" = "X"; then 2504fb28925Smrg # -L didn't work. 2514fb28925Smrg set X `ls -t $srcdir/configure conftest.file` 2524fb28925Smrg fi 2534fb28925Smrg rm -f conftest.file 2544fb28925Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 2554fb28925Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 2564fb28925Smrg 2574fb28925Smrg # If neither matched, then we have a broken ls. This can happen 2584fb28925Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 2594fb28925Smrg # broken ls alias from the environment. This has actually 2604fb28925Smrg # happened. Such a system could not be considered "sane". 2614fb28925Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2624fb28925Smrgalias in your environment]) 2634fb28925Smrg fi 2644fb28925Smrg 2654fb28925Smrg test "$[2]" = conftest.file 2664fb28925Smrg ) 2674fb28925Smrgthen 2684fb28925Smrg # Ok. 2694fb28925Smrg : 2704fb28925Smrgelse 2714fb28925Smrg AC_MSG_ERROR([newly created file is older than distributed files! 2724fb28925SmrgCheck your system clock]) 2734fb28925Smrgfi 2744fb28925SmrgAC_MSG_RESULT(yes)]) 2754fb28925Smrg 2764fb28925Smrg# -*- Autoconf -*- 2774fb28925Smrg 2784fb28925Smrg 2794fb28925Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 2804fb28925Smrg 2814fb28925Smrg# This program is free software; you can redistribute it and/or modify 2824fb28925Smrg# it under the terms of the GNU General Public License as published by 2834fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 2844fb28925Smrg# any later version. 2854fb28925Smrg 2864fb28925Smrg# This program is distributed in the hope that it will be useful, 2874fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2884fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2894fb28925Smrg# GNU General Public License for more details. 2904fb28925Smrg 2914fb28925Smrg# You should have received a copy of the GNU General Public License 2924fb28925Smrg# along with this program; if not, write to the Free Software 2934fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2944fb28925Smrg# 02111-1307, USA. 2954fb28925Smrg 2964fb28925Smrg# serial 3 2974fb28925Smrg 2984fb28925Smrg# AM_MISSING_PROG(NAME, PROGRAM) 2994fb28925Smrg# ------------------------------ 3004fb28925SmrgAC_DEFUN([AM_MISSING_PROG], 3014fb28925Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3024fb28925Smrg$1=${$1-"${am_missing_run}$2"} 3034fb28925SmrgAC_SUBST($1)]) 3044fb28925Smrg 3054fb28925Smrg 3064fb28925Smrg# AM_MISSING_HAS_RUN 3074fb28925Smrg# ------------------ 3084fb28925Smrg# Define MISSING if not defined so far and test if it supports --run. 3094fb28925Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 3104fb28925SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 3114fb28925Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3124fb28925Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 3134fb28925Smrg# Use eval to expand $SHELL 3144fb28925Smrgif eval "$MISSING --run true"; then 3154fb28925Smrg am_missing_run="$MISSING --run " 3164fb28925Smrgelse 3174fb28925Smrg am_missing_run= 3184fb28925Smrg AC_MSG_WARN([`missing' script is too old or missing]) 3194fb28925Smrgfi 3204fb28925Smrg]) 3214fb28925Smrg 3224fb28925Smrg# AM_AUX_DIR_EXPAND 3234fb28925Smrg 3244fb28925Smrg# Copyright 2001 Free Software Foundation, Inc. 3254fb28925Smrg 3264fb28925Smrg# This program is free software; you can redistribute it and/or modify 3274fb28925Smrg# it under the terms of the GNU General Public License as published by 3284fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 3294fb28925Smrg# any later version. 3304fb28925Smrg 3314fb28925Smrg# This program is distributed in the hope that it will be useful, 3324fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 3334fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3344fb28925Smrg# GNU General Public License for more details. 3354fb28925Smrg 3364fb28925Smrg# You should have received a copy of the GNU General Public License 3374fb28925Smrg# along with this program; if not, write to the Free Software 3384fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 3394fb28925Smrg# 02111-1307, USA. 3404fb28925Smrg 3414fb28925Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 3424fb28925Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 3434fb28925Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 3444fb28925Smrg# 3454fb28925Smrg# Of course, Automake must honor this variable whenever it calls a 3464fb28925Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 3474fb28925Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 3484fb28925Smrg# depending on how configure is run. This is pretty annoying, since 3494fb28925Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 3504fb28925Smrg# source directory, any form will work fine, but in subdirectories a 3514fb28925Smrg# relative path needs to be adjusted first. 3524fb28925Smrg# 3534fb28925Smrg# $ac_aux_dir/missing 3544fb28925Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 3554fb28925Smrg# $top_srcdir/$ac_aux_dir/missing 3564fb28925Smrg# fails if $ac_aux_dir is absolute, 3574fb28925Smrg# fails when called from a subdirectory in a VPATH build with 3584fb28925Smrg# a relative $ac_aux_dir 3594fb28925Smrg# 3604fb28925Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 3614fb28925Smrg# are both prefixed by $srcdir. In an in-source build this is usually 3624fb28925Smrg# harmless because $srcdir is `.', but things will broke when you 3634fb28925Smrg# start a VPATH build or use an absolute $srcdir. 3644fb28925Smrg# 3654fb28925Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 3664fb28925Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 3674fb28925Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 3684fb28925Smrg# and then we would define $MISSING as 3694fb28925Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 3704fb28925Smrg# This will work as long as MISSING is not called from configure, because 3714fb28925Smrg# unfortunately $(top_srcdir) has no meaning in configure. 3724fb28925Smrg# However there are other variables, like CC, which are often used in 3734fb28925Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3744fb28925Smrg# 3754fb28925Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3764fb28925Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3774fb28925Smrg# configured tree to be moved without reconfiguration. 3784fb28925Smrg 3794fb28925Smrg# Rely on autoconf to set up CDPATH properly. 3804fb28925SmrgAC_PREREQ([2.50]) 3814fb28925Smrg 3824fb28925SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 3834fb28925Smrg# expand $ac_aux_dir to an absolute path 3844fb28925Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 3854fb28925Smrg]) 3864fb28925Smrg 3874fb28925Smrg# AM_PROG_INSTALL_SH 3884fb28925Smrg# ------------------ 3894fb28925Smrg# Define $install_sh. 3904fb28925Smrg 3914fb28925Smrg# Copyright 2001 Free Software Foundation, Inc. 3924fb28925Smrg 3934fb28925Smrg# This program is free software; you can redistribute it and/or modify 3944fb28925Smrg# it under the terms of the GNU General Public License as published by 3954fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 3964fb28925Smrg# any later version. 3974fb28925Smrg 3984fb28925Smrg# This program is distributed in the hope that it will be useful, 3994fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4004fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4014fb28925Smrg# GNU General Public License for more details. 4024fb28925Smrg 4034fb28925Smrg# You should have received a copy of the GNU General Public License 4044fb28925Smrg# along with this program; if not, write to the Free Software 4054fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4064fb28925Smrg# 02111-1307, USA. 4074fb28925Smrg 4084fb28925SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 4094fb28925Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 4104fb28925Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 4114fb28925SmrgAC_SUBST(install_sh)]) 4124fb28925Smrg 4134fb28925Smrg# AM_PROG_INSTALL_STRIP 4144fb28925Smrg 4154fb28925Smrg# Copyright 2001 Free Software Foundation, Inc. 4164fb28925Smrg 4174fb28925Smrg# This program is free software; you can redistribute it and/or modify 4184fb28925Smrg# it under the terms of the GNU General Public License as published by 4194fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 4204fb28925Smrg# any later version. 4214fb28925Smrg 4224fb28925Smrg# This program is distributed in the hope that it will be useful, 4234fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4244fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4254fb28925Smrg# GNU General Public License for more details. 4264fb28925Smrg 4274fb28925Smrg# You should have received a copy of the GNU General Public License 4284fb28925Smrg# along with this program; if not, write to the Free Software 4294fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4304fb28925Smrg# 02111-1307, USA. 4314fb28925Smrg 4324fb28925Smrg# One issue with vendor `install' (even GNU) is that you can't 4334fb28925Smrg# specify the program used to strip binaries. This is especially 4344fb28925Smrg# annoying in cross-compiling environments, where the build's strip 4354fb28925Smrg# is unlikely to handle the host's binaries. 4364fb28925Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 4374fb28925Smrg# always use install-sh in `make install-strip', and initialize 4384fb28925Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 4394fb28925SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 4404fb28925Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4414fb28925Smrg# Installed binaries are usually stripped using `strip' when the user 4424fb28925Smrg# run `make install-strip'. However `strip' might not be the right 4434fb28925Smrg# tool to use in cross-compilation environments, therefore Automake 4444fb28925Smrg# will honor the `STRIP' environment variable to overrule this program. 4454fb28925Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 4464fb28925Smrgif test "$cross_compiling" != no; then 4474fb28925Smrg AC_CHECK_TOOL([STRIP], [strip], :) 4484fb28925Smrgfi 4494fb28925SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 4504fb28925SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 4514fb28925Smrg 4524fb28925Smrg# -*- Autoconf -*- 4534fb28925Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 4544fb28925Smrg 4554fb28925Smrg# This program is free software; you can redistribute it and/or modify 4564fb28925Smrg# it under the terms of the GNU General Public License as published by 4574fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 4584fb28925Smrg# any later version. 4594fb28925Smrg 4604fb28925Smrg# This program is distributed in the hope that it will be useful, 4614fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4624fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4634fb28925Smrg# GNU General Public License for more details. 4644fb28925Smrg 4654fb28925Smrg# You should have received a copy of the GNU General Public License 4664fb28925Smrg# along with this program; if not, write to the Free Software 4674fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4684fb28925Smrg# 02111-1307, USA. 4694fb28925Smrg 4704fb28925Smrg# serial 1 4714fb28925Smrg 4724fb28925Smrg# Check whether the underlying file-system supports filenames 4734fb28925Smrg# with a leading dot. For instance MS-DOS doesn't. 4744fb28925SmrgAC_DEFUN([AM_SET_LEADING_DOT], 4754fb28925Smrg[rm -rf .tst 2>/dev/null 4764fb28925Smrgmkdir .tst 2>/dev/null 4774fb28925Smrgif test -d .tst; then 4784fb28925Smrg am__leading_dot=. 4794fb28925Smrgelse 4804fb28925Smrg am__leading_dot=_ 4814fb28925Smrgfi 4824fb28925Smrgrmdir .tst 2>/dev/null 4834fb28925SmrgAC_SUBST([am__leading_dot])]) 4844fb28925Smrg 4854fb28925Smrg# serial 5 -*- Autoconf -*- 4864fb28925Smrg 4874fb28925Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4884fb28925Smrg 4894fb28925Smrg# This program is free software; you can redistribute it and/or modify 4904fb28925Smrg# it under the terms of the GNU General Public License as published by 4914fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 4924fb28925Smrg# any later version. 4934fb28925Smrg 4944fb28925Smrg# This program is distributed in the hope that it will be useful, 4954fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4964fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4974fb28925Smrg# GNU General Public License for more details. 4984fb28925Smrg 4994fb28925Smrg# You should have received a copy of the GNU General Public License 5004fb28925Smrg# along with this program; if not, write to the Free Software 5014fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 5024fb28925Smrg# 02111-1307, USA. 5034fb28925Smrg 5044fb28925Smrg 5054fb28925Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 5064fb28925Smrg# written in clear, in which case automake, when reading aclocal.m4, 5074fb28925Smrg# will think it sees a *use*, and therefore will trigger all it's 5084fb28925Smrg# C support machinery. Also note that it means that autoscan, seeing 5094fb28925Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 5104fb28925Smrg 5114fb28925Smrg 5124fb28925Smrg 5134fb28925Smrg# _AM_DEPENDENCIES(NAME) 5144fb28925Smrg# ---------------------- 5154fb28925Smrg# See how the compiler implements dependency checking. 5164fb28925Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 5174fb28925Smrg# We try a few techniques and use that to set a single cache variable. 5184fb28925Smrg# 5194fb28925Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 5204fb28925Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 5214fb28925Smrg# dependency, and given that the user is not expected to run this macro, 5224fb28925Smrg# just rely on AC_PROG_CC. 5234fb28925SmrgAC_DEFUN([_AM_DEPENDENCIES], 5244fb28925Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 5254fb28925SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 5264fb28925SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 5274fb28925SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 5284fb28925Smrg 5294fb28925Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 5304fb28925Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 5314fb28925Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 5324fb28925Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 5334fb28925Smrg [depcc="$$1" am_compiler_list=]) 5344fb28925Smrg 5354fb28925SmrgAC_CACHE_CHECK([dependency style of $depcc], 5364fb28925Smrg [am_cv_$1_dependencies_compiler_type], 5374fb28925Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5384fb28925Smrg # We make a subdir and do the tests there. Otherwise we can end up 5394fb28925Smrg # making bogus files that we don't know about and never remove. For 5404fb28925Smrg # instance it was reported that on HP-UX the gcc test will end up 5414fb28925Smrg # making a dummy file named `D' -- because `-MD' means `put the output 5424fb28925Smrg # in D'. 5434fb28925Smrg mkdir conftest.dir 5444fb28925Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 5454fb28925Smrg # using a relative directory. 5464fb28925Smrg cp "$am_depcomp" conftest.dir 5474fb28925Smrg cd conftest.dir 5484fb28925Smrg # We will build objects and dependencies in a subdirectory because 5494fb28925Smrg # it helps to detect inapplicable dependency modes. For instance 5504fb28925Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 5514fb28925Smrg # side effect of compilation, but ICC will put the dependencies in 5524fb28925Smrg # the current directory while Tru64 will put them in the object 5534fb28925Smrg # directory. 5544fb28925Smrg mkdir sub 5554fb28925Smrg 5564fb28925Smrg am_cv_$1_dependencies_compiler_type=none 5574fb28925Smrg if test "$am_compiler_list" = ""; then 5584fb28925Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 5594fb28925Smrg fi 5604fb28925Smrg for depmode in $am_compiler_list; do 5614fb28925Smrg # Setup a source with many dependencies, because some compilers 5624fb28925Smrg # like to wrap large dependency lists on column 80 (with \), and 5634fb28925Smrg # we should not choose a depcomp mode which is confused by this. 5644fb28925Smrg # 5654fb28925Smrg # We need to recreate these files for each test, as the compiler may 5664fb28925Smrg # overwrite some of them when testing with obscure command lines. 5674fb28925Smrg # This happens at least with the AIX C compiler. 5684fb28925Smrg : > sub/conftest.c 5694fb28925Smrg for i in 1 2 3 4 5 6; do 5704fb28925Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 5714fb28925Smrg : > sub/conftst$i.h 5724fb28925Smrg done 5734fb28925Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5744fb28925Smrg 5754fb28925Smrg case $depmode in 5764fb28925Smrg nosideeffect) 5774fb28925Smrg # after this tag, mechanisms are not by side-effect, so they'll 5784fb28925Smrg # only be used when explicitly requested 5794fb28925Smrg if test "x$enable_dependency_tracking" = xyes; then 5804fb28925Smrg continue 5814fb28925Smrg else 5824fb28925Smrg break 5834fb28925Smrg fi 5844fb28925Smrg ;; 5854fb28925Smrg none) break ;; 5864fb28925Smrg esac 5874fb28925Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 5884fb28925Smrg # mode. It turns out that the SunPro C++ compiler does not properly 5894fb28925Smrg # handle `-M -o', and we need to detect this. 5904fb28925Smrg if depmode=$depmode \ 5914fb28925Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 5924fb28925Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 5934fb28925Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 5944fb28925Smrg >/dev/null 2>conftest.err && 5954fb28925Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 5964fb28925Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 5974fb28925Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 5984fb28925Smrg # icc doesn't choke on unknown options, it will just issue warnings 5994fb28925Smrg # (even with -Werror). So we grep stderr for any message 6004fb28925Smrg # that says an option was ignored. 6014fb28925Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 6024fb28925Smrg am_cv_$1_dependencies_compiler_type=$depmode 6034fb28925Smrg break 6044fb28925Smrg fi 6054fb28925Smrg fi 6064fb28925Smrg done 6074fb28925Smrg 6084fb28925Smrg cd .. 6094fb28925Smrg rm -rf conftest.dir 6104fb28925Smrgelse 6114fb28925Smrg am_cv_$1_dependencies_compiler_type=none 6124fb28925Smrgfi 6134fb28925Smrg]) 6144fb28925SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6154fb28925SmrgAM_CONDITIONAL([am__fastdep$1], [ 6164fb28925Smrg test "x$enable_dependency_tracking" != xno \ 6174fb28925Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6184fb28925Smrg]) 6194fb28925Smrg 6204fb28925Smrg 6214fb28925Smrg# AM_SET_DEPDIR 6224fb28925Smrg# ------------- 6234fb28925Smrg# Choose a directory name for dependency files. 6244fb28925Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6254fb28925SmrgAC_DEFUN([AM_SET_DEPDIR], 6264fb28925Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6274fb28925SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6284fb28925Smrg]) 6294fb28925Smrg 6304fb28925Smrg 6314fb28925Smrg# AM_DEP_TRACK 6324fb28925Smrg# ------------ 6334fb28925SmrgAC_DEFUN([AM_DEP_TRACK], 6344fb28925Smrg[AC_ARG_ENABLE(dependency-tracking, 6354fb28925Smrg[ --disable-dependency-tracking Speeds up one-time builds 6364fb28925Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 6374fb28925Smrgif test "x$enable_dependency_tracking" != xno; then 6384fb28925Smrg am_depcomp="$ac_aux_dir/depcomp" 6394fb28925Smrg AMDEPBACKSLASH='\' 6404fb28925Smrgfi 6414fb28925SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6424fb28925SmrgAC_SUBST([AMDEPBACKSLASH]) 6434fb28925Smrg]) 6444fb28925Smrg 6454fb28925Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 6464fb28925Smrg 6474fb28925Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 6484fb28925Smrg 6494fb28925Smrg# This program is free software; you can redistribute it and/or modify 6504fb28925Smrg# it under the terms of the GNU General Public License as published by 6514fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 6524fb28925Smrg# any later version. 6534fb28925Smrg 6544fb28925Smrg# This program is distributed in the hope that it will be useful, 6554fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 6564fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6574fb28925Smrg# GNU General Public License for more details. 6584fb28925Smrg 6594fb28925Smrg# You should have received a copy of the GNU General Public License 6604fb28925Smrg# along with this program; if not, write to the Free Software 6614fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6624fb28925Smrg# 02111-1307, USA. 6634fb28925Smrg 6644fb28925Smrg#serial 2 6654fb28925Smrg 6664fb28925Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 6674fb28925Smrg# ------------------------------ 6684fb28925SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6694fb28925Smrg[for mf in $CONFIG_FILES; do 6704fb28925Smrg # Strip MF so we end up with the name of the file. 6714fb28925Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 6724fb28925Smrg # Check whether this is an Automake generated Makefile or not. 6734fb28925Smrg # We used to match only the files named `Makefile.in', but 6744fb28925Smrg # some people rename them; so instead we look at the file content. 6754fb28925Smrg # Grep'ing the first line is not enough: some people post-process 6764fb28925Smrg # each Makefile.in and add a new line on top of each file to say so. 6774fb28925Smrg # So let's grep whole file. 6784fb28925Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6794fb28925Smrg dirpart=`AS_DIRNAME("$mf")` 6804fb28925Smrg else 6814fb28925Smrg continue 6824fb28925Smrg fi 6834fb28925Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 6844fb28925Smrg # Extract the definition of DEP_FILES from the Makefile without 6854fb28925Smrg # running `make'. 6864fb28925Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 6874fb28925Smrg test -z "$DEPDIR" && continue 6884fb28925Smrg # When using ansi2knr, U may be empty or an underscore; expand it 6894fb28925Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 6904fb28925Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 6914fb28925Smrg # We invoke sed twice because it is the simplest approach to 6924fb28925Smrg # changing $(DEPDIR) to its actual value in the expansion. 6934fb28925Smrg for file in `sed -n -e ' 6944fb28925Smrg /^DEP_FILES = .*\\\\$/ { 6954fb28925Smrg s/^DEP_FILES = // 6964fb28925Smrg :loop 6974fb28925Smrg s/\\\\$// 6984fb28925Smrg p 6994fb28925Smrg n 7004fb28925Smrg /\\\\$/ b loop 7014fb28925Smrg p 7024fb28925Smrg } 7034fb28925Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 7044fb28925Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7054fb28925Smrg # Make sure the directory exists. 7064fb28925Smrg test -f "$dirpart/$file" && continue 7074fb28925Smrg fdir=`AS_DIRNAME(["$file"])` 7084fb28925Smrg AS_MKDIR_P([$dirpart/$fdir]) 7094fb28925Smrg # echo "creating $dirpart/$file" 7104fb28925Smrg echo '# dummy' > "$dirpart/$file" 7114fb28925Smrg done 7124fb28925Smrgdone 7134fb28925Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7144fb28925Smrg 7154fb28925Smrg 7164fb28925Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7174fb28925Smrg# ----------------------------- 7184fb28925Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7194fb28925Smrg# 7204fb28925Smrg# This code is only required when automatic dependency tracking 7214fb28925Smrg# is enabled. FIXME. This creates each `.P' file that we will 7224fb28925Smrg# need in order to bootstrap the dependency handling code. 7234fb28925SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7244fb28925Smrg[AC_CONFIG_COMMANDS([depfiles], 7254fb28925Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7264fb28925Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7274fb28925Smrg]) 7284fb28925Smrg 7294fb28925Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7304fb28925Smrg 7314fb28925Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 7324fb28925Smrg 7334fb28925Smrg# This program is free software; you can redistribute it and/or modify 7344fb28925Smrg# it under the terms of the GNU General Public License as published by 7354fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 7364fb28925Smrg# any later version. 7374fb28925Smrg 7384fb28925Smrg# This program is distributed in the hope that it will be useful, 7394fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 7404fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7414fb28925Smrg# GNU General Public License for more details. 7424fb28925Smrg 7434fb28925Smrg# You should have received a copy of the GNU General Public License 7444fb28925Smrg# along with this program; if not, write to the Free Software 7454fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7464fb28925Smrg# 02111-1307, USA. 7474fb28925Smrg 7484fb28925Smrg# serial 2 7494fb28925Smrg 7504fb28925Smrg# AM_MAKE_INCLUDE() 7514fb28925Smrg# ----------------- 7524fb28925Smrg# Check to see how make treats includes. 7534fb28925SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7544fb28925Smrg[am_make=${MAKE-make} 7554fb28925Smrgcat > confinc << 'END' 7564fb28925Smrgam__doit: 7574fb28925Smrg @echo done 7584fb28925Smrg.PHONY: am__doit 7594fb28925SmrgEND 7604fb28925Smrg# If we don't find an include directive, just comment out the code. 7614fb28925SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7624fb28925Smrgam__include="#" 7634fb28925Smrgam__quote= 7644fb28925Smrg_am_result=none 7654fb28925Smrg# First try GNU make style include. 7664fb28925Smrgecho "include confinc" > confmf 7674fb28925Smrg# We grep out `Entering directory' and `Leaving directory' 7684fb28925Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 7694fb28925Smrg# In particular we don't look at `^make:' because GNU make might 7704fb28925Smrg# be invoked under some other name (usually "gmake"), in which 7714fb28925Smrg# case it prints its new name instead of `make'. 7724fb28925Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7734fb28925Smrg am__include=include 7744fb28925Smrg am__quote= 7754fb28925Smrg _am_result=GNU 7764fb28925Smrgfi 7774fb28925Smrg# Now try BSD make style include. 7784fb28925Smrgif test "$am__include" = "#"; then 7794fb28925Smrg echo '.include "confinc"' > confmf 7804fb28925Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7814fb28925Smrg am__include=.include 7824fb28925Smrg am__quote="\"" 7834fb28925Smrg _am_result=BSD 7844fb28925Smrg fi 7854fb28925Smrgfi 7864fb28925SmrgAC_SUBST([am__include]) 7874fb28925SmrgAC_SUBST([am__quote]) 7884fb28925SmrgAC_MSG_RESULT([$_am_result]) 7894fb28925Smrgrm -f confinc confmf 7904fb28925Smrg]) 7914fb28925Smrg 7924fb28925Smrg# AM_CONDITIONAL -*- Autoconf -*- 7934fb28925Smrg 7944fb28925Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 7954fb28925Smrg 7964fb28925Smrg# This program is free software; you can redistribute it and/or modify 7974fb28925Smrg# it under the terms of the GNU General Public License as published by 7984fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 7994fb28925Smrg# any later version. 8004fb28925Smrg 8014fb28925Smrg# This program is distributed in the hope that it will be useful, 8024fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8034fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8044fb28925Smrg# GNU General Public License for more details. 8054fb28925Smrg 8064fb28925Smrg# You should have received a copy of the GNU General Public License 8074fb28925Smrg# along with this program; if not, write to the Free Software 8084fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8094fb28925Smrg# 02111-1307, USA. 8104fb28925Smrg 8114fb28925Smrg# serial 5 8124fb28925Smrg 8134fb28925SmrgAC_PREREQ(2.52) 8144fb28925Smrg 8154fb28925Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8164fb28925Smrg# ------------------------------------- 8174fb28925Smrg# Define a conditional. 8184fb28925SmrgAC_DEFUN([AM_CONDITIONAL], 8194fb28925Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8204fb28925Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8214fb28925SmrgAC_SUBST([$1_TRUE]) 8224fb28925SmrgAC_SUBST([$1_FALSE]) 8234fb28925Smrgif $2; then 8244fb28925Smrg $1_TRUE= 8254fb28925Smrg $1_FALSE='#' 8264fb28925Smrgelse 8274fb28925Smrg $1_TRUE='#' 8284fb28925Smrg $1_FALSE= 8294fb28925Smrgfi 8304fb28925SmrgAC_CONFIG_COMMANDS_PRE( 8314fb28925Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8324fb28925Smrg AC_MSG_ERROR([conditional "$1" was never defined. 8334fb28925SmrgUsually this means the macro was only invoked conditionally.]) 8344fb28925Smrgfi])]) 8354fb28925Smrg 8364fb28925Smrg# Add --enable-maintainer-mode option to configure. 8374fb28925Smrg# From Jim Meyering 8384fb28925Smrg 8394fb28925Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 8404fb28925Smrg 8414fb28925Smrg# This program is free software; you can redistribute it and/or modify 8424fb28925Smrg# it under the terms of the GNU General Public License as published by 8434fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 8444fb28925Smrg# any later version. 8454fb28925Smrg 8464fb28925Smrg# This program is distributed in the hope that it will be useful, 8474fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8484fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8494fb28925Smrg# GNU General Public License for more details. 8504fb28925Smrg 8514fb28925Smrg# You should have received a copy of the GNU General Public License 8524fb28925Smrg# along with this program; if not, write to the Free Software 8534fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8544fb28925Smrg# 02111-1307, USA. 8554fb28925Smrg 8564fb28925Smrg# serial 2 8574fb28925Smrg 8584fb28925SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8594fb28925Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 8604fb28925Smrg dnl maintainer-mode is disabled by default 8614fb28925Smrg AC_ARG_ENABLE(maintainer-mode, 8624fb28925Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 8634fb28925Smrg (and sometimes confusing) to the casual installer], 8644fb28925Smrg USE_MAINTAINER_MODE=$enableval, 8654fb28925Smrg USE_MAINTAINER_MODE=no) 8664fb28925Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8674fb28925Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 8684fb28925Smrg MAINT=$MAINTAINER_MODE_TRUE 8694fb28925Smrg AC_SUBST(MAINT)dnl 8704fb28925Smrg] 8714fb28925Smrg) 8724fb28925Smrg 8734fb28925SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8744fb28925Smrg 8754fb28925Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 8764fb28925Smrg 8774fb28925Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 8784fb28925Smrg 8794fb28925Smrg# This program is free software; you can redistribute it and/or modify 8804fb28925Smrg# it under the terms of the GNU General Public License as published by 8814fb28925Smrg# the Free Software Foundation; either version 2, or (at your option) 8824fb28925Smrg# any later version. 8834fb28925Smrg 8844fb28925Smrg# This program is distributed in the hope that it will be useful, 8854fb28925Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8864fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8874fb28925Smrg# GNU General Public License for more details. 8884fb28925Smrg 8894fb28925Smrg# You should have received a copy of the GNU General Public License 8904fb28925Smrg# along with this program; if not, write to the Free Software 8914fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8924fb28925Smrg# 02111-1307, USA. 8934fb28925Smrg 8944fb28925SmrgAC_PREREQ([2.52]) 8954fb28925Smrg 8964fb28925Smrg# serial 6 8974fb28925Smrg 8984fb28925Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8994fb28925SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9004fb28925Smrg 9014fb28925Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9024fb28925Smrg# 9034fb28925Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9044fb28925Smrg# 9054fb28925Smrg# This program is free software; you can redistribute it and/or modify 9064fb28925Smrg# it under the terms of the GNU General Public License as published by 9074fb28925Smrg# the Free Software Foundation; either version 2 of the License, or 9084fb28925Smrg# (at your option) any later version. 9094fb28925Smrg# 9104fb28925Smrg# This program is distributed in the hope that it will be useful, but 9114fb28925Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9124fb28925Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9134fb28925Smrg# General Public License for more details. 9144fb28925Smrg# 9154fb28925Smrg# You should have received a copy of the GNU General Public License 9164fb28925Smrg# along with this program; if not, write to the Free Software 9174fb28925Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9184fb28925Smrg# 9194fb28925Smrg# As a special exception to the GNU General Public License, if you 9204fb28925Smrg# distribute this file as part of a program that contains a 9214fb28925Smrg# configuration script generated by Autoconf, you may include it under 9224fb28925Smrg# the same distribution terms that you use for the rest of that program. 9234fb28925Smrg 9244fb28925Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9254fb28925Smrg# ---------------------------------- 9264fb28925SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9274fb28925Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9284fb28925Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9294fb28925SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9304fb28925Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9314fb28925Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9324fb28925Smrgfi 9334fb28925Smrgif test -n "$PKG_CONFIG"; then 9344fb28925Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9354fb28925Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9364fb28925Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9374fb28925Smrg AC_MSG_RESULT([yes]) 9384fb28925Smrg else 9394fb28925Smrg AC_MSG_RESULT([no]) 9404fb28925Smrg PKG_CONFIG="" 9414fb28925Smrg fi 9424fb28925Smrg 9434fb28925Smrgfi[]dnl 9444fb28925Smrg])# PKG_PROG_PKG_CONFIG 9454fb28925Smrg 9464fb28925Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9474fb28925Smrg# 9484fb28925Smrg# Check to see whether a particular set of modules exists. Similar 9494fb28925Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9504fb28925Smrg# 9514fb28925Smrg# 9524fb28925Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9534fb28925Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9544fb28925Smrg# PKG_CHECK_EXISTS manually 9554fb28925Smrg# -------------------------------------------------------------- 9564fb28925SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9574fb28925Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9584fb28925Smrgif test -n "$PKG_CONFIG" && \ 9594fb28925Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9604fb28925Smrg m4_ifval([$2], [$2], [:]) 9614fb28925Smrgm4_ifvaln([$3], [else 9624fb28925Smrg $3])dnl 9634fb28925Smrgfi]) 9644fb28925Smrg 9654fb28925Smrg 9664fb28925Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9674fb28925Smrg# --------------------------------------------- 9684fb28925Smrgm4_define([_PKG_CONFIG], 9694fb28925Smrg[if test -n "$PKG_CONFIG"; then 9704fb28925Smrg if test -n "$$1"; then 9714fb28925Smrg pkg_cv_[]$1="$$1" 9724fb28925Smrg else 9734fb28925Smrg PKG_CHECK_EXISTS([$3], 9744fb28925Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9754fb28925Smrg [pkg_failed=yes]) 9764fb28925Smrg fi 9774fb28925Smrgelse 9784fb28925Smrg pkg_failed=untried 9794fb28925Smrgfi[]dnl 9804fb28925Smrg])# _PKG_CONFIG 9814fb28925Smrg 9824fb28925Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9834fb28925Smrg# ----------------------------- 9844fb28925SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9854fb28925Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9864fb28925Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9874fb28925Smrg _pkg_short_errors_supported=yes 9884fb28925Smrgelse 9894fb28925Smrg _pkg_short_errors_supported=no 9904fb28925Smrgfi[]dnl 9914fb28925Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9924fb28925Smrg 9934fb28925Smrg 9944fb28925Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9954fb28925Smrg# [ACTION-IF-NOT-FOUND]) 9964fb28925Smrg# 9974fb28925Smrg# 9984fb28925Smrg# Note that if there is a possibility the first call to 9994fb28925Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 10004fb28925Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 10014fb28925Smrg# 10024fb28925Smrg# 10034fb28925Smrg# -------------------------------------------------------------- 10044fb28925SmrgAC_DEFUN([PKG_CHECK_MODULES], 10054fb28925Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10064fb28925SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 10074fb28925SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 10084fb28925Smrg 10094fb28925Smrgpkg_failed=no 10104fb28925SmrgAC_MSG_CHECKING([for $1]) 10114fb28925Smrg 10124fb28925Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 10134fb28925Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 10144fb28925Smrg 10154fb28925Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 10164fb28925Smrgand $1[]_LIBS to avoid the need to call pkg-config. 10174fb28925SmrgSee the pkg-config man page for more details.]) 10184fb28925Smrg 10194fb28925Smrgif test $pkg_failed = yes; then 10204fb28925Smrg _PKG_SHORT_ERRORS_SUPPORTED 10214fb28925Smrg if test $_pkg_short_errors_supported = yes; then 10224fb28925Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 10234fb28925Smrg else 10244fb28925Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 10254fb28925Smrg fi 10264fb28925Smrg # Put the nasty error message in config.log where it belongs 10274fb28925Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 10284fb28925Smrg 10294fb28925Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 10304fb28925Smrg[Package requirements ($2) were not met: 10314fb28925Smrg 10324fb28925Smrg$$1_PKG_ERRORS 10334fb28925Smrg 10344fb28925SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 10354fb28925Smrginstalled software in a non-standard prefix. 10364fb28925Smrg 10374fb28925Smrg_PKG_TEXT 10384fb28925Smrg])], 10394fb28925Smrg [$4]) 10404fb28925Smrgelif test $pkg_failed = untried; then 10414fb28925Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 10424fb28925Smrg[The pkg-config script could not be found or is too old. Make sure it 10434fb28925Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 10444fb28925Smrgpath to pkg-config. 10454fb28925Smrg 10464fb28925Smrg_PKG_TEXT 10474fb28925Smrg 10484fb28925SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 10494fb28925Smrg [$4]) 10504fb28925Smrgelse 10514fb28925Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 10524fb28925Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 10534fb28925Smrg AC_MSG_RESULT([yes]) 10544fb28925Smrg ifelse([$3], , :, [$3]) 10554fb28925Smrgfi[]dnl 10564fb28925Smrg])# PKG_CHECK_MODULES 10574fb28925Smrg 10584fb28925Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:26:55 mrg Exp $ 10594fb28925Smrgdnl 10604fb28925Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 10614fb28925Smrgdnl 10624fb28925Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10634fb28925Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10644fb28925Smrgdnl the above copyright notice appear in all copies and that both that 10654fb28925Smrgdnl copyright notice and this permission notice appear in supporting 10664fb28925Smrgdnl documentation. 10674fb28925Smrgdnl 10684fb28925Smrgdnl The above copyright notice and this permission notice shall be included 10694fb28925Smrgdnl in all copies or substantial portions of the Software. 10704fb28925Smrgdnl 10714fb28925Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10724fb28925Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10734fb28925Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10744fb28925Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10754fb28925Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10764fb28925Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10774fb28925Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10784fb28925Smrgdnl 10794fb28925Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10804fb28925Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10814fb28925Smrgdnl other dealings in this Software without prior written authorization 10824fb28925Smrgdnl from the copyright holders. 10834fb28925Smrgdnl 10844fb28925Smrg 10854fb28925Smrg# XORG_PROG_RAWCPP() 10864fb28925Smrg# ------------------ 10874fb28925Smrg# Find cpp program and necessary flags for use in pre-processing text files 10884fb28925Smrg# such as man pages and config files 10894fb28925SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10904fb28925SmrgAC_REQUIRE([AC_PROG_CPP]) 10914fb28925SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10924fb28925Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10934fb28925Smrg 10944fb28925Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10954fb28925Smrg# which is not the best choice for supporting other OS'es, but covers most 10964fb28925Smrg# of the ones we need for now. 10974fb28925SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10984fb28925SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10994fb28925Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11004fb28925Smrg AC_MSG_RESULT([no]) 11014fb28925Smrgelse 11024fb28925Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11034fb28925Smrg RAWCPPFLAGS=-undef 11044fb28925Smrg AC_MSG_RESULT([yes]) 11054fb28925Smrg else 11064fb28925Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11074fb28925Smrg fi 11084fb28925Smrgfi 11094fb28925Smrgrm -f conftest.$ac_ext 11104fb28925Smrg 11114fb28925SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11124fb28925SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11134fb28925Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11144fb28925Smrg AC_MSG_RESULT([no]) 11154fb28925Smrgelse 11164fb28925Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11174fb28925Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11184fb28925Smrg AC_MSG_RESULT([yes]) 11194fb28925Smrg else 11204fb28925Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11214fb28925Smrg fi 11224fb28925Smrgfi 11234fb28925Smrgrm -f conftest.$ac_ext 11244fb28925SmrgAC_SUBST(RAWCPPFLAGS) 11254fb28925Smrg]) # XORG_PROG_RAWCPP 11264fb28925Smrg 11274fb28925Smrg# XORG_MANPAGE_SECTIONS() 11284fb28925Smrg# ----------------------- 11294fb28925Smrg# Determine which sections man pages go in for the different man page types 11304fb28925Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11314fb28925Smrg# Not sure if there's any better way than just hardcoding by OS name. 11324fb28925Smrg# Override default settings by setting environment variables 11334fb28925Smrg 11344fb28925SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11354fb28925SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11364fb28925Smrg 11374fb28925Smrgif test x$APP_MAN_SUFFIX = x ; then 11384fb28925Smrg case $host_os in 11394fb28925Smrg linux*) APP_MAN_SUFFIX=1x ;; 11404fb28925Smrg *) APP_MAN_SUFFIX=1 ;; 11414fb28925Smrg esac 11424fb28925Smrgfi 11434fb28925Smrgif test x$APP_MAN_DIR = x ; then 11444fb28925Smrg case $host_os in 11454fb28925Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 11464fb28925Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 11474fb28925Smrg esac 11484fb28925Smrgfi 11494fb28925Smrg 11504fb28925Smrgif test x$LIB_MAN_SUFFIX = x ; then 11514fb28925Smrg case $host_os in 11524fb28925Smrg linux*) LIB_MAN_SUFFIX=3x ;; 11534fb28925Smrg *) LIB_MAN_SUFFIX=3 ;; 11544fb28925Smrg esac 11554fb28925Smrgfi 11564fb28925Smrgif test x$LIB_MAN_DIR = x ; then 11574fb28925Smrg case $host_os in 11584fb28925Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 11594fb28925Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 11604fb28925Smrg esac 11614fb28925Smrgfi 11624fb28925Smrg 11634fb28925Smrgif test x$FILE_MAN_SUFFIX = x ; then 11644fb28925Smrg case $host_os in 11654fb28925Smrg linux*) FILE_MAN_SUFFIX=5x ;; 11664fb28925Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 11674fb28925Smrg *) FILE_MAN_SUFFIX=5 ;; 11684fb28925Smrg esac 11694fb28925Smrgfi 11704fb28925Smrgif test x$FILE_MAN_DIR = x ; then 11714fb28925Smrg case $host_os in 11724fb28925Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 11734fb28925Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 11744fb28925Smrg esac 11754fb28925Smrgfi 11764fb28925Smrg 11774fb28925Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 11784fb28925Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11794fb28925Smrgif test x$MISC_MAN_SUFFIX = x ; then 11804fb28925Smrg case $host_os in 11814fb28925Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 11824fb28925Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 11834fb28925Smrg *) MISC_MAN_SUFFIX=7 ;; 11844fb28925Smrg esac 11854fb28925Smrgfi 11864fb28925Smrgif test x$MISC_MAN_DIR = x ; then 11874fb28925Smrg case $host_os in 11884fb28925Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 11894fb28925Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 11904fb28925Smrg esac 11914fb28925Smrgfi 11924fb28925Smrg 11934fb28925Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 11944fb28925Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11954fb28925Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 11964fb28925Smrg case $host_os in 11974fb28925Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 11984fb28925Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11994fb28925Smrg *) DRIVER_MAN_SUFFIX=4 ;; 12004fb28925Smrg esac 12014fb28925Smrgfi 12024fb28925Smrgif test x$DRIVER_MAN_DIR = x ; then 12034fb28925Smrg case $host_os in 12044fb28925Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 12054fb28925Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 12064fb28925Smrg esac 12074fb28925Smrgfi 12084fb28925Smrg 12094fb28925Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 12104fb28925Smrg case $host_os in 12114fb28925Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 12124fb28925Smrg *) ADMIN_MAN_SUFFIX=8 ;; 12134fb28925Smrg esac 12144fb28925Smrgfi 12154fb28925Smrgif test x$ADMIN_MAN_DIR = x ; then 12164fb28925Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12174fb28925Smrgfi 12184fb28925Smrg 12194fb28925Smrg 12204fb28925SmrgAC_SUBST([APP_MAN_SUFFIX]) 12214fb28925SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12224fb28925SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12234fb28925SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12244fb28925SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12254fb28925SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12264fb28925SmrgAC_SUBST([APP_MAN_DIR]) 12274fb28925SmrgAC_SUBST([LIB_MAN_DIR]) 12284fb28925SmrgAC_SUBST([FILE_MAN_DIR]) 12294fb28925SmrgAC_SUBST([MISC_MAN_DIR]) 12304fb28925SmrgAC_SUBST([DRIVER_MAN_DIR]) 12314fb28925SmrgAC_SUBST([ADMIN_MAN_DIR]) 12324fb28925Smrg]) # XORG_MANPAGE_SECTIONS 12334fb28925Smrg 12344fb28925Smrg# XORG_CHECK_LINUXDOC 12354fb28925Smrg# ------------------- 12364fb28925Smrg# Defines the variable MAKE_TEXT if the necessary tools and 12374fb28925Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12384fb28925Smrg# Whether or not the necessary tools and files are found can be checked 12394fb28925Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12404fb28925SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12414fb28925SmrgAC_CHECK_FILE( 12424fb28925Smrg [$prefix/share/X11/sgml/defs.ent], 12434fb28925Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 12444fb28925Smrg [DEFS_ENT_PATH=] 12454fb28925Smrg) 12464fb28925Smrg 12474fb28925SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12484fb28925SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 12494fb28925Smrg 12504fb28925SmrgAC_MSG_CHECKING([Whether to build documentation]) 12514fb28925Smrg 12524fb28925Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 12534fb28925Smrg BUILDDOC=yes 12544fb28925Smrgelse 12554fb28925Smrg BUILDDOC=no 12564fb28925Smrgfi 12574fb28925Smrg 12584fb28925SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12594fb28925Smrg 12604fb28925SmrgAC_MSG_RESULT([$BUILDDOC]) 12614fb28925Smrg 12624fb28925SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 12634fb28925Smrg 12644fb28925Smrgif test x$PS2PDF != x ; then 12654fb28925Smrg BUILDPDFDOC=yes 12664fb28925Smrgelse 12674fb28925Smrg BUILDPDFDOC=no 12684fb28925Smrgfi 12694fb28925Smrg 12704fb28925SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12714fb28925Smrg 12724fb28925SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12734fb28925Smrg 12744fb28925SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12754fb28925SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 12764fb28925SmrgMAKE_PDF="$PS2PDF" 12774fb28925SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 12784fb28925Smrg 12794fb28925SmrgAC_SUBST(MAKE_TEXT) 12804fb28925SmrgAC_SUBST(MAKE_PS) 12814fb28925SmrgAC_SUBST(MAKE_PDF) 12824fb28925SmrgAC_SUBST(MAKE_HTML) 12834fb28925Smrg]) # XORG_CHECK_LINUXDOC 12844fb28925Smrg 12854fb28925Smrg# XORG_CHECK_MALLOC_ZERO 12864fb28925Smrg# ---------------------- 12874fb28925Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 12884fb28925Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 12894fb28925Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 12904fb28925SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 12914fb28925SmrgAC_ARG_ENABLE(malloc0returnsnull, 12924fb28925Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 12934fb28925Smrg [malloc(0) returns NULL (default: auto)]), 12944fb28925Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 12954fb28925Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 12964fb28925Smrg 12974fb28925SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 12984fb28925Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 12994fb28925Smrg AC_RUN_IFELSE([ 13004fb28925Smrgchar *malloc(); 13014fb28925Smrgchar *realloc(); 13024fb28925Smrgchar *calloc(); 13034fb28925Smrgmain() { 13044fb28925Smrg char *m0, *r0, *c0, *p; 13054fb28925Smrg m0 = malloc(0); 13064fb28925Smrg p = malloc(10); 13074fb28925Smrg r0 = realloc(p,0); 13084fb28925Smrg c0 = calloc(0); 13094fb28925Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 13104fb28925Smrg}], 13114fb28925Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 13124fb28925Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 13134fb28925Smrgfi 13144fb28925SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13154fb28925Smrg 13164fb28925Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 13174fb28925Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 13184fb28925Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 13194fb28925Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 13204fb28925Smrgelse 13214fb28925Smrg MALLOC_ZERO_CFLAGS="" 13224fb28925Smrg XMALLOC_ZERO_CFLAGS="" 13234fb28925Smrg XTMALLOC_ZERO_CFLAGS="" 13244fb28925Smrgfi 13254fb28925Smrg 13264fb28925SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 13274fb28925SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 13284fb28925SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 13294fb28925Smrg]) # XORG_CHECK_MALLOC_ZERO 13304fb28925Smrg 13314fb28925Smrgdnl Copyright 2005 Red Hat, Inc 13324fb28925Smrgdnl 13334fb28925Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 13344fb28925Smrgdnl documentation for any purpose is hereby granted without fee, provided that 13354fb28925Smrgdnl the above copyright notice appear in all copies and that both that 13364fb28925Smrgdnl copyright notice and this permission notice appear in supporting 13374fb28925Smrgdnl documentation. 13384fb28925Smrgdnl 13394fb28925Smrgdnl The above copyright notice and this permission notice shall be included 13404fb28925Smrgdnl in all copies or substantial portions of the Software. 13414fb28925Smrgdnl 13424fb28925Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13434fb28925Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13444fb28925Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13454fb28925Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 13464fb28925Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 13474fb28925Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 13484fb28925Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 13494fb28925Smrgdnl 13504fb28925Smrgdnl Except as contained in this notice, the name of the copyright holders shall 13514fb28925Smrgdnl not be used in advertising or otherwise to promote the sale, use or 13524fb28925Smrgdnl other dealings in this Software without prior written authorization 13534fb28925Smrgdnl from the copyright holders. 13544fb28925Smrgdnl 13554fb28925Smrg 13564fb28925Smrg# XORG_RELEASE_VERSION 13574fb28925Smrg# -------------------- 13584fb28925Smrg# Adds --with/without-release-string and changes the PACKAGE and 13594fb28925Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 13604fb28925Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 13614fb28925Smrg 13624fb28925SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 13634fb28925Smrg AC_ARG_WITH(release-version, 13644fb28925Smrg AC_HELP_STRING([--with-release-version=STRING], 13654fb28925Smrg [Use release version string in package name]), 13664fb28925Smrg [RELEASE_VERSION="$withval"], 13674fb28925Smrg [RELEASE_VERSION=""]) 13684fb28925Smrg if test "x$RELEASE_VERSION" != "x"; then 13694fb28925Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 13704fb28925Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 13714fb28925Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 13724fb28925Smrg fi 13734fb28925Smrg]) 13744fb28925Smrg 1375