1 # aclocal.m4 generated automatically by aclocal 1.5
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.
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
14 AC_DEFUN(hs_ULONG_CONST,
15 [ AC_EGREP_CPP(Circus,
16 [#define ACAT(a,b)a ## b
18 ], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
20 [#define RCAT(a,b)a/**/b
22 ], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
23 AC_MSG_ERROR([How do we create an unsigned long constant?])))])
24 dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
26 dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
27 dnl variable, taking care of fixing up ${prefix} and such.
29 dnl Note that the 3 argument form is only supported with autoconf 2.13 and
30 dnl later (i.e. only where AC_DEFINE supports 3 arguments).
34 dnl AC_DEFINE_DIR(DATADIR, datadir)
35 dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
38 dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
40 AC_DEFUN(AC_DEFINE_DIR, [
42 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
43 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
47 AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
48 AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
51 # Like AC_CONFIG_HEADER, but automatically create stamp file.
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 "/".
62 AC_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
72 AC_CONFIG_HEADERS(_AM_File,
73 dnl COMMANDS, [, INIT-CMDS]
74 [# update the timestamp
75 echo 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])
80 ifelse(patsubst([$1], [[^ ]], []),
82 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
83 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
86 case " \$CONFIG_HEADERS " in
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
98 echo timestamp > "\$am_dir"stamp-h\$am_indx
101 am_indx=\`expr \$am_indx + 1\`
103 ])]) # AM_CONFIG_HEADER
107 # Like AS_DIRNAME, only do it during macro expansion
108 AC_DEFUN([_AM_DIRNAME],
109 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
110 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
111 m4_if(m4_regexp([$1], [^/.*]), -1,
113 m4_patsubst([$1], [^\(/\).*], [\1])),
114 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
115 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
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.
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...
131 # We require 2.13 because we rely on SHELL being computed by configure.
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.
141 ifdef([AC_PROVIDE_IFELSE],
143 [define([AC_PROVIDE_IFELSE],
144 [ifdef([AC_PROVIDE_$1],
148 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
149 # ----------------------------------------------
150 AC_DEFUN([AM_INIT_AUTOMAKE],
151 [AC_REQUIRE([AC_PROG_INSTALL])dnl
152 # test to see if srcdir already configured
153 if 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])
158 # Define the identity of the package.
164 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
165 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
167 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
168 # the ones we care about.
169 ifdef([m4_pattern_allow],
170 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
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
176 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
177 # requests that it be used. This is a bit dumb.
181 # Some tools Automake needs.
182 AC_REQUIRE([AM_SANITY_CHECK])dnl
183 AC_REQUIRE([AC_ARG_PROGRAM])dnl
184 AM_MISSING_PROG(ACLOCAL, aclocal)
185 AM_MISSING_PROG(AUTOCONF, autoconf)
186 AM_MISSING_PROG(AUTOMAKE, automake)
187 AM_MISSING_PROG(AUTOHEADER, autoheader)
188 AM_MISSING_PROG(MAKEINFO, makeinfo)
189 AM_MISSING_PROG(AMTAR, tar)
191 AM_PROG_INSTALL_STRIP
192 # We need awk for the "check" target. The system "awk" is bad on
194 AC_REQUIRE([AC_PROG_AWK])dnl
195 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
196 AC_REQUIRE([AM_DEP_TRACK])dnl
197 AC_REQUIRE([AM_SET_DEPDIR])dnl
198 AC_PROVIDE_IFELSE([AC_PROG_][CC],
199 [_AM_DEPENDENCIES(CC)],
200 [define([AC_PROG_][CC],
201 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
202 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
203 [_AM_DEPENDENCIES(CXX)],
204 [define([AC_PROG_][CXX],
205 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
209 # Check to make sure that the build environment is sane.
216 AC_DEFUN([AM_SANITY_CHECK],
217 [AC_MSG_CHECKING([whether build environment is sane])
220 echo 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
227 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
228 if test "$[*]" = "X"; then
230 set X `ls -t $srcdir/configure conftest.file`
233 if test "$[*]" != "X $srcdir/configure conftest.file" \
234 && test "$[*]" != "X conftest.file $srcdir/configure"; then
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
241 alias in your environment])
244 test "$[2]" = conftest.file
250 AC_MSG_ERROR([newly created file is older than distributed files!
251 Check your system clock])
258 # AM_MISSING_PROG(NAME, PROGRAM)
259 # ------------------------------
260 AC_DEFUN([AM_MISSING_PROG],
261 [AC_REQUIRE([AM_MISSING_HAS_RUN])
262 $1=${$1-"${am_missing_run}$2"}
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.
270 AC_DEFUN([AM_MISSING_HAS_RUN],
271 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
272 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
273 # Use eval to expand $SHELL
274 if eval "$MISSING --run true"; then
275 am_missing_run="$MISSING --run "
279 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
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/../..'.
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.
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
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.
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.
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.
323 AC_DEFUN([AM_AUX_DIR_EXPAND], [
324 # expand $ac_aux_dir to an absolute path
325 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
330 # Define $install_sh.
331 AC_DEFUN([AM_PROG_INSTALL_SH],
332 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
333 install_sh=${install_sh-"$am_aux_dir/install-sh"}
334 AC_SUBST(install_sh)])
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).
343 AC_DEFUN([AM_PROG_INSTALL_STRIP],
344 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
345 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
346 AC_SUBST([INSTALL_STRIP_PROGRAM])])
348 # serial 4 -*- Autoconf -*-
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...
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.
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.
370 AC_DEFUN([_AM_DEPENDENCIES],
371 [AC_REQUIRE([AM_SET_DEPDIR])dnl
372 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
373 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
374 AC_REQUIRE([AM_DEP_TRACK])dnl
376 ifelse([$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=])
382 AC_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
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
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`
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
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
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
437 am_cv_$1_dependencies_compiler_type=none
440 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
441 AC_SUBST([$1DEPMODE])
447 # Choose a directory name for dependency files.
448 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
449 AC_DEFUN([AM_SET_DEPDIR],
450 [rm -f .deps 2>/dev/null
451 mkdir .deps 2>/dev/null
452 if test -d .deps; then
455 # MS-DOS does not allow filenames that begin with a dot.
458 rmdir .deps 2>/dev/null
465 AC_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])
469 if test "x$enable_dependency_tracking" != xno; then
470 am_depcomp="$ac_aux_dir/depcomp"
473 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
474 pushdef([subst], defn([AC_SUBST]))
475 subst(AMDEPBACKSLASH)
479 # Generate code to set up dependency tracking.
480 # This macro should only be invoked once -- use via AC_REQUIRE.
482 # AM_OUTPUT_DEPENDENCY_COMMANDS
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.
488 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
490 test x"$AMDEP_TRUE" != x"" ||
491 for mf in $CONFIG_FILES; do
493 Makefile) dirpart=.;;
494 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
497 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
498 # Extract the definition of DEP_FILES from the Makefile without
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 = .*\\\\$/ {
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"
527 ], [AMDEP_TRUE="$AMDEP_TRUE"
528 ac_aux_dir="$ac_aux_dir"])])
532 # Check to see how make treats includes.
533 AC_DEFUN([AM_MAKE_INCLUDE],
534 [am_make=${MAKE-make}
535 cat > confinc << 'END'
539 # If we don't find an include directive, just comment out the code.
540 AC_MSG_CHECKING([for style of include used by $am_make])
544 # First try GNU make style include.
545 echo "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'.
551 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
556 # Now try BSD make style include.
557 if test "$am__include" = "#"; then
558 echo '.include "confinc"' > confmf
559 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
565 AC_SUBST(am__include)
567 AC_MSG_RESULT($_am_result)
573 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
574 # -------------------------------------
575 # Define a conditional.
577 # FIXME: Once using 2.50, use this:
578 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
579 AC_DEFUN([AM_CONDITIONAL],
580 [ifelse([$1], [TRUE],
581 [errprint(__file__:__line__: [$0: invalid condition: $1
584 ifelse([$1], [FALSE],
585 [errprint(__file__:__line__: [$0: invalid condition: $1
601 AC_DEFUN([AM_C_PROTOTYPES],
602 [AC_REQUIRE([AM_PROG_CC_STDC])
603 AC_REQUIRE([AC_PROG_CPP])
604 AC_MSG_CHECKING([for function prototypes])
605 if test "$am_cv_prog_cc_stdc" != no; then
607 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
611 U=_ ANSI2KNR=./ansi2knr
613 # Ensure some checks needed by ansi2knr itself.
615 AC_CHECK_HEADERS(string.h)
617 AC_SUBST(ANSI2KNR)dnl
623 # @defmac AC_PROG_CC_STDC
624 # @maindex PROG_CC_STDC
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.
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.
638 AC_DEFUN([AM_PROG_CC_STDC],
639 [AC_REQUIRE([AC_PROG_CC])
640 AC_BEFORE([$0], [AC_C_INLINE])
641 AC_BEFORE([$0], [AC_C_CONST])
642 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
643 dnl a magic option to avoid problems with ANSI preprocessor commands
645 dnl FIXME: can't do this because then AC_AIX won't work due to a
646 dnl circular dependency.
647 dnl AC_BEFORE([$0], [AC_PROG_CPP])
648 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
649 AC_CACHE_VAL(am_cv_prog_cc_stdc,
650 [am_cv_prog_cc_stdc=no
652 # Don't try gcc -ansi; that turns off useful extensions and
653 # breaks some systems' header files.
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__
659 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
661 CC="$ac_save_CC $ac_arg"
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. */
668 struct buf { int x; };
669 FILE * (*rcsopen) (struct buf *, struct stat *, int);
670 static char *e (p, i)
676 static char *f (char * (*g) (char **, int), char **p, ...)
681 s = g (p, va_arg (v,int));
685 int test (int i, double x);
686 struct s1 {int (*f) (int a);};
687 struct s2 {int (*f) (double a);};
688 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
692 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
694 [am_cv_prog_cc_stdc="$ac_arg"; break])
698 if test -z "$am_cv_prog_cc_stdc"; then
699 AC_MSG_RESULT([none needed])
701 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
703 case "x$am_cv_prog_cc_stdc" in
705 *) CC="$CC $am_cv_prog_cc_stdc" ;;