annotate m4/alloca.m4 @ 285:9010796c6253 2.3 2.3.1

Generated manual for distribution
author lost
date Fri, 24 Apr 2009 22:36:09 +0000
parents 2cb097e760a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
1 # alloca.m4 serial 8
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
2 dnl Copyright (C) 2002-2004, 2006, 2007 Free Software Foundation, Inc.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
6
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_ALLOCA],
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
8 [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
9 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
10 AC_REQUIRE([AC_PROG_CPP])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
11 AC_REQUIRE([AC_PROG_EGREP])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
12
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
13 AC_REQUIRE([AC_FUNC_ALLOCA])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
14 if test $ac_cv_func_alloca_works = no; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
15 gl_PREREQ_ALLOCA
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
16 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
17
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
18 # Define an additional variable used in the Makefile substitution.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
19 if test $ac_cv_working_alloca_h = yes; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
20 AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
21 AC_EGREP_CPP([Need own alloca], [
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
22 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
23 Need own alloca
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
24 #endif
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
25 ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
26 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
27 if test $gl_cv_rpl_alloca = yes; then
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
28 dnl OK, alloca can be implemented through a compiler built-in.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
29 AC_DEFINE([HAVE_ALLOCA], 1,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
30 [Define to 1 if you have 'alloca' after including <alloca.h>,
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
31 a header that may be supplied by this distribution.])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
32 ALLOCA_H=alloca.h
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
33 else
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
34 dnl alloca exists as a library function, i.e. it is slow and probably
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
35 dnl a memory leak. Don't define HAVE_ALLOCA in this case.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
36 ALLOCA_H=
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
37 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
38 else
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
39 ALLOCA_H=alloca.h
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
40 fi
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
41 AC_SUBST([ALLOCA_H])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
42 ])
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
43
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
44 # Prerequisites of lib/alloca.c.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
45 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
2cb097e760a5 Added various generated files in prep for release
lost
parents:
diff changeset
46 AC_DEFUN([gl_PREREQ_ALLOCA], [:])