source: trunk/third/xntp/aclocal.m4 @ 17260

Revision 17260, 22.7 KB checked in by zacheiss, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17259, which included commits to RCS files with non-trunk default branches.
Line 
1# aclocal.m4 generated automatically by aclocal 1.5
2
3# Copyright 1996, 1997, 1998, 1999, 2000, 2001
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14AC_DEFUN(hs_ULONG_CONST,
15[ AC_EGREP_CPP(Circus,
16 [#define ACAT(a,b)a ## b
17ACAT(Cir,cus)
18], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
19    AC_EGREP_CPP(Reiser,
20[#define RCAT(a,b)a/**/b
21RCAT(Rei,ser)
22], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
23    AC_MSG_ERROR([How do we create an unsigned long constant?])))])
24dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
25dnl
26dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
27dnl variable, taking care of fixing up ${prefix} and such.
28dnl
29dnl Note that the 3 argument form is only supported with autoconf 2.13 and
30dnl later (i.e. only where AC_DEFINE supports 3 arguments).
31dnl
32dnl Examples:
33dnl
34dnl    AC_DEFINE_DIR(DATADIR, datadir)
35dnl    AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
36dnl
37dnl @version $Id: aclocal.m4,v 1.1.1.3 2002-03-01 17:36:32 zacheiss Exp $
38dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
39
40AC_DEFUN(AC_DEFINE_DIR, [
41        ac_expanded=`(
42            test "x$prefix" = xNONE && prefix="$ac_default_prefix"
43            test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
44            eval echo \""[$]$2"\"
45        )`
46        ifelse($3, ,
47          AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
48          AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
49])
50
51# Like AC_CONFIG_HEADER, but automatically create stamp file.
52
53# serial 3
54
55# When config.status generates a header, we must update the stamp-h file.
56# This file resides in the same directory as the config header
57# that is generated.  We must strip everything past the first ":",
58# and everything past the last "/".
59
60AC_PREREQ([2.12])
61
62AC_DEFUN([AM_CONFIG_HEADER],
63[ifdef([AC_FOREACH],dnl
64         [dnl init our file count if it isn't already
65         m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
66         dnl prepare to store our destination file list for use in config.status
67         AC_FOREACH([_AM_File], [$1],
68                    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
69                    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
70                    dnl and add it to the list of files AC keeps track of, along
71                    dnl with our hook
72                    AC_CONFIG_HEADERS(_AM_File,
73dnl COMMANDS, [, INIT-CMDS]
74[# update the timestamp
75echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
76][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
77                    m4_popdef([_AM_Dest])])],dnl
78[AC_CONFIG_HEADER([$1])
79  AC_OUTPUT_COMMANDS(
80   ifelse(patsubst([$1], [[^ ]], []),
81          [],
82          [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
83           patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
84[am_indx=1
85for am_file in $1; do
86  case " \$CONFIG_HEADERS " in
87  *" \$am_file "*)
88    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
89    if test -n "\$am_dir"; then
90      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
91      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
92        am_tmpdir=\$am_tmpdir\$am_subdir/
93        if test ! -d \$am_tmpdir; then
94          mkdir \$am_tmpdir
95        fi
96      done
97    fi
98    echo timestamp > "\$am_dir"stamp-h\$am_indx
99    ;;
100  esac
101  am_indx=\`expr \$am_indx + 1\`
102done])
103])]) # AM_CONFIG_HEADER
104
105# _AM_DIRNAME(PATH)
106# -----------------
107# Like AS_DIRNAME, only do it during macro expansion
108AC_DEFUN([_AM_DIRNAME],
109       [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
110              m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
111                    m4_if(m4_regexp([$1], [^/.*]), -1,
112                          [.],
113                          m4_patsubst([$1], [^\(/\).*], [\1])),
114                    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
115              m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
116]) # _AM_DIRNAME
117
118# Do all the work for Automake.  This macro actually does too much --
119# some checks are only needed if your package does certain things.
120# But this isn't really a big deal.
121
122# serial 5
123
124# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
125# written in clear, in which case automake, when reading aclocal.m4,
126# will think it sees a *use*, and therefore will trigger all it's
127# C support machinery.  Also note that it means that autoscan, seeing
128# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
129
130
131# We require 2.13 because we rely on SHELL being computed by configure.
132AC_PREREQ([2.13])
133
134# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
135# -----------------------------------------------------------
136# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
137# The purpose of this macro is to provide the user with a means to
138# check macros which are provided without letting her know how the
139# information is coded.
140# If this macro is not defined by Autoconf, define it here.
141ifdef([AC_PROVIDE_IFELSE],
142      [],
143      [define([AC_PROVIDE_IFELSE],
144              [ifdef([AC_PROVIDE_$1],
145                     [$2], [$3])])])
146
147
148# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
149# ----------------------------------------------
150AC_DEFUN([AM_INIT_AUTOMAKE],
151[AC_REQUIRE([AC_PROG_INSTALL])dnl
152# test to see if srcdir already configured
153if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
154   test -f $srcdir/config.status; then
155  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
156fi
157
158# Define the identity of the package.
159PACKAGE=$1
160AC_SUBST(PACKAGE)dnl
161VERSION=$2
162AC_SUBST(VERSION)dnl
163ifelse([$3],,
164[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
165AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
166
167# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
168# the ones we care about.
169ifdef([m4_pattern_allow],
170      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
171
172# Autoconf 2.50 always computes EXEEXT.  However we need to be
173# compatible with 2.13, for now.  So we always define EXEEXT, but we
174# don't compute it.
175AC_SUBST(EXEEXT)
176# Similar for OBJEXT -- only we only use OBJEXT if the user actually
177# requests that it be used.  This is a bit dumb.
178: ${OBJEXT=o}
179AC_SUBST(OBJEXT)
180
181# Some tools Automake needs.
182AC_REQUIRE([AM_SANITY_CHECK])dnl
183AC_REQUIRE([AC_ARG_PROGRAM])dnl
184AM_MISSING_PROG(ACLOCAL, aclocal)
185AM_MISSING_PROG(AUTOCONF, autoconf)
186AM_MISSING_PROG(AUTOMAKE, automake)
187AM_MISSING_PROG(AUTOHEADER, autoheader)
188AM_MISSING_PROG(MAKEINFO, makeinfo)
189AM_MISSING_PROG(AMTAR, tar)
190AM_PROG_INSTALL_SH
191AM_PROG_INSTALL_STRIP
192# We need awk for the "check" target.  The system "awk" is bad on
193# some platforms.
194AC_REQUIRE([AC_PROG_AWK])dnl
195AC_REQUIRE([AC_PROG_MAKE_SET])dnl
196AC_REQUIRE([AM_DEP_TRACK])dnl
197AC_REQUIRE([AM_SET_DEPDIR])dnl
198AC_PROVIDE_IFELSE([AC_PROG_][CC],
199                  [_AM_DEPENDENCIES(CC)],
200                  [define([AC_PROG_][CC],
201                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
202AC_PROVIDE_IFELSE([AC_PROG_][CXX],
203                  [_AM_DEPENDENCIES(CXX)],
204                  [define([AC_PROG_][CXX],
205                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
206])
207
208#
209# Check to make sure that the build environment is sane.
210#
211
212# serial 3
213
214# AM_SANITY_CHECK
215# ---------------
216AC_DEFUN([AM_SANITY_CHECK],
217[AC_MSG_CHECKING([whether build environment is sane])
218# Just in case
219sleep 1
220echo timestamp > conftest.file
221# Do `set' in a subshell so we don't clobber the current shell's
222# arguments.  Must try -L first in case configure is actually a
223# symlink; some systems play weird games with the mod time of symlinks
224# (eg FreeBSD returns the mod time of the symlink's containing
225# directory).
226if (
227   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
228   if test "$[*]" = "X"; then
229      # -L didn't work.
230      set X `ls -t $srcdir/configure conftest.file`
231   fi
232   rm -f conftest.file
233   if test "$[*]" != "X $srcdir/configure conftest.file" \
234      && test "$[*]" != "X conftest.file $srcdir/configure"; then
235
236      # If neither matched, then we have a broken ls.  This can happen
237      # if, for instance, CONFIG_SHELL is bash and it inherits a
238      # broken ls alias from the environment.  This has actually
239      # happened.  Such a system could not be considered "sane".
240      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
241alias in your environment])
242   fi
243
244   test "$[2]" = conftest.file
245   )
246then
247   # Ok.
248   :
249else
250   AC_MSG_ERROR([newly created file is older than distributed files!
251Check your system clock])
252fi
253AC_MSG_RESULT(yes)])
254
255
256# serial 2
257
258# AM_MISSING_PROG(NAME, PROGRAM)
259# ------------------------------
260AC_DEFUN([AM_MISSING_PROG],
261[AC_REQUIRE([AM_MISSING_HAS_RUN])
262$1=${$1-"${am_missing_run}$2"}
263AC_SUBST($1)])
264
265
266# AM_MISSING_HAS_RUN
267# ------------------
268# Define MISSING if not defined so far and test if it supports --run.
269# If it does, set am_missing_run to use it, otherwise, to nothing.
270AC_DEFUN([AM_MISSING_HAS_RUN],
271[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
272test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
273# Use eval to expand $SHELL
274if eval "$MISSING --run true"; then
275  am_missing_run="$MISSING --run "
276else
277  am_missing_run=
278  am_backtick='`'
279  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
280fi
281])
282
283# AM_AUX_DIR_EXPAND
284
285# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
286# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
287# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
288#
289# Of course, Automake must honor this variable whenever it calls a
290# tool from the auxiliary directory.  The problem is that $srcdir (and
291# therefore $ac_aux_dir as well) can be either absolute or relative,
292# depending on how configure is run.  This is pretty annoying, since
293# it makes $ac_aux_dir quite unusable in subdirectories: in the top
294# source directory, any form will work fine, but in subdirectories a
295# relative path needs to be adjusted first.
296#
297# $ac_aux_dir/missing
298#    fails when called from a subdirectory if $ac_aux_dir is relative
299# $top_srcdir/$ac_aux_dir/missing
300#    fails if $ac_aux_dir is absolute,
301#    fails when called from a subdirectory in a VPATH build with
302#          a relative $ac_aux_dir
303#
304# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
305# are both prefixed by $srcdir.  In an in-source build this is usually
306# harmless because $srcdir is `.', but things will broke when you
307# start a VPATH build or use an absolute $srcdir.
308#
309# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
310# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
311#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
312# and then we would define $MISSING as
313#   MISSING="\${SHELL} $am_aux_dir/missing"
314# This will work as long as MISSING is not called from configure, because
315# unfortunately $(top_srcdir) has no meaning in configure.
316# However there are other variables, like CC, which are often used in
317# configure, and could therefore not use this "fixed" $ac_aux_dir.
318#
319# Another solution, used here, is to always expand $ac_aux_dir to an
320# absolute PATH.  The drawback is that using absolute paths prevent a
321# configured tree to be moved without reconfiguration.
322
323AC_DEFUN([AM_AUX_DIR_EXPAND], [
324# expand $ac_aux_dir to an absolute path
325am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
326])
327
328# AM_PROG_INSTALL_SH
329# ------------------
330# Define $install_sh.
331AC_DEFUN([AM_PROG_INSTALL_SH],
332[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
333install_sh=${install_sh-"$am_aux_dir/install-sh"}
334AC_SUBST(install_sh)])
335
336# One issue with vendor `install' (even GNU) is that you can't
337# specify the program used to strip binaries.  This is especially
338# annoying in cross-compiling environments, where the build's strip
339# is unlikely to handle the host's binaries.
340# Fortunately install-sh will honor a STRIPPROG variable, so we
341# always use install-sh in `make install-strip', and initialize
342# STRIPPROG with the value of the STRIP variable (set by the user).
343AC_DEFUN([AM_PROG_INSTALL_STRIP],
344[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
345INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
346AC_SUBST([INSTALL_STRIP_PROGRAM])])
347
348# serial 4                                              -*- Autoconf -*-
349
350
351
352# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
353# written in clear, in which case automake, when reading aclocal.m4,
354# will think it sees a *use*, and therefore will trigger all it's
355# C support machinery.  Also note that it means that autoscan, seeing
356# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
357
358
359
360# _AM_DEPENDENCIES(NAME)
361# ---------------------
362# See how the compiler implements dependency checking.
363# NAME is "CC", "CXX" or "OBJC".
364# We try a few techniques and use that to set a single cache variable.
365#
366# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
367# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
368# dependency, and given that the user is not expected to run this macro,
369# just rely on AC_PROG_CC.
370AC_DEFUN([_AM_DEPENDENCIES],
371[AC_REQUIRE([AM_SET_DEPDIR])dnl
372AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
373AC_REQUIRE([AM_MAKE_INCLUDE])dnl
374AC_REQUIRE([AM_DEP_TRACK])dnl
375
376ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
377       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
378       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
379       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
380                   [depcc="$$1"   am_compiler_list=])
381
382AC_CACHE_CHECK([dependency style of $depcc],
383               [am_cv_$1_dependencies_compiler_type],
384[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
385  # We make a subdir and do the tests there.  Otherwise we can end up
386  # making bogus files that we don't know about and never remove.  For
387  # instance it was reported that on HP-UX the gcc test will end up
388  # making a dummy file named `D' -- because `-MD' means `put the output
389  # in D'.
390  mkdir conftest.dir
391  # Copy depcomp to subdir because otherwise we won't find it if we're
392  # using a relative directory.
393  cp "$am_depcomp" conftest.dir
394  cd conftest.dir
395
396  am_cv_$1_dependencies_compiler_type=none
397  if test "$am_compiler_list" = ""; then
398     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
399  fi
400  for depmode in $am_compiler_list; do
401    # We need to recreate these files for each test, as the compiler may
402    # overwrite some of them when testing with obscure command lines.
403    # This happens at least with the AIX C compiler.
404    echo '#include "conftest.h"' > conftest.c
405    echo 'int i;' > conftest.h
406    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
407
408    case $depmode in
409    nosideeffect)
410      # after this tag, mechanisms are not by side-effect, so they'll
411      # only be used when explicitly requested
412      if test "x$enable_dependency_tracking" = xyes; then
413        continue
414      else
415        break
416      fi
417      ;;
418    none) break ;;
419    esac
420    # We check with `-c' and `-o' for the sake of the "dashmstdout"
421    # mode.  It turns out that the SunPro C++ compiler does not properly
422    # handle `-M -o', and we need to detect this.
423    if depmode=$depmode \
424       source=conftest.c object=conftest.o \
425       depfile=conftest.Po tmpdepfile=conftest.TPo \
426       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
427       grep conftest.h conftest.Po > /dev/null 2>&1 &&
428       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
429      am_cv_$1_dependencies_compiler_type=$depmode
430      break
431    fi
432  done
433
434  cd ..
435  rm -rf conftest.dir
436else
437  am_cv_$1_dependencies_compiler_type=none
438fi
439])
440$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
441AC_SUBST([$1DEPMODE])
442])
443
444
445# AM_SET_DEPDIR
446# -------------
447# Choose a directory name for dependency files.
448# This macro is AC_REQUIREd in _AM_DEPENDENCIES
449AC_DEFUN([AM_SET_DEPDIR],
450[rm -f .deps 2>/dev/null
451mkdir .deps 2>/dev/null
452if test -d .deps; then
453  DEPDIR=.deps
454else
455  # MS-DOS does not allow filenames that begin with a dot.
456  DEPDIR=_deps
457fi
458rmdir .deps 2>/dev/null
459AC_SUBST(DEPDIR)
460])
461
462
463# AM_DEP_TRACK
464# ------------
465AC_DEFUN([AM_DEP_TRACK],
466[AC_ARG_ENABLE(dependency-tracking,
467[  --disable-dependency-tracking Speeds up one-time builds
468  --enable-dependency-tracking  Do not reject slow dependency extractors])
469if test "x$enable_dependency_tracking" != xno; then
470  am_depcomp="$ac_aux_dir/depcomp"
471  AMDEPBACKSLASH='\'
472fi
473AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
474pushdef([subst], defn([AC_SUBST]))
475subst(AMDEPBACKSLASH)
476popdef([subst])
477])
478
479# Generate code to set up dependency tracking.
480# This macro should only be invoked once -- use via AC_REQUIRE.
481# Usage:
482# AM_OUTPUT_DEPENDENCY_COMMANDS
483
484#
485# This code is only required when automatic dependency tracking
486# is enabled.  FIXME.  This creates each `.P' file that we will
487# need in order to bootstrap the dependency handling code.
488AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
489AC_OUTPUT_COMMANDS([
490test x"$AMDEP_TRUE" != x"" ||
491for mf in $CONFIG_FILES; do
492  case "$mf" in
493  Makefile) dirpart=.;;
494  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
495  *) continue;;
496  esac
497  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
498  # Extract the definition of DEP_FILES from the Makefile without
499  # running `make'.
500  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
501  test -z "$DEPDIR" && continue
502  # When using ansi2knr, U may be empty or an underscore; expand it
503  U=`sed -n -e '/^U = / s///p' < "$mf"`
504  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
505  # We invoke sed twice because it is the simplest approach to
506  # changing $(DEPDIR) to its actual value in the expansion.
507  for file in `sed -n -e '
508    /^DEP_FILES = .*\\\\$/ {
509      s/^DEP_FILES = //
510      :loop
511        s/\\\\$//
512        p
513        n
514        /\\\\$/ b loop
515      p
516    }
517    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
518       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
519    # Make sure the directory exists.
520    test -f "$dirpart/$file" && continue
521    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
522    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
523    # echo "creating $dirpart/$file"
524    echo '# dummy' > "$dirpart/$file"
525  done
526done
527], [AMDEP_TRUE="$AMDEP_TRUE"
528ac_aux_dir="$ac_aux_dir"])])
529
530# AM_MAKE_INCLUDE()
531# -----------------
532# Check to see how make treats includes.
533AC_DEFUN([AM_MAKE_INCLUDE],
534[am_make=${MAKE-make}
535cat > confinc << 'END'
536doit:
537        @echo done
538END
539# If we don't find an include directive, just comment out the code.
540AC_MSG_CHECKING([for style of include used by $am_make])
541am__include='#'
542am__quote=
543_am_result=none
544# First try GNU make style include.
545echo "include confinc" > confmf
546# We grep out `Entering directory' and `Leaving directory'
547# messages which can occur if `w' ends up in MAKEFLAGS.
548# In particular we don't look at `^make:' because GNU make might
549# be invoked under some other name (usually "gmake"), in which
550# case it prints its new name instead of `make'.
551if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
552   am__include=include
553   am__quote=
554   _am_result=GNU
555fi
556# Now try BSD make style include.
557if test "$am__include" = "#"; then
558   echo '.include "confinc"' > confmf
559   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
560      am__include=.include
561      am__quote='"'
562      _am_result=BSD
563   fi
564fi
565AC_SUBST(am__include)
566AC_SUBST(am__quote)
567AC_MSG_RESULT($_am_result)
568rm -f confinc confmf
569])
570
571# serial 3
572
573# AM_CONDITIONAL(NAME, SHELL-CONDITION)
574# -------------------------------------
575# Define a conditional.
576#
577# FIXME: Once using 2.50, use this:
578# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
579AC_DEFUN([AM_CONDITIONAL],
580[ifelse([$1], [TRUE],
581        [errprint(__file__:__line__: [$0: invalid condition: $1
582])dnl
583m4exit(1)])dnl
584ifelse([$1], [FALSE],
585       [errprint(__file__:__line__: [$0: invalid condition: $1
586])dnl
587m4exit(1)])dnl
588AC_SUBST([$1_TRUE])
589AC_SUBST([$1_FALSE])
590if $2; then
591  $1_TRUE=
592  $1_FALSE='#'
593else
594  $1_TRUE='#'
595  $1_FALSE=
596fi])
597
598
599# serial 1
600
601AC_DEFUN([AM_C_PROTOTYPES],
602[AC_REQUIRE([AM_PROG_CC_STDC])
603AC_REQUIRE([AC_PROG_CPP])
604AC_MSG_CHECKING([for function prototypes])
605if test "$am_cv_prog_cc_stdc" != no; then
606  AC_MSG_RESULT(yes)
607  AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
608  U= ANSI2KNR=
609else
610  AC_MSG_RESULT(no)
611  U=_ ANSI2KNR=./ansi2knr
612fi
613# Ensure some checks needed by ansi2knr itself.
614AC_HEADER_STDC
615AC_CHECK_HEADERS(string.h)
616AC_SUBST(U)dnl
617AC_SUBST(ANSI2KNR)dnl
618])
619
620
621# serial 1
622
623# @defmac AC_PROG_CC_STDC
624# @maindex PROG_CC_STDC
625# @ovindex CC
626# If the C compiler in not in ANSI C mode by default, try to add an option
627# to output variable @code{CC} to make it so.  This macro tries various
628# options that select ANSI C on some system or another.  It considers the
629# compiler to be in ANSI C mode if it handles function prototypes correctly.
630#
631# If you use this macro, you should check after calling it whether the C
632# compiler has been set to accept ANSI C; if not, the shell variable
633# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
634# code in ANSI C, you can make an un-ANSIfied copy of it by using the
635# program @code{ansi2knr}, which comes with Ghostscript.
636# @end defmac
637
638AC_DEFUN([AM_PROG_CC_STDC],
639[AC_REQUIRE([AC_PROG_CC])
640AC_BEFORE([$0], [AC_C_INLINE])
641AC_BEFORE([$0], [AC_C_CONST])
642dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
643dnl a magic option to avoid problems with ANSI preprocessor commands
644dnl like #elif.
645dnl FIXME: can't do this because then AC_AIX won't work due to a
646dnl circular dependency.
647dnl AC_BEFORE([$0], [AC_PROG_CPP])
648AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
649AC_CACHE_VAL(am_cv_prog_cc_stdc,
650[am_cv_prog_cc_stdc=no
651ac_save_CC="$CC"
652# Don't try gcc -ansi; that turns off useful extensions and
653# breaks some systems' header files.
654# AIX                   -qlanglvl=ansi
655# Ultrix and OSF/1      -std1
656# HP-UX 10.20 and later -Ae
657# HP-UX older versions  -Aa -D_HPUX_SOURCE
658# SVR4                  -Xc -D__EXTENSIONS__
659for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
660do
661  CC="$ac_save_CC $ac_arg"
662  AC_TRY_COMPILE(
663[#include <stdarg.h>
664#include <stdio.h>
665#include <sys/types.h>
666#include <sys/stat.h>
667/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
668struct buf { int x; };
669FILE * (*rcsopen) (struct buf *, struct stat *, int);
670static char *e (p, i)
671     char **p;
672     int i;
673{
674  return p[i];
675}
676static char *f (char * (*g) (char **, int), char **p, ...)
677{
678  char *s;
679  va_list v;
680  va_start (v,p);
681  s = g (p, va_arg (v,int));
682  va_end (v);
683  return s;
684}
685int test (int i, double x);
686struct s1 {int (*f) (int a);};
687struct s2 {int (*f) (double a);};
688int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
689int argc;
690char **argv;
691], [
692return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
693],
694[am_cv_prog_cc_stdc="$ac_arg"; break])
695done
696CC="$ac_save_CC"
697])
698if test -z "$am_cv_prog_cc_stdc"; then
699  AC_MSG_RESULT([none needed])
700else
701  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
702fi
703case "x$am_cv_prog_cc_stdc" in
704  x|xno) ;;
705  *) CC="$CC $am_cv_prog_cc_stdc" ;;
706esac
707])
708
Note: See TracBrowser for help on using the repository browser.