1dnl aclocal.m4 generated automatically by aclocal 1.4a 2 3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. 4dnl This file is free software; the Free Software Foundation 5dnl gives unlimited permission to copy and/or distribute it, 6dnl with or without modifications, as long as this notice is preserved. 7 8dnl This program is distributed in the hope that it will be useful, 9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11dnl PARTICULAR PURPOSE. 12 13# Like AC_CONFIG_HEADER, but automatically create stamp file. 14 15AC_DEFUN(AM_CONFIG_HEADER, 16[AC_PREREQ([2.12]) 17AC_CONFIG_HEADER([$1]) 18dnl When config.status generates a header, we must update the stamp-h file. 19dnl This file resides in the same directory as the config header 20dnl that is generated. We must strip everything past the first ":", 21dnl and everything past the last "/". 22AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 23ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 24<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 25<<am_indx=1 26for am_file in <<$1>>; do 27 case " <<$>>CONFIG_HEADERS " in 28 *" <<$>>am_file "*<<)>> 29 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 30 ;; 31 esac 32 am_indx=`expr "<<$>>am_indx" + 1` 33done<<>>dnl>>) 34changequote([,]))]) 35 36# Do all the work for Automake. This macro actually does too much -- 37# some checks are only needed if your package does certain things. 38# But this isn't really a big deal. 39 40# serial 1 41 42dnl Usage: 43dnl AM_INIT_AUTOMAKE(package,version, [no-define]) 44 45AC_DEFUN(AM_INIT_AUTOMAKE, 46[AC_REQUIRE([AC_PROG_INSTALL]) 47dnl We require 2.13 because we rely on SHELL being computed by configure. 48AC_PREREQ([2.13]) 49PACKAGE=[$1] 50AC_SUBST(PACKAGE) 51VERSION=[$2] 52AC_SUBST(VERSION) 53dnl test to see if srcdir already configured 54if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" && 55 test -f $srcdir/config.status; then 56 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 57fi 58ifelse([$3],, 59AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 60AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 61AC_REQUIRE([AM_SANITY_CHECK]) 62AC_REQUIRE([AC_ARG_PROGRAM]) 63AM_MISSING_PROG(ACLOCAL, aclocal) 64AM_MISSING_PROG(AUTOCONF, autoconf) 65AM_MISSING_PROG(AUTOMAKE, automake) 66AM_MISSING_PROG(AUTOHEADER, autoheader) 67AM_MISSING_PROG(MAKEINFO, makeinfo) 68AM_MISSING_PROG(AMTAR, tar) 69AM_MISSING_INSTALL_SH 70dnl We need awk for the "check" target. The system "awk" is bad on 71dnl some platforms. 72AC_REQUIRE([AC_PROG_AWK]) 73AC_REQUIRE([AC_PROG_MAKE_SET]) 74AC_REQUIRE([AM_DEP_TRACK]) 75AC_REQUIRE([AM_SET_DEPDIR]) 76ifdef([AC_PROVIDE_AC_PROG_CC], [AM_DEPENDENCIES(CC)], [ 77 define([AC_PROG_CC], defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])]) 78ifdef([AC_PROVIDE_AC_PROG_CXX], [AM_DEPENDENCIES(CXX)], [ 79 define([AC_PROG_CXX], defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])]) 80]) 81 82# 83# Check to make sure that the build environment is sane. 84# 85 86AC_DEFUN(AM_SANITY_CHECK, 87[AC_MSG_CHECKING([whether build environment is sane]) 88# Just in case 89sleep 1 90echo timestamp > conftestfile 91# Do `set' in a subshell so we don't clobber the current shell's 92# arguments. Must try -L first in case configure is actually a 93# symlink; some systems play weird games with the mod time of symlinks 94# (eg FreeBSD returns the mod time of the symlink's containing 95# directory). 96if ( 97 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 98 if test "[$]*" = "X"; then 99 # -L didn't work. 100 set X `ls -t $srcdir/configure conftestfile` 101 fi 102 if test "[$]*" != "X $srcdir/configure conftestfile" \ 103 && test "[$]*" != "X conftestfile $srcdir/configure"; then 104 105 # If neither matched, then we have a broken ls. This can happen 106 # if, for instance, CONFIG_SHELL is bash and it inherits a 107 # broken ls alias from the environment. This has actually 108 # happened. Such a system could not be considered "sane". 109 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 110alias in your environment]) 111 fi 112 113 test "[$]2" = conftestfile 114 ) 115then 116 # Ok. 117 : 118else 119 AC_MSG_ERROR([newly created file is older than distributed files! 120Check your system clock]) 121fi 122rm -f conftest* 123AC_MSG_RESULT(yes)]) 124 125dnl AM_MISSING_PROG(NAME, PROGRAM) 126AC_DEFUN(AM_MISSING_PROG, [ 127AC_REQUIRE([AM_MISSING_HAS_RUN]) 128$1=${$1-"${am_missing_run}$2"} 129AC_SUBST($1)]) 130 131dnl Like AM_MISSING_PROG, but only looks for install-sh. 132dnl AM_MISSING_INSTALL_SH() 133AC_DEFUN(AM_MISSING_INSTALL_SH, [ 134AC_REQUIRE([AM_MISSING_HAS_RUN]) 135if test -z "$install_sh"; then 136 install_sh="$ac_aux_dir/install-sh" 137 test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh" 138 test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh" 139 dnl FIXME: an evil hack: we remove the SHELL invocation from 140 dnl install_sh because automake adds it back in. Sigh. 141 install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`" 142fi 143AC_SUBST(install_sh)]) 144 145dnl AM_MISSING_HAS_RUN. 146dnl Define MISSING if not defined so far and test if it supports --run. 147dnl If it does, set am_missing_run to use it, otherwise, to nothing. 148AC_DEFUN([AM_MISSING_HAS_RUN], [ 149test x"${MISSING+set}" = xset || \ 150 MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing" 151dnl Use eval to expand $SHELL 152if eval "$MISSING --run :"; then 153 am_missing_run="$MISSING --run " 154else 155 am_missing_run= 156 AC_MSG_WARN([\`missing' script is too old or missing]) 157fi 158]) 159 160dnl See how the compiler implements dependency checking. 161dnl Usage: 162dnl AM_DEPENDENCIES(NAME) 163dnl NAME is "CC", "CXX" or "OBJC". 164 165dnl We try a few techniques and use that to set a single cache variable. 166 167AC_DEFUN(AM_DEPENDENCIES,[ 168AC_REQUIRE([AM_SET_DEPDIR]) 169AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS]) 170ifelse([$1],CC,[ 171AC_REQUIRE([AC_PROG_CC]) 172AC_REQUIRE([AC_PROG_CPP]) 173depcc="$CC" 174depcpp="$CPP"],[$1],CXX,[ 175AC_REQUIRE([AC_PROG_CXX]) 176AC_REQUIRE([AC_PROG_CXXCPP]) 177depcc="$CXX" 178depcpp="$CXXCPP"],[$1],OBJC,[ 179am_cv_OBJC_dependencies_compiler_type=gcc],[ 180AC_REQUIRE([AC_PROG_][$1]) 181depcc="$[$1]" 182depcpp=""]) 183AC_MSG_CHECKING([dependency style of $depcc]) 184AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[ 185if test -z "$AMDEP"; then 186 echo '#include "conftest.h"' > conftest.c 187 echo 'int i;' > conftest.h 188 189 am_cv_[$1]_dependencies_compiler_type=none 190 for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do 191 case "$depmode" in 192 nosideeffect) 193 # after this tag, mechanisms are not by side-effect, so they'll 194 # only be used when explicitly requested 195 if test "x$enable_dependency_tracking" = xyes; then 196 continue 197 else 198 break 199 fi 200 ;; 201 none) break ;; 202 esac 203 if depmode="$depmode" \ 204 source=conftest.c object=conftest.o \ 205 depfile=conftest.Po tmpdepfile=conftest.TPo \ 206 $SHELL $am_depcomp $depcc -c conftest.c 2>/dev/null && 207 grep conftest.h conftest.Po > /dev/null 2>&1; then 208 am_cv_[$1]_dependencies_compiler_type="$depmode" 209 break 210 fi 211 done 212 213 rm -f conftest.* 214else 215 am_cv_[$1]_dependencies_compiler_type=none 216fi 217]) 218AC_MSG_RESULT($am_cv_[$1]_dependencies_compiler_type) 219[$1]DEPMODE="depmode=$am_cv_[$1]_dependencies_compiler_type" 220AC_SUBST([$1]DEPMODE) 221]) 222 223dnl Choose a directory name for dependency files. 224dnl This macro is AC_REQUIREd in AM_DEPENDENCIES 225 226AC_DEFUN(AM_SET_DEPDIR,[ 227if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then 228 DEPDIR=.deps 229else 230 DEPDIR=_deps 231fi 232AC_SUBST(DEPDIR) 233]) 234 235AC_DEFUN(AM_DEP_TRACK,[ 236AC_ARG_ENABLE(dependency-tracking, 237[ --disable-dependency-tracking Speeds up one-time builds 238 --enable-dependency-tracking Do not reject slow dependency extractors]) 239if test "x$enable_dependency_tracking" = xno; then 240 AMDEP="#" 241else 242 am_depcomp="$ac_aux_dir/depcomp" 243 if test ! -f "$am_depcomp"; then 244 AMDEP="#" 245 else 246 AMDEP= 247 fi 248fi 249AC_SUBST(AMDEP) 250if test -z "$AMDEP"; then 251 AMDEPBACKSLASH='\' 252else 253 AMDEPBACKSLASH= 254fi 255pushdef([subst], defn([AC_SUBST])) 256subst(AMDEPBACKSLASH) 257popdef([subst]) 258]) 259 260dnl Generate code to set up dependency tracking. 261dnl This macro should only be invoked once -- use via AC_REQUIRE. 262dnl Usage: 263dnl AM_OUTPUT_DEPENDENCY_COMMANDS 264 265dnl 266dnl This code is only required when automatic dependency tracking 267dnl is enabled. FIXME. This creates each `.P' file that we will 268dnl need in order to bootstrap the dependency handling code. 269AC_DEFUN(AM_OUTPUT_DEPENDENCY_COMMANDS,[ 270AC_OUTPUT_COMMANDS([ 271test x"$AMDEP" != x"" || 272for mf in $CONFIG_FILES; do 273 case "$mf" in 274 Makefile) dirpart=.;; 275 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; 276 *) continue;; 277 esac 278 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue 279 # Extract the definition of DEP_FILES from the Makefile without 280 # running `make'. 281 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 282 test -z "$DEPDIR" && continue 283 # When using ansi2knr, U may be empty or an underscore; expand it 284 U=`sed -n -e '/^U = / s///p' < "$mf"` 285 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 286 # We invoke sed twice because it is the simplest approach to 287 # changing $(DEPDIR) to its actual value in the expansion. 288 for file in `sed -n -e ' 289 /^DEP_FILES = .*\\\\$/ { 290 s/^DEP_FILES = // 291 :loop 292 s/\\\\$// 293 p 294 n 295 /\\\\$/ b loop 296 p 297 } 298 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 299 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 300 # Make sure the directory exists. 301 test -f "$dirpart/$file" && continue 302 fdir=`echo "$file" | sed -e 's|/[^/]*$||'` 303 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 304 # echo "creating $dirpart/$file" 305 echo '# dummy' > "$dirpart/$file" 306 done 307done 308], [AMDEP="$AMDEP" 309ac_aux_dir="$ac_aux_dir"])]) 310 311 312# serial 1 313 314AC_DEFUN(AM_C_PROTOTYPES, 315[AC_REQUIRE([AM_PROG_CC_STDC]) 316AC_REQUIRE([AC_PROG_CPP]) 317AC_MSG_CHECKING([for function prototypes]) 318if test "$am_cv_prog_cc_stdc" != no; then 319 AC_MSG_RESULT(yes) 320 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes]) 321 U= ANSI2KNR= 322else 323 AC_MSG_RESULT(no) 324 U=_ ANSI2KNR=./ansi2knr 325 # Ensure some checks needed by ansi2knr itself. 326 AC_HEADER_STDC 327 AC_CHECK_HEADERS(string.h) 328fi 329AC_SUBST(U)dnl 330AC_SUBST(ANSI2KNR)dnl 331]) 332 333 334# serial 1 335 336# @defmac AC_PROG_CC_STDC 337# @maindex PROG_CC_STDC 338# @ovindex CC 339# If the C compiler in not in ANSI C mode by default, try to add an option 340# to output variable @code{CC} to make it so. This macro tries various 341# options that select ANSI C on some system or another. It considers the 342# compiler to be in ANSI C mode if it handles function prototypes correctly. 343# 344# If you use this macro, you should check after calling it whether the C 345# compiler has been set to accept ANSI C; if not, the shell variable 346# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source 347# code in ANSI C, you can make an un-ANSIfied copy of it by using the 348# program @code{ansi2knr}, which comes with Ghostscript. 349# @end defmac 350 351AC_DEFUN(AM_PROG_CC_STDC, 352[AC_REQUIRE([AC_PROG_CC]) 353AC_BEFORE([$0], [AC_C_INLINE]) 354AC_BEFORE([$0], [AC_C_CONST]) 355dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require 356dnl a magic option to avoid problems with ANSI preprocessor commands 357dnl like #elif. 358dnl FIXME: can't do this because then AC_AIX won't work due to a 359dnl circular dependency. 360dnl AC_BEFORE([$0], [AC_PROG_CPP]) 361AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) 362AC_CACHE_VAL(am_cv_prog_cc_stdc, 363[am_cv_prog_cc_stdc=no 364ac_save_CC="$CC" 365# Don't try gcc -ansi; that turns off useful extensions and 366# breaks some systems' header files. 367# AIX -qlanglvl=ansi 368# Ultrix and OSF/1 -std1 369# HP-UX 10.20 and later -Ae 370# HP-UX older versions -Aa -D_HPUX_SOURCE 371# SVR4 -Xc -D__EXTENSIONS__ 372for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 373do 374 CC="$ac_save_CC $ac_arg" 375 AC_TRY_COMPILE( 376[#include <stdarg.h> 377#include <stdio.h> 378#include <sys/types.h> 379#include <sys/stat.h> 380/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 381struct buf { int x; }; 382FILE * (*rcsopen) (struct buf *, struct stat *, int); 383static char *e (p, i) 384 char **p; 385 int i; 386{ 387 return p[i]; 388} 389static char *f (char * (*g) (char **, int), char **p, ...) 390{ 391 char *s; 392 va_list v; 393 va_start (v,p); 394 s = g (p, va_arg (v,int)); 395 va_end (v); 396 return s; 397} 398int test (int i, double x); 399struct s1 {int (*f) (int a);}; 400struct s2 {int (*f) (double a);}; 401int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 402int argc; 403char **argv; 404], [ 405return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 406], 407[am_cv_prog_cc_stdc="$ac_arg"; break]) 408done 409CC="$ac_save_CC" 410]) 411if test -z "$am_cv_prog_cc_stdc"; then 412 AC_MSG_RESULT([none needed]) 413else 414 AC_MSG_RESULT($am_cv_prog_cc_stdc) 415fi 416case "x$am_cv_prog_cc_stdc" in 417 x|xno) ;; 418 *) CC="$CC $am_cv_prog_cc_stdc" ;; 419esac 420]) 421 422