Mercurial > hg > octave-shane > gnulib-hg
annotate m4/alloca.m4 @ 7659:e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
random "(cached)" in configure output.
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Wed, 15 Nov 2006 18:13:04 +0000 |
parents | a0dfb5334b53 |
children | 8c905c6c16a0 |
rev | line source |
---|---|
7659
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
1 # alloca.m4 serial 7 |
7535 | 2 dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5063
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5063
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5063
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 AC_DEFUN([gl_FUNC_ALLOCA], |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 [ |
4184
bd50be83d452
Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents:
4156
diff
changeset
|
9 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
|
10 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
|
11 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
|
12 |
4107
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 AC_REQUIRE([AC_FUNC_ALLOCA]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 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
|
15 gl_PREREQ_ALLOCA |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 fi |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
17 |
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
18 # 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
|
19 if test $ac_cv_working_alloca_h = yes; then |
7659
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
20 AC_CACHE_CHECK([whether alloca must be replaced], [gl_cv_rpl_alloca], [ |
7535 | 21 AC_EGREP_CPP([Need own alloca], [ |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
22 #if defined __GNUC__ || defined _AIX || defined _MSC_VER |
7659
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
23 Need own alloca |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
24 #endif |
7659
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
25 ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) |
7535 | 26 ]) |
27 if test $gl_cv_rpl_alloca = yes; then | |
28 AC_DEFINE([HAVE_ALLOCA], 1, | |
7659
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
29 [Define to 1 if you have `alloca' after including <alloca.h>, |
e2febe678452
* m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents:
7535
diff
changeset
|
30 a header that may be supplied by this distribution.]) |
7535 | 31 ALLOCA_H=alloca.h |
32 else | |
33 ALLOCA_H= | |
34 fi | |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
35 else |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
36 ALLOCA_H=alloca.h |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
37 fi |
4156
99ea86c79f44
Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents:
4107
diff
changeset
|
38 AC_SUBST([ALLOCA_H]) |
5063
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
39 |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
40 AC_DEFINE(HAVE_ALLOCA_H, 1, |
1aecdc8063ba
alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4631
diff
changeset
|
41 [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
|
42 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
|
43 ]) |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 # Prerequisites of lib/alloca.c. |
7c1a6b73f48e
An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. |
4631 | 47 AC_DEFUN([gl_PREREQ_ALLOCA], [:]) |