annotate m4/alloca.m4 @ 272:d5392bb5da3c 2.5

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