aclocal.m4 revision 8108eb18
18108eb18Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 28108eb18Smrg 38108eb18Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 48108eb18Smrg# Free Software Foundation, Inc. 58108eb18Smrg# This file is free software; the Free Software Foundation 68108eb18Smrg# gives unlimited permission to copy and/or distribute it, 78108eb18Smrg# with or without modifications, as long as this notice is preserved. 88108eb18Smrg 98108eb18Smrg# This program is distributed in the hope that it will be useful, 108108eb18Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 118108eb18Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 128108eb18Smrg# PARTICULAR PURPOSE. 138108eb18Smrg 148108eb18Smrg# Do all the work for Automake. -*- Autoconf -*- 158108eb18Smrg 168108eb18Smrg# This macro actually does too much some checks are only needed if 178108eb18Smrg# your package does certain things. But this isn't really a big deal. 188108eb18Smrg 198108eb18Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 208108eb18Smrg# Free Software Foundation, Inc. 218108eb18Smrg 228108eb18Smrg# This program is free software; you can redistribute it and/or modify 238108eb18Smrg# it under the terms of the GNU General Public License as published by 248108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 258108eb18Smrg# any later version. 268108eb18Smrg 278108eb18Smrg# This program is distributed in the hope that it will be useful, 288108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 298108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 308108eb18Smrg# GNU General Public License for more details. 318108eb18Smrg 328108eb18Smrg# You should have received a copy of the GNU General Public License 338108eb18Smrg# along with this program; if not, write to the Free Software 348108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 358108eb18Smrg# 02111-1307, USA. 368108eb18Smrg 378108eb18Smrg# serial 10 388108eb18Smrg 398108eb18SmrgAC_PREREQ([2.54]) 408108eb18Smrg 418108eb18Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 428108eb18Smrg# the ones we care about. 438108eb18Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 448108eb18Smrg 458108eb18Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 468108eb18Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 478108eb18Smrg# ----------------------------------------------- 488108eb18Smrg# The call with PACKAGE and VERSION arguments is the old style 498108eb18Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 508108eb18Smrg# and VERSION should now be passed to AC_INIT and removed from 518108eb18Smrg# the call to AM_INIT_AUTOMAKE. 528108eb18Smrg# We support both call styles for the transition. After 538108eb18Smrg# the next Automake release, Autoconf can make the AC_INIT 548108eb18Smrg# arguments mandatory, and then we can depend on a new Autoconf 558108eb18Smrg# release and drop the old call support. 568108eb18SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 578108eb18Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 588108eb18Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 598108eb18Smrg# test to see if srcdir already configured 608108eb18Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 618108eb18Smrg test -f $srcdir/config.status; then 628108eb18Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 638108eb18Smrgfi 648108eb18Smrg 658108eb18Smrg# test whether we have cygpath 668108eb18Smrgif test -z "$CYGPATH_W"; then 678108eb18Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 688108eb18Smrg CYGPATH_W='cygpath -w' 698108eb18Smrg else 708108eb18Smrg CYGPATH_W=echo 718108eb18Smrg fi 728108eb18Smrgfi 738108eb18SmrgAC_SUBST([CYGPATH_W]) 748108eb18Smrg 758108eb18Smrg# Define the identity of the package. 768108eb18Smrgdnl Distinguish between old-style and new-style calls. 778108eb18Smrgm4_ifval([$2], 788108eb18Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 798108eb18Smrg AC_SUBST([PACKAGE], [$1])dnl 808108eb18Smrg AC_SUBST([VERSION], [$2])], 818108eb18Smrg[_AM_SET_OPTIONS([$1])dnl 828108eb18Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 838108eb18Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 848108eb18Smrg 858108eb18Smrg_AM_IF_OPTION([no-define],, 868108eb18Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 878108eb18Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 888108eb18Smrg 898108eb18Smrg# Some tools Automake needs. 908108eb18SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 918108eb18SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 928108eb18SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 938108eb18SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 948108eb18SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 958108eb18SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 968108eb18SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 978108eb18SmrgAM_MISSING_PROG(AMTAR, tar) 988108eb18SmrgAM_PROG_INSTALL_SH 998108eb18SmrgAM_PROG_INSTALL_STRIP 1008108eb18Smrg# We need awk for the "check" target. The system "awk" is bad on 1018108eb18Smrg# some platforms. 1028108eb18SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1038108eb18SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1048108eb18SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1058108eb18Smrg 1068108eb18Smrg_AM_IF_OPTION([no-dependencies],, 1078108eb18Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1088108eb18Smrg [_AM_DEPENDENCIES(CC)], 1098108eb18Smrg [define([AC_PROG_CC], 1108108eb18Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1118108eb18SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1128108eb18Smrg [_AM_DEPENDENCIES(CXX)], 1138108eb18Smrg [define([AC_PROG_CXX], 1148108eb18Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1158108eb18Smrg]) 1168108eb18Smrg]) 1178108eb18Smrg 1188108eb18Smrg 1198108eb18Smrg# When config.status generates a header, we must update the stamp-h file. 1208108eb18Smrg# This file resides in the same directory as the config header 1218108eb18Smrg# that is generated. The stamp files are numbered to have different names. 1228108eb18Smrg 1238108eb18Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1248108eb18Smrg# loop where config.status creates the headers, so we can generate 1258108eb18Smrg# our stamp files there. 1268108eb18SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1278108eb18Smrg[# Compute $1's index in $config_headers. 1288108eb18Smrg_am_stamp_count=1 1298108eb18Smrgfor _am_header in $config_headers :; do 1308108eb18Smrg case $_am_header in 1318108eb18Smrg $1 | $1:* ) 1328108eb18Smrg break ;; 1338108eb18Smrg * ) 1348108eb18Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1358108eb18Smrg esac 1368108eb18Smrgdone 1378108eb18Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1388108eb18Smrg 1398108eb18Smrg# Copyright 2002 Free Software Foundation, Inc. 1408108eb18Smrg 1418108eb18Smrg# This program is free software; you can redistribute it and/or modify 1428108eb18Smrg# it under the terms of the GNU General Public License as published by 1438108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 1448108eb18Smrg# any later version. 1458108eb18Smrg 1468108eb18Smrg# This program is distributed in the hope that it will be useful, 1478108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1488108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1498108eb18Smrg# GNU General Public License for more details. 1508108eb18Smrg 1518108eb18Smrg# You should have received a copy of the GNU General Public License 1528108eb18Smrg# along with this program; if not, write to the Free Software 1538108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1548108eb18Smrg 1558108eb18Smrg# AM_AUTOMAKE_VERSION(VERSION) 1568108eb18Smrg# ---------------------------- 1578108eb18Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1588108eb18Smrg# generated from the m4 files accompanying Automake X.Y. 1598108eb18SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 1608108eb18Smrg 1618108eb18Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1628108eb18Smrg# ------------------------------- 1638108eb18Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 1648108eb18Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 1658108eb18SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1668108eb18Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 1678108eb18Smrg 1688108eb18Smrg# Helper functions for option handling. -*- Autoconf -*- 1698108eb18Smrg 1708108eb18Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 1718108eb18Smrg 1728108eb18Smrg# This program is free software; you can redistribute it and/or modify 1738108eb18Smrg# it under the terms of the GNU General Public License as published by 1748108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 1758108eb18Smrg# any later version. 1768108eb18Smrg 1778108eb18Smrg# This program is distributed in the hope that it will be useful, 1788108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1798108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1808108eb18Smrg# GNU General Public License for more details. 1818108eb18Smrg 1828108eb18Smrg# You should have received a copy of the GNU General Public License 1838108eb18Smrg# along with this program; if not, write to the Free Software 1848108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1858108eb18Smrg# 02111-1307, USA. 1868108eb18Smrg 1878108eb18Smrg# serial 2 1888108eb18Smrg 1898108eb18Smrg# _AM_MANGLE_OPTION(NAME) 1908108eb18Smrg# ----------------------- 1918108eb18SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1928108eb18Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1938108eb18Smrg 1948108eb18Smrg# _AM_SET_OPTION(NAME) 1958108eb18Smrg# ------------------------------ 1968108eb18Smrg# Set option NAME. Presently that only means defining a flag for this option. 1978108eb18SmrgAC_DEFUN([_AM_SET_OPTION], 1988108eb18Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1998108eb18Smrg 2008108eb18Smrg# _AM_SET_OPTIONS(OPTIONS) 2018108eb18Smrg# ---------------------------------- 2028108eb18Smrg# OPTIONS is a space-separated list of Automake options. 2038108eb18SmrgAC_DEFUN([_AM_SET_OPTIONS], 2048108eb18Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2058108eb18Smrg 2068108eb18Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2078108eb18Smrg# ------------------------------------------- 2088108eb18Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2098108eb18SmrgAC_DEFUN([_AM_IF_OPTION], 2108108eb18Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2118108eb18Smrg 2128108eb18Smrg# 2138108eb18Smrg# Check to make sure that the build environment is sane. 2148108eb18Smrg# 2158108eb18Smrg 2168108eb18Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 2178108eb18Smrg 2188108eb18Smrg# This program is free software; you can redistribute it and/or modify 2198108eb18Smrg# it under the terms of the GNU General Public License as published by 2208108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 2218108eb18Smrg# any later version. 2228108eb18Smrg 2238108eb18Smrg# This program is distributed in the hope that it will be useful, 2248108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2258108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2268108eb18Smrg# GNU General Public License for more details. 2278108eb18Smrg 2288108eb18Smrg# You should have received a copy of the GNU General Public License 2298108eb18Smrg# along with this program; if not, write to the Free Software 2308108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2318108eb18Smrg# 02111-1307, USA. 2328108eb18Smrg 2338108eb18Smrg# serial 3 2348108eb18Smrg 2358108eb18Smrg# AM_SANITY_CHECK 2368108eb18Smrg# --------------- 2378108eb18SmrgAC_DEFUN([AM_SANITY_CHECK], 2388108eb18Smrg[AC_MSG_CHECKING([whether build environment is sane]) 2398108eb18Smrg# Just in case 2408108eb18Smrgsleep 1 2418108eb18Smrgecho timestamp > conftest.file 2428108eb18Smrg# Do `set' in a subshell so we don't clobber the current shell's 2438108eb18Smrg# arguments. Must try -L first in case configure is actually a 2448108eb18Smrg# symlink; some systems play weird games with the mod time of symlinks 2458108eb18Smrg# (eg FreeBSD returns the mod time of the symlink's containing 2468108eb18Smrg# directory). 2478108eb18Smrgif ( 2488108eb18Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 2498108eb18Smrg if test "$[*]" = "X"; then 2508108eb18Smrg # -L didn't work. 2518108eb18Smrg set X `ls -t $srcdir/configure conftest.file` 2528108eb18Smrg fi 2538108eb18Smrg rm -f conftest.file 2548108eb18Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 2558108eb18Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 2568108eb18Smrg 2578108eb18Smrg # If neither matched, then we have a broken ls. This can happen 2588108eb18Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 2598108eb18Smrg # broken ls alias from the environment. This has actually 2608108eb18Smrg # happened. Such a system could not be considered "sane". 2618108eb18Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2628108eb18Smrgalias in your environment]) 2638108eb18Smrg fi 2648108eb18Smrg 2658108eb18Smrg test "$[2]" = conftest.file 2668108eb18Smrg ) 2678108eb18Smrgthen 2688108eb18Smrg # Ok. 2698108eb18Smrg : 2708108eb18Smrgelse 2718108eb18Smrg AC_MSG_ERROR([newly created file is older than distributed files! 2728108eb18SmrgCheck your system clock]) 2738108eb18Smrgfi 2748108eb18SmrgAC_MSG_RESULT(yes)]) 2758108eb18Smrg 2768108eb18Smrg# -*- Autoconf -*- 2778108eb18Smrg 2788108eb18Smrg 2798108eb18Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 2808108eb18Smrg 2818108eb18Smrg# This program is free software; you can redistribute it and/or modify 2828108eb18Smrg# it under the terms of the GNU General Public License as published by 2838108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 2848108eb18Smrg# any later version. 2858108eb18Smrg 2868108eb18Smrg# This program is distributed in the hope that it will be useful, 2878108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2888108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2898108eb18Smrg# GNU General Public License for more details. 2908108eb18Smrg 2918108eb18Smrg# You should have received a copy of the GNU General Public License 2928108eb18Smrg# along with this program; if not, write to the Free Software 2938108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 2948108eb18Smrg# 02111-1307, USA. 2958108eb18Smrg 2968108eb18Smrg# serial 3 2978108eb18Smrg 2988108eb18Smrg# AM_MISSING_PROG(NAME, PROGRAM) 2998108eb18Smrg# ------------------------------ 3008108eb18SmrgAC_DEFUN([AM_MISSING_PROG], 3018108eb18Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3028108eb18Smrg$1=${$1-"${am_missing_run}$2"} 3038108eb18SmrgAC_SUBST($1)]) 3048108eb18Smrg 3058108eb18Smrg 3068108eb18Smrg# AM_MISSING_HAS_RUN 3078108eb18Smrg# ------------------ 3088108eb18Smrg# Define MISSING if not defined so far and test if it supports --run. 3098108eb18Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 3108108eb18SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 3118108eb18Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3128108eb18Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 3138108eb18Smrg# Use eval to expand $SHELL 3148108eb18Smrgif eval "$MISSING --run true"; then 3158108eb18Smrg am_missing_run="$MISSING --run " 3168108eb18Smrgelse 3178108eb18Smrg am_missing_run= 3188108eb18Smrg AC_MSG_WARN([`missing' script is too old or missing]) 3198108eb18Smrgfi 3208108eb18Smrg]) 3218108eb18Smrg 3228108eb18Smrg# AM_AUX_DIR_EXPAND 3238108eb18Smrg 3248108eb18Smrg# Copyright 2001 Free Software Foundation, Inc. 3258108eb18Smrg 3268108eb18Smrg# This program is free software; you can redistribute it and/or modify 3278108eb18Smrg# it under the terms of the GNU General Public License as published by 3288108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 3298108eb18Smrg# any later version. 3308108eb18Smrg 3318108eb18Smrg# This program is distributed in the hope that it will be useful, 3328108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 3338108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3348108eb18Smrg# GNU General Public License for more details. 3358108eb18Smrg 3368108eb18Smrg# You should have received a copy of the GNU General Public License 3378108eb18Smrg# along with this program; if not, write to the Free Software 3388108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 3398108eb18Smrg# 02111-1307, USA. 3408108eb18Smrg 3418108eb18Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 3428108eb18Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 3438108eb18Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 3448108eb18Smrg# 3458108eb18Smrg# Of course, Automake must honor this variable whenever it calls a 3468108eb18Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 3478108eb18Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 3488108eb18Smrg# depending on how configure is run. This is pretty annoying, since 3498108eb18Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 3508108eb18Smrg# source directory, any form will work fine, but in subdirectories a 3518108eb18Smrg# relative path needs to be adjusted first. 3528108eb18Smrg# 3538108eb18Smrg# $ac_aux_dir/missing 3548108eb18Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 3558108eb18Smrg# $top_srcdir/$ac_aux_dir/missing 3568108eb18Smrg# fails if $ac_aux_dir is absolute, 3578108eb18Smrg# fails when called from a subdirectory in a VPATH build with 3588108eb18Smrg# a relative $ac_aux_dir 3598108eb18Smrg# 3608108eb18Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 3618108eb18Smrg# are both prefixed by $srcdir. In an in-source build this is usually 3628108eb18Smrg# harmless because $srcdir is `.', but things will broke when you 3638108eb18Smrg# start a VPATH build or use an absolute $srcdir. 3648108eb18Smrg# 3658108eb18Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 3668108eb18Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 3678108eb18Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 3688108eb18Smrg# and then we would define $MISSING as 3698108eb18Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 3708108eb18Smrg# This will work as long as MISSING is not called from configure, because 3718108eb18Smrg# unfortunately $(top_srcdir) has no meaning in configure. 3728108eb18Smrg# However there are other variables, like CC, which are often used in 3738108eb18Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3748108eb18Smrg# 3758108eb18Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3768108eb18Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3778108eb18Smrg# configured tree to be moved without reconfiguration. 3788108eb18Smrg 3798108eb18Smrg# Rely on autoconf to set up CDPATH properly. 3808108eb18SmrgAC_PREREQ([2.50]) 3818108eb18Smrg 3828108eb18SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 3838108eb18Smrg# expand $ac_aux_dir to an absolute path 3848108eb18Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 3858108eb18Smrg]) 3868108eb18Smrg 3878108eb18Smrg# AM_PROG_INSTALL_SH 3888108eb18Smrg# ------------------ 3898108eb18Smrg# Define $install_sh. 3908108eb18Smrg 3918108eb18Smrg# Copyright 2001 Free Software Foundation, Inc. 3928108eb18Smrg 3938108eb18Smrg# This program is free software; you can redistribute it and/or modify 3948108eb18Smrg# it under the terms of the GNU General Public License as published by 3958108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 3968108eb18Smrg# any later version. 3978108eb18Smrg 3988108eb18Smrg# This program is distributed in the hope that it will be useful, 3998108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4008108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4018108eb18Smrg# GNU General Public License for more details. 4028108eb18Smrg 4038108eb18Smrg# You should have received a copy of the GNU General Public License 4048108eb18Smrg# along with this program; if not, write to the Free Software 4058108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4068108eb18Smrg# 02111-1307, USA. 4078108eb18Smrg 4088108eb18SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 4098108eb18Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 4108108eb18Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 4118108eb18SmrgAC_SUBST(install_sh)]) 4128108eb18Smrg 4138108eb18Smrg# AM_PROG_INSTALL_STRIP 4148108eb18Smrg 4158108eb18Smrg# Copyright 2001 Free Software Foundation, Inc. 4168108eb18Smrg 4178108eb18Smrg# This program is free software; you can redistribute it and/or modify 4188108eb18Smrg# it under the terms of the GNU General Public License as published by 4198108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 4208108eb18Smrg# any later version. 4218108eb18Smrg 4228108eb18Smrg# This program is distributed in the hope that it will be useful, 4238108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4248108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4258108eb18Smrg# GNU General Public License for more details. 4268108eb18Smrg 4278108eb18Smrg# You should have received a copy of the GNU General Public License 4288108eb18Smrg# along with this program; if not, write to the Free Software 4298108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4308108eb18Smrg# 02111-1307, USA. 4318108eb18Smrg 4328108eb18Smrg# One issue with vendor `install' (even GNU) is that you can't 4338108eb18Smrg# specify the program used to strip binaries. This is especially 4348108eb18Smrg# annoying in cross-compiling environments, where the build's strip 4358108eb18Smrg# is unlikely to handle the host's binaries. 4368108eb18Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 4378108eb18Smrg# always use install-sh in `make install-strip', and initialize 4388108eb18Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 4398108eb18SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 4408108eb18Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4418108eb18Smrg# Installed binaries are usually stripped using `strip' when the user 4428108eb18Smrg# run `make install-strip'. However `strip' might not be the right 4438108eb18Smrg# tool to use in cross-compilation environments, therefore Automake 4448108eb18Smrg# will honor the `STRIP' environment variable to overrule this program. 4458108eb18Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 4468108eb18Smrgif test "$cross_compiling" != no; then 4478108eb18Smrg AC_CHECK_TOOL([STRIP], [strip], :) 4488108eb18Smrgfi 4498108eb18SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 4508108eb18SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 4518108eb18Smrg 4528108eb18Smrg# -*- Autoconf -*- 4538108eb18Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 4548108eb18Smrg 4558108eb18Smrg# This program is free software; you can redistribute it and/or modify 4568108eb18Smrg# it under the terms of the GNU General Public License as published by 4578108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 4588108eb18Smrg# any later version. 4598108eb18Smrg 4608108eb18Smrg# This program is distributed in the hope that it will be useful, 4618108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4628108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4638108eb18Smrg# GNU General Public License for more details. 4648108eb18Smrg 4658108eb18Smrg# You should have received a copy of the GNU General Public License 4668108eb18Smrg# along with this program; if not, write to the Free Software 4678108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 4688108eb18Smrg# 02111-1307, USA. 4698108eb18Smrg 4708108eb18Smrg# serial 1 4718108eb18Smrg 4728108eb18Smrg# Check whether the underlying file-system supports filenames 4738108eb18Smrg# with a leading dot. For instance MS-DOS doesn't. 4748108eb18SmrgAC_DEFUN([AM_SET_LEADING_DOT], 4758108eb18Smrg[rm -rf .tst 2>/dev/null 4768108eb18Smrgmkdir .tst 2>/dev/null 4778108eb18Smrgif test -d .tst; then 4788108eb18Smrg am__leading_dot=. 4798108eb18Smrgelse 4808108eb18Smrg am__leading_dot=_ 4818108eb18Smrgfi 4828108eb18Smrgrmdir .tst 2>/dev/null 4838108eb18SmrgAC_SUBST([am__leading_dot])]) 4848108eb18Smrg 4858108eb18Smrg# serial 5 -*- Autoconf -*- 4868108eb18Smrg 4878108eb18Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4888108eb18Smrg 4898108eb18Smrg# This program is free software; you can redistribute it and/or modify 4908108eb18Smrg# it under the terms of the GNU General Public License as published by 4918108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 4928108eb18Smrg# any later version. 4938108eb18Smrg 4948108eb18Smrg# This program is distributed in the hope that it will be useful, 4958108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 4968108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4978108eb18Smrg# GNU General Public License for more details. 4988108eb18Smrg 4998108eb18Smrg# You should have received a copy of the GNU General Public License 5008108eb18Smrg# along with this program; if not, write to the Free Software 5018108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 5028108eb18Smrg# 02111-1307, USA. 5038108eb18Smrg 5048108eb18Smrg 5058108eb18Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 5068108eb18Smrg# written in clear, in which case automake, when reading aclocal.m4, 5078108eb18Smrg# will think it sees a *use*, and therefore will trigger all it's 5088108eb18Smrg# C support machinery. Also note that it means that autoscan, seeing 5098108eb18Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 5108108eb18Smrg 5118108eb18Smrg 5128108eb18Smrg 5138108eb18Smrg# _AM_DEPENDENCIES(NAME) 5148108eb18Smrg# ---------------------- 5158108eb18Smrg# See how the compiler implements dependency checking. 5168108eb18Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 5178108eb18Smrg# We try a few techniques and use that to set a single cache variable. 5188108eb18Smrg# 5198108eb18Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 5208108eb18Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 5218108eb18Smrg# dependency, and given that the user is not expected to run this macro, 5228108eb18Smrg# just rely on AC_PROG_CC. 5238108eb18SmrgAC_DEFUN([_AM_DEPENDENCIES], 5248108eb18Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 5258108eb18SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 5268108eb18SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 5278108eb18SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 5288108eb18Smrg 5298108eb18Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 5308108eb18Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 5318108eb18Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 5328108eb18Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 5338108eb18Smrg [depcc="$$1" am_compiler_list=]) 5348108eb18Smrg 5358108eb18SmrgAC_CACHE_CHECK([dependency style of $depcc], 5368108eb18Smrg [am_cv_$1_dependencies_compiler_type], 5378108eb18Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5388108eb18Smrg # We make a subdir and do the tests there. Otherwise we can end up 5398108eb18Smrg # making bogus files that we don't know about and never remove. For 5408108eb18Smrg # instance it was reported that on HP-UX the gcc test will end up 5418108eb18Smrg # making a dummy file named `D' -- because `-MD' means `put the output 5428108eb18Smrg # in D'. 5438108eb18Smrg mkdir conftest.dir 5448108eb18Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 5458108eb18Smrg # using a relative directory. 5468108eb18Smrg cp "$am_depcomp" conftest.dir 5478108eb18Smrg cd conftest.dir 5488108eb18Smrg # We will build objects and dependencies in a subdirectory because 5498108eb18Smrg # it helps to detect inapplicable dependency modes. For instance 5508108eb18Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 5518108eb18Smrg # side effect of compilation, but ICC will put the dependencies in 5528108eb18Smrg # the current directory while Tru64 will put them in the object 5538108eb18Smrg # directory. 5548108eb18Smrg mkdir sub 5558108eb18Smrg 5568108eb18Smrg am_cv_$1_dependencies_compiler_type=none 5578108eb18Smrg if test "$am_compiler_list" = ""; then 5588108eb18Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 5598108eb18Smrg fi 5608108eb18Smrg for depmode in $am_compiler_list; do 5618108eb18Smrg # Setup a source with many dependencies, because some compilers 5628108eb18Smrg # like to wrap large dependency lists on column 80 (with \), and 5638108eb18Smrg # we should not choose a depcomp mode which is confused by this. 5648108eb18Smrg # 5658108eb18Smrg # We need to recreate these files for each test, as the compiler may 5668108eb18Smrg # overwrite some of them when testing with obscure command lines. 5678108eb18Smrg # This happens at least with the AIX C compiler. 5688108eb18Smrg : > sub/conftest.c 5698108eb18Smrg for i in 1 2 3 4 5 6; do 5708108eb18Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 5718108eb18Smrg : > sub/conftst$i.h 5728108eb18Smrg done 5738108eb18Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5748108eb18Smrg 5758108eb18Smrg case $depmode in 5768108eb18Smrg nosideeffect) 5778108eb18Smrg # after this tag, mechanisms are not by side-effect, so they'll 5788108eb18Smrg # only be used when explicitly requested 5798108eb18Smrg if test "x$enable_dependency_tracking" = xyes; then 5808108eb18Smrg continue 5818108eb18Smrg else 5828108eb18Smrg break 5838108eb18Smrg fi 5848108eb18Smrg ;; 5858108eb18Smrg none) break ;; 5868108eb18Smrg esac 5878108eb18Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 5888108eb18Smrg # mode. It turns out that the SunPro C++ compiler does not properly 5898108eb18Smrg # handle `-M -o', and we need to detect this. 5908108eb18Smrg if depmode=$depmode \ 5918108eb18Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 5928108eb18Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 5938108eb18Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 5948108eb18Smrg >/dev/null 2>conftest.err && 5958108eb18Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 5968108eb18Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 5978108eb18Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 5988108eb18Smrg # icc doesn't choke on unknown options, it will just issue warnings 5998108eb18Smrg # (even with -Werror). So we grep stderr for any message 6008108eb18Smrg # that says an option was ignored. 6018108eb18Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 6028108eb18Smrg am_cv_$1_dependencies_compiler_type=$depmode 6038108eb18Smrg break 6048108eb18Smrg fi 6058108eb18Smrg fi 6068108eb18Smrg done 6078108eb18Smrg 6088108eb18Smrg cd .. 6098108eb18Smrg rm -rf conftest.dir 6108108eb18Smrgelse 6118108eb18Smrg am_cv_$1_dependencies_compiler_type=none 6128108eb18Smrgfi 6138108eb18Smrg]) 6148108eb18SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 6158108eb18SmrgAM_CONDITIONAL([am__fastdep$1], [ 6168108eb18Smrg test "x$enable_dependency_tracking" != xno \ 6178108eb18Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 6188108eb18Smrg]) 6198108eb18Smrg 6208108eb18Smrg 6218108eb18Smrg# AM_SET_DEPDIR 6228108eb18Smrg# ------------- 6238108eb18Smrg# Choose a directory name for dependency files. 6248108eb18Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 6258108eb18SmrgAC_DEFUN([AM_SET_DEPDIR], 6268108eb18Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 6278108eb18SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 6288108eb18Smrg]) 6298108eb18Smrg 6308108eb18Smrg 6318108eb18Smrg# AM_DEP_TRACK 6328108eb18Smrg# ------------ 6338108eb18SmrgAC_DEFUN([AM_DEP_TRACK], 6348108eb18Smrg[AC_ARG_ENABLE(dependency-tracking, 6358108eb18Smrg[ --disable-dependency-tracking Speeds up one-time builds 6368108eb18Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 6378108eb18Smrgif test "x$enable_dependency_tracking" != xno; then 6388108eb18Smrg am_depcomp="$ac_aux_dir/depcomp" 6398108eb18Smrg AMDEPBACKSLASH='\' 6408108eb18Smrgfi 6418108eb18SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 6428108eb18SmrgAC_SUBST([AMDEPBACKSLASH]) 6438108eb18Smrg]) 6448108eb18Smrg 6458108eb18Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 6468108eb18Smrg 6478108eb18Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 6488108eb18Smrg 6498108eb18Smrg# This program is free software; you can redistribute it and/or modify 6508108eb18Smrg# it under the terms of the GNU General Public License as published by 6518108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 6528108eb18Smrg# any later version. 6538108eb18Smrg 6548108eb18Smrg# This program is distributed in the hope that it will be useful, 6558108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 6568108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6578108eb18Smrg# GNU General Public License for more details. 6588108eb18Smrg 6598108eb18Smrg# You should have received a copy of the GNU General Public License 6608108eb18Smrg# along with this program; if not, write to the Free Software 6618108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 6628108eb18Smrg# 02111-1307, USA. 6638108eb18Smrg 6648108eb18Smrg#serial 2 6658108eb18Smrg 6668108eb18Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 6678108eb18Smrg# ------------------------------ 6688108eb18SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 6698108eb18Smrg[for mf in $CONFIG_FILES; do 6708108eb18Smrg # Strip MF so we end up with the name of the file. 6718108eb18Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 6728108eb18Smrg # Check whether this is an Automake generated Makefile or not. 6738108eb18Smrg # We used to match only the files named `Makefile.in', but 6748108eb18Smrg # some people rename them; so instead we look at the file content. 6758108eb18Smrg # Grep'ing the first line is not enough: some people post-process 6768108eb18Smrg # each Makefile.in and add a new line on top of each file to say so. 6778108eb18Smrg # So let's grep whole file. 6788108eb18Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 6798108eb18Smrg dirpart=`AS_DIRNAME("$mf")` 6808108eb18Smrg else 6818108eb18Smrg continue 6828108eb18Smrg fi 6838108eb18Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 6848108eb18Smrg # Extract the definition of DEP_FILES from the Makefile without 6858108eb18Smrg # running `make'. 6868108eb18Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 6878108eb18Smrg test -z "$DEPDIR" && continue 6888108eb18Smrg # When using ansi2knr, U may be empty or an underscore; expand it 6898108eb18Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 6908108eb18Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 6918108eb18Smrg # We invoke sed twice because it is the simplest approach to 6928108eb18Smrg # changing $(DEPDIR) to its actual value in the expansion. 6938108eb18Smrg for file in `sed -n -e ' 6948108eb18Smrg /^DEP_FILES = .*\\\\$/ { 6958108eb18Smrg s/^DEP_FILES = // 6968108eb18Smrg :loop 6978108eb18Smrg s/\\\\$// 6988108eb18Smrg p 6998108eb18Smrg n 7008108eb18Smrg /\\\\$/ b loop 7018108eb18Smrg p 7028108eb18Smrg } 7038108eb18Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 7048108eb18Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7058108eb18Smrg # Make sure the directory exists. 7068108eb18Smrg test -f "$dirpart/$file" && continue 7078108eb18Smrg fdir=`AS_DIRNAME(["$file"])` 7088108eb18Smrg AS_MKDIR_P([$dirpart/$fdir]) 7098108eb18Smrg # echo "creating $dirpart/$file" 7108108eb18Smrg echo '# dummy' > "$dirpart/$file" 7118108eb18Smrg done 7128108eb18Smrgdone 7138108eb18Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 7148108eb18Smrg 7158108eb18Smrg 7168108eb18Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 7178108eb18Smrg# ----------------------------- 7188108eb18Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 7198108eb18Smrg# 7208108eb18Smrg# This code is only required when automatic dependency tracking 7218108eb18Smrg# is enabled. FIXME. This creates each `.P' file that we will 7228108eb18Smrg# need in order to bootstrap the dependency handling code. 7238108eb18SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 7248108eb18Smrg[AC_CONFIG_COMMANDS([depfiles], 7258108eb18Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 7268108eb18Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 7278108eb18Smrg]) 7288108eb18Smrg 7298108eb18Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7308108eb18Smrg 7318108eb18Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 7328108eb18Smrg 7338108eb18Smrg# This program is free software; you can redistribute it and/or modify 7348108eb18Smrg# it under the terms of the GNU General Public License as published by 7358108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 7368108eb18Smrg# any later version. 7378108eb18Smrg 7388108eb18Smrg# This program is distributed in the hope that it will be useful, 7398108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 7408108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7418108eb18Smrg# GNU General Public License for more details. 7428108eb18Smrg 7438108eb18Smrg# You should have received a copy of the GNU General Public License 7448108eb18Smrg# along with this program; if not, write to the Free Software 7458108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7468108eb18Smrg# 02111-1307, USA. 7478108eb18Smrg 7488108eb18Smrg# serial 2 7498108eb18Smrg 7508108eb18Smrg# AM_MAKE_INCLUDE() 7518108eb18Smrg# ----------------- 7528108eb18Smrg# Check to see how make treats includes. 7538108eb18SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7548108eb18Smrg[am_make=${MAKE-make} 7558108eb18Smrgcat > confinc << 'END' 7568108eb18Smrgam__doit: 7578108eb18Smrg @echo done 7588108eb18Smrg.PHONY: am__doit 7598108eb18SmrgEND 7608108eb18Smrg# If we don't find an include directive, just comment out the code. 7618108eb18SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7628108eb18Smrgam__include="#" 7638108eb18Smrgam__quote= 7648108eb18Smrg_am_result=none 7658108eb18Smrg# First try GNU make style include. 7668108eb18Smrgecho "include confinc" > confmf 7678108eb18Smrg# We grep out `Entering directory' and `Leaving directory' 7688108eb18Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 7698108eb18Smrg# In particular we don't look at `^make:' because GNU make might 7708108eb18Smrg# be invoked under some other name (usually "gmake"), in which 7718108eb18Smrg# case it prints its new name instead of `make'. 7728108eb18Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 7738108eb18Smrg am__include=include 7748108eb18Smrg am__quote= 7758108eb18Smrg _am_result=GNU 7768108eb18Smrgfi 7778108eb18Smrg# Now try BSD make style include. 7788108eb18Smrgif test "$am__include" = "#"; then 7798108eb18Smrg echo '.include "confinc"' > confmf 7808108eb18Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 7818108eb18Smrg am__include=.include 7828108eb18Smrg am__quote="\"" 7838108eb18Smrg _am_result=BSD 7848108eb18Smrg fi 7858108eb18Smrgfi 7868108eb18SmrgAC_SUBST([am__include]) 7878108eb18SmrgAC_SUBST([am__quote]) 7888108eb18SmrgAC_MSG_RESULT([$_am_result]) 7898108eb18Smrgrm -f confinc confmf 7908108eb18Smrg]) 7918108eb18Smrg 7928108eb18Smrg# AM_CONDITIONAL -*- Autoconf -*- 7938108eb18Smrg 7948108eb18Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 7958108eb18Smrg 7968108eb18Smrg# This program is free software; you can redistribute it and/or modify 7978108eb18Smrg# it under the terms of the GNU General Public License as published by 7988108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 7998108eb18Smrg# any later version. 8008108eb18Smrg 8018108eb18Smrg# This program is distributed in the hope that it will be useful, 8028108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8038108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8048108eb18Smrg# GNU General Public License for more details. 8058108eb18Smrg 8068108eb18Smrg# You should have received a copy of the GNU General Public License 8078108eb18Smrg# along with this program; if not, write to the Free Software 8088108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8098108eb18Smrg# 02111-1307, USA. 8108108eb18Smrg 8118108eb18Smrg# serial 5 8128108eb18Smrg 8138108eb18SmrgAC_PREREQ(2.52) 8148108eb18Smrg 8158108eb18Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8168108eb18Smrg# ------------------------------------- 8178108eb18Smrg# Define a conditional. 8188108eb18SmrgAC_DEFUN([AM_CONDITIONAL], 8198108eb18Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8208108eb18Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8218108eb18SmrgAC_SUBST([$1_TRUE]) 8228108eb18SmrgAC_SUBST([$1_FALSE]) 8238108eb18Smrgif $2; then 8248108eb18Smrg $1_TRUE= 8258108eb18Smrg $1_FALSE='#' 8268108eb18Smrgelse 8278108eb18Smrg $1_TRUE='#' 8288108eb18Smrg $1_FALSE= 8298108eb18Smrgfi 8308108eb18SmrgAC_CONFIG_COMMANDS_PRE( 8318108eb18Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8328108eb18Smrg AC_MSG_ERROR([conditional "$1" was never defined. 8338108eb18SmrgUsually this means the macro was only invoked conditionally.]) 8348108eb18Smrgfi])]) 8358108eb18Smrg 8368108eb18Smrg# Add --enable-maintainer-mode option to configure. 8378108eb18Smrg# From Jim Meyering 8388108eb18Smrg 8398108eb18Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 8408108eb18Smrg 8418108eb18Smrg# This program is free software; you can redistribute it and/or modify 8428108eb18Smrg# it under the terms of the GNU General Public License as published by 8438108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 8448108eb18Smrg# any later version. 8458108eb18Smrg 8468108eb18Smrg# This program is distributed in the hope that it will be useful, 8478108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8488108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8498108eb18Smrg# GNU General Public License for more details. 8508108eb18Smrg 8518108eb18Smrg# You should have received a copy of the GNU General Public License 8528108eb18Smrg# along with this program; if not, write to the Free Software 8538108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8548108eb18Smrg# 02111-1307, USA. 8558108eb18Smrg 8568108eb18Smrg# serial 2 8578108eb18Smrg 8588108eb18SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8598108eb18Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 8608108eb18Smrg dnl maintainer-mode is disabled by default 8618108eb18Smrg AC_ARG_ENABLE(maintainer-mode, 8628108eb18Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 8638108eb18Smrg (and sometimes confusing) to the casual installer], 8648108eb18Smrg USE_MAINTAINER_MODE=$enableval, 8658108eb18Smrg USE_MAINTAINER_MODE=no) 8668108eb18Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8678108eb18Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 8688108eb18Smrg MAINT=$MAINTAINER_MODE_TRUE 8698108eb18Smrg AC_SUBST(MAINT)dnl 8708108eb18Smrg] 8718108eb18Smrg) 8728108eb18Smrg 8738108eb18SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8748108eb18Smrg 8758108eb18Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 8768108eb18Smrg 8778108eb18Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 8788108eb18Smrg 8798108eb18Smrg# This program is free software; you can redistribute it and/or modify 8808108eb18Smrg# it under the terms of the GNU General Public License as published by 8818108eb18Smrg# the Free Software Foundation; either version 2, or (at your option) 8828108eb18Smrg# any later version. 8838108eb18Smrg 8848108eb18Smrg# This program is distributed in the hope that it will be useful, 8858108eb18Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 8868108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8878108eb18Smrg# GNU General Public License for more details. 8888108eb18Smrg 8898108eb18Smrg# You should have received a copy of the GNU General Public License 8908108eb18Smrg# along with this program; if not, write to the Free Software 8918108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 8928108eb18Smrg# 02111-1307, USA. 8938108eb18Smrg 8948108eb18SmrgAC_PREREQ([2.52]) 8958108eb18Smrg 8968108eb18Smrg# serial 6 8978108eb18Smrg 8988108eb18Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8998108eb18SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9008108eb18Smrg 9018108eb18Smrgdnl Copyright 2005 Red Hat, Inc 9028108eb18Smrgdnl 9038108eb18Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9048108eb18Smrgdnl documentation for any purpose is hereby granted without fee, provided that 9058108eb18Smrgdnl the above copyright notice appear in all copies and that both that 9068108eb18Smrgdnl copyright notice and this permission notice appear in supporting 9078108eb18Smrgdnl documentation. 9088108eb18Smrgdnl 9098108eb18Smrgdnl The above copyright notice and this permission notice shall be included 9108108eb18Smrgdnl in all copies or substantial portions of the Software. 9118108eb18Smrgdnl 9128108eb18Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9138108eb18Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9148108eb18Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9158108eb18Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9168108eb18Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9178108eb18Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9188108eb18Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 9198108eb18Smrgdnl 9208108eb18Smrgdnl Except as contained in this notice, the name of the copyright holders shall 9218108eb18Smrgdnl not be used in advertising or otherwise to promote the sale, use or 9228108eb18Smrgdnl other dealings in this Software without prior written authorization 9238108eb18Smrgdnl from the copyright holders. 9248108eb18Smrgdnl 9258108eb18Smrg 9268108eb18Smrg# XAW_CHECK_XPRINT_SUPPORT() 9278108eb18Smrg# -------------------------- 9288108eb18Smrg# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 9298108eb18Smrg# library. If neither --enable-xprint nor --disable-xprint are given, 9308108eb18Smrg# the presence of an Xaw with Xprint support will be auto detected 9318108eb18Smrg 9328108eb18SmrgAC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[ 9338108eb18Smrg AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]), 9348108eb18Smrg [use_xprint=$enableval],[use_xprint=auto]) 9358108eb18Smrg if test "x$use_xprint" = "xyes"; then 9368108eb18Smrg TMP_CHECK1=xaw8 9378108eb18Smrg TMP_CHECK2= 9388108eb18Smrg xaw_use_xprint=yes 9398108eb18Smrg elif test "x$use_xprint" = "xno"; then 9408108eb18Smrg TMP_CHECK1=xaw7 9418108eb18Smrg TMP_CHECK2= 9428108eb18Smrg xaw_use_xprint=no 9438108eb18Smrg else 9448108eb18Smrg TMP_CHECK1=xaw8 9458108eb18Smrg TMP_CHECK2=xaw7 9468108eb18Smrg xaw_use_xprint=yes 9478108eb18Smrg fi 9488108eb18Smrg 9498108eb18Smrg PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no) 9508108eb18Smrg if [[ ! -z $TMP_CHECK2 ]] ; then 9518108eb18Smrg if test $success = no ; then 9528108eb18Smrg PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no) 9538108eb18Smrg xaw_use_xprint=no 9548108eb18Smrg fi 9558108eb18Smrg fi 9568108eb18Smrg 9578108eb18Smrg if test "x$success" = "xyes"; then 9588108eb18Smrg $1_CFLAGS=$TMP_XAW_CFLAGS 9598108eb18Smrg $1_LIBS=$TMP_XAW_LIBS 9608108eb18Smrg 9618108eb18Smrg AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"]) 9628108eb18Smrg else 9638108eb18Smrg AC_MSG_ERROR([No suitable version of Xaw found]) 9648108eb18Smrg fi 9658108eb18Smrg]) 9668108eb18Smrg 9678108eb18Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9688108eb18Smrg# 9698108eb18Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9708108eb18Smrg# 9718108eb18Smrg# This program is free software; you can redistribute it and/or modify 9728108eb18Smrg# it under the terms of the GNU General Public License as published by 9738108eb18Smrg# the Free Software Foundation; either version 2 of the License, or 9748108eb18Smrg# (at your option) any later version. 9758108eb18Smrg# 9768108eb18Smrg# This program is distributed in the hope that it will be useful, but 9778108eb18Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9788108eb18Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9798108eb18Smrg# General Public License for more details. 9808108eb18Smrg# 9818108eb18Smrg# You should have received a copy of the GNU General Public License 9828108eb18Smrg# along with this program; if not, write to the Free Software 9838108eb18Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9848108eb18Smrg# 9858108eb18Smrg# As a special exception to the GNU General Public License, if you 9868108eb18Smrg# distribute this file as part of a program that contains a 9878108eb18Smrg# configuration script generated by Autoconf, you may include it under 9888108eb18Smrg# the same distribution terms that you use for the rest of that program. 9898108eb18Smrg 9908108eb18Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9918108eb18Smrg# ---------------------------------- 9928108eb18SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9938108eb18Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9948108eb18Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9958108eb18SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9968108eb18Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9978108eb18Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9988108eb18Smrgfi 9998108eb18Smrgif test -n "$PKG_CONFIG"; then 10008108eb18Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 10018108eb18Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 10028108eb18Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10038108eb18Smrg AC_MSG_RESULT([yes]) 10048108eb18Smrg else 10058108eb18Smrg AC_MSG_RESULT([no]) 10068108eb18Smrg PKG_CONFIG="" 10078108eb18Smrg fi 10088108eb18Smrg 10098108eb18Smrgfi[]dnl 10108108eb18Smrg])# PKG_PROG_PKG_CONFIG 10118108eb18Smrg 10128108eb18Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 10138108eb18Smrg# 10148108eb18Smrg# Check to see whether a particular set of modules exists. Similar 10158108eb18Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 10168108eb18Smrg# 10178108eb18Smrg# 10188108eb18Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 10198108eb18Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 10208108eb18Smrg# PKG_CHECK_EXISTS manually 10218108eb18Smrg# -------------------------------------------------------------- 10228108eb18SmrgAC_DEFUN([PKG_CHECK_EXISTS], 10238108eb18Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10248108eb18Smrgif test -n "$PKG_CONFIG" && \ 10258108eb18Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 10268108eb18Smrg m4_ifval([$2], [$2], [:]) 10278108eb18Smrgm4_ifvaln([$3], [else 10288108eb18Smrg $3])dnl 10298108eb18Smrgfi]) 10308108eb18Smrg 10318108eb18Smrg 10328108eb18Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 10338108eb18Smrg# --------------------------------------------- 10348108eb18Smrgm4_define([_PKG_CONFIG], 10358108eb18Smrg[if test -n "$PKG_CONFIG"; then 10368108eb18Smrg if test -n "$$1"; then 10378108eb18Smrg pkg_cv_[]$1="$$1" 10388108eb18Smrg else 10398108eb18Smrg PKG_CHECK_EXISTS([$3], 10408108eb18Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 10418108eb18Smrg [pkg_failed=yes]) 10428108eb18Smrg fi 10438108eb18Smrgelse 10448108eb18Smrg pkg_failed=untried 10458108eb18Smrgfi[]dnl 10468108eb18Smrg])# _PKG_CONFIG 10478108eb18Smrg 10488108eb18Smrg# _PKG_SHORT_ERRORS_SUPPORTED 10498108eb18Smrg# ----------------------------- 10508108eb18SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 10518108eb18Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10528108eb18Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 10538108eb18Smrg _pkg_short_errors_supported=yes 10548108eb18Smrgelse 10558108eb18Smrg _pkg_short_errors_supported=no 10568108eb18Smrgfi[]dnl 10578108eb18Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 10588108eb18Smrg 10598108eb18Smrg 10608108eb18Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 10618108eb18Smrg# [ACTION-IF-NOT-FOUND]) 10628108eb18Smrg# 10638108eb18Smrg# 10648108eb18Smrg# Note that if there is a possibility the first call to 10658108eb18Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 10668108eb18Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 10678108eb18Smrg# 10688108eb18Smrg# 10698108eb18Smrg# -------------------------------------------------------------- 10708108eb18SmrgAC_DEFUN([PKG_CHECK_MODULES], 10718108eb18Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10728108eb18SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 10738108eb18SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 10748108eb18Smrg 10758108eb18Smrgpkg_failed=no 10768108eb18SmrgAC_MSG_CHECKING([for $1]) 10778108eb18Smrg 10788108eb18Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 10798108eb18Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 10808108eb18Smrg 10818108eb18Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 10828108eb18Smrgand $1[]_LIBS to avoid the need to call pkg-config. 10838108eb18SmrgSee the pkg-config man page for more details.]) 10848108eb18Smrg 10858108eb18Smrgif test $pkg_failed = yes; then 10868108eb18Smrg _PKG_SHORT_ERRORS_SUPPORTED 10878108eb18Smrg if test $_pkg_short_errors_supported = yes; then 10888108eb18Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 10898108eb18Smrg else 10908108eb18Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 10918108eb18Smrg fi 10928108eb18Smrg # Put the nasty error message in config.log where it belongs 10938108eb18Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 10948108eb18Smrg 10958108eb18Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 10968108eb18Smrg[Package requirements ($2) were not met: 10978108eb18Smrg 10988108eb18Smrg$$1_PKG_ERRORS 10998108eb18Smrg 11008108eb18SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 11018108eb18Smrginstalled software in a non-standard prefix. 11028108eb18Smrg 11038108eb18Smrg_PKG_TEXT 11048108eb18Smrg])], 11058108eb18Smrg [$4]) 11068108eb18Smrgelif test $pkg_failed = untried; then 11078108eb18Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 11088108eb18Smrg[The pkg-config script could not be found or is too old. Make sure it 11098108eb18Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 11108108eb18Smrgpath to pkg-config. 11118108eb18Smrg 11128108eb18Smrg_PKG_TEXT 11138108eb18Smrg 11148108eb18SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 11158108eb18Smrg [$4]) 11168108eb18Smrgelse 11178108eb18Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 11188108eb18Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 11198108eb18Smrg AC_MSG_RESULT([yes]) 11208108eb18Smrg ifelse([$3], , :, [$3]) 11218108eb18Smrgfi[]dnl 11228108eb18Smrg])# PKG_CHECK_MODULES 11238108eb18Smrg 11248108eb18Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:38:50 mrg Exp $ 11258108eb18Smrgdnl 11268108eb18Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 11278108eb18Smrgdnl 11288108eb18Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11298108eb18Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11308108eb18Smrgdnl the above copyright notice appear in all copies and that both that 11318108eb18Smrgdnl copyright notice and this permission notice appear in supporting 11328108eb18Smrgdnl documentation. 11338108eb18Smrgdnl 11348108eb18Smrgdnl The above copyright notice and this permission notice shall be included 11358108eb18Smrgdnl in all copies or substantial portions of the Software. 11368108eb18Smrgdnl 11378108eb18Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11388108eb18Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11398108eb18Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11408108eb18Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11418108eb18Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11428108eb18Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11438108eb18Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11448108eb18Smrgdnl 11458108eb18Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11468108eb18Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11478108eb18Smrgdnl other dealings in this Software without prior written authorization 11488108eb18Smrgdnl from the copyright holders. 11498108eb18Smrgdnl 11508108eb18Smrg 11518108eb18Smrg# XORG_PROG_RAWCPP() 11528108eb18Smrg# ------------------ 11538108eb18Smrg# Find cpp program and necessary flags for use in pre-processing text files 11548108eb18Smrg# such as man pages and config files 11558108eb18SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 11568108eb18SmrgAC_REQUIRE([AC_PROG_CPP]) 11578108eb18SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 11588108eb18Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 11598108eb18Smrg 11608108eb18Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 11618108eb18Smrg# which is not the best choice for supporting other OS'es, but covers most 11628108eb18Smrg# of the ones we need for now. 11638108eb18SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 11648108eb18SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 11658108eb18Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11668108eb18Smrg AC_MSG_RESULT([no]) 11678108eb18Smrgelse 11688108eb18Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11698108eb18Smrg RAWCPPFLAGS=-undef 11708108eb18Smrg AC_MSG_RESULT([yes]) 11718108eb18Smrg else 11728108eb18Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11738108eb18Smrg fi 11748108eb18Smrgfi 11758108eb18Smrgrm -f conftest.$ac_ext 11768108eb18Smrg 11778108eb18SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11788108eb18SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11798108eb18Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11808108eb18Smrg AC_MSG_RESULT([no]) 11818108eb18Smrgelse 11828108eb18Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11838108eb18Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11848108eb18Smrg AC_MSG_RESULT([yes]) 11858108eb18Smrg else 11868108eb18Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11878108eb18Smrg fi 11888108eb18Smrgfi 11898108eb18Smrgrm -f conftest.$ac_ext 11908108eb18SmrgAC_SUBST(RAWCPPFLAGS) 11918108eb18Smrg]) # XORG_PROG_RAWCPP 11928108eb18Smrg 11938108eb18Smrg# XORG_MANPAGE_SECTIONS() 11948108eb18Smrg# ----------------------- 11958108eb18Smrg# Determine which sections man pages go in for the different man page types 11968108eb18Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11978108eb18Smrg# Not sure if there's any better way than just hardcoding by OS name. 11988108eb18Smrg# Override default settings by setting environment variables 11998108eb18Smrg 12008108eb18SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 12018108eb18SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 12028108eb18Smrg 12038108eb18Smrgif test x$APP_MAN_SUFFIX = x ; then 12048108eb18Smrg case $host_os in 12058108eb18Smrg linux*) APP_MAN_SUFFIX=1x ;; 12068108eb18Smrg *) APP_MAN_SUFFIX=1 ;; 12078108eb18Smrg esac 12088108eb18Smrgfi 12098108eb18Smrgif test x$APP_MAN_DIR = x ; then 12108108eb18Smrg case $host_os in 12118108eb18Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 12128108eb18Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 12138108eb18Smrg esac 12148108eb18Smrgfi 12158108eb18Smrg 12168108eb18Smrgif test x$LIB_MAN_SUFFIX = x ; then 12178108eb18Smrg case $host_os in 12188108eb18Smrg linux*) LIB_MAN_SUFFIX=3x ;; 12198108eb18Smrg *) LIB_MAN_SUFFIX=3 ;; 12208108eb18Smrg esac 12218108eb18Smrgfi 12228108eb18Smrgif test x$LIB_MAN_DIR = x ; then 12238108eb18Smrg case $host_os in 12248108eb18Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 12258108eb18Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 12268108eb18Smrg esac 12278108eb18Smrgfi 12288108eb18Smrg 12298108eb18Smrgif test x$FILE_MAN_SUFFIX = x ; then 12308108eb18Smrg case $host_os in 12318108eb18Smrg linux*) FILE_MAN_SUFFIX=5x ;; 12328108eb18Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 12338108eb18Smrg *) FILE_MAN_SUFFIX=5 ;; 12348108eb18Smrg esac 12358108eb18Smrgfi 12368108eb18Smrgif test x$FILE_MAN_DIR = x ; then 12378108eb18Smrg case $host_os in 12388108eb18Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 12398108eb18Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 12408108eb18Smrg esac 12418108eb18Smrgfi 12428108eb18Smrg 12438108eb18Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 12448108eb18Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 12458108eb18Smrgif test x$MISC_MAN_SUFFIX = x ; then 12468108eb18Smrg case $host_os in 12478108eb18Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 12488108eb18Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 12498108eb18Smrg *) MISC_MAN_SUFFIX=7 ;; 12508108eb18Smrg esac 12518108eb18Smrgfi 12528108eb18Smrgif test x$MISC_MAN_DIR = x ; then 12538108eb18Smrg case $host_os in 12548108eb18Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 12558108eb18Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 12568108eb18Smrg esac 12578108eb18Smrgfi 12588108eb18Smrg 12598108eb18Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 12608108eb18Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 12618108eb18Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 12628108eb18Smrg case $host_os in 12638108eb18Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 12648108eb18Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 12658108eb18Smrg *) DRIVER_MAN_SUFFIX=4 ;; 12668108eb18Smrg esac 12678108eb18Smrgfi 12688108eb18Smrgif test x$DRIVER_MAN_DIR = x ; then 12698108eb18Smrg case $host_os in 12708108eb18Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 12718108eb18Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 12728108eb18Smrg esac 12738108eb18Smrgfi 12748108eb18Smrg 12758108eb18Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 12768108eb18Smrg case $host_os in 12778108eb18Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 12788108eb18Smrg *) ADMIN_MAN_SUFFIX=8 ;; 12798108eb18Smrg esac 12808108eb18Smrgfi 12818108eb18Smrgif test x$ADMIN_MAN_DIR = x ; then 12828108eb18Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12838108eb18Smrgfi 12848108eb18Smrg 12858108eb18Smrg 12868108eb18SmrgAC_SUBST([APP_MAN_SUFFIX]) 12878108eb18SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12888108eb18SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12898108eb18SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12908108eb18SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12918108eb18SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12928108eb18SmrgAC_SUBST([APP_MAN_DIR]) 12938108eb18SmrgAC_SUBST([LIB_MAN_DIR]) 12948108eb18SmrgAC_SUBST([FILE_MAN_DIR]) 12958108eb18SmrgAC_SUBST([MISC_MAN_DIR]) 12968108eb18SmrgAC_SUBST([DRIVER_MAN_DIR]) 12978108eb18SmrgAC_SUBST([ADMIN_MAN_DIR]) 12988108eb18Smrg]) # XORG_MANPAGE_SECTIONS 12998108eb18Smrg 13008108eb18Smrg# XORG_CHECK_LINUXDOC 13018108eb18Smrg# ------------------- 13028108eb18Smrg# Defines the variable MAKE_TEXT if the necessary tools and 13038108eb18Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 13048108eb18Smrg# Whether or not the necessary tools and files are found can be checked 13058108eb18Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 13068108eb18SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 13078108eb18SmrgAC_CHECK_FILE( 13088108eb18Smrg [$prefix/share/X11/sgml/defs.ent], 13098108eb18Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 13108108eb18Smrg [DEFS_ENT_PATH=] 13118108eb18Smrg) 13128108eb18Smrg 13138108eb18SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 13148108eb18SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 13158108eb18Smrg 13168108eb18SmrgAC_MSG_CHECKING([Whether to build documentation]) 13178108eb18Smrg 13188108eb18Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 13198108eb18Smrg BUILDDOC=yes 13208108eb18Smrgelse 13218108eb18Smrg BUILDDOC=no 13228108eb18Smrgfi 13238108eb18Smrg 13248108eb18SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 13258108eb18Smrg 13268108eb18SmrgAC_MSG_RESULT([$BUILDDOC]) 13278108eb18Smrg 13288108eb18SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 13298108eb18Smrg 13308108eb18Smrgif test x$PS2PDF != x ; then 13318108eb18Smrg BUILDPDFDOC=yes 13328108eb18Smrgelse 13338108eb18Smrg BUILDPDFDOC=no 13348108eb18Smrgfi 13358108eb18Smrg 13368108eb18SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13378108eb18Smrg 13388108eb18SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13398108eb18Smrg 13408108eb18SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 13418108eb18SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 13428108eb18SmrgMAKE_PDF="$PS2PDF" 13438108eb18SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 13448108eb18Smrg 13458108eb18SmrgAC_SUBST(MAKE_TEXT) 13468108eb18SmrgAC_SUBST(MAKE_PS) 13478108eb18SmrgAC_SUBST(MAKE_PDF) 13488108eb18SmrgAC_SUBST(MAKE_HTML) 13498108eb18Smrg]) # XORG_CHECK_LINUXDOC 13508108eb18Smrg 13518108eb18Smrg# XORG_CHECK_MALLOC_ZERO 13528108eb18Smrg# ---------------------- 13538108eb18Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 13548108eb18Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 13558108eb18Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 13568108eb18SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 13578108eb18SmrgAC_ARG_ENABLE(malloc0returnsnull, 13588108eb18Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 13598108eb18Smrg [malloc(0) returns NULL (default: auto)]), 13608108eb18Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 13618108eb18Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 13628108eb18Smrg 13638108eb18SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 13648108eb18Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 13658108eb18Smrg AC_RUN_IFELSE([ 13668108eb18Smrgchar *malloc(); 13678108eb18Smrgchar *realloc(); 13688108eb18Smrgchar *calloc(); 13698108eb18Smrgmain() { 13708108eb18Smrg char *m0, *r0, *c0, *p; 13718108eb18Smrg m0 = malloc(0); 13728108eb18Smrg p = malloc(10); 13738108eb18Smrg r0 = realloc(p,0); 13748108eb18Smrg c0 = calloc(0); 13758108eb18Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 13768108eb18Smrg}], 13778108eb18Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 13788108eb18Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 13798108eb18Smrgfi 13808108eb18SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13818108eb18Smrg 13828108eb18Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 13838108eb18Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 13848108eb18Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 13858108eb18Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 13868108eb18Smrgelse 13878108eb18Smrg MALLOC_ZERO_CFLAGS="" 13888108eb18Smrg XMALLOC_ZERO_CFLAGS="" 13898108eb18Smrg XTMALLOC_ZERO_CFLAGS="" 13908108eb18Smrgfi 13918108eb18Smrg 13928108eb18SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 13938108eb18SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 13948108eb18SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 13958108eb18Smrg]) # XORG_CHECK_MALLOC_ZERO 13968108eb18Smrg 13978108eb18Smrgdnl Copyright 2005 Red Hat, Inc 13988108eb18Smrgdnl 13998108eb18Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 14008108eb18Smrgdnl documentation for any purpose is hereby granted without fee, provided that 14018108eb18Smrgdnl the above copyright notice appear in all copies and that both that 14028108eb18Smrgdnl copyright notice and this permission notice appear in supporting 14038108eb18Smrgdnl documentation. 14048108eb18Smrgdnl 14058108eb18Smrgdnl The above copyright notice and this permission notice shall be included 14068108eb18Smrgdnl in all copies or substantial portions of the Software. 14078108eb18Smrgdnl 14088108eb18Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14098108eb18Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14108108eb18Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14118108eb18Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 14128108eb18Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 14138108eb18Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 14148108eb18Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 14158108eb18Smrgdnl 14168108eb18Smrgdnl Except as contained in this notice, the name of the copyright holders shall 14178108eb18Smrgdnl not be used in advertising or otherwise to promote the sale, use or 14188108eb18Smrgdnl other dealings in this Software without prior written authorization 14198108eb18Smrgdnl from the copyright holders. 14208108eb18Smrgdnl 14218108eb18Smrg 14228108eb18Smrg# XORG_RELEASE_VERSION 14238108eb18Smrg# -------------------- 14248108eb18Smrg# Adds --with/without-release-string and changes the PACKAGE and 14258108eb18Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 14268108eb18Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 14278108eb18Smrg 14288108eb18SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 14298108eb18Smrg AC_ARG_WITH(release-version, 14308108eb18Smrg AC_HELP_STRING([--with-release-version=STRING], 14318108eb18Smrg [Use release version string in package name]), 14328108eb18Smrg [RELEASE_VERSION="$withval"], 14338108eb18Smrg [RELEASE_VERSION=""]) 14348108eb18Smrg if test "x$RELEASE_VERSION" != "x"; then 14358108eb18Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 14368108eb18Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 14378108eb18Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 14388108eb18Smrg fi 14398108eb18Smrg]) 14408108eb18Smrg 1441