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.
9 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
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)]))
20 #define alloca __builtin_alloca
24 #define alloca _alloca
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()])