14963b7b6Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 24963b7b6Smrg 34963b7b6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 44963b7b6Smrg# Free Software Foundation, Inc. 54963b7b6Smrg# This file is free software; the Free Software Foundation 64963b7b6Smrg# gives unlimited permission to copy and/or distribute it, 74963b7b6Smrg# with or without modifications, as long as this notice is preserved. 84963b7b6Smrg 94963b7b6Smrg# This program is distributed in the hope that it will be useful, 104963b7b6Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114963b7b6Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124963b7b6Smrg# PARTICULAR PURPOSE. 134963b7b6Smrg 144963b7b6Smrg# Do all the work for Automake. -*- Autoconf -*- 154963b7b6Smrg 164963b7b6Smrg# This macro actually does too much some checks are only needed if 174963b7b6Smrg# your package does certain things. But this isn't really a big deal. 184963b7b6Smrg 194963b7b6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 204963b7b6Smrg# Free Software Foundation, Inc. 214963b7b6Smrg 224963b7b6Smrg# This program is free software; you can redistribute it and/or modify 234963b7b6Smrg# it under the terms of the GNU General Public License as published by 244963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 254963b7b6Smrg# any later version. 264963b7b6Smrg 274963b7b6Smrg# This program is distributed in the hope that it will be useful, 284963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 294963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304963b7b6Smrg# GNU General Public License for more details. 314963b7b6Smrg 324963b7b6Smrg# You should have received a copy of the GNU General Public License 334963b7b6Smrg# along with this program; if not, write to the Free Software 344963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 354963b7b6Smrg# 02111-1307, USA. 364963b7b6Smrg 374963b7b6Smrg# serial 10 384963b7b6Smrg 394963b7b6SmrgAC_PREREQ([2.54]) 404963b7b6Smrg 414963b7b6Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 424963b7b6Smrg# the ones we care about. 434963b7b6Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 444963b7b6Smrg 454963b7b6Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 464963b7b6Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 474963b7b6Smrg# ----------------------------------------------- 484963b7b6Smrg# The call with PACKAGE and VERSION arguments is the old style 494963b7b6Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 504963b7b6Smrg# and VERSION should now be passed to AC_INIT and removed from 514963b7b6Smrg# the call to AM_INIT_AUTOMAKE. 524963b7b6Smrg# We support both call styles for the transition. After 534963b7b6Smrg# the next Automake release, Autoconf can make the AC_INIT 544963b7b6Smrg# arguments mandatory, and then we can depend on a new Autoconf 554963b7b6Smrg# release and drop the old call support. 564963b7b6SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 574963b7b6Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 584963b7b6Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 594963b7b6Smrg# test to see if srcdir already configured 604963b7b6Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 614963b7b6Smrg test -f $srcdir/config.status; then 624963b7b6Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 634963b7b6Smrgfi 644963b7b6Smrg 654963b7b6Smrg# test whether we have cygpath 664963b7b6Smrgif test -z "$CYGPATH_W"; then 674963b7b6Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 684963b7b6Smrg CYGPATH_W='cygpath -w' 694963b7b6Smrg else 704963b7b6Smrg CYGPATH_W=echo 714963b7b6Smrg fi 724963b7b6Smrgfi 734963b7b6SmrgAC_SUBST([CYGPATH_W]) 744963b7b6Smrg 754963b7b6Smrg# Define the identity of the package. 764963b7b6Smrgdnl Distinguish between old-style and new-style calls. 774963b7b6Smrgm4_ifval([$2], 784963b7b6Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 794963b7b6Smrg AC_SUBST([PACKAGE], [$1])dnl 804963b7b6Smrg AC_SUBST([VERSION], [$2])], 814963b7b6Smrg[_AM_SET_OPTIONS([$1])dnl 824963b7b6Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 834963b7b6Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 844963b7b6Smrg 854963b7b6Smrg_AM_IF_OPTION([no-define],, 864963b7b6Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 874963b7b6Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 884963b7b6Smrg 894963b7b6Smrg# Some tools Automake needs. 904963b7b6SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 914963b7b6SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 924963b7b6SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 934963b7b6SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 944963b7b6SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 954963b7b6SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 964963b7b6SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 974963b7b6SmrgAM_MISSING_PROG(AMTAR, tar) 984963b7b6SmrgAM_PROG_INSTALL_SH 994963b7b6SmrgAM_PROG_INSTALL_STRIP 1004963b7b6Smrg# We need awk for the "check" target. The system "awk" is bad on 1014963b7b6Smrg# some platforms. 1024963b7b6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1034963b7b6SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1044963b7b6SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1054963b7b6Smrg 1064963b7b6Smrg_AM_IF_OPTION([no-dependencies],, 1074963b7b6Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1084963b7b6Smrg [_AM_DEPENDENCIES(CC)], 1094963b7b6Smrg [define([AC_PROG_CC], 1104963b7b6Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1114963b7b6SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1124963b7b6Smrg [_AM_DEPENDENCIES(CXX)], 1134963b7b6Smrg [define([AC_PROG_CXX], 1144963b7b6Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1154963b7b6Smrg]) 1164963b7b6Smrg]) 1174963b7b6Smrg 1184963b7b6Smrg 1194963b7b6Smrg# When config.status generates a header, we must update the stamp-h file. 1204963b7b6Smrg# This file resides in the same directory as the config header 1214963b7b6Smrg# that is generated. The stamp files are numbered to have different names. 1224963b7b6Smrg 1234963b7b6Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1244963b7b6Smrg# loop where config.status creates the headers, so we can generate 1254963b7b6Smrg# our stamp files there. 1264963b7b6SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1274963b7b6Smrg[# Compute $1's index in $config_headers. 1284963b7b6Smrg_am_stamp_count=1 1294963b7b6Smrgfor _am_header in $config_headers :; do 1304963b7b6Smrg case $_am_header in 1314963b7b6Smrg $1 | $1:* ) 1324963b7b6Smrg break ;; 1334963b7b6Smrg * ) 1344963b7b6Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1354963b7b6Smrg esac 1364963b7b6Smrgdone 1374963b7b6Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1384963b7b6Smrg 1394963b7b6Smrg# Copyright 2002 Free Software Foundation, Inc. 1404963b7b6Smrg 1414963b7b6Smrg# This program is free software; you can redistribute it and/or modify 1424963b7b6Smrg# it under the terms of the GNU General Public License as published by 1434963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 1444963b7b6Smrg# any later version. 1454963b7b6Smrg 1464963b7b6Smrg# This program is distributed in the hope that it will be useful, 1474963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1484963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1494963b7b6Smrg# GNU General Public License for more details. 1504963b7b6Smrg 1514963b7b6Smrg# You should have received a copy of the GNU General Public License 1524963b7b6Smrg# along with this program; if not, write to the Free Software 1534963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1544963b7b6Smrg 1554963b7b6Smrg# AM_AUTOMAKE_VERSION(VERSION) 1564963b7b6Smrg# ---------------------------- 1574963b7b6Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1584963b7b6Smrg# generated from the m4 files accompanying Automake X.Y. 1594963b7b6SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 1604963b7b6Smrg 1614963b7b6Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1624963b7b6Smrg# ------------------------------- 1634963b7b6Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 1644963b7b6Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 1654963b7b6SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1664963b7b6Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 1674963b7b6Smrg 1684963b7b6Smrg# Helper functions for option handling. -*- Autoconf -*- 1694963b7b6Smrg 1704963b7b6Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 1714963b7b6Smrg 1724963b7b6Smrg# This program is free software; you can redistribute it and/or modify 1734963b7b6Smrg# it under the terms of the GNU General Public License as published by 1744963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 1754963b7b6Smrg# any later version. 1764963b7b6Smrg 1774963b7b6Smrg# This program is distributed in the hope that it will be useful, 1784963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1794963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1804963b7b6Smrg# GNU General Public License for more details. 1814963b7b6Smrg 1824963b7b6Smrg# You should have received a copy of the GNU General Public License 1834963b7b6Smrg# along with this program; if not, write to the Free Software 1844963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1854963b7b6Smrg# 02111-1307, USA. 1864963b7b6Smrg 1874963b7b6Smrg# serial 2 1884963b7b6Smrg 1894963b7b6Smrg# _AM_MANGLE_OPTION(NAME) 1904963b7b6Smrg# ----------------------- 1914963b7b6SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1924963b7b6Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1934963b7b6Smrg 1944963b7b6Smrg# _AM_SET_OPTION(NAME) 1954963b7b6Smrg# ------------------------------ 1964963b7b6Smrg# Set option NAME. Presently that only means defining a flag for this option. 1974963b7b6SmrgAC_DEFUN([_AM_SET_OPTION], 1984963b7b6Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1994963b7b6Smrg 2004963b7b6Smrg# _AM_SET_OPTIONS(OPTIONS) 2014963b7b6Smrg# ---------------------------------- 2024963b7b6Smrg# OPTIONS is a space-separated list of Automake options. 2034963b7b6SmrgAC_DEFUN([_AM_SET_OPTIONS], 2044963b7b6Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2054963b7b6Smrg 2064963b7b6Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2074963b7b6Smrg# ------------------------------------------- 2084963b7b6Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2094963b7b6SmrgAC_DEFUN([_AM_IF_OPTION], 2104963b7b6Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2114963b7b6Smrg 2124963b7b6Smrg# 2134963b7b6Smrg# Check to make sure that the build environment is sane. 2144963b7b6Smrg# 2154963b7b6Smrg 2164963b7b6Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 2174963b7b6Smrg 2184963b7b6Smrg# This program is free software; you can redistribute it and/or modify 2194963b7b6Smrg# it under the terms of the GNU General Public License as published by 2204963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 2214963b7b6Smrg# any later version. 2224963b7b6Smrg 2234963b7b6Smrg# This program is distributed in the hope that it will be useful, 2244963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2254963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2264963b7b6Smrg# GNU General Public License for more details. 2274963b7b6Smrg 2284963b7b6Smrg# You should have received a copy of the GNU General Public License 2294963b7b6Smrg# along with this program; if not, write to the Free Software 2304963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2314963b7b6Smrg# 02111-1307, USA. 2324963b7b6Smrg 2334963b7b6Smrg# serial 3 2344963b7b6Smrg 2354963b7b6Smrg# AM_SANITY_CHECK 2364963b7b6Smrg# --------------- 2374963b7b6SmrgAC_DEFUN([AM_SANITY_CHECK], 2384963b7b6Smrg[AC_MSG_CHECKING([whether build environment is sane]) 2394963b7b6Smrg# Just in case 2404963b7b6Smrgsleep 1 2414963b7b6Smrgecho timestamp > conftest.file 2424963b7b6Smrg# Do `set' in a subshell so we don't clobber the current shell's 2434963b7b6Smrg# arguments. Must try -L first in case configure is actually a 2444963b7b6Smrg# symlink; some systems play weird games with the mod time of symlinks 2454963b7b6Smrg# (eg FreeBSD returns the mod time of the symlink's containing 2464963b7b6Smrg# directory). 2474963b7b6Smrgif ( 2484963b7b6Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 2494963b7b6Smrg if test "$[*]" = "X"; then 2504963b7b6Smrg # -L didn't work. 2514963b7b6Smrg set X `ls -t $srcdir/configure conftest.file` 2524963b7b6Smrg fi 2534963b7b6Smrg rm -f conftest.file 2544963b7b6Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 2554963b7b6Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 2564963b7b6Smrg 2574963b7b6Smrg # If neither matched, then we have a broken ls. This can happen 2584963b7b6Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 2594963b7b6Smrg # broken ls alias from the environment. This has actually 2604963b7b6Smrg # happened. Such a system could not be considered "sane". 2614963b7b6Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2624963b7b6Smrgalias in your environment]) 2634963b7b6Smrg fi 2644963b7b6Smrg 2654963b7b6Smrg test "$[2]" = conftest.file 2664963b7b6Smrg ) 2674963b7b6Smrgthen 2684963b7b6Smrg # Ok. 2694963b7b6Smrg : 2704963b7b6Smrgelse 2714963b7b6Smrg AC_MSG_ERROR([newly created file is older than distributed files! 2724963b7b6SmrgCheck your system clock]) 2734963b7b6Smrgfi 2744963b7b6SmrgAC_MSG_RESULT(yes)]) 2754963b7b6Smrg 2764963b7b6Smrg# -*- Autoconf -*- 2774963b7b6Smrg 2784963b7b6Smrg 2794963b7b6Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 2804963b7b6Smrg 2814963b7b6Smrg# This program is free software; you can redistribute it and/or modify 2824963b7b6Smrg# it under the terms of the GNU General Public License as published by 2834963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 2844963b7b6Smrg# any later version. 2854963b7b6Smrg 2864963b7b6Smrg# This program is distributed in the hope that it will be useful, 2874963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2884963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2894963b7b6Smrg# GNU General Public License for more details. 2904963b7b6Smrg 2914963b7b6Smrg# You should have received a copy of the GNU General Public License 2924963b7b6Smrg# along with this program; if not, write to the Free Software 2934963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2944963b7b6Smrg# 02111-1307, USA. 2954963b7b6Smrg 2964963b7b6Smrg# serial 3 2974963b7b6Smrg 2984963b7b6Smrg# AM_MISSING_PROG(NAME, PROGRAM) 2994963b7b6Smrg# ------------------------------ 3004963b7b6SmrgAC_DEFUN([AM_MISSING_PROG], 3014963b7b6Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3024963b7b6Smrg$1=${$1-"${am_missing_run}$2"} 3034963b7b6SmrgAC_SUBST($1)]) 3044963b7b6Smrg 3054963b7b6Smrg 3064963b7b6Smrg# AM_MISSING_HAS_RUN 3074963b7b6Smrg# ------------------ 3084963b7b6Smrg# Define MISSING if not defined so far and test if it supports --run. 3094963b7b6Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 3104963b7b6SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 3114963b7b6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3124963b7b6Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 3134963b7b6Smrg# Use eval to expand $SHELL 3144963b7b6Smrgif eval "$MISSING --run true"; then 3154963b7b6Smrg am_missing_run="$MISSING --run " 3164963b7b6Smrgelse 3174963b7b6Smrg am_missing_run= 3184963b7b6Smrg AC_MSG_WARN([`missing' script is too old or missing]) 3194963b7b6Smrgfi 3204963b7b6Smrg]) 3214963b7b6Smrg 3224963b7b6Smrg# AM_AUX_DIR_EXPAND 3234963b7b6Smrg 3244963b7b6Smrg# Copyright 2001 Free Software Foundation, Inc. 3254963b7b6Smrg 3264963b7b6Smrg# This program is free software; you can redistribute it and/or modify 3274963b7b6Smrg# it under the terms of the GNU General Public License as published by 3284963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 3294963b7b6Smrg# any later version. 3304963b7b6Smrg 3314963b7b6Smrg# This program is distributed in the hope that it will be useful, 3324963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 3334963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3344963b7b6Smrg# GNU General Public License for more details. 3354963b7b6Smrg 3364963b7b6Smrg# You should have received a copy of the GNU General Public License 3374963b7b6Smrg# along with this program; if not, write to the Free Software 3384963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 3394963b7b6Smrg# 02111-1307, USA. 3404963b7b6Smrg 3414963b7b6Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 3424963b7b6Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 3434963b7b6Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 3444963b7b6Smrg# 3454963b7b6Smrg# Of course, Automake must honor this variable whenever it calls a 3464963b7b6Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 3474963b7b6Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 3484963b7b6Smrg# depending on how configure is run. This is pretty annoying, since 3494963b7b6Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 3504963b7b6Smrg# source directory, any form will work fine, but in subdirectories a 3514963b7b6Smrg# relative path needs to be adjusted first. 3524963b7b6Smrg# 3534963b7b6Smrg# $ac_aux_dir/missing 3544963b7b6Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 3554963b7b6Smrg# $top_srcdir/$ac_aux_dir/missing 3564963b7b6Smrg# fails if $ac_aux_dir is absolute, 3574963b7b6Smrg# fails when called from a subdirectory in a VPATH build with 3584963b7b6Smrg# a relative $ac_aux_dir 3594963b7b6Smrg# 3604963b7b6Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 3614963b7b6Smrg# are both prefixed by $srcdir. In an in-source build this is usually 3624963b7b6Smrg# harmless because $srcdir is `.', but things will broke when you 3634963b7b6Smrg# start a VPATH build or use an absolute $srcdir. 3644963b7b6Smrg# 3654963b7b6Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 3664963b7b6Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 3674963b7b6Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 3684963b7b6Smrg# and then we would define $MISSING as 3694963b7b6Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 3704963b7b6Smrg# This will work as long as MISSING is not called from configure, because 3714963b7b6Smrg# unfortunately $(top_srcdir) has no meaning in configure. 3724963b7b6Smrg# However there are other variables, like CC, which are often used in 3734963b7b6Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3744963b7b6Smrg# 3754963b7b6Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3764963b7b6Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3774963b7b6Smrg# configured tree to be moved without reconfiguration. 3784963b7b6Smrg 3794963b7b6Smrg# Rely on autoconf to set up CDPATH properly. 3804963b7b6SmrgAC_PREREQ([2.50]) 3814963b7b6Smrg 3824963b7b6SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 3834963b7b6Smrg# expand $ac_aux_dir to an absolute path 3844963b7b6Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 3854963b7b6Smrg]) 3864963b7b6Smrg 3874963b7b6Smrg# AM_PROG_INSTALL_SH 3884963b7b6Smrg# ------------------ 3894963b7b6Smrg# Define $install_sh. 3904963b7b6Smrg 3914963b7b6Smrg# Copyright 2001 Free Software Foundation, Inc. 3924963b7b6Smrg 3934963b7b6Smrg# This program is free software; you can redistribute it and/or modify 3944963b7b6Smrg# it under the terms of the GNU General Public License as published by 3954963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 3964963b7b6Smrg# any later version. 3974963b7b6Smrg 3984963b7b6Smrg# This program is distributed in the hope that it will be useful, 3994963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4004963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4014963b7b6Smrg# GNU General Public License for more details. 4024963b7b6Smrg 4034963b7b6Smrg# You should have received a copy of the GNU General Public License 4044963b7b6Smrg# along with this program; if not, write to the Free Software 4054963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4064963b7b6Smrg# 02111-1307, USA. 4074963b7b6Smrg 4084963b7b6SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 4094963b7b6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 4104963b7b6Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 4114963b7b6SmrgAC_SUBST(install_sh)]) 4124963b7b6Smrg 4134963b7b6Smrg# AM_PROG_INSTALL_STRIP 4144963b7b6Smrg 4154963b7b6Smrg# Copyright 2001 Free Software Foundation, Inc. 4164963b7b6Smrg 4174963b7b6Smrg# This program is free software; you can redistribute it and/or modify 4184963b7b6Smrg# it under the terms of the GNU General Public License as published by 4194963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 4204963b7b6Smrg# any later version. 4214963b7b6Smrg 4224963b7b6Smrg# This program is distributed in the hope that it will be useful, 4234963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4244963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4254963b7b6Smrg# GNU General Public License for more details. 4264963b7b6Smrg 4274963b7b6Smrg# You should have received a copy of the GNU General Public License 4284963b7b6Smrg# along with this program; if not, write to the Free Software 4294963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4304963b7b6Smrg# 02111-1307, USA. 4314963b7b6Smrg 4324963b7b6Smrg# One issue with vendor `install' (even GNU) is that you can't 4334963b7b6Smrg# specify the program used to strip binaries. This is especially 4344963b7b6Smrg# annoying in cross-compiling environments, where the build's strip 4354963b7b6Smrg# is unlikely to handle the host's binaries. 4364963b7b6Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 4374963b7b6Smrg# always use install-sh in `make install-strip', and initialize 4384963b7b6Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 4394963b7b6SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 4404963b7b6Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4414963b7b6Smrg# Installed binaries are usually stripped using `strip' when the user 4424963b7b6Smrg# run `make install-strip'. However `strip' might not be the right 4434963b7b6Smrg# tool to use in cross-compilation environments, therefore Automake 4444963b7b6Smrg# will honor the `STRIP' environment variable to overrule this program. 4454963b7b6Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 4464963b7b6Smrgif test "$cross_compiling" != no; then 4474963b7b6Smrg AC_CHECK_TOOL([STRIP], [strip], :) 4484963b7b6Smrgfi 4494963b7b6SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 4504963b7b6SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 4514963b7b6Smrg 4524963b7b6Smrg# -*- Autoconf -*- 4534963b7b6Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 4544963b7b6Smrg 4554963b7b6Smrg# This program is free software; you can redistribute it and/or modify 4564963b7b6Smrg# it under the terms of the GNU General Public License as published by 4574963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 4584963b7b6Smrg# any later version. 4594963b7b6Smrg 4604963b7b6Smrg# This program is distributed in the hope that it will be useful, 4614963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4624963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4634963b7b6Smrg# GNU General Public License for more details. 4644963b7b6Smrg 4654963b7b6Smrg# You should have received a copy of the GNU General Public License 4664963b7b6Smrg# along with this program; if not, write to the Free Software 4674963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4684963b7b6Smrg# 02111-1307, USA. 4694963b7b6Smrg 4704963b7b6Smrg# serial 1 4714963b7b6Smrg 4724963b7b6Smrg# Check whether the underlying file-system supports filenames 4734963b7b6Smrg# with a leading dot. For instance MS-DOS doesn't. 4744963b7b6SmrgAC_DEFUN([AM_SET_LEADING_DOT], 4754963b7b6Smrg[rm -rf .tst 2>/dev/null 4764963b7b6Smrgmkdir .tst 2>/dev/null 4774963b7b6Smrgif test -d .tst; then 4784963b7b6Smrg am__leading_dot=. 4794963b7b6Smrgelse 4804963b7b6Smrg am__leading_dot=_ 4814963b7b6Smrgfi 4824963b7b6Smrgrmdir .tst 2>/dev/null 4834963b7b6SmrgAC_SUBST([am__leading_dot])]) 4844963b7b6Smrg 4854963b7b6Smrg# serial 5 -*- Autoconf -*- 4864963b7b6Smrg 4874963b7b6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4884963b7b6Smrg 4894963b7b6Smrg# This program is free software; you can redistribute it and/or modify 4904963b7b6Smrg# it under the terms of the GNU General Public License as published by 4914963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 4924963b7b6Smrg# any later version. 4934963b7b6Smrg 4944963b7b6Smrg# This program is distributed in the hope that it will be useful, 4954963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4964963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4974963b7b6Smrg# GNU General Public License for more details. 4984963b7b6Smrg 4994963b7b6Smrg# You should have received a copy of the GNU General Public License 5004963b7b6Smrg# along with this program; if not, write to the Free Software 5014963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 5024963b7b6Smrg# 02111-1307, USA. 5034963b7b6Smrg 5044963b7b6Smrg 5054963b7b6Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 5064963b7b6Smrg# written in clear, in which case automake, when reading aclocal.m4, 5074963b7b6Smrg# will think it sees a *use*, and therefore will trigger all it's 5084963b7b6Smrg# C support machinery. Also note that it means that autoscan, seeing 5094963b7b6Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 5104963b7b6Smrg 5114963b7b6Smrg 5124963b7b6Smrg 5134963b7b6Smrg# _AM_DEPENDENCIES(NAME) 5144963b7b6Smrg# ---------------------- 5154963b7b6Smrg# See how the compiler implements dependency checking. 5164963b7b6Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 5174963b7b6Smrg# We try a few techniques and use that to set a single cache variable. 5184963b7b6Smrg# 5194963b7b6Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 5204963b7b6Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 5214963b7b6Smrg# dependency, and given that the user is not expected to run this macro, 5224963b7b6Smrg# just rely on AC_PROG_CC. 5234963b7b6SmrgAC_DEFUN([_AM_DEPENDENCIES], 5244963b7b6Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 5254963b7b6SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 5264963b7b6SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 5274963b7b6SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 5284963b7b6Smrg 5294963b7b6Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 5304963b7b6Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 5314963b7b6Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 5324963b7b6Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 5334963b7b6Smrg [depcc="$$1" am_compiler_list=]) 5344963b7b6Smrg 5354963b7b6SmrgAC_CACHE_CHECK([dependency style of $depcc], 5364963b7b6Smrg [am_cv_$1_dependencies_compiler_type], 5374963b7b6Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5384963b7b6Smrg # We make a subdir and do the tests there. Otherwise we can end up 5394963b7b6Smrg # making bogus files that we don't know about and never remove. For 5404963b7b6Smrg # instance it was reported that on HP-UX the gcc test will end up 5414963b7b6Smrg # making a dummy file named `D' -- because `-MD' means `put the output 5424963b7b6Smrg # in D'. 5434963b7b6Smrg mkdir conftest.dir 5444963b7b6Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 5454963b7b6Smrg # using a relative directory. 5464963b7b6Smrg cp "$am_depcomp" conftest.dir 5474963b7b6Smrg cd conftest.dir 5484963b7b6Smrg # We will build objects and dependencies in a subdirectory because 5494963b7b6Smrg # it helps to detect inapplicable dependency modes. For instance 5504963b7b6Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 5514963b7b6Smrg # side effect of compilation, but ICC will put the dependencies in 5524963b7b6Smrg # the current directory while Tru64 will put them in the object 5534963b7b6Smrg # directory. 5544963b7b6Smrg mkdir sub 5554963b7b6Smrg 5564963b7b6Smrg am_cv_$1_dependencies_compiler_type=none 5574963b7b6Smrg if test "$am_compiler_list" = ""; then 5584963b7b6Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 5594963b7b6Smrg fi 5604963b7b6Smrg for depmode in $am_compiler_list; do 5614963b7b6Smrg # Setup a source with many dependencies, because some compilers 5624963b7b6Smrg # like to wrap large dependency lists on column 80 (with \), and 5634963b7b6Smrg # we should not choose a depcomp mode which is confused by this. 5644963b7b6Smrg # 5654963b7b6Smrg # We need to recreate these files for each test, as the compiler may 5664963b7b6Smrg # overwrite some of them when testing with obscure command lines. 5674963b7b6Smrg # This happens at least with the AIX C compiler. 5684963b7b6Smrg : > sub/conftest.c 5694963b7b6Smrg for i in 1 2 3 4 5 6; do 5704963b7b6Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 5714963b7b6Smrg : > sub/conftst$i.h 5724963b7b6Smrg done 5734963b7b6Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5744963b7b6Smrg 5754963b7b6Smrg case $depmode in 5764963b7b6Smrg nosideeffect) 5774963b7b6Smrg # after this tag, mechanisms are not by side-effect, so they'll 5784963b7b6Smrg # only be used when explicitly requested 5794963b7b6Smrg if test "x$enable_dependency_tracking" = xyes; then 5804963b7b6Smrg continue 5814963b7b6Smrg else 5824963b7b6Smrg break 5834963b7b6Smrg fi 5844963b7b6Smrg ;; 5854963b7b6Smrg none) break ;; 5864963b7b6Smrg esac 5874963b7b6Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 5884963b7b6Smrg # mode. It turns out that the SunPro C++ compiler does not properly 5894963b7b6Smrg # handle `-M -o', and we need to detect this. 5904963b7b6Smrg if depmode=$depmode \ 5914963b7b6Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 5924963b7b6Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 5934963b7b6Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 5944963b7b6Smrg >/dev/null 2>conftest.err && 5954963b7b6Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 5964963b7b6Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 5974963b7b6Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 5984963b7b6Smrg # icc doesn't choke on unknown options, it will just issue warnings 5994963b7b6Smrg # (even with -Werror). So we grep stderr for any message 6004963b7b6Smrg # that says an option was ignored. 6014963b7b6Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 6024963b7b6Smrg am_cv_$1_dependencies_compiler_type=$depmode 6034963b7b6Smrg break 6044963b7b6Smrg fi 6054963b7b6Smrg fi 6064963b7b6Smrg done 6074963b7b6Smrg 6084963b7b6Smrg cd .. 6094963b7b6Smrg rm -rf conftest.dir 6104963b7b6Smrgelse 6114963b7b6Smrg am_cv_$1_dependencies_compiler_type=none 6124963b7b6Smrgfi 6134963b7b6Smrg]) 6144963b7b6SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6154963b7b6SmrgAM_CONDITIONAL([am__fastdep$1], [ 6164963b7b6Smrg test "x$enable_dependency_tracking" != xno \ 6174963b7b6Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6184963b7b6Smrg]) 6194963b7b6Smrg 6204963b7b6Smrg 6214963b7b6Smrg# AM_SET_DEPDIR 6224963b7b6Smrg# ------------- 6234963b7b6Smrg# Choose a directory name for dependency files. 6244963b7b6Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6254963b7b6SmrgAC_DEFUN([AM_SET_DEPDIR], 6264963b7b6Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6274963b7b6SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6284963b7b6Smrg]) 6294963b7b6Smrg 6304963b7b6Smrg 6314963b7b6Smrg# AM_DEP_TRACK 6324963b7b6Smrg# ------------ 6334963b7b6SmrgAC_DEFUN([AM_DEP_TRACK], 6344963b7b6Smrg[AC_ARG_ENABLE(dependency-tracking, 6354963b7b6Smrg[ --disable-dependency-tracking Speeds up one-time builds 6364963b7b6Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 6374963b7b6Smrgif test "x$enable_dependency_tracking" != xno; then 6384963b7b6Smrg am_depcomp="$ac_aux_dir/depcomp" 6394963b7b6Smrg AMDEPBACKSLASH='\' 6404963b7b6Smrgfi 6414963b7b6SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6424963b7b6SmrgAC_SUBST([AMDEPBACKSLASH]) 6434963b7b6Smrg]) 6444963b7b6Smrg 6454963b7b6Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 6464963b7b6Smrg 6474963b7b6Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 6484963b7b6Smrg 6494963b7b6Smrg# This program is free software; you can redistribute it and/or modify 6504963b7b6Smrg# it under the terms of the GNU General Public License as published by 6514963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 6524963b7b6Smrg# any later version. 6534963b7b6Smrg 6544963b7b6Smrg# This program is distributed in the hope that it will be useful, 6554963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 6564963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6574963b7b6Smrg# GNU General Public License for more details. 6584963b7b6Smrg 6594963b7b6Smrg# You should have received a copy of the GNU General Public License 6604963b7b6Smrg# along with this program; if not, write to the Free Software 6614963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6624963b7b6Smrg# 02111-1307, USA. 6634963b7b6Smrg 6644963b7b6Smrg#serial 2 6654963b7b6Smrg 6664963b7b6Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 6674963b7b6Smrg# ------------------------------ 6684963b7b6SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6694963b7b6Smrg[for mf in $CONFIG_FILES; do 6704963b7b6Smrg # Strip MF so we end up with the name of the file. 6714963b7b6Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 6724963b7b6Smrg # Check whether this is an Automake generated Makefile or not. 6734963b7b6Smrg # We used to match only the files named `Makefile.in', but 6744963b7b6Smrg # some people rename them; so instead we look at the file content. 6754963b7b6Smrg # Grep'ing the first line is not enough: some people post-process 6764963b7b6Smrg # each Makefile.in and add a new line on top of each file to say so. 6774963b7b6Smrg # So let's grep whole file. 6784963b7b6Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6794963b7b6Smrg dirpart=`AS_DIRNAME("$mf")` 6804963b7b6Smrg else 6814963b7b6Smrg continue 6824963b7b6Smrg fi 6834963b7b6Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 6844963b7b6Smrg # Extract the definition of DEP_FILES from the Makefile without 6854963b7b6Smrg # running `make'. 6864963b7b6Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 6874963b7b6Smrg test -z "$DEPDIR" && continue 6884963b7b6Smrg # When using ansi2knr, U may be empty or an underscore; expand it 6894963b7b6Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 6904963b7b6Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 6914963b7b6Smrg # We invoke sed twice because it is the simplest approach to 6924963b7b6Smrg # changing $(DEPDIR) to its actual value in the expansion. 6934963b7b6Smrg for file in `sed -n -e ' 6944963b7b6Smrg /^DEP_FILES = .*\\\\$/ { 6954963b7b6Smrg s/^DEP_FILES = // 6964963b7b6Smrg :loop 6974963b7b6Smrg s/\\\\$// 6984963b7b6Smrg p 6994963b7b6Smrg n 7004963b7b6Smrg /\\\\$/ b loop 7014963b7b6Smrg p 7024963b7b6Smrg } 7034963b7b6Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 7044963b7b6Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7054963b7b6Smrg # Make sure the directory exists. 7064963b7b6Smrg test -f "$dirpart/$file" && continue 7074963b7b6Smrg fdir=`AS_DIRNAME(["$file"])` 7084963b7b6Smrg AS_MKDIR_P([$dirpart/$fdir]) 7094963b7b6Smrg # echo "creating $dirpart/$file" 7104963b7b6Smrg echo '# dummy' > "$dirpart/$file" 7114963b7b6Smrg done 7124963b7b6Smrgdone 7134963b7b6Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7144963b7b6Smrg 7154963b7b6Smrg 7164963b7b6Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7174963b7b6Smrg# ----------------------------- 7184963b7b6Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7194963b7b6Smrg# 7204963b7b6Smrg# This code is only required when automatic dependency tracking 7214963b7b6Smrg# is enabled. FIXME. This creates each `.P' file that we will 7224963b7b6Smrg# need in order to bootstrap the dependency handling code. 7234963b7b6SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7244963b7b6Smrg[AC_CONFIG_COMMANDS([depfiles], 7254963b7b6Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7264963b7b6Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7274963b7b6Smrg]) 7284963b7b6Smrg 7294963b7b6Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7304963b7b6Smrg 7314963b7b6Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 7324963b7b6Smrg 7334963b7b6Smrg# This program is free software; you can redistribute it and/or modify 7344963b7b6Smrg# it under the terms of the GNU General Public License as published by 7354963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 7364963b7b6Smrg# any later version. 7374963b7b6Smrg 7384963b7b6Smrg# This program is distributed in the hope that it will be useful, 7394963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 7404963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7414963b7b6Smrg# GNU General Public License for more details. 7424963b7b6Smrg 7434963b7b6Smrg# You should have received a copy of the GNU General Public License 7444963b7b6Smrg# along with this program; if not, write to the Free Software 7454963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7464963b7b6Smrg# 02111-1307, USA. 7474963b7b6Smrg 7484963b7b6Smrg# serial 2 7494963b7b6Smrg 7504963b7b6Smrg# AM_MAKE_INCLUDE() 7514963b7b6Smrg# ----------------- 7524963b7b6Smrg# Check to see how make treats includes. 7534963b7b6SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7544963b7b6Smrg[am_make=${MAKE-make} 7554963b7b6Smrgcat > confinc << 'END' 7564963b7b6Smrgam__doit: 7574963b7b6Smrg @echo done 7584963b7b6Smrg.PHONY: am__doit 7594963b7b6SmrgEND 7604963b7b6Smrg# If we don't find an include directive, just comment out the code. 7614963b7b6SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7624963b7b6Smrgam__include="#" 7634963b7b6Smrgam__quote= 7644963b7b6Smrg_am_result=none 7654963b7b6Smrg# First try GNU make style include. 7664963b7b6Smrgecho "include confinc" > confmf 7674963b7b6Smrg# We grep out `Entering directory' and `Leaving directory' 7684963b7b6Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 7694963b7b6Smrg# In particular we don't look at `^make:' because GNU make might 7704963b7b6Smrg# be invoked under some other name (usually "gmake"), in which 7714963b7b6Smrg# case it prints its new name instead of `make'. 7724963b7b6Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7734963b7b6Smrg am__include=include 7744963b7b6Smrg am__quote= 7754963b7b6Smrg _am_result=GNU 7764963b7b6Smrgfi 7774963b7b6Smrg# Now try BSD make style include. 7784963b7b6Smrgif test "$am__include" = "#"; then 7794963b7b6Smrg echo '.include "confinc"' > confmf 7804963b7b6Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7814963b7b6Smrg am__include=.include 7824963b7b6Smrg am__quote="\"" 7834963b7b6Smrg _am_result=BSD 7844963b7b6Smrg fi 7854963b7b6Smrgfi 7864963b7b6SmrgAC_SUBST([am__include]) 7874963b7b6SmrgAC_SUBST([am__quote]) 7884963b7b6SmrgAC_MSG_RESULT([$_am_result]) 7894963b7b6Smrgrm -f confinc confmf 7904963b7b6Smrg]) 7914963b7b6Smrg 7924963b7b6Smrg# AM_CONDITIONAL -*- Autoconf -*- 7934963b7b6Smrg 7944963b7b6Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 7954963b7b6Smrg 7964963b7b6Smrg# This program is free software; you can redistribute it and/or modify 7974963b7b6Smrg# it under the terms of the GNU General Public License as published by 7984963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 7994963b7b6Smrg# any later version. 8004963b7b6Smrg 8014963b7b6Smrg# This program is distributed in the hope that it will be useful, 8024963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8034963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8044963b7b6Smrg# GNU General Public License for more details. 8054963b7b6Smrg 8064963b7b6Smrg# You should have received a copy of the GNU General Public License 8074963b7b6Smrg# along with this program; if not, write to the Free Software 8084963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8094963b7b6Smrg# 02111-1307, USA. 8104963b7b6Smrg 8114963b7b6Smrg# serial 5 8124963b7b6Smrg 8134963b7b6SmrgAC_PREREQ(2.52) 8144963b7b6Smrg 8154963b7b6Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8164963b7b6Smrg# ------------------------------------- 8174963b7b6Smrg# Define a conditional. 8184963b7b6SmrgAC_DEFUN([AM_CONDITIONAL], 8194963b7b6Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8204963b7b6Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8214963b7b6SmrgAC_SUBST([$1_TRUE]) 8224963b7b6SmrgAC_SUBST([$1_FALSE]) 8234963b7b6Smrgif $2; then 8244963b7b6Smrg $1_TRUE= 8254963b7b6Smrg $1_FALSE='#' 8264963b7b6Smrgelse 8274963b7b6Smrg $1_TRUE='#' 8284963b7b6Smrg $1_FALSE= 8294963b7b6Smrgfi 8304963b7b6SmrgAC_CONFIG_COMMANDS_PRE( 8314963b7b6Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8324963b7b6Smrg AC_MSG_ERROR([conditional "$1" was never defined. 8334963b7b6SmrgUsually this means the macro was only invoked conditionally.]) 8344963b7b6Smrgfi])]) 8354963b7b6Smrg 8364963b7b6Smrg# Add --enable-maintainer-mode option to configure. 8374963b7b6Smrg# From Jim Meyering 8384963b7b6Smrg 8394963b7b6Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 8404963b7b6Smrg 8414963b7b6Smrg# This program is free software; you can redistribute it and/or modify 8424963b7b6Smrg# it under the terms of the GNU General Public License as published by 8434963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 8444963b7b6Smrg# any later version. 8454963b7b6Smrg 8464963b7b6Smrg# This program is distributed in the hope that it will be useful, 8474963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8484963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8494963b7b6Smrg# GNU General Public License for more details. 8504963b7b6Smrg 8514963b7b6Smrg# You should have received a copy of the GNU General Public License 8524963b7b6Smrg# along with this program; if not, write to the Free Software 8534963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8544963b7b6Smrg# 02111-1307, USA. 8554963b7b6Smrg 8564963b7b6Smrg# serial 2 8574963b7b6Smrg 8584963b7b6SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8594963b7b6Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 8604963b7b6Smrg dnl maintainer-mode is disabled by default 8614963b7b6Smrg AC_ARG_ENABLE(maintainer-mode, 8624963b7b6Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 8634963b7b6Smrg (and sometimes confusing) to the casual installer], 8644963b7b6Smrg USE_MAINTAINER_MODE=$enableval, 8654963b7b6Smrg USE_MAINTAINER_MODE=no) 8664963b7b6Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8674963b7b6Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 8684963b7b6Smrg MAINT=$MAINTAINER_MODE_TRUE 8694963b7b6Smrg AC_SUBST(MAINT)dnl 8704963b7b6Smrg] 8714963b7b6Smrg) 8724963b7b6Smrg 8734963b7b6SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8744963b7b6Smrg 8754963b7b6Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 8764963b7b6Smrg 8774963b7b6Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 8784963b7b6Smrg 8794963b7b6Smrg# This program is free software; you can redistribute it and/or modify 8804963b7b6Smrg# it under the terms of the GNU General Public License as published by 8814963b7b6Smrg# the Free Software Foundation; either version 2, or (at your option) 8824963b7b6Smrg# any later version. 8834963b7b6Smrg 8844963b7b6Smrg# This program is distributed in the hope that it will be useful, 8854963b7b6Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8864963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8874963b7b6Smrg# GNU General Public License for more details. 8884963b7b6Smrg 8894963b7b6Smrg# You should have received a copy of the GNU General Public License 8904963b7b6Smrg# along with this program; if not, write to the Free Software 8914963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8924963b7b6Smrg# 02111-1307, USA. 8934963b7b6Smrg 8944963b7b6SmrgAC_PREREQ([2.52]) 8954963b7b6Smrg 8964963b7b6Smrg# serial 6 8974963b7b6Smrg 8984963b7b6Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8994963b7b6SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9004963b7b6Smrg 9014963b7b6Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9024963b7b6Smrg# 9034963b7b6Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9044963b7b6Smrg# 9054963b7b6Smrg# This program is free software; you can redistribute it and/or modify 9064963b7b6Smrg# it under the terms of the GNU General Public License as published by 9074963b7b6Smrg# the Free Software Foundation; either version 2 of the License, or 9084963b7b6Smrg# (at your option) any later version. 9094963b7b6Smrg# 9104963b7b6Smrg# This program is distributed in the hope that it will be useful, but 9114963b7b6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9124963b7b6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9134963b7b6Smrg# General Public License for more details. 9144963b7b6Smrg# 9154963b7b6Smrg# You should have received a copy of the GNU General Public License 9164963b7b6Smrg# along with this program; if not, write to the Free Software 9174963b7b6Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9184963b7b6Smrg# 9194963b7b6Smrg# As a special exception to the GNU General Public License, if you 9204963b7b6Smrg# distribute this file as part of a program that contains a 9214963b7b6Smrg# configuration script generated by Autoconf, you may include it under 9224963b7b6Smrg# the same distribution terms that you use for the rest of that program. 9234963b7b6Smrg 9244963b7b6Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9254963b7b6Smrg# ---------------------------------- 9264963b7b6SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9274963b7b6Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9284963b7b6Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9294963b7b6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9304963b7b6Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9314963b7b6Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9324963b7b6Smrgfi 9334963b7b6Smrgif test -n "$PKG_CONFIG"; then 9344963b7b6Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9354963b7b6Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9364963b7b6Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9374963b7b6Smrg AC_MSG_RESULT([yes]) 9384963b7b6Smrg else 9394963b7b6Smrg AC_MSG_RESULT([no]) 9404963b7b6Smrg PKG_CONFIG="" 9414963b7b6Smrg fi 9424963b7b6Smrg 9434963b7b6Smrgfi[]dnl 9444963b7b6Smrg])# PKG_PROG_PKG_CONFIG 9454963b7b6Smrg 9464963b7b6Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9474963b7b6Smrg# 9484963b7b6Smrg# Check to see whether a particular set of modules exists. Similar 9494963b7b6Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9504963b7b6Smrg# 9514963b7b6Smrg# 9524963b7b6Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9534963b7b6Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9544963b7b6Smrg# PKG_CHECK_EXISTS manually 9554963b7b6Smrg# -------------------------------------------------------------- 9564963b7b6SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9574963b7b6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9584963b7b6Smrgif test -n "$PKG_CONFIG" && \ 9594963b7b6Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9604963b7b6Smrg m4_ifval([$2], [$2], [:]) 9614963b7b6Smrgm4_ifvaln([$3], [else 9624963b7b6Smrg $3])dnl 9634963b7b6Smrgfi]) 9644963b7b6Smrg 9654963b7b6Smrg 9664963b7b6Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9674963b7b6Smrg# --------------------------------------------- 9684963b7b6Smrgm4_define([_PKG_CONFIG], 9694963b7b6Smrg[if test -n "$PKG_CONFIG"; then 9704963b7b6Smrg if test -n "$$1"; then 9714963b7b6Smrg pkg_cv_[]$1="$$1" 9724963b7b6Smrg else 9734963b7b6Smrg PKG_CHECK_EXISTS([$3], 9744963b7b6Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9754963b7b6Smrg [pkg_failed=yes]) 9764963b7b6Smrg fi 9774963b7b6Smrgelse 9784963b7b6Smrg pkg_failed=untried 9794963b7b6Smrgfi[]dnl 9804963b7b6Smrg])# _PKG_CONFIG 9814963b7b6Smrg 9824963b7b6Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9834963b7b6Smrg# ----------------------------- 9844963b7b6SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9854963b7b6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9864963b7b6Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9874963b7b6Smrg _pkg_short_errors_supported=yes 9884963b7b6Smrgelse 9894963b7b6Smrg _pkg_short_errors_supported=no 9904963b7b6Smrgfi[]dnl 9914963b7b6Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9924963b7b6Smrg 9934963b7b6Smrg 9944963b7b6Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9954963b7b6Smrg# [ACTION-IF-NOT-FOUND]) 9964963b7b6Smrg# 9974963b7b6Smrg# 9984963b7b6Smrg# Note that if there is a possibility the first call to 9994963b7b6Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 10004963b7b6Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 10014963b7b6Smrg# 10024963b7b6Smrg# 10034963b7b6Smrg# -------------------------------------------------------------- 10044963b7b6SmrgAC_DEFUN([PKG_CHECK_MODULES], 10054963b7b6Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10064963b7b6SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 10074963b7b6SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 10084963b7b6Smrg 10094963b7b6Smrgpkg_failed=no 10104963b7b6SmrgAC_MSG_CHECKING([for $1]) 10114963b7b6Smrg 10124963b7b6Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 10134963b7b6Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 10144963b7b6Smrg 10154963b7b6Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 10164963b7b6Smrgand $1[]_LIBS to avoid the need to call pkg-config. 10174963b7b6SmrgSee the pkg-config man page for more details.]) 10184963b7b6Smrg 10194963b7b6Smrgif test $pkg_failed = yes; then 10204963b7b6Smrg _PKG_SHORT_ERRORS_SUPPORTED 10214963b7b6Smrg if test $_pkg_short_errors_supported = yes; then 10224963b7b6Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 10234963b7b6Smrg else 10244963b7b6Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 10254963b7b6Smrg fi 10264963b7b6Smrg # Put the nasty error message in config.log where it belongs 10274963b7b6Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 10284963b7b6Smrg 10294963b7b6Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 10304963b7b6Smrg[Package requirements ($2) were not met: 10314963b7b6Smrg 10324963b7b6Smrg$$1_PKG_ERRORS 10334963b7b6Smrg 10344963b7b6SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 10354963b7b6Smrginstalled software in a non-standard prefix. 10364963b7b6Smrg 10374963b7b6Smrg_PKG_TEXT 10384963b7b6Smrg])], 10394963b7b6Smrg [$4]) 10404963b7b6Smrgelif test $pkg_failed = untried; then 10414963b7b6Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 10424963b7b6Smrg[The pkg-config script could not be found or is too old. Make sure it 10434963b7b6Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 10444963b7b6Smrgpath to pkg-config. 10454963b7b6Smrg 10464963b7b6Smrg_PKG_TEXT 10474963b7b6Smrg 10484963b7b6SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 10494963b7b6Smrg [$4]) 10504963b7b6Smrgelse 10514963b7b6Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 10524963b7b6Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 10534963b7b6Smrg AC_MSG_RESULT([yes]) 10544963b7b6Smrg ifelse([$3], , :, [$3]) 10554963b7b6Smrgfi[]dnl 10564963b7b6Smrg])# PKG_CHECK_MODULES 10574963b7b6Smrg 10584963b7b6Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:38:37 mrg Exp $ 10594963b7b6Smrgdnl 10604963b7b6Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 10614963b7b6Smrgdnl 10624963b7b6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10634963b7b6Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10644963b7b6Smrgdnl the above copyright notice appear in all copies and that both that 10654963b7b6Smrgdnl copyright notice and this permission notice appear in supporting 10664963b7b6Smrgdnl documentation. 10674963b7b6Smrgdnl 10684963b7b6Smrgdnl The above copyright notice and this permission notice shall be included 10694963b7b6Smrgdnl in all copies or substantial portions of the Software. 10704963b7b6Smrgdnl 10714963b7b6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10724963b7b6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10734963b7b6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10744963b7b6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10754963b7b6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10764963b7b6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10774963b7b6Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10784963b7b6Smrgdnl 10794963b7b6Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10804963b7b6Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10814963b7b6Smrgdnl other dealings in this Software without prior written authorization 10824963b7b6Smrgdnl from the copyright holders. 10834963b7b6Smrgdnl 10844963b7b6Smrg 10854963b7b6Smrg# XORG_PROG_RAWCPP() 10864963b7b6Smrg# ------------------ 10874963b7b6Smrg# Find cpp program and necessary flags for use in pre-processing text files 10884963b7b6Smrg# such as man pages and config files 10894963b7b6SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10904963b7b6SmrgAC_REQUIRE([AC_PROG_CPP]) 10914963b7b6SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10924963b7b6Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10934963b7b6Smrg 10944963b7b6Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10954963b7b6Smrg# which is not the best choice for supporting other OS'es, but covers most 10964963b7b6Smrg# of the ones we need for now. 10974963b7b6SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10984963b7b6SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10994963b7b6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11004963b7b6Smrg AC_MSG_RESULT([no]) 11014963b7b6Smrgelse 11024963b7b6Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11034963b7b6Smrg RAWCPPFLAGS=-undef 11044963b7b6Smrg AC_MSG_RESULT([yes]) 11054963b7b6Smrg else 11064963b7b6Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11074963b7b6Smrg fi 11084963b7b6Smrgfi 11094963b7b6Smrgrm -f conftest.$ac_ext 11104963b7b6Smrg 11114963b7b6SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11124963b7b6SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11134963b7b6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11144963b7b6Smrg AC_MSG_RESULT([no]) 11154963b7b6Smrgelse 11164963b7b6Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11174963b7b6Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11184963b7b6Smrg AC_MSG_RESULT([yes]) 11194963b7b6Smrg else 11204963b7b6Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11214963b7b6Smrg fi 11224963b7b6Smrgfi 11234963b7b6Smrgrm -f conftest.$ac_ext 11244963b7b6SmrgAC_SUBST(RAWCPPFLAGS) 11254963b7b6Smrg]) # XORG_PROG_RAWCPP 11264963b7b6Smrg 11274963b7b6Smrg# XORG_MANPAGE_SECTIONS() 11284963b7b6Smrg# ----------------------- 11294963b7b6Smrg# Determine which sections man pages go in for the different man page types 11304963b7b6Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11314963b7b6Smrg# Not sure if there's any better way than just hardcoding by OS name. 11324963b7b6Smrg# Override default settings by setting environment variables 11334963b7b6Smrg 11344963b7b6SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11354963b7b6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11364963b7b6Smrg 11374963b7b6Smrgif test x$APP_MAN_SUFFIX = x ; then 11384963b7b6Smrg case $host_os in 11394963b7b6Smrg linux*) APP_MAN_SUFFIX=1x ;; 11404963b7b6Smrg *) APP_MAN_SUFFIX=1 ;; 11414963b7b6Smrg esac 11424963b7b6Smrgfi 11434963b7b6Smrgif test x$APP_MAN_DIR = x ; then 11444963b7b6Smrg case $host_os in 11454963b7b6Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 11464963b7b6Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 11474963b7b6Smrg esac 11484963b7b6Smrgfi 11494963b7b6Smrg 11504963b7b6Smrgif test x$LIB_MAN_SUFFIX = x ; then 11514963b7b6Smrg case $host_os in 11524963b7b6Smrg linux*) LIB_MAN_SUFFIX=3x ;; 11534963b7b6Smrg *) LIB_MAN_SUFFIX=3 ;; 11544963b7b6Smrg esac 11554963b7b6Smrgfi 11564963b7b6Smrgif test x$LIB_MAN_DIR = x ; then 11574963b7b6Smrg case $host_os in 11584963b7b6Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 11594963b7b6Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 11604963b7b6Smrg esac 11614963b7b6Smrgfi 11624963b7b6Smrg 11634963b7b6Smrgif test x$FILE_MAN_SUFFIX = x ; then 11644963b7b6Smrg case $host_os in 11654963b7b6Smrg linux*) FILE_MAN_SUFFIX=5x ;; 11664963b7b6Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 11674963b7b6Smrg *) FILE_MAN_SUFFIX=5 ;; 11684963b7b6Smrg esac 11694963b7b6Smrgfi 11704963b7b6Smrgif test x$FILE_MAN_DIR = x ; then 11714963b7b6Smrg case $host_os in 11724963b7b6Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 11734963b7b6Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 11744963b7b6Smrg esac 11754963b7b6Smrgfi 11764963b7b6Smrg 11774963b7b6Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 11784963b7b6Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11794963b7b6Smrgif test x$MISC_MAN_SUFFIX = x ; then 11804963b7b6Smrg case $host_os in 11814963b7b6Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 11824963b7b6Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 11834963b7b6Smrg *) MISC_MAN_SUFFIX=7 ;; 11844963b7b6Smrg esac 11854963b7b6Smrgfi 11864963b7b6Smrgif test x$MISC_MAN_DIR = x ; then 11874963b7b6Smrg case $host_os in 11884963b7b6Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 11894963b7b6Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 11904963b7b6Smrg esac 11914963b7b6Smrgfi 11924963b7b6Smrg 11934963b7b6Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 11944963b7b6Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 11954963b7b6Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 11964963b7b6Smrg case $host_os in 11974963b7b6Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 11984963b7b6Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11994963b7b6Smrg *) DRIVER_MAN_SUFFIX=4 ;; 12004963b7b6Smrg esac 12014963b7b6Smrgfi 12024963b7b6Smrgif test x$DRIVER_MAN_DIR = x ; then 12034963b7b6Smrg case $host_os in 12044963b7b6Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 12054963b7b6Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 12064963b7b6Smrg esac 12074963b7b6Smrgfi 12084963b7b6Smrg 12094963b7b6Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 12104963b7b6Smrg case $host_os in 12114963b7b6Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 12124963b7b6Smrg *) ADMIN_MAN_SUFFIX=8 ;; 12134963b7b6Smrg esac 12144963b7b6Smrgfi 12154963b7b6Smrgif test x$ADMIN_MAN_DIR = x ; then 12164963b7b6Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12174963b7b6Smrgfi 12184963b7b6Smrg 12194963b7b6Smrg 12204963b7b6SmrgAC_SUBST([APP_MAN_SUFFIX]) 12214963b7b6SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12224963b7b6SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12234963b7b6SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12244963b7b6SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12254963b7b6SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12264963b7b6SmrgAC_SUBST([APP_MAN_DIR]) 12274963b7b6SmrgAC_SUBST([LIB_MAN_DIR]) 12284963b7b6SmrgAC_SUBST([FILE_MAN_DIR]) 12294963b7b6SmrgAC_SUBST([MISC_MAN_DIR]) 12304963b7b6SmrgAC_SUBST([DRIVER_MAN_DIR]) 12314963b7b6SmrgAC_SUBST([ADMIN_MAN_DIR]) 12324963b7b6Smrg]) # XORG_MANPAGE_SECTIONS 12334963b7b6Smrg 12344963b7b6Smrg# XORG_CHECK_LINUXDOC 12354963b7b6Smrg# ------------------- 12364963b7b6Smrg# Defines the variable MAKE_TEXT if the necessary tools and 12374963b7b6Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12384963b7b6Smrg# Whether or not the necessary tools and files are found can be checked 12394963b7b6Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12404963b7b6SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12414963b7b6SmrgAC_CHECK_FILE( 12424963b7b6Smrg [$prefix/share/X11/sgml/defs.ent], 12434963b7b6Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 12444963b7b6Smrg [DEFS_ENT_PATH=] 12454963b7b6Smrg) 12464963b7b6Smrg 12474963b7b6SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12484963b7b6SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 12494963b7b6Smrg 12504963b7b6SmrgAC_MSG_CHECKING([Whether to build documentation]) 12514963b7b6Smrg 12524963b7b6Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 12534963b7b6Smrg BUILDDOC=yes 12544963b7b6Smrgelse 12554963b7b6Smrg BUILDDOC=no 12564963b7b6Smrgfi 12574963b7b6Smrg 12584963b7b6SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12594963b7b6Smrg 12604963b7b6SmrgAC_MSG_RESULT([$BUILDDOC]) 12614963b7b6Smrg 12624963b7b6SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 12634963b7b6Smrg 12644963b7b6Smrgif test x$PS2PDF != x ; then 12654963b7b6Smrg BUILDPDFDOC=yes 12664963b7b6Smrgelse 12674963b7b6Smrg BUILDPDFDOC=no 12684963b7b6Smrgfi 12694963b7b6Smrg 12704963b7b6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12714963b7b6Smrg 12724963b7b6SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12734963b7b6Smrg 12744963b7b6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12754963b7b6SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 12764963b7b6SmrgMAKE_PDF="$PS2PDF" 12774963b7b6SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 12784963b7b6Smrg 12794963b7b6SmrgAC_SUBST(MAKE_TEXT) 12804963b7b6SmrgAC_SUBST(MAKE_PS) 12814963b7b6SmrgAC_SUBST(MAKE_PDF) 12824963b7b6SmrgAC_SUBST(MAKE_HTML) 12834963b7b6Smrg]) # XORG_CHECK_LINUXDOC 12844963b7b6Smrg 12854963b7b6Smrg# XORG_CHECK_MALLOC_ZERO 12864963b7b6Smrg# ---------------------- 12874963b7b6Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 12884963b7b6Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 12894963b7b6Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 12904963b7b6SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 12914963b7b6SmrgAC_ARG_ENABLE(malloc0returnsnull, 12924963b7b6Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 12934963b7b6Smrg [malloc(0) returns NULL (default: auto)]), 12944963b7b6Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 12954963b7b6Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 12964963b7b6Smrg 12974963b7b6SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 12984963b7b6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 12994963b7b6Smrg AC_RUN_IFELSE([ 13004963b7b6Smrgchar *malloc(); 13014963b7b6Smrgchar *realloc(); 13024963b7b6Smrgchar *calloc(); 13034963b7b6Smrgmain() { 13044963b7b6Smrg char *m0, *r0, *c0, *p; 13054963b7b6Smrg m0 = malloc(0); 13064963b7b6Smrg p = malloc(10); 13074963b7b6Smrg r0 = realloc(p,0); 13084963b7b6Smrg c0 = calloc(0); 13094963b7b6Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 13104963b7b6Smrg}], 13114963b7b6Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 13124963b7b6Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 13134963b7b6Smrgfi 13144963b7b6SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13154963b7b6Smrg 13164963b7b6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 13174963b7b6Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 13184963b7b6Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 13194963b7b6Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 13204963b7b6Smrgelse 13214963b7b6Smrg MALLOC_ZERO_CFLAGS="" 13224963b7b6Smrg XMALLOC_ZERO_CFLAGS="" 13234963b7b6Smrg XTMALLOC_ZERO_CFLAGS="" 13244963b7b6Smrgfi 13254963b7b6Smrg 13264963b7b6SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 13274963b7b6SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 13284963b7b6SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 13294963b7b6Smrg]) # XORG_CHECK_MALLOC_ZERO 13304963b7b6Smrg 13314963b7b6Smrgdnl Copyright 2005 Red Hat, Inc 13324963b7b6Smrgdnl 13334963b7b6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 13344963b7b6Smrgdnl documentation for any purpose is hereby granted without fee, provided that 13354963b7b6Smrgdnl the above copyright notice appear in all copies and that both that 13364963b7b6Smrgdnl copyright notice and this permission notice appear in supporting 13374963b7b6Smrgdnl documentation. 13384963b7b6Smrgdnl 13394963b7b6Smrgdnl The above copyright notice and this permission notice shall be included 13404963b7b6Smrgdnl in all copies or substantial portions of the Software. 13414963b7b6Smrgdnl 13424963b7b6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13434963b7b6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13444963b7b6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13454963b7b6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 13464963b7b6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 13474963b7b6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 13484963b7b6Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 13494963b7b6Smrgdnl 13504963b7b6Smrgdnl Except as contained in this notice, the name of the copyright holders shall 13514963b7b6Smrgdnl not be used in advertising or otherwise to promote the sale, use or 13524963b7b6Smrgdnl other dealings in this Software without prior written authorization 13534963b7b6Smrgdnl from the copyright holders. 13544963b7b6Smrgdnl 13554963b7b6Smrg 13564963b7b6Smrg# XORG_RELEASE_VERSION 13574963b7b6Smrg# -------------------- 13584963b7b6Smrg# Adds --with/without-release-string and changes the PACKAGE and 13594963b7b6Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 13604963b7b6Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 13614963b7b6Smrg 13624963b7b6SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 13634963b7b6Smrg AC_ARG_WITH(release-version, 13644963b7b6Smrg AC_HELP_STRING([--with-release-version=STRING], 13654963b7b6Smrg [Use release version string in package name]), 13664963b7b6Smrg [RELEASE_VERSION="$withval"], 13674963b7b6Smrg [RELEASE_VERSION=""]) 13684963b7b6Smrg if test "x$RELEASE_VERSION" != "x"; then 13694963b7b6Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 13704963b7b6Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 13714963b7b6Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 13724963b7b6Smrg fi 13734963b7b6Smrg]) 13744963b7b6Smrg 1375