Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/alloca.m4 @ 5063:1aecdc8063ba
alloca cleanup: always include <alloca.h>.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 17 May 2004 05:41:42 +0000 |
parents | 069117fb861f |
children | 87c42e194f4a |
rev | line source |
---|---|
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
1 # alloca.m4 serial 4 |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
2 dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 dnl This file is free software, distributed under the terms of the GNU |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 dnl General Public License. As a special exception to the GNU General |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 dnl Public License, this file may be distributed as part of a program |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 dnl that contains a configuration script generated by Autoconf, under |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 dnl the same distribution terms as the rest of that program. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 AC_DEFUN([gl_FUNC_ALLOCA], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 [ |
4184
bd50be83d452
Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents:
4156
diff
changeset
|
11 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. |
bd50be83d452
Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents:
4156
diff
changeset
|
12 AC_REQUIRE([AC_PROG_CPP]) |
bd50be83d452
Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents:
4156
diff
changeset
|
13 AC_REQUIRE([AC_PROG_EGREP]) |
bd50be83d452
Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents:
4156
diff
changeset
|
14 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 AC_REQUIRE([AC_FUNC_ALLOCA]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 if test $ac_cv_func_alloca_works = no; then |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 gl_PREREQ_ALLOCA |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 fi |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
19 |
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
20 # Define an additional variable used in the Makefile substitution. |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
21 if test $ac_cv_working_alloca_h = yes; then |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
22 AC_EGREP_CPP([Need own alloca], [ |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
23 #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
24 Need own alloca |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
25 #endif |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
26 ], |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
27 [AC_DEFINE(HAVE_ALLOCA, 1, |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
28 [Define to 1 if you have `alloca' after including <alloca.h>, |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
29 a header that may be supplied by this distribution.]) |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
30 ALLOCA_H=alloca.h], |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
31 [ALLOCA_H=]) |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
32 else |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
33 ALLOCA_H=alloca.h |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
34 fi |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
35 AC_SUBST([ALLOCA_H]) |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
36 |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
37 AC_DEFINE(HAVE_ALLOCA_H, 1, |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
38 [Define HAVE_ALLOCA_H for backward compatibility with older code |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
39 that includes <alloca.h> only if HAVE_ALLOCA_H is defined.]) |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 # Prerequisites of lib/alloca.c. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. |
4631 | 44 AC_DEFUN([gl_PREREQ_ALLOCA], [:]) |