]> www.ginac.de Git - cln.git/blob - m4/alloca.m4
Remove the conversion step .tex -> .texi.
[cln.git] / m4 / alloca.m4
1 dnl -*- Autoconf -*-
2 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License.  As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
8
9 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
10
11 AC_PREREQ(2.57)
12
13 AC_DEFUN([CL_ALLOCA],
14 [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15 # for constant arguments.  Useless!
16 CL_LINK_CHECK(working alloca.h, cl_cv_header_alloca_h,
17 [#include <alloca.h>], [char *p = (char *) alloca(2 * sizeof(int));],
18 AC_DEFINE(HAVE_ALLOCA_H,,[have <alloca.h> and it should be used (not Ultrix)]))
19 decl="#ifdef __GNUC__
20 #define alloca __builtin_alloca
21 #else
22 #ifdef _MSC_VER
23 #include <malloc.h>
24 #define alloca _alloca
25 #else
26 #ifdef HAVE_ALLOCA_H
27 #include <alloca.h>
28 #else
29 #ifdef _AIX
30  #pragma alloca
31 #else
32 #ifndef alloca
33 char *alloca ();
34 #endif
35 #endif
36 #endif
37 #endif
38 #endif
39 "
40 CL_LINK_CHECK([alloca], cl_cv_func_alloca,
41 $decl, [char *p = (char *) alloca(1);],
42  , [alloca_missing=1])dnl
43 if test -n "$alloca_missing"; then
44   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
45   # that cause trouble.  Some versions do not even contain alloca or
46   # contain a buggy version.  If you still want to use their alloca,
47   # use ar to extract alloca.o from them instead of compiling alloca.c.
48   ALLOCA=alloca.${ac_objext}
49   AC_DEFINE(NO_ALLOCA,,[need to link with an external alloca.o when using alloca()])
50 fi
51 AC_SUBST(ALLOCA)dnl
52 ])